OSDN Git Service

add location mmd3dcu
authornomeu <nomeu@users.sourceforge.jp>
Tue, 17 May 2011 06:48:05 +0000 (15:48 +0900)
committernomeu <nomeu@users.sourceforge.jp>
Tue, 17 May 2011 06:48:05 +0000 (15:48 +0900)
app/models/arc.rb
bin/create-location-mmd3dcu.rb [new file with mode: 0644]

index 6524896..c02f561 100644 (file)
@@ -24,6 +24,8 @@ class Arc < ActiveRecord::Base
       "http://www9.atpages.jp/~mmdaccessory/uploader"
     when "accs"
       "http://www9.atpages.jp/~mmdaccessory/uploader2"
+    when "cu"
+      "http://cdn.3dcustom.net/MMDuploader"
     end
   end
 
@@ -45,6 +47,13 @@ class Arc < ActiveRecord::Base
       "#{site}/log/#{number}.#{extname}"
     when "accs"
       "#{site}/src/MMD#{code}.#{extname}.html"
+    when "cu"
+      if locked?
+        "#{site}/upload.cgi?mode=dl&file=#{number}"
+      else
+        fixed_number = '%05d' % number
+        "#{site}/src/MMD#{fixed_number}.#{extname}"
+      end
     end
   end
 
diff --git a/bin/create-location-mmd3dcu.rb b/bin/create-location-mmd3dcu.rb
new file mode 100644 (file)
index 0000000..6d259bb
--- /dev/null
@@ -0,0 +1 @@
+Location.create(:code => "mmd3dcu", :site => "http://cdn.3dcustom.net/MMDuploader/upload.html", :summary => "VPVPwiki向けアップローダ")