shrine 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of shrine might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 25b8acff9f68f0cc11cbadc0eeb39a5bdcf839d1
4
- data.tar.gz: 666390819abcf036b20f46ecf04b1a30fef68a28
3
+ metadata.gz: 2a35f41e1e5941af4a9f726f6ff2057a3a65203f
4
+ data.tar.gz: 17d53c374878d16e8d20f5c5e6819fb90bb45888
5
5
  SHA512:
6
- metadata.gz: be25b88ca4629b8a1e052ed442b5530d1661a0f23a4d3d7cb0cb2e6f6538379c1a46a22e921091a3a718755e1f4378bd97a25312bde436134cdd3ac0ba487194
7
- data.tar.gz: cf90025e05a3f0790bde9ba0763a66e75c6aba48a1b5586a4a814947693154d1a345ae90c447341f349cf9e3abf29a62e2fe6ab211993fc1685ad38cef479b33
6
+ metadata.gz: 0ba8c4a7b7e65caa42e101a3197aa18fc9039c0b72abe82dc7d77641935ccfa5aa7f906d1ad6d1e1cad63aeb017d471d48df8646c5ead787ecea9ca2730cd2fd
7
+ data.tar.gz: accad9b2d8743585c20ec36dac4f9d73b664bd6ab63687caf2ceb13c1536f4b185165d74c45e79ad43a5aee08cdc251240f8bed9f6e8567a92fc505f8a917279
data/lib/shrine.rb CHANGED
@@ -127,8 +127,8 @@ class Shrine
127
127
  def plugin(plugin, *args, &block)
128
128
  plugin = Plugins.load_plugin(plugin) if plugin.is_a?(Symbol)
129
129
  plugin.load_dependencies(self, *args, &block) if plugin.respond_to?(:load_dependencies)
130
- include(plugin::InstanceMethods) if defined?(plugin::InstanceMethods)
131
- extend(plugin::ClassMethods) if defined?(plugin::ClassMethods)
130
+ self.include(plugin::InstanceMethods) if defined?(plugin::InstanceMethods)
131
+ self.extend(plugin::ClassMethods) if defined?(plugin::ClassMethods)
132
132
  self::UploadedFile.include(plugin::FileMethods) if defined?(plugin::FileMethods)
133
133
  self::UploadedFile.extend(plugin::FileClassMethods) if defined?(plugin::FileClassMethods)
134
134
  self::Attachment.include(plugin::AttachmentMethods) if defined?(plugin::AttachmentMethods)
@@ -16,7 +16,7 @@ class Shrine
16
16
  # Any additional URL options will be present in the `context` hash.
17
17
  module DefaultUrl
18
18
  def self.configure(uploader, &block)
19
- uploader.opts[:default_url] = block
19
+ uploader.opts[:default_url] = block if block
20
20
  end
21
21
 
22
22
  module AttacherMethods
@@ -8,7 +8,7 @@ class Shrine
8
8
  # The default options are merged with options passed to `UploadedFile#url`,
9
9
  # and the latter will always have precedence over default options.
10
10
  module DefaultUrlOptions
11
- def self.configure(uploader, **options)
11
+ def self.configure(uploader, options = {})
12
12
  uploader.opts[:default_url_options] = (uploader.opts[:default_url_options] || {}).merge(options)
13
13
  end
14
14
 
@@ -17,8 +17,7 @@ class Shrine
17
17
  # end
18
18
  module UploadOptions
19
19
  def self.configure(uploader, options = {})
20
- uploader.opts[:upload_options] ||= {}
21
- options.each { |key, value| uploader.opts[:upload_options][key] = value }
20
+ uploader.opts[:upload_options] = (uploader.opts[:upload_options] || {}).merge(options)
22
21
  end
23
22
 
24
23
  module InstanceMethods
@@ -6,7 +6,7 @@ class Shrine
6
6
  module VERSION
7
7
  MAJOR = 2
8
8
  MINOR = 0
9
- TINY = 0
9
+ TINY = 1
10
10
  PRE = nil
11
11
 
12
12
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
data/shrine.gemspec CHANGED
@@ -34,7 +34,7 @@ column, and tying them to record's lifecycle.
34
34
  gem.add_development_dependency "webmock"
35
35
  gem.add_development_dependency "rack-test_app"
36
36
  gem.add_development_dependency "dotenv"
37
- gem.add_development_dependency "shrine-memory"
37
+ gem.add_development_dependency "shrine-memory", "~> 0.2.0"
38
38
 
39
39
  gem.add_development_dependency "roda"
40
40
  gem.add_development_dependency "mimemagic"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shrine
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Janko Marohnić
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-19 00:00:00.000000000 Z
11
+ date: 2016-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: down
@@ -126,16 +126,16 @@ dependencies:
126
126
  name: shrine-memory
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ">="
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '0'
131
+ version: 0.2.0
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ">="
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '0'
138
+ version: 0.2.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: roda
141
141
  requirement: !ruby/object:Gem::Requirement