default_value_for 4.1.0 → 4.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +2 -0
- data/default_value_for.gemspec +1 -1
- data/lib/default_value_for.rb +3 -8
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c80aedef2e43b52fc2a1b30f73d1a3dc67ed4681593e22791850451f923670fa
|
4
|
+
data.tar.gz: ca8f91561bd47228f36f6ebd4cfaa399513e1a28bf5cdc580a533a463529c4e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3844921bb7754bf60e50ea6e31138ce2da56d59a46e858234d53359889e9f8bf36b8746c388fcc35bec245544a5a0cdc616ce49b29fb2923789233bc8cb274c3
|
7
|
+
data.tar.gz: 172aef2c3dfe0d0f69647cc54547284afa27a557c6625d648492d19b61fe62efcfe7f884b208e42c81d7b141bff8eb165d38e3b678c18c95159be6faa8753e0f
|
data/Rakefile
CHANGED
@@ -29,6 +29,7 @@ rails_versions.each do |version|
|
|
29
29
|
namespace :test do
|
30
30
|
desc "Test with Rails #{version}.x"
|
31
31
|
task :"rails#{dotless}" do
|
32
|
+
sh 'appraisal install'
|
32
33
|
ENV['BUNDLE_GEMFILE'] = "gemfiles/rails_#{dotless}.gemfile"
|
33
34
|
ruby "test.rb"
|
34
35
|
end
|
@@ -38,6 +39,7 @@ end
|
|
38
39
|
namespace :test do
|
39
40
|
desc "Test with all supported Rails versions"
|
40
41
|
task :railsall do
|
42
|
+
sh 'appraisal install'
|
41
43
|
rails_versions.each do |version|
|
42
44
|
dotless = version.delete('.')
|
43
45
|
ENV['BUNDLE_GEMFILE'] = "gemfiles/rails_#{dotless}.gemfile"
|
data/default_value_for.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = %q{default_value_for}
|
3
|
-
s.version = "4.1.
|
3
|
+
s.version = "4.1.1"
|
4
4
|
s.summary = %q{Provides a way to specify default values for ActiveRecord models}
|
5
5
|
s.description = %q{The default_value_for plugin allows one to define default values for ActiveRecord models in a declarative manner}
|
6
6
|
s.email = %q{software-signing@phusion.nl}
|
data/lib/default_value_for.rb
CHANGED
@@ -65,7 +65,7 @@ module DefaultValueFor
|
|
65
65
|
allows_nil = opts.fetch('allows_nil', true)
|
66
66
|
end
|
67
67
|
|
68
|
-
if !
|
68
|
+
if !singleton_methods(false).include?(:_default_attribute_values)
|
69
69
|
include(InstanceMethods)
|
70
70
|
|
71
71
|
after_initialize :set_default_values
|
@@ -73,15 +73,10 @@ module DefaultValueFor
|
|
73
73
|
class_attribute :_default_attribute_values
|
74
74
|
class_attribute :_default_attribute_values_not_allowing_nil
|
75
75
|
|
76
|
-
extend(DelayedClassMethods)
|
77
|
-
init_hash = true
|
78
|
-
else
|
79
|
-
init_hash = !singleton_methods(false).include?(:_default_attribute_values)
|
80
|
-
end
|
81
|
-
|
82
|
-
if init_hash
|
83
76
|
self._default_attribute_values = {}
|
84
77
|
self._default_attribute_values_not_allowing_nil = []
|
78
|
+
|
79
|
+
extend(DelayedClassMethods)
|
85
80
|
end
|
86
81
|
|
87
82
|
if block_given?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: default_value_for
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.
|
4
|
+
version: 4.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hongli Lai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -160,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
160
|
- !ruby/object:Gem::Version
|
161
161
|
version: '0'
|
162
162
|
requirements: []
|
163
|
-
rubygems_version: 3.5.
|
163
|
+
rubygems_version: 3.5.22
|
164
164
|
signing_key:
|
165
165
|
specification_version: 4
|
166
166
|
summary: Provides a way to specify default values for ActiveRecord models
|