polygallery 0.0.9 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 88e9534f1c61c15956c2e2739dd6a2a655769ef9
4
- data.tar.gz: 2908cdc1082c6ddbe40b1d7ae98e17af7963384e
3
+ metadata.gz: 67e3aaed5e507354d277892e276cae6f38a38240
4
+ data.tar.gz: c166c46f2a3f765ec8a4bc5ac5b32893cef8f3d0
5
5
  SHA512:
6
- metadata.gz: 08fa013c59768b511455e4eaf601cc303bc67da57c662a077ffcb5c015627b2e490c9b15af7bda88fd01881acf98b32fb486e87fe4c78b286e566a177284676c
7
- data.tar.gz: 0f7a7ceb4f0a4a5483872ba2bc675f70e2e506330d90d691a92c85c2d4bd7a69a471c8cb463eba8b7ebb8e3d878ba29ffbb6b681dfbd0355cc13d5fcb66f73b1
6
+ metadata.gz: a3c98cf9f5fdc35ad298200a206a87acb176ab1a4915959fd46d01def276b9bbd9bf00569ae46329b65f975e8a14e34d3e454d0bcaabb045238fe7c5287cdf55
7
+ data.tar.gz: 73b73f7c137451a54c67cd7a4c8fece8748d47376cf2cdf6d98bf0fb5eeb3410e14ca845c76ee4031e4ba6d461a598b6bbc6ce86ba81997ce836558ac5ffefbf
@@ -52,5 +52,9 @@ module Polygallery
52
52
  end
53
53
  end
54
54
 
55
+ def default_options
56
+ @default_options ||= DEFAULTS
57
+ end
58
+
55
59
  end
56
60
  end
@@ -6,7 +6,7 @@ module Polygallery
6
6
  :default_url => '/images/:style/missing.png'
7
7
  }
8
8
  has_attached_file :photo,
9
- :styles => ->(a) { if a.instance.class_name then raise a.instance.class_name else PAPERCLIP_SETTINGS[:styles] end },# PAPERCLIP_SETTINGS[:styles],
9
+ :styles => PAPERCLIP_SETTINGS[:styles], # ->(a) { if a.instance.class.name then raise a.instance.class.name else PAPERCLIP_SETTINGS[:styles] end },
10
10
  :default_url => PAPERCLIP_SETTINGS[:default_url]
11
11
  validates_attachment_content_type :photo, :content_type => /\Aimage\/.*\Z/
12
12
  # validates_attachment_presence :photo # TODO: make this a setting
@@ -5,10 +5,17 @@ module Polygallery
5
5
  require 'rails'
6
6
 
7
7
  class Railtie < Rails::Railtie
8
+ # initializer "polygallery.configure_rails_initialization" do |app|
9
+ # app.middleware.use Railtie::
10
+ # end
8
11
  initializer "polygallery.insert_into_active_record" do |app|
9
12
  ActiveSupport.on_load :active_record do
10
13
  Polygallery::Railtie.insert
11
14
  end
15
+
16
+ if app.config.respond_to?(:polygallery_defaults)
17
+ Polygallery::Gallery.default_options.merge!(app.config.polygallery_defaults)
18
+ end
12
19
  end
13
20
  initializer "polygallery.view_helpers" do
14
21
  ActionView::Base.send :include, ViewHelpers
@@ -1,3 +1,3 @@
1
1
  module Polygallery
2
- VERSION = "0.0.9"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polygallery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - MacKinley Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-01 00:00:00.000000000 Z
11
+ date: 2014-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails