paperclip_database 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +2 -6
- data/Appraisals +17 -46
- data/README.md +5 -1
- data/features/basic_integration.feature +1 -0
- data/gemfiles/rails50_paperclip6x.gemfile +1 -0
- data/gemfiles/rails51_paperclip6x.gemfile +12 -0
- data/gemfiles/rails52_paperclip6x.gemfile +12 -0
- data/lib/generators/paperclip_database/migration/migration_generator.rb +7 -1
- data/lib/generators/paperclip_database/migration/templates/migration.rb.erb +1 -1
- data/lib/paperclip/storage/database.rb +2 -4
- data/lib/paperclip_database/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c66bf9b6a5634a776f394e7513407593c2ce770609476ee559693aed990ce08b
|
|
4
|
+
data.tar.gz: 35f44887de4e4ae03d1b38b1805cc710c90f9c0213a02e36d2f176cdda2e5660
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 64684bd642348c67cf99a0be22acd89870a8c3e57c1eb5c8c328a87b474e97413b6716238b22664382a7710eb9d313a84a47b24fa8ec20405efb3c24ef3b3268
|
|
7
|
+
data.tar.gz: 849af3ee0e30b46ac85069ff29fb6ecc480062017d36e72688e68478e74f7d69b6bac9b9c23784faff53512fb7adaeed9d324c89bae43dcf67bcd38c13454ea0
|
data/.travis.yml
CHANGED
|
@@ -11,9 +11,5 @@ gemfile:
|
|
|
11
11
|
- gemfiles/rails50_paperclip4x.gemfile
|
|
12
12
|
- gemfiles/rails50_paperclip5x.gemfile
|
|
13
13
|
- gemfiles/rails50_paperclip6x.gemfile
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
# - gemfiles/rails51_paperclip6x.gemfile
|
|
17
|
-
# - gemfiles/rails52_paperclip4x.gemfile
|
|
18
|
-
# - gemfiles/rails52_paperclip5x.gemfile
|
|
19
|
-
# - gemfiles/rails52_paperclip6x.gemfile
|
|
14
|
+
- gemfiles/rails51_paperclip6x.gemfile
|
|
15
|
+
- gemfiles/rails52_paperclip6x.gemfile
|
data/Appraisals
CHANGED
|
@@ -48,53 +48,24 @@ appraise "rails50_paperclip6x" do
|
|
|
48
48
|
gem 'capybara'
|
|
49
49
|
gem 'rspec'
|
|
50
50
|
gem 'sqlite3', '~> 1.3.0'
|
|
51
|
+
gem 'bootsnap', '~> 1.0', require: false
|
|
51
52
|
end
|
|
52
53
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
# appraise "rails51_paperclip5x" do
|
|
62
|
-
# gem "rails", "~> 5.1.0"
|
|
63
|
-
# gem "paperclip", "~> 5.0"
|
|
64
|
-
# gem 'capybara'
|
|
65
|
-
# gem 'rspec'
|
|
66
|
-
# gem 'sqlite3', '~> 1.3.0'
|
|
67
|
-
# end
|
|
68
|
-
|
|
69
|
-
# appraise "rails51_paperclip6x" do
|
|
70
|
-
# gem "rails", "~> 5.1.0"
|
|
71
|
-
# gem "paperclip", "~> 6.0"
|
|
72
|
-
# gem 'capybara'
|
|
73
|
-
# gem 'rspec'
|
|
74
|
-
# gem 'sqlite3', '~> 1.3.0'
|
|
75
|
-
# end
|
|
76
|
-
|
|
77
|
-
# appraise "rails52_paperclip4x" do
|
|
78
|
-
# gem "rails", "~> 5.2.0"
|
|
79
|
-
# gem "paperclip", "~> 4.0"
|
|
80
|
-
# gem 'capybara'
|
|
81
|
-
# gem 'rspec'
|
|
82
|
-
# gem 'sqlite3', '~> 1.3.0'
|
|
83
|
-
# end
|
|
84
|
-
|
|
85
|
-
# appraise "rails52_paperclip5x" do
|
|
86
|
-
# gem "rails", "~> 5.2.0"
|
|
87
|
-
# gem "paperclip", "~> 5.0"
|
|
88
|
-
# gem 'capybara'
|
|
89
|
-
# gem 'rspec'
|
|
90
|
-
# gem 'sqlite3', '~> 1.3.0'
|
|
91
|
-
# end
|
|
54
|
+
appraise "rails51_paperclip6x" do
|
|
55
|
+
gem "rails", "~> 5.1.0"
|
|
56
|
+
gem "paperclip", "~> 6.0"
|
|
57
|
+
gem 'capybara'
|
|
58
|
+
gem 'rspec'
|
|
59
|
+
gem 'sqlite3', '~> 1.3.0'
|
|
60
|
+
gem 'bootsnap', '~> 1.0', require: false
|
|
61
|
+
end
|
|
92
62
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
63
|
+
appraise "rails52_paperclip6x" do
|
|
64
|
+
gem "rails", "~> 5.2.0"
|
|
65
|
+
gem "paperclip", "~> 6.0"
|
|
66
|
+
gem 'capybara'
|
|
67
|
+
gem 'rspec'
|
|
68
|
+
gem 'sqlite3', '~> 1.3.0'
|
|
69
|
+
gem 'bootsnap', '~> 1.0', require: false
|
|
70
|
+
end
|
|
100
71
|
|
data/README.md
CHANGED
|
@@ -45,7 +45,11 @@ Supported Versions
|
|
|
45
45
|
|
|
46
46
|
As of version 2.0, Rails 2 is no longer supported.
|
|
47
47
|
As of version 3.0, Rails 3 is no longer supported.
|
|
48
|
-
Supported
|
|
48
|
+
Supported versions are rails from >= 4.2 to < 6.0 and paperclip version >= 2.3
|
|
49
|
+
As Paperclip is deprecated and final rails support for that was rails 5.x this gem will equally no longer going to be updated to more than rails 5.x
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
49
53
|
|
|
50
54
|
Quick Start
|
|
51
55
|
-----------
|
|
@@ -18,7 +18,7 @@ module PaperclipDatabase
|
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def generate_migration
|
|
21
|
-
migration_template "migration.rb.erb", "db/migrate/#{migration_file_name}"
|
|
21
|
+
migration_template "migration.rb.erb", "db/migrate/#{migration_file_name}", migration_version: migration_version
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
def migration_name
|
|
@@ -33,6 +33,12 @@ module PaperclipDatabase
|
|
|
33
33
|
migration_name.camelize
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
def migration_version
|
|
37
|
+
if Rails.version.to_i >= 5
|
|
38
|
+
"[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]"
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
36
42
|
end
|
|
37
43
|
end
|
|
38
44
|
end
|
|
@@ -104,7 +104,7 @@ module Paperclip
|
|
|
104
104
|
case ActiveModel::VERSION::MAJOR
|
|
105
105
|
when 3, 4
|
|
106
106
|
@paperclip_file_model.scope :file_for, lambda {|style| @paperclip_file_model.where('style = ?', style) }
|
|
107
|
-
when 5
|
|
107
|
+
when 5,6
|
|
108
108
|
@paperclip_file_model.scope :file_for, lambda {|style| where('style = ?', style) }
|
|
109
109
|
else
|
|
110
110
|
raise "ActiveModel version #{ActiveModel::VERSION::STRING} is not supported (yet)"
|
|
@@ -197,9 +197,7 @@ module Paperclip
|
|
|
197
197
|
case ActiveModel::VERSION::MAJOR
|
|
198
198
|
when 3
|
|
199
199
|
paperclip_file = instance.send(@paperclip_files_association_name).send(:find_or_create_by_style, style.to_s)
|
|
200
|
-
when 4
|
|
201
|
-
paperclip_file = instance.send(@paperclip_files_association_name).send(:find_or_create_by, style: style.to_s)
|
|
202
|
-
when 5
|
|
200
|
+
when 4,5,6
|
|
203
201
|
paperclip_file = instance.send(@paperclip_files_association_name).send(:find_or_create_by, style: style.to_s)
|
|
204
202
|
else
|
|
205
203
|
raise "ActiveModel version #{ActiveModel::VERSION::STRING} is not supported (yet)"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: paperclip_database
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jarl Friis
|
|
@@ -202,6 +202,8 @@ files:
|
|
|
202
202
|
- gemfiles/rails50_paperclip4x.gemfile
|
|
203
203
|
- gemfiles/rails50_paperclip5x.gemfile
|
|
204
204
|
- gemfiles/rails50_paperclip6x.gemfile
|
|
205
|
+
- gemfiles/rails51_paperclip6x.gemfile
|
|
206
|
+
- gemfiles/rails52_paperclip6x.gemfile
|
|
205
207
|
- lib/generators/paperclip_database/migration/USAGE
|
|
206
208
|
- lib/generators/paperclip_database/migration/migration_generator.rb
|
|
207
209
|
- lib/generators/paperclip_database/migration/templates/migration.rb.erb
|