paperclip 4.3.4 → 4.3.5

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

Potentially problematic release.


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

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 83567677f13e381c3c2808fb4351ebe5ab1d9472
4
- data.tar.gz: c6b76b6377eb8635a698be2c4aca1c3fe803bf39
3
+ metadata.gz: 33906ec8f0fa8be6fd6df7df38d355a736cd574a
4
+ data.tar.gz: de38c7e728dcfc5e938115706b27ba716475b8f3
5
5
  SHA512:
6
- metadata.gz: 6d6985f2ea18d7b5924555ada101da7575603ccf3df435902e3388dc81750c4028a5abd9e8eaeff15b005716c86a9c066c7a172b11806278dde485abf0b7bd0c
7
- data.tar.gz: ee7e8530249f6015fc49d7cb45167490dd26f011177b273a7284773b965c375beb8a38692a885af12fba83ef1a55452e1dcc6f1ca51fb655ea2b560f4d4b7bf5
6
+ metadata.gz: 55a6e285fe1f1a7a32f4e15e05f73119047b3bbcb5e7c3bda18ef49c008d2cb2db4c407bf23b7d1da363f16a509cda486dbbee0d4de52e225d2497118231cc95
7
+ data.tar.gz: 8d85e18f6f1438538e8116cd93166362954700f8e4b31896b045cb1966ded6861d669b53057995caaa127a0918baed6076e414cdeab006e90678c78e434e360c
data/NEWS CHANGED
@@ -1,3 +1,6 @@
1
+ 4.3.5 (2/8/2016):
2
+ * Bug Fix: Remove deprecation warnings for v5.0 for now. Will re-add once the version has landed.
3
+
1
4
  4.3.4 (2/2/2016):
2
5
  * Bug Fix: Fix incompatible change from v4.3.3.
3
6
 
@@ -56,7 +56,6 @@ require 'paperclip/has_attached_file'
56
56
  require 'paperclip/attachment_registry'
57
57
  require 'paperclip/filename_cleaner'
58
58
  require 'paperclip/rails_environment'
59
- require "paperclip/deprecations"
60
59
 
61
60
  begin
62
61
  # Use mime/types/columnar if available, for reduced memory usage
@@ -192,7 +191,6 @@ module Paperclip
192
191
  # end
193
192
  # end
194
193
  def has_attached_file(name, options = {})
195
- Paperclip::Deprecations.check
196
194
  HasAttachedFile.define_on(self, name, options)
197
195
  end
198
196
  end
@@ -1,3 +1,3 @@
1
1
  module Paperclip
2
- VERSION = "4.3.4" unless defined? Paperclip::VERSION
2
+ VERSION = "4.3.5" unless defined? Paperclip::VERSION
3
3
  end
@@ -109,7 +109,6 @@ describe Paperclip do
109
109
 
110
110
  context "An ActiveRecord model with an 'avatar' attachment" do
111
111
  before do
112
- Paperclip::Deprecations.stubs(:check)
113
112
  rebuild_model path: "tmp/:class/omg/:style.:extension"
114
113
  @file = File.new(fixture_file("5k.png"), 'rb')
115
114
  end
@@ -151,10 +150,6 @@ describe Paperclip do
151
150
  end
152
151
  end
153
152
 
154
- it "calls Paperclip::Deprecations.check" do
155
- expect(Paperclip::Deprecations).to have_received(:check)
156
- end
157
-
158
153
  context "with a subclass" do
159
154
  before do
160
155
  class ::SubDummy < Dummy; end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paperclip
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.4
4
+ version: 4.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Yurek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-02 00:00:00.000000000 Z
11
+ date: 2016-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -429,7 +429,6 @@ files:
429
429
  - lib/paperclip/attachment_registry.rb
430
430
  - lib/paperclip/callbacks.rb
431
431
  - lib/paperclip/content_type_detector.rb
432
- - lib/paperclip/deprecations.rb
433
432
  - lib/paperclip/errors.rb
434
433
  - lib/paperclip/file_command_content_type_detector.rb
435
434
  - lib/paperclip/filename_cleaner.rb
@@ -500,7 +499,6 @@ files:
500
499
  - spec/paperclip/attachment_registry_spec.rb
501
500
  - spec/paperclip/attachment_spec.rb
502
501
  - spec/paperclip/content_type_detector_spec.rb
503
- - spec/paperclip/deprecations_spec.rb
504
502
  - spec/paperclip/file_command_content_type_detector_spec.rb
505
503
  - spec/paperclip/filename_cleaner_spec.rb
506
504
  - spec/paperclip/geometry_detector_spec.rb
@@ -552,7 +550,6 @@ files:
552
550
  - spec/paperclip/validators_spec.rb
553
551
  - spec/spec_helper.rb
554
552
  - spec/support/assertions.rb
555
- - spec/support/deprecations.rb
556
553
  - spec/support/fake_model.rb
557
554
  - spec/support/fake_rails.rb
558
555
  - spec/support/fixtures/12k.png
@@ -631,7 +628,6 @@ test_files:
631
628
  - spec/paperclip/attachment_registry_spec.rb
632
629
  - spec/paperclip/attachment_spec.rb
633
630
  - spec/paperclip/content_type_detector_spec.rb
634
- - spec/paperclip/deprecations_spec.rb
635
631
  - spec/paperclip/file_command_content_type_detector_spec.rb
636
632
  - spec/paperclip/filename_cleaner_spec.rb
637
633
  - spec/paperclip/geometry_detector_spec.rb
@@ -683,7 +679,6 @@ test_files:
683
679
  - spec/paperclip/validators_spec.rb
684
680
  - spec/spec_helper.rb
685
681
  - spec/support/assertions.rb
686
- - spec/support/deprecations.rb
687
682
  - spec/support/fake_model.rb
688
683
  - spec/support/fake_rails.rb
689
684
  - spec/support/fixtures/12k.png
@@ -1,42 +0,0 @@
1
- require "active_support/deprecation"
2
-
3
- module Paperclip
4
- class Deprecations
5
- class << self
6
- def check
7
- warn_aws_sdk_v1 if aws_sdk_v1?
8
- warn_outdated_rails if active_model_version < "4.2"
9
- end
10
-
11
- private
12
-
13
- def active_model_version
14
- ::ActiveModel::VERSION::STRING
15
- end
16
-
17
- def aws_sdk_v1?
18
- defined?(::AWS) && aws_sdk_version < "2"
19
- end
20
-
21
- def warn_aws_sdk_v1
22
- warn "[paperclip] [deprecation] AWS SDK v1 has been deprecated in " \
23
- "paperclip 5. Please consider upgrading to AWS 2 before " \
24
- "upgrading paperclip."
25
- end
26
-
27
- def warn_outdated_rails
28
- warn "[paperclip] [deprecation] Rails 3.2 and 4.1 are unsupported as " \
29
- "of Rails 5 release. Please upgrade to Rails 4.2 before " \
30
- "upgrading paperclip."
31
- end
32
-
33
- def aws_sdk_version
34
- ::AWS::VERSION
35
- end
36
-
37
- def warn(message)
38
- ActiveSupport::Deprecation.warn(message)
39
- end
40
- end
41
- end
42
- end
@@ -1,65 +0,0 @@
1
- require "spec_helper"
2
- require "aws-sdk"
3
- require "active_support/testing/deprecation"
4
-
5
- describe Paperclip::Deprecations do
6
- include ActiveSupport::Testing::Deprecation
7
-
8
- describe ".check" do
9
- before do
10
- ActiveSupport::Deprecation.silenced = false
11
- end
12
-
13
- after do
14
- ActiveSupport::Deprecation.silenced = true
15
- end
16
-
17
- context "when active model version is < 4.2" do
18
- it "displays deprecation warning" do
19
- Paperclip::Deprecations.stubs(:active_model_version).returns("4.1")
20
-
21
- assert_deprecated("Rails 3.2 and 4.1 are unsupported") do
22
- Paperclip::Deprecations.check
23
- end
24
- end
25
- end
26
-
27
- context "when active model version is 4.2" do
28
- it "do not display deprecation warning" do
29
- Paperclip::Deprecations.stubs(:active_model_version).returns("4.2")
30
-
31
- assert_not_deprecated do
32
- Paperclip::Deprecations.check
33
- end
34
- end
35
- end
36
-
37
- context "when aws sdk version is < 2" do
38
- before do
39
- ::AWS.stub! if !defined?(::AWS)
40
- end
41
-
42
- it "displays deprecation warning" do
43
- Paperclip::Deprecations.stubs(:aws_sdk_version).returns("1.68.0")
44
-
45
- assert_deprecated("AWS SDK v1 has been deprecated") do
46
- Paperclip::Deprecations.check
47
- end
48
- end
49
- end
50
-
51
- context "when aws sdk version is 2" do
52
- before do
53
- ::AWS.stub! if !defined?(::AWS)
54
- end
55
-
56
- it "do not display deprecation warning" do
57
- Paperclip::Deprecations.stubs(:aws_sdk_version).returns("2.0.0")
58
-
59
- assert_not_deprecated do
60
- Paperclip::Deprecations.check
61
- end
62
- end
63
- end
64
- end
65
- end
@@ -1,9 +0,0 @@
1
- RSpec.configure do |config|
2
- config.before(:all) do
3
- ActiveSupport::Deprecation.silenced = true
4
- end
5
- config.before(:each) do
6
- Paperclip::Deprecations.stubs(:active_model_version).returns("4.2")
7
- Paperclip::Deprecations.stubs(:aws_sdk_version).returns("2.0.0")
8
- end
9
- end