paperclip_database_myplaceonline 3.1.1
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 +7 -0
- data/.document +5 -0
- data/.gitignore +57 -0
- data/.rspec +1 -0
- data/.travis.yml +15 -0
- data/Appraisals +71 -0
- data/Gemfile +5 -0
- data/LICENSE.txt +26 -0
- data/README.md +126 -0
- data/Rakefile +42 -0
- data/features/basic_integration.feature +45 -0
- data/features/step_definitions/html_steps.rb +15 -0
- data/features/step_definitions/paperclip_database_steps.rb +0 -0
- data/features/step_definitions/rails_steps.rb +209 -0
- data/features/step_definitions/web_steps.rb +115 -0
- data/features/support/env.rb +15 -0
- data/features/support/fakeweb.rb +3 -0
- data/features/support/paths.rb +28 -0
- data/features/support/rails.rb +62 -0
- data/features/support/selectors.rb +19 -0
- data/gemfiles/rails42_paperclip4x.gemfile +11 -0
- data/gemfiles/rails42_paperclip5x.gemfile +11 -0
- data/gemfiles/rails42_paperclip6x.gemfile +11 -0
- data/gemfiles/rails50_paperclip4x.gemfile +11 -0
- data/gemfiles/rails50_paperclip5x.gemfile +11 -0
- data/gemfiles/rails50_paperclip6x.gemfile +12 -0
- data/gemfiles/rails51_paperclip6x.gemfile +12 -0
- data/gemfiles/rails52_paperclip6x.gemfile +12 -0
- data/lib/generators/paperclip_database/migration/USAGE +8 -0
- data/lib/generators/paperclip_database/migration/migration_generator.rb +44 -0
- data/lib/generators/paperclip_database/migration/templates/migration.rb.erb +20 -0
- data/lib/paperclip/storage/database.rb +243 -0
- data/lib/paperclip_database/version.rb +3 -0
- data/lib/paperclip_database.rb +3 -0
- data/paperclip_database.gemspec +37 -0
- data/rails/init.rb +3 -0
- data/spec/database.yml +3 -0
- data/spec/default_options_spec.rb +74 -0
- data/spec/fixtures/5k.png +0 -0
- data/spec/major_version_API_spec.rb +89 -0
- data/spec/namespaced_models_spec.rb +39 -0
- data/spec/single_table_inheritance_spec.rb +39 -0
- data/spec/spec_helper.rb +92 -0
- metadata +260 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# -*- ruby -*-
|
|
2
|
+
|
|
3
|
+
$LOAD_PATH.push File.expand_path("../lib", __FILE__)
|
|
4
|
+
require 'paperclip_database/version'
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |s|
|
|
7
|
+
s.name = "paperclip_database_myplaceonline"
|
|
8
|
+
s.version = PaperclipDatabase::VERSION
|
|
9
|
+
s.platform = Gem::Platform::RUBY
|
|
10
|
+
s.author = "Jarl Friis"
|
|
11
|
+
s.email = ["jarl@softace.dk"]
|
|
12
|
+
s.homepage = "https://github.com/softace/paperclip_database"
|
|
13
|
+
s.summary = "Database storage for paperclip"
|
|
14
|
+
s.description = "To have all your data in one place: the database"
|
|
15
|
+
s.license = 'MIT'
|
|
16
|
+
|
|
17
|
+
s.files = `git ls-files`.split("\n")
|
|
18
|
+
s.test_files = `git ls-files -- {spec,features}/*`.split("\n")
|
|
19
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
|
20
|
+
s.require_paths = ["lib"]
|
|
21
|
+
|
|
22
|
+
s.requirements << "ImageMagick"
|
|
23
|
+
|
|
24
|
+
s.add_dependency('kt-paperclip', '>= 8.0.1')
|
|
25
|
+
|
|
26
|
+
s.add_development_dependency('rspec', '~> 3.1')
|
|
27
|
+
s.add_development_dependency('appraisal', '~> 2.0')
|
|
28
|
+
# s.add_development_dependency('rails', '>= 3.0.0') # Appraisal
|
|
29
|
+
s.add_development_dependency('sqlite3', '~> 1.3.0')
|
|
30
|
+
s.add_development_dependency('cucumber', '~> 1.1')
|
|
31
|
+
s.add_development_dependency('launchy', '~> 2.1')
|
|
32
|
+
s.add_development_dependency('aruba')
|
|
33
|
+
s.add_development_dependency('capybara', '~> 2.0.0', '< 2.1.0')
|
|
34
|
+
s.add_development_dependency('bundler', '< 2.0')
|
|
35
|
+
s.add_development_dependency('rake')
|
|
36
|
+
s.add_development_dependency('fakeweb')
|
|
37
|
+
end
|
data/rails/init.rb
ADDED
data/spec/database.yml
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe "PaperclipDatabase" do
|
|
4
|
+
describe "default options" do
|
|
5
|
+
before(:context) do
|
|
6
|
+
create_model_tables :users, :avatars
|
|
7
|
+
build_model 'User', nil, :avatar, {}
|
|
8
|
+
|
|
9
|
+
@model = User.new
|
|
10
|
+
file = File.open(fixture_file('5k.png'))
|
|
11
|
+
|
|
12
|
+
@model.avatar = file
|
|
13
|
+
@model.save
|
|
14
|
+
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
after(:context) do
|
|
18
|
+
reset_activerecord
|
|
19
|
+
reset_database :users, :avatars
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
it "has backward compatible table name" do
|
|
23
|
+
expect(@model.avatar.instance_variable_get(:@database_table)).to eq 'avatars'
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
it "has association name" do
|
|
27
|
+
expect(@model.avatar.instance_variable_get(:@paperclip_files_association_name)).to eq 'user_avatar_paperclip_files'
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
it "has model constant" do
|
|
31
|
+
expect(@model.avatar.instance_variable_get(:@paperclip_file_model).to_s).to eq 'User::UserAvatarPaperclipFile'
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
it "has association" do
|
|
35
|
+
expect(@model.methods.include?(:user_avatar_paperclip_files)).to be_truthy
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
describe "Namespaced model" do
|
|
39
|
+
describe "default options" do
|
|
40
|
+
before(:context) do
|
|
41
|
+
Object.const_set('Namespace', Module.new())
|
|
42
|
+
create_model_tables :users, :avatars
|
|
43
|
+
build_model 'Namespace::User', nil, :avatar, {}
|
|
44
|
+
|
|
45
|
+
@model = Namespace::User.new
|
|
46
|
+
file = File.open(fixture_file('5k.png'))
|
|
47
|
+
|
|
48
|
+
@model.avatar = file
|
|
49
|
+
@model.save
|
|
50
|
+
end
|
|
51
|
+
after(:context) do
|
|
52
|
+
reset_activerecord
|
|
53
|
+
reset_database :users, :avatars
|
|
54
|
+
Object.send(:remove_const, 'Namespace')
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
it "has backward compatible table name" do
|
|
58
|
+
expect(@model.avatar.instance_variable_get(:@database_table)).to eq 'avatars'
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
it "has association name" do
|
|
62
|
+
expect(@model.avatar.instance_variable_get(:@paperclip_files_association_name)).to eq 'user_avatar_paperclip_files'
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
it "has model constant" do
|
|
66
|
+
expect(@model.avatar.instance_variable_get(:@paperclip_file_model).to_s).to eq 'Namespace::User::UserAvatarPaperclipFile'
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
it "has association" do
|
|
70
|
+
expect(@model.methods.include?(:user_avatar_paperclip_files)).to be_truthy
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
Binary file
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
##
|
|
4
|
+
## named subject 'attachment' is the SUT
|
|
5
|
+
# args can be
|
|
6
|
+
# [:table_name] The table name
|
|
7
|
+
#
|
|
8
|
+
shared_examples_for "major version API compatible" do |args|
|
|
9
|
+
table_name = args[:table_name]
|
|
10
|
+
describe "Major version compatible with table name '#{table_name}'" do
|
|
11
|
+
subject{attachment}
|
|
12
|
+
it "has table name '#{table_name}'" do
|
|
13
|
+
expect(subject.instance_variable_get(:@database_table)).to eq table_name
|
|
14
|
+
end
|
|
15
|
+
##Basic (common)
|
|
16
|
+
it { is_expected.to respond_to(:exists?).with(1).argument }
|
|
17
|
+
it { is_expected.to respond_to(:flush_writes).with(0).argument }
|
|
18
|
+
it { is_expected.to respond_to(:flush_deletes).with(0).argument }
|
|
19
|
+
it { is_expected.to respond_to(:copy_to_local_file).with(2).arguments }
|
|
20
|
+
|
|
21
|
+
##Database specific
|
|
22
|
+
it { is_expected.to respond_to(:files).with(0).arguments }
|
|
23
|
+
it { is_expected.to respond_to(:database_path).with(1).argument }
|
|
24
|
+
it { is_expected.to respond_to(:to_file).with(1).argument }
|
|
25
|
+
it { is_expected.to respond_to(:to_io).with(1).argument }
|
|
26
|
+
it { is_expected.to respond_to(:file_for).with(1).argument }
|
|
27
|
+
it { is_expected.to respond_to(:file_contents).with(1).argument }
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
## named subject 'namespace' is the SUT
|
|
32
|
+
shared_examples_for "model" do |args|
|
|
33
|
+
describe "with default options" do
|
|
34
|
+
let!(:model_name){"#{namespace}User"}
|
|
35
|
+
let!(:attachment_name){'avatar'}
|
|
36
|
+
it_behaves_like "major version API compatible", :table_name => 'avatars'
|
|
37
|
+
end
|
|
38
|
+
describe "with custom model table_name" do
|
|
39
|
+
let(:model_name){"#{namespace}CUser"}
|
|
40
|
+
let(:model_table_name){'custom_users'}
|
|
41
|
+
let(:attachment_name){'avatar'}
|
|
42
|
+
it_behaves_like "major version API compatible", :table_name => 'avatars'
|
|
43
|
+
end
|
|
44
|
+
describe "with custom attachment table_name" do
|
|
45
|
+
let(:model_name){"#{namespace}AUser"}
|
|
46
|
+
let(:attachment_name){'avatar'}
|
|
47
|
+
let(:attachment_table_name){'custom_avatars'}
|
|
48
|
+
it_behaves_like "major version API compatible", :table_name => 'custom_avatars'
|
|
49
|
+
end
|
|
50
|
+
describe "with custom model table_name and custom attachment table_name" do
|
|
51
|
+
let(:model_name){"#{namespace}SUser"}
|
|
52
|
+
let(:model_table_name){'special_users'}
|
|
53
|
+
let(:attachment_name){'avatar'}
|
|
54
|
+
let(:attachment_table_name){'custom_avatars'}
|
|
55
|
+
it_behaves_like "major version API compatible", :table_name => 'custom_avatars'
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
describe "PaperclipDatabase" do
|
|
60
|
+
before(:example) do
|
|
61
|
+
@attachment_table_name = defined?(attachment_table_name) ? attachment_table_name : attachment_name.tableize
|
|
62
|
+
extra_paperclip_options = defined?(attachment_table_name)? {:database_table => attachment_table_name.to_sym} : {}
|
|
63
|
+
|
|
64
|
+
build_model model_name, (defined?(model_table_name)? model_table_name: nil), attachment_name.to_sym, extra_paperclip_options
|
|
65
|
+
@model_table_name = model_name.constantize.table_name
|
|
66
|
+
create_model_tables @model_table_name, @attachment_table_name, attachment_name
|
|
67
|
+
@model = model_name.constantize.new
|
|
68
|
+
file = File.open(fixture_file('5k.png'))
|
|
69
|
+
|
|
70
|
+
@model.send(:"#{attachment_name}=",file)
|
|
71
|
+
@model.save
|
|
72
|
+
end
|
|
73
|
+
subject(:attachment){@model.avatar}
|
|
74
|
+
after(:example) do
|
|
75
|
+
reset_activerecord
|
|
76
|
+
reset_database @model_table_name, @attachment_table_name
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
describe "model with no namespace" do
|
|
80
|
+
subject(:namespace){''}
|
|
81
|
+
it_behaves_like "model"
|
|
82
|
+
end
|
|
83
|
+
describe "model in namespace 'Namespace::'" do
|
|
84
|
+
before(:context) { Object.const_set('Namespace', Module.new()) }
|
|
85
|
+
after(:context) { Object.send(:remove_const, 'Namespace') }
|
|
86
|
+
subject(:namespace){'Namespace::'}
|
|
87
|
+
it_behaves_like "model"
|
|
88
|
+
end
|
|
89
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe "PaperclipDatabase" do
|
|
4
|
+
describe "Namespaced model" do
|
|
5
|
+
before(:context) do
|
|
6
|
+
Object.const_set('Namespace', Module.new())
|
|
7
|
+
create_model_tables :namespace_models, :namespace_model_avatars, 'avatar'
|
|
8
|
+
build_model 'Namespace::Model', 'namespace_models', :avatar, {:database_table => :namespace_model_avatars}
|
|
9
|
+
|
|
10
|
+
@model = Namespace::Model.new
|
|
11
|
+
file = File.open(fixture_file('5k.png'))
|
|
12
|
+
|
|
13
|
+
@model.avatar = file
|
|
14
|
+
@model.save
|
|
15
|
+
|
|
16
|
+
end
|
|
17
|
+
after(:context) do
|
|
18
|
+
reset_activerecord
|
|
19
|
+
reset_database :namespace_models, :namespace_model_avatars
|
|
20
|
+
Object.send(:remove_const, 'Namespace')
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
it "has correct association name" do
|
|
24
|
+
expect(@model.avatar.instance_variable_get(:@paperclip_files_association_name)).to eq 'namespace_model_avatar_paperclip_files'
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
it "has correct model constant" do
|
|
28
|
+
expect(@model.avatar.instance_variable_get(:@paperclip_file_model).to_s).to eq 'Namespace::Model::NamespaceModelAvatarPaperclipFile'
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
it "has correct table name" do
|
|
32
|
+
expect(@model.avatar.instance_variable_get(:@database_table)).to eq 'namespace_model_avatars'
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
it "has association" do
|
|
36
|
+
expect(@model.methods.include?(:namespace_model_avatar_paperclip_files)).to be_truthy
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe "PaperclipDatabase" do
|
|
4
|
+
describe "Single table inheritance" do
|
|
5
|
+
before(:example) do
|
|
6
|
+
create_model_tables :users, :avatars
|
|
7
|
+
build_model 'User', nil, :avatar, {}
|
|
8
|
+
|
|
9
|
+
Object.const_set('SuperUser', Class.new(User))
|
|
10
|
+
|
|
11
|
+
@model = SuperUser.new
|
|
12
|
+
file = File.open(fixture_file('5k.png'))
|
|
13
|
+
|
|
14
|
+
@model.avatar = file
|
|
15
|
+
@model.save
|
|
16
|
+
end
|
|
17
|
+
after(:example) do
|
|
18
|
+
reset_activerecord
|
|
19
|
+
reset_database :users, :avatars
|
|
20
|
+
Object.send(:remove_const, 'SuperUser')
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
it "has correct association name" do
|
|
24
|
+
expect(@model.avatar.instance_variable_get(:@paperclip_files_association_name)).to eq 'user_avatar_paperclip_files'
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
it "has correct model constant" do
|
|
28
|
+
expect(@model.avatar.instance_variable_get(:@paperclip_file_model).to_s).to eq 'User::UserAvatarPaperclipFile'
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
it "has correct table name" do
|
|
32
|
+
expect(@model.avatar.instance_variable_get(:@database_table)).to eq 'avatars'
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
it "has association" do
|
|
36
|
+
expect(@model.methods.include?(:user_avatar_paperclip_files)).to be_truthy
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
data/spec/spec_helper.rb
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
|
2
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
|
3
|
+
require 'rspec'
|
|
4
|
+
require 'paperclip_database'
|
|
5
|
+
require 'active_record'
|
|
6
|
+
require 'active_support'
|
|
7
|
+
require 'active_support/core_ext'
|
|
8
|
+
require 'yaml'
|
|
9
|
+
|
|
10
|
+
config = YAML::load(IO.read(File.dirname(__FILE__) + '/database.yml'))
|
|
11
|
+
ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + "/debug.log")
|
|
12
|
+
ActiveRecord::Base.establish_connection(config['test'])
|
|
13
|
+
Paperclip.options[:logger] = ActiveRecord::Base.logger
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# Requires supporting files with custom matchers and macros, etc,
|
|
17
|
+
# in ./support/ and its subdirectories.
|
|
18
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
|
19
|
+
|
|
20
|
+
RSpec.configure do |config|
|
|
21
|
+
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def reset_activerecord
|
|
25
|
+
if Gem::Version.new(::ActiveModel::VERSION::STRING) < Gem::Version.new('3.1.0')
|
|
26
|
+
ActiveRecord::Base.descendants.each do |model|
|
|
27
|
+
model.reset_column_information
|
|
28
|
+
end
|
|
29
|
+
else
|
|
30
|
+
ActiveRecord::Base.clear_cache!
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def reset_database(*tables)
|
|
35
|
+
tables.each do |table|
|
|
36
|
+
ActiveRecord::Base.connection.drop_table table
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def create_model_tables(model_table_name, attachment_table_name, association_name = nil)
|
|
41
|
+
association_name ||= attachment_table_name.to_s.singularize
|
|
42
|
+
ActiveRecord::Base.connection.create_table model_table_name, :force => true do |table|
|
|
43
|
+
table.column :"#{association_name}_file_name", :string
|
|
44
|
+
table.column :"#{association_name}_content_type", :string
|
|
45
|
+
table.column :"#{association_name}_file_size", :integer
|
|
46
|
+
table.column :"#{association_name}_updated_at", :datetime
|
|
47
|
+
table.column :"#{association_name}_fingerprint", :string
|
|
48
|
+
end
|
|
49
|
+
single_model = model_table_name.to_s.singularize
|
|
50
|
+
ActiveRecord::Base.connection.create_table attachment_table_name, :force => true do |table|
|
|
51
|
+
table.column :"#{single_model}_id", :integer
|
|
52
|
+
table.column :style, :string
|
|
53
|
+
table.column :file_contents, :binary
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def build_model(name, table_name, attachment_name, paperclip_options)
|
|
58
|
+
reset_class(name, attachment_name).tap do |klass|
|
|
59
|
+
klass.table_name = table_name if table_name
|
|
60
|
+
klass.has_attached_file attachment_name, {:storage => :database}.merge(paperclip_options)
|
|
61
|
+
klass.validates_attachment_content_type attachment_name, :content_type => /\Aimage\/.*\Z/
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def reset_class class_name, attachment_name
|
|
66
|
+
if class_name.include? '::'
|
|
67
|
+
module_name = class_name[0...(class_name.rindex('::') || 0)]
|
|
68
|
+
class_module = module_name.constantize rescue Object
|
|
69
|
+
else
|
|
70
|
+
class_module = Object
|
|
71
|
+
end
|
|
72
|
+
class_name = class_name.demodulize
|
|
73
|
+
|
|
74
|
+
ActiveRecord::Base.send(:include, Paperclip::Glue)
|
|
75
|
+
if class_module.const_defined?(class_name)
|
|
76
|
+
old_klass = class_module.const_get(class_name)
|
|
77
|
+
paperclip_class_name = "#{old_klass.table_name.singularize}_#{attachment_name.to_s}_paperclip_file".classify
|
|
78
|
+
class_module.send(:remove_const, paperclip_class_name) rescue nil
|
|
79
|
+
class_module.send(:remove_const, class_name) rescue nil
|
|
80
|
+
end
|
|
81
|
+
klass = class_module.const_set(class_name, Class.new(ActiveRecord::Base))
|
|
82
|
+
|
|
83
|
+
klass.class_eval do
|
|
84
|
+
include Paperclip::Glue
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
klass
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def fixture_file(filename)
|
|
91
|
+
File.join(File.dirname(__FILE__), 'fixtures', filename)
|
|
92
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: paperclip_database_myplaceonline
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 3.1.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Jarl Friis
|
|
8
|
+
bindir: bin
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: kt-paperclip
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - ">="
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: 8.0.1
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - ">="
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: 8.0.1
|
|
26
|
+
- !ruby/object:Gem::Dependency
|
|
27
|
+
name: rspec
|
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - "~>"
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '3.1'
|
|
33
|
+
type: :development
|
|
34
|
+
prerelease: false
|
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - "~>"
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '3.1'
|
|
40
|
+
- !ruby/object:Gem::Dependency
|
|
41
|
+
name: appraisal
|
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - "~>"
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '2.0'
|
|
47
|
+
type: :development
|
|
48
|
+
prerelease: false
|
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - "~>"
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: '2.0'
|
|
54
|
+
- !ruby/object:Gem::Dependency
|
|
55
|
+
name: sqlite3
|
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
|
57
|
+
requirements:
|
|
58
|
+
- - "~>"
|
|
59
|
+
- !ruby/object:Gem::Version
|
|
60
|
+
version: 1.3.0
|
|
61
|
+
type: :development
|
|
62
|
+
prerelease: false
|
|
63
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
64
|
+
requirements:
|
|
65
|
+
- - "~>"
|
|
66
|
+
- !ruby/object:Gem::Version
|
|
67
|
+
version: 1.3.0
|
|
68
|
+
- !ruby/object:Gem::Dependency
|
|
69
|
+
name: cucumber
|
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
|
71
|
+
requirements:
|
|
72
|
+
- - "~>"
|
|
73
|
+
- !ruby/object:Gem::Version
|
|
74
|
+
version: '1.1'
|
|
75
|
+
type: :development
|
|
76
|
+
prerelease: false
|
|
77
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
78
|
+
requirements:
|
|
79
|
+
- - "~>"
|
|
80
|
+
- !ruby/object:Gem::Version
|
|
81
|
+
version: '1.1'
|
|
82
|
+
- !ruby/object:Gem::Dependency
|
|
83
|
+
name: launchy
|
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
|
85
|
+
requirements:
|
|
86
|
+
- - "~>"
|
|
87
|
+
- !ruby/object:Gem::Version
|
|
88
|
+
version: '2.1'
|
|
89
|
+
type: :development
|
|
90
|
+
prerelease: false
|
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
92
|
+
requirements:
|
|
93
|
+
- - "~>"
|
|
94
|
+
- !ruby/object:Gem::Version
|
|
95
|
+
version: '2.1'
|
|
96
|
+
- !ruby/object:Gem::Dependency
|
|
97
|
+
name: aruba
|
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
|
99
|
+
requirements:
|
|
100
|
+
- - ">="
|
|
101
|
+
- !ruby/object:Gem::Version
|
|
102
|
+
version: '0'
|
|
103
|
+
type: :development
|
|
104
|
+
prerelease: false
|
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
106
|
+
requirements:
|
|
107
|
+
- - ">="
|
|
108
|
+
- !ruby/object:Gem::Version
|
|
109
|
+
version: '0'
|
|
110
|
+
- !ruby/object:Gem::Dependency
|
|
111
|
+
name: capybara
|
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
|
113
|
+
requirements:
|
|
114
|
+
- - "~>"
|
|
115
|
+
- !ruby/object:Gem::Version
|
|
116
|
+
version: 2.0.0
|
|
117
|
+
- - "<"
|
|
118
|
+
- !ruby/object:Gem::Version
|
|
119
|
+
version: 2.1.0
|
|
120
|
+
type: :development
|
|
121
|
+
prerelease: false
|
|
122
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
123
|
+
requirements:
|
|
124
|
+
- - "~>"
|
|
125
|
+
- !ruby/object:Gem::Version
|
|
126
|
+
version: 2.0.0
|
|
127
|
+
- - "<"
|
|
128
|
+
- !ruby/object:Gem::Version
|
|
129
|
+
version: 2.1.0
|
|
130
|
+
- !ruby/object:Gem::Dependency
|
|
131
|
+
name: bundler
|
|
132
|
+
requirement: !ruby/object:Gem::Requirement
|
|
133
|
+
requirements:
|
|
134
|
+
- - "<"
|
|
135
|
+
- !ruby/object:Gem::Version
|
|
136
|
+
version: '2.0'
|
|
137
|
+
type: :development
|
|
138
|
+
prerelease: false
|
|
139
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
140
|
+
requirements:
|
|
141
|
+
- - "<"
|
|
142
|
+
- !ruby/object:Gem::Version
|
|
143
|
+
version: '2.0'
|
|
144
|
+
- !ruby/object:Gem::Dependency
|
|
145
|
+
name: rake
|
|
146
|
+
requirement: !ruby/object:Gem::Requirement
|
|
147
|
+
requirements:
|
|
148
|
+
- - ">="
|
|
149
|
+
- !ruby/object:Gem::Version
|
|
150
|
+
version: '0'
|
|
151
|
+
type: :development
|
|
152
|
+
prerelease: false
|
|
153
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
154
|
+
requirements:
|
|
155
|
+
- - ">="
|
|
156
|
+
- !ruby/object:Gem::Version
|
|
157
|
+
version: '0'
|
|
158
|
+
- !ruby/object:Gem::Dependency
|
|
159
|
+
name: fakeweb
|
|
160
|
+
requirement: !ruby/object:Gem::Requirement
|
|
161
|
+
requirements:
|
|
162
|
+
- - ">="
|
|
163
|
+
- !ruby/object:Gem::Version
|
|
164
|
+
version: '0'
|
|
165
|
+
type: :development
|
|
166
|
+
prerelease: false
|
|
167
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
168
|
+
requirements:
|
|
169
|
+
- - ">="
|
|
170
|
+
- !ruby/object:Gem::Version
|
|
171
|
+
version: '0'
|
|
172
|
+
description: 'To have all your data in one place: the database'
|
|
173
|
+
email:
|
|
174
|
+
- jarl@softace.dk
|
|
175
|
+
executables: []
|
|
176
|
+
extensions: []
|
|
177
|
+
extra_rdoc_files: []
|
|
178
|
+
files:
|
|
179
|
+
- ".document"
|
|
180
|
+
- ".gitignore"
|
|
181
|
+
- ".rspec"
|
|
182
|
+
- ".travis.yml"
|
|
183
|
+
- Appraisals
|
|
184
|
+
- Gemfile
|
|
185
|
+
- LICENSE.txt
|
|
186
|
+
- README.md
|
|
187
|
+
- Rakefile
|
|
188
|
+
- features/basic_integration.feature
|
|
189
|
+
- features/step_definitions/html_steps.rb
|
|
190
|
+
- features/step_definitions/paperclip_database_steps.rb
|
|
191
|
+
- features/step_definitions/rails_steps.rb
|
|
192
|
+
- features/step_definitions/web_steps.rb
|
|
193
|
+
- features/support/env.rb
|
|
194
|
+
- features/support/fakeweb.rb
|
|
195
|
+
- features/support/paths.rb
|
|
196
|
+
- features/support/rails.rb
|
|
197
|
+
- features/support/selectors.rb
|
|
198
|
+
- gemfiles/rails42_paperclip4x.gemfile
|
|
199
|
+
- gemfiles/rails42_paperclip5x.gemfile
|
|
200
|
+
- gemfiles/rails42_paperclip6x.gemfile
|
|
201
|
+
- gemfiles/rails50_paperclip4x.gemfile
|
|
202
|
+
- gemfiles/rails50_paperclip5x.gemfile
|
|
203
|
+
- gemfiles/rails50_paperclip6x.gemfile
|
|
204
|
+
- gemfiles/rails51_paperclip6x.gemfile
|
|
205
|
+
- gemfiles/rails52_paperclip6x.gemfile
|
|
206
|
+
- lib/generators/paperclip_database/migration/USAGE
|
|
207
|
+
- lib/generators/paperclip_database/migration/migration_generator.rb
|
|
208
|
+
- lib/generators/paperclip_database/migration/templates/migration.rb.erb
|
|
209
|
+
- lib/paperclip/storage/database.rb
|
|
210
|
+
- lib/paperclip_database.rb
|
|
211
|
+
- lib/paperclip_database/version.rb
|
|
212
|
+
- paperclip_database.gemspec
|
|
213
|
+
- rails/init.rb
|
|
214
|
+
- spec/database.yml
|
|
215
|
+
- spec/default_options_spec.rb
|
|
216
|
+
- spec/fixtures/5k.png
|
|
217
|
+
- spec/major_version_API_spec.rb
|
|
218
|
+
- spec/namespaced_models_spec.rb
|
|
219
|
+
- spec/single_table_inheritance_spec.rb
|
|
220
|
+
- spec/spec_helper.rb
|
|
221
|
+
homepage: https://github.com/softace/paperclip_database
|
|
222
|
+
licenses:
|
|
223
|
+
- MIT
|
|
224
|
+
metadata: {}
|
|
225
|
+
rdoc_options: []
|
|
226
|
+
require_paths:
|
|
227
|
+
- lib
|
|
228
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
229
|
+
requirements:
|
|
230
|
+
- - ">="
|
|
231
|
+
- !ruby/object:Gem::Version
|
|
232
|
+
version: '0'
|
|
233
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
234
|
+
requirements:
|
|
235
|
+
- - ">="
|
|
236
|
+
- !ruby/object:Gem::Version
|
|
237
|
+
version: '0'
|
|
238
|
+
requirements:
|
|
239
|
+
- ImageMagick
|
|
240
|
+
rubygems_version: 4.0.19
|
|
241
|
+
specification_version: 4
|
|
242
|
+
summary: Database storage for paperclip
|
|
243
|
+
test_files:
|
|
244
|
+
- features/basic_integration.feature
|
|
245
|
+
- features/step_definitions/html_steps.rb
|
|
246
|
+
- features/step_definitions/paperclip_database_steps.rb
|
|
247
|
+
- features/step_definitions/rails_steps.rb
|
|
248
|
+
- features/step_definitions/web_steps.rb
|
|
249
|
+
- features/support/env.rb
|
|
250
|
+
- features/support/fakeweb.rb
|
|
251
|
+
- features/support/paths.rb
|
|
252
|
+
- features/support/rails.rb
|
|
253
|
+
- features/support/selectors.rb
|
|
254
|
+
- spec/database.yml
|
|
255
|
+
- spec/default_options_spec.rb
|
|
256
|
+
- spec/fixtures/5k.png
|
|
257
|
+
- spec/major_version_API_spec.rb
|
|
258
|
+
- spec/namespaced_models_spec.rb
|
|
259
|
+
- spec/single_table_inheritance_spec.rb
|
|
260
|
+
- spec/spec_helper.rb
|