OSDN Git Service

update
authoryasushiito <yas@pen-chan.jp>
Tue, 3 Jan 2012 04:12:32 +0000 (13:12 +0900)
committeryasushiito <yas@pen-chan.jp>
Tue, 3 Jan 2012 04:12:32 +0000 (13:12 +0900)
config/environments/development.rb
config/environments/production.rb
config/routes.rb
lib/picture_io.rb

index bd57e43..1f7eb0e 100644 (file)
@@ -30,7 +30,6 @@ Pettanr::Application.configure do
   # Expands the lines which load the assets
   config.assets.debug = true
 end
-y = YAML.load(open(Rails.root + 'config/aws.yaml').read)
 
 require 'local_picture'
 PictureIO.setup do |config|
index 71c356d..25028e6 100644 (file)
@@ -71,4 +71,5 @@ require 's3_picture'
 PictureIO.setup do |config|
   config.original_picture_io = PictureIO::S3Picture.new 'pettanr-original'
   config.resource_picture_io = PictureIO::S3Picture.new 'pettanr-stable'
+  config.system_picture_io = PictureIO::S3Picture.new  'pettanr-system'
 end
index 0e0b2c6..fe47bc6 100644 (file)
@@ -19,6 +19,7 @@ Pettanr::Application.routes.draw do
   resources :lisences, only: [:index]
   resources :original_lisences
   resources :common_lisences
+  resources :system_pictures, except: [:new, :edit]
 
   # The priority is based upon order of creation:
   # first created -> highest priority.
@@ -32,6 +33,7 @@ Pettanr::Application.routes.draw do
   match 'help/(:action)', :controller => 'help'
   controller 'system' do
     get 'start'
+    get 'index'
 #    match 'start', :to => 'system#start'
   end
   
index 5ca2662..df49d0e 100644 (file)
@@ -1,6 +1,7 @@
 class PictureIO
   @@resource_picture_io #= LocalPicture.new
   @@original_picture_io #= LocalPicture.new Rails.root + 'original'
+  @@system_picture_io #= LocalPicture.new Rails.root + 'system'
   
   def self.original_picture_io
     @@original_picture_io
@@ -18,6 +19,14 @@ class PictureIO
     @@resource_picture_io = pclass
   end
   
+  def self.system_picture_io
+    @@system_picture_io
+  end
+  
+  def self.system_picture_io=(pclass)
+    @@system_picture_io = pclass
+  end
+  
   def self.setup
     yield self
   end