automatic_record 0.0.2 → 0.0.3
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/Rakefile +1 -1
- data/lib/automatic_record/auto_create.rb +13 -13
- data/lib/automatic_record/engine.rb +1 -1
- data/lib/automatic_record/version.rb +1 -1
- data/spec/dummy/app/models/preference.rb +5 -5
- data/spec/dummy/app/models/user.rb +5 -5
- data/spec/dummy/bin/setup +8 -8
- data/spec/dummy/config/application.rb +1 -5
- data/spec/dummy/config/environments/test.rb +2 -2
- data/spec/dummy/db/schema.rb +10 -11
- data/spec/models/preference_spec.rb +3 -14
- data/spec/models/user_spec.rb +8 -19
- data/spec/rails_helper.rb +3 -3
- data/spec/spec_helper.rb +42 -44
- metadata +37 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12dcf108b424c2704cf0e8850ecfa6da84076f0c
|
4
|
+
data.tar.gz: 72c1f43594b34489fdc22500f4969c8f66c27cde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba76de7cc5a42b4d1a77cc7009970b77797fab29db4773d3f160f3ee3fc725491feea382f055a5b5b048e0be985d678fe0b89a75cefe902a2b4c3cb591aee20f
|
7
|
+
data.tar.gz: c0bfa1287c95b0de9223c8a4ea01b36c84d39dcf55d3840c94854b208a6e3ed7efd556d2f3573ae608909e2b6a0809d3a53c78492c9497652cbaf1690be09191
|
data/Rakefile
CHANGED
@@ -14,7 +14,7 @@ RDoc::Task.new(:rdoc) do |rdoc|
|
|
14
14
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
15
|
end
|
16
16
|
|
17
|
-
APP_RAKEFILE = File.expand_path(
|
17
|
+
APP_RAKEFILE = File.expand_path('../spec/dummy/Rakefile', __FILE__)
|
18
18
|
load 'rails/tasks/engine.rake'
|
19
19
|
|
20
20
|
Bundler::GemHelper.install_tasks
|
@@ -27,30 +27,30 @@ module AutomaticRecord
|
|
27
27
|
# Pass a block to be used for object creation:
|
28
28
|
# auto_create :preference, ->(user){ user.create_preference(:language => 'en', :notifications => true) }
|
29
29
|
#
|
30
|
-
def auto_create(assoc, default_attrs_or_block={})
|
30
|
+
def auto_create(assoc, default_attrs_or_block = {})
|
31
31
|
reflection = reflect_on_association(assoc)
|
32
32
|
if reflection.nil?
|
33
|
-
raise AutomaticRecord::Error::MissingAssociation
|
33
|
+
raise AutomaticRecord::Error::MissingAssociation, assoc
|
34
34
|
elsif !(reflection.has_one? || reflection.belongs_to?)
|
35
|
-
raise AutomaticRecord::Error::InvalidAssociation
|
35
|
+
raise AutomaticRecord::Error::InvalidAssociation, assoc
|
36
36
|
else
|
37
|
-
define_method(assoc) do |
|
38
|
-
return get_or_auto_create_assoc(assoc,
|
37
|
+
define_method(assoc) do |_force_reload = nil| # force_reload is deprecated by rails
|
38
|
+
return get_or_auto_create_assoc(assoc, default_attrs_or_block)
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
|
-
private
|
44
|
+
private
|
45
45
|
|
46
|
-
def get_or_auto_create_assoc(assoc,
|
47
|
-
result = method(assoc).super_method.call
|
46
|
+
def get_or_auto_create_assoc(assoc, default_attrs_or_block = {}) # :nodoc:
|
47
|
+
result = method(assoc).super_method.call
|
48
48
|
if result.blank?
|
49
|
-
if default_attrs_or_block.is_a?(Proc)
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
49
|
+
result = if default_attrs_or_block.is_a?(Proc)
|
50
|
+
default_attrs_or_block.call(self)
|
51
|
+
else
|
52
|
+
send("create_#{assoc}", default_attrs_or_block)
|
53
|
+
end
|
54
54
|
end
|
55
55
|
return result
|
56
56
|
end
|
@@ -1,13 +1,13 @@
|
|
1
1
|
class Preference < ActiveRecord::Base
|
2
2
|
|
3
3
|
belongs_to :user
|
4
|
-
belongs_to :user_with_default_attrs, :
|
5
|
-
belongs_to :user_with_block, :
|
4
|
+
belongs_to :user_with_default_attrs, class_name: 'User', foreign_key: 'user_id'
|
5
|
+
belongs_to :user_with_block, class_name: 'User', foreign_key: 'user_id'
|
6
6
|
|
7
7
|
auto_create :user
|
8
|
-
auto_create :user_with_default_attrs,
|
9
|
-
auto_create :user_with_block, ->(instance){
|
10
|
-
instance.create_user(:
|
8
|
+
auto_create :user_with_default_attrs, username: 'defaulted'
|
9
|
+
auto_create :user_with_block, ->(instance) {
|
10
|
+
instance.create_user(username: 'blocked')
|
11
11
|
}
|
12
12
|
|
13
13
|
end
|
@@ -1,13 +1,13 @@
|
|
1
1
|
class User < ActiveRecord::Base
|
2
2
|
|
3
3
|
has_one :preference
|
4
|
-
has_one :preference_with_default_attrs, :
|
5
|
-
has_one :preference_with_block, :
|
4
|
+
has_one :preference_with_default_attrs, class_name: 'Preference'
|
5
|
+
has_one :preference_with_block, class_name: 'Preference'
|
6
6
|
|
7
7
|
auto_create :preference
|
8
|
-
auto_create :preference_with_default_attrs,
|
9
|
-
auto_create :preference_with_block, ->(instance){
|
10
|
-
instance.create_preference(:
|
8
|
+
auto_create :preference_with_default_attrs, language: 'en', notifications: true
|
9
|
+
auto_create :preference_with_block, ->(instance) {
|
10
|
+
instance.create_preference(language: 'fr', notifications: true)
|
11
11
|
}
|
12
12
|
|
13
13
|
end
|
data/spec/dummy/bin/setup
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
require 'pathname'
|
3
3
|
|
4
4
|
# path to your application root.
|
5
|
-
APP_ROOT = Pathname.new File.expand_path('../../',
|
5
|
+
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
6
6
|
|
7
7
|
Dir.chdir APP_ROOT do
|
8
8
|
# This script is a starting point to setup your application.
|
9
9
|
# Add necessary setup steps to this file:
|
10
10
|
|
11
|
-
puts
|
12
|
-
system
|
13
|
-
system
|
11
|
+
puts '== Installing dependencies =='
|
12
|
+
system 'gem install bundler --conservative'
|
13
|
+
system 'bundle check || bundle install'
|
14
14
|
|
15
15
|
# puts "\n== Copying sample files =="
|
16
16
|
# unless File.exist?("config/database.yml")
|
@@ -18,12 +18,12 @@ Dir.chdir APP_ROOT do
|
|
18
18
|
# end
|
19
19
|
|
20
20
|
puts "\n== Preparing database =="
|
21
|
-
system
|
21
|
+
system 'bin/rake db:setup'
|
22
22
|
|
23
23
|
puts "\n== Removing old logs and tempfiles =="
|
24
|
-
system
|
25
|
-
system
|
24
|
+
system 'rm -f log/*'
|
25
|
+
system 'rm -rf tmp/cache'
|
26
26
|
|
27
27
|
puts "\n== Restarting application server =="
|
28
|
-
system
|
28
|
+
system 'touch tmp/restart.txt'
|
29
29
|
end
|
@@ -3,7 +3,7 @@ require File.expand_path('../boot', __FILE__)
|
|
3
3
|
require 'rails/all'
|
4
4
|
|
5
5
|
Bundler.require(*Rails.groups)
|
6
|
-
require
|
6
|
+
require 'automatic_record'
|
7
7
|
|
8
8
|
module Dummy
|
9
9
|
class Application < Rails::Application
|
@@ -18,9 +18,5 @@ module Dummy
|
|
18
18
|
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
19
19
|
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
20
20
|
# config.i18n.default_locale = :de
|
21
|
-
|
22
|
-
# Do not swallow errors in after_commit/after_rollback callbacks.
|
23
|
-
config.active_record.raise_in_transactional_callbacks = true
|
24
21
|
end
|
25
22
|
end
|
26
|
-
|
@@ -13,8 +13,8 @@ Rails.application.configure do
|
|
13
13
|
config.eager_load = false
|
14
14
|
|
15
15
|
# Configure static file server for tests with Cache-Control for performance.
|
16
|
-
config.
|
17
|
-
config.
|
16
|
+
config.public_file_server.enabled = true
|
17
|
+
config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' }
|
18
18
|
|
19
19
|
# Show full error reports and disable caching.
|
20
20
|
config.consider_all_requests_local = true
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# encoding: UTF-8
|
2
1
|
# This file is auto-generated from the current state of the database. Instead
|
3
2
|
# of editing this file, please use the migrations feature of Active Record to
|
4
3
|
# incrementally modify your database, and then regenerate this schema definition.
|
@@ -13,18 +12,18 @@
|
|
13
12
|
|
14
13
|
ActiveRecord::Schema.define(version: 20150416151003) do
|
15
14
|
|
16
|
-
create_table "preferences", force: :cascade do |t|
|
17
|
-
t.integer "user_id"
|
18
|
-
t.string "language"
|
19
|
-
t.boolean "notifications"
|
20
|
-
t.datetime "created_at",
|
21
|
-
t.datetime "updated_at",
|
15
|
+
create_table "preferences", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t|
|
16
|
+
t.integer "user_id"
|
17
|
+
t.string "language"
|
18
|
+
t.boolean "notifications"
|
19
|
+
t.datetime "created_at", null: false
|
20
|
+
t.datetime "updated_at", null: false
|
22
21
|
end
|
23
22
|
|
24
|
-
create_table "users", force: :cascade do |t|
|
25
|
-
t.string "username"
|
26
|
-
t.datetime "created_at",
|
27
|
-
t.datetime "updated_at",
|
23
|
+
create_table "users", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t|
|
24
|
+
t.string "username"
|
25
|
+
t.datetime "created_at", null: false
|
26
|
+
t.datetime "updated_at", null: false
|
28
27
|
end
|
29
28
|
|
30
29
|
end
|
@@ -5,14 +5,14 @@ RSpec.describe Preference, type: :model do
|
|
5
5
|
describe '#belongs_to' do
|
6
6
|
it 'should create the user record' do
|
7
7
|
preference = FactoryGirl.create(:preference)
|
8
|
-
expect
|
8
|
+
expect do
|
9
9
|
preference.user
|
10
|
-
|
10
|
+
end.to change(User, :count).by(1)
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'should get the pre-existing record' do
|
14
14
|
user = FactoryGirl.create(:user)
|
15
|
-
preference = FactoryGirl.create(:preference, :
|
15
|
+
preference = FactoryGirl.create(:preference, user_id: user.id)
|
16
16
|
expect(preference.user).to eq(user)
|
17
17
|
end
|
18
18
|
|
@@ -27,17 +27,6 @@ RSpec.describe Preference, type: :model do
|
|
27
27
|
user = preference.user_with_block
|
28
28
|
expect(user.username).to eq('blocked')
|
29
29
|
end
|
30
|
-
|
31
|
-
it 'should reload the record from the database' do
|
32
|
-
preference = FactoryGirl.create(:preference)
|
33
|
-
user = preference.user
|
34
|
-
|
35
|
-
user_alt = User.find_by(:id => user.id)
|
36
|
-
user_alt.update_attribute(:username, 'reloaded')
|
37
|
-
|
38
|
-
expect(preference.user.username).to_not eq('reloaded')
|
39
|
-
expect(preference.user(true).username).to eq('reloaded')
|
40
|
-
end
|
41
30
|
end
|
42
31
|
|
43
32
|
end
|
data/spec/models/user_spec.rb
CHANGED
@@ -5,15 +5,15 @@ RSpec.describe User, type: :model do
|
|
5
5
|
describe '#has_one' do
|
6
6
|
it 'should create the preference record' do
|
7
7
|
user = FactoryGirl.create(:user)
|
8
|
-
expect(Preference.find_by(:
|
9
|
-
expect
|
8
|
+
expect(Preference.find_by(user_id: user.id)).to eq(nil)
|
9
|
+
expect do
|
10
10
|
user.preference
|
11
|
-
|
11
|
+
end.to change(Preference, :count).by(1)
|
12
12
|
end
|
13
13
|
|
14
14
|
it 'should get the pre-existing record' do
|
15
15
|
user = FactoryGirl.create(:user)
|
16
|
-
preference = FactoryGirl.create(:preference, :
|
16
|
+
preference = FactoryGirl.create(:preference, user_id: user.id)
|
17
17
|
expect(user.preference).to eq(preference)
|
18
18
|
end
|
19
19
|
|
@@ -30,33 +30,22 @@ RSpec.describe User, type: :model do
|
|
30
30
|
expect(preference.language).to eq('fr')
|
31
31
|
expect(preference.notifications).to eq(true)
|
32
32
|
end
|
33
|
-
|
34
|
-
it 'should reload the record from the database' do
|
35
|
-
user = FactoryGirl.create(:user)
|
36
|
-
preference = user.preference
|
37
|
-
|
38
|
-
preference_alt = Preference.find_by(:id => preference.id)
|
39
|
-
preference_alt.update_attribute(:language, 'ca')
|
40
|
-
|
41
|
-
expect(user.preference.language).to_not eq('ca')
|
42
|
-
expect(user.preference(true).language).to eq('ca')
|
43
|
-
end
|
44
33
|
end
|
45
34
|
|
46
35
|
describe 'errors' do
|
47
36
|
it 'should raise an error if the association does not exist' do
|
48
|
-
expect
|
37
|
+
expect do
|
49
38
|
User.class_eval('auto_create :does_not_exist')
|
50
|
-
|
39
|
+
end.to raise_error(AutomaticRecord::Error::MissingAssociation)
|
51
40
|
end
|
52
41
|
|
53
42
|
it 'should raise an error if the association is not :belongs_to or :has_one' do
|
54
|
-
expect
|
43
|
+
expect do
|
55
44
|
User.class_eval do
|
56
45
|
has_many :widgets
|
57
46
|
auto_create :widgets
|
58
47
|
end
|
59
|
-
|
48
|
+
end.to raise_error(AutomaticRecord::Error::InvalidAssociation)
|
60
49
|
end
|
61
50
|
end
|
62
51
|
|
data/spec/rails_helper.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
2
|
-
ENV[
|
2
|
+
ENV['RAILS_ENV'] ||= 'test'
|
3
3
|
require 'spec_helper'
|
4
|
-
require File.expand_path(
|
4
|
+
require File.expand_path('../dummy/config/environment.rb', __FILE__)
|
5
5
|
require 'rspec/rails'
|
6
6
|
|
7
7
|
# Add additional requires below this line. Rails is not loaded until this point!
|
8
8
|
require 'database_cleaner'
|
9
|
-
require
|
9
|
+
require 'factory_girl_rails'
|
10
10
|
require 'simplecov'
|
11
11
|
|
12
12
|
SimpleCov.start 'rails'
|
data/spec/spec_helper.rb
CHANGED
@@ -38,48 +38,46 @@ RSpec.configure do |config|
|
|
38
38
|
mocks.verify_partial_doubles = true
|
39
39
|
end
|
40
40
|
|
41
|
-
# The settings below are suggested to provide a good initial experience
|
42
|
-
# with RSpec, but feel free to customize to your heart's content.
|
43
|
-
|
44
|
-
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
config.
|
49
|
-
|
50
|
-
|
51
|
-
#
|
52
|
-
#
|
53
|
-
# - http://
|
54
|
-
# - http://
|
55
|
-
#
|
56
|
-
|
57
|
-
|
58
|
-
#
|
59
|
-
#
|
60
|
-
#
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
#
|
69
|
-
#
|
70
|
-
#
|
71
|
-
|
72
|
-
|
73
|
-
#
|
74
|
-
#
|
75
|
-
#
|
76
|
-
#
|
77
|
-
|
78
|
-
|
79
|
-
#
|
80
|
-
#
|
81
|
-
#
|
82
|
-
#
|
83
|
-
Kernel.srand config.seed
|
84
|
-
=end
|
41
|
+
# The settings below are suggested to provide a good initial experience
|
42
|
+
# with RSpec, but feel free to customize to your heart's content.
|
43
|
+
# # These two settings work together to allow you to limit a spec run
|
44
|
+
# # to individual examples or groups you care about by tagging them with
|
45
|
+
# # `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
46
|
+
# # get run.
|
47
|
+
# config.filter_run :focus
|
48
|
+
# config.run_all_when_everything_filtered = true
|
49
|
+
#
|
50
|
+
# # Limits the available syntax to the non-monkey patched syntax that is recommended.
|
51
|
+
# # For more details, see:
|
52
|
+
# # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
|
53
|
+
# # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
54
|
+
# # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
|
55
|
+
# config.disable_monkey_patching!
|
56
|
+
#
|
57
|
+
# # Many RSpec users commonly either run the entire suite or an individual
|
58
|
+
# # file, and it's useful to allow more verbose output when running an
|
59
|
+
# # individual spec file.
|
60
|
+
# if config.files_to_run.one?
|
61
|
+
# # Use the documentation formatter for detailed output,
|
62
|
+
# # unless a formatter has already been configured
|
63
|
+
# # (e.g. via a command-line flag).
|
64
|
+
# config.default_formatter = 'doc'
|
65
|
+
# end
|
66
|
+
#
|
67
|
+
# # Print the 10 slowest examples and example groups at the
|
68
|
+
# # end of the spec run, to help surface which specs are running
|
69
|
+
# # particularly slow.
|
70
|
+
# config.profile_examples = 10
|
71
|
+
#
|
72
|
+
# # Run specs in random order to surface order dependencies. If you find an
|
73
|
+
# # order dependency and want to debug it, you can fix the order by providing
|
74
|
+
# # the seed, which is printed after each run.
|
75
|
+
# # --seed 1234
|
76
|
+
# config.order = :random
|
77
|
+
#
|
78
|
+
# # Seed global randomization in this process using the `--seed` CLI option.
|
79
|
+
# # Setting this allows you to use `--seed` to deterministically reproduce
|
80
|
+
# # test failures related to randomization by passing the same `--seed` value
|
81
|
+
# # as the one that triggered the failure.
|
82
|
+
# Kernel.srand config.seed
|
85
83
|
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: automatic_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Greg Woods
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mysql2
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -42,58 +42,72 @@ dependencies:
|
|
42
42
|
name: rspec-rails
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: factory_girl_rails
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: database_cleaner
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: simplecov
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
90
104
|
type: :development
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
|
-
- - "
|
108
|
+
- - ">="
|
95
109
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0
|
110
|
+
version: '0'
|
97
111
|
description: Automatically create a has_one or belongs_to association the first time
|
98
112
|
it is accessed. Also supports optional default attributes or block usage to customize
|
99
113
|
the record creation.
|
@@ -178,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
178
192
|
version: '0'
|
179
193
|
requirements: []
|
180
194
|
rubyforge_project:
|
181
|
-
rubygems_version: 2.
|
195
|
+
rubygems_version: 2.5.2
|
182
196
|
signing_key:
|
183
197
|
specification_version: 4
|
184
198
|
summary: Automatically create has_one and belongs_to associations the first time they
|