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 +4 -4
- data/app/models/polygallery/gallery.rb +4 -0
- data/app/models/polygallery/photo.rb +1 -1
- data/lib/polygallery/railtie.rb +7 -0
- data/lib/polygallery/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67e3aaed5e507354d277892e276cae6f38a38240
|
4
|
+
data.tar.gz: c166c46f2a3f765ec8a4bc5ac5b32893cef8f3d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3c98cf9f5fdc35ad298200a206a87acb176ab1a4915959fd46d01def276b9bbd9bf00569ae46329b65f975e8a14e34d3e454d0bcaabb045238fe7c5287cdf55
|
7
|
+
data.tar.gz: 73b73f7c137451a54c67cd7a4c8fece8748d47376cf2cdf6d98bf0fb5eeb3410e14ca845c76ee4031e4ba6d461a598b6bbc6ce86ba81997ce836558ac5ffefbf
|
@@ -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.
|
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
|
data/lib/polygallery/railtie.rb
CHANGED
@@ -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
|
data/lib/polygallery/version.rb
CHANGED
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
|
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-
|
11
|
+
date: 2014-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|