default_value_for 3.4.0 → 3.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +5 -0
  3. data/default_value_for.gemspec +5 -5
  4. data/test.rb +9 -9
  5. metadata +11 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 15a799717c30677d582f0c87b7491f2a6a15206dd52018057e2df15db60fb21f
4
- data.tar.gz: b884a6fbd0e6c679562a3765499514893649a8d3659318a92dbf009e1a1a43aa
3
+ metadata.gz: fdfb798901eea229f953dfb541d5efe0b2decb31863326fc0c0a489e2f76f2c5
4
+ data.tar.gz: 96d72a6a620685ba5c5bb2212f955bb0e33b44198f7657c8d24665411329a16d
5
5
  SHA512:
6
- metadata.gz: 1814019f12d56dcde794f9a70e530088ab1746976a99a8d076ef3b6858cb9c56410e85932f690a26a0d6ab8ee632c93634b81622e7b45548362c19d2551d548f
7
- data.tar.gz: 73995f62cc25df268848f6630018dcba0f9fc8093d28382f2006919b08e32eda7b375de1359ae7506f5e074359db6839f1178e1446d52579ee69cb30d06c0ba6
6
+ metadata.gz: 3ac180c638bbaabbfa7d95a98ece04682c99abd8c602a84a5471d9403e8f8bbdf34f6aba3e31da03946913340036be35389ae7ce4cdd84f73ab6ef05c53ea4c0
7
+ data.tar.gz: 289f0da4d133b294840521a3378e716d2b5d2efd8a41e99b7f113a6134b7c6d73fc718f9859d1059fcd1b585d654f0c7307b6f1b2be9aced03651c21b9abe118
data/Rakefile CHANGED
@@ -1,5 +1,8 @@
1
1
  task :default => :test
2
2
 
3
+ require 'bundler'
4
+ require "bundler/gem_tasks"
5
+
3
6
  desc "Run unit tests."
4
7
  task :test do
5
8
  ruby "test.rb"
@@ -15,6 +18,8 @@ rails_versions = %w(
15
18
  5.2
16
19
  6.0
17
20
  6.1
21
+ 7.0
22
+ 7.1
18
23
  )
19
24
 
20
25
  rails_versions.each do |version|
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{default_value_for}
3
- s.version = "3.4.0"
3
+ s.version = "3.6.0"
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}
@@ -14,10 +14,10 @@ Gem::Specification.new do |s|
14
14
  'lib/default_value_for.rb',
15
15
  'lib/default_value_for/railtie.rb'
16
16
  ]
17
- s.add_dependency 'activerecord', '>= 3.2.0', '< 7.0'
18
- s.add_development_dependency 'actionpack', '>= 3.2.0', '< 7.0'
19
- s.add_development_dependency 'railties', '>= 3.2.0', '< 7.0'
20
- s.add_development_dependency 'minitest', '>= 4.2'
17
+ s.add_dependency 'activerecord', '>= 3.2.0', '< 7.2'
18
+ s.add_development_dependency 'actionpack', '>= 3.2.0', '< 7.2'
19
+ s.add_development_dependency 'railties', '>= 3.2.0', '< 7.2'
20
+ s.add_development_dependency 'minitest', '>= 5.0'
21
21
  s.add_development_dependency 'minitest-around'
22
22
  s.add_development_dependency 'appraisal'
23
23
  end
data/test.rb CHANGED
@@ -60,18 +60,18 @@ if rails_2_4_or_newer && arel_older_than_7_1
60
60
  end
61
61
  end
62
62
 
63
- begin
64
- TestCaseClass = MiniTest::Test
65
- rescue NameError
66
- TestCaseClass = MiniTest::Unit::TestCase
67
- end
68
-
69
63
  require 'default_value_for'
70
64
 
71
65
  puts "\nTesting with Active Record version #{ActiveRecord::VERSION::STRING}"
72
66
  puts "\nTesting with Action Pack version #{ActionPack::VERSION::STRING}\n\n"
73
67
 
74
- ActiveRecord::Base.default_timezone = :local
68
+ if ActiveRecord.respond_to?(:default_timezone)
69
+ ActiveRecord.default_timezone = :local
70
+ else
71
+ # Deprecated in rails 7.0, removed in 7.1
72
+ ActiveRecord::Base.default_timezone = :local
73
+ end
74
+
75
75
  ActiveRecord::Base.logger = Logger.new(STDERR)
76
76
  ActiveRecord::Base.logger.level = Logger::WARN
77
77
 
@@ -101,7 +101,7 @@ if defined?(Rails::Railtie)
101
101
  DefaultValueFor.initialize_active_record_extensions
102
102
  end
103
103
 
104
- class DefaultValuePluginTest < TestCaseClass
104
+ class DefaultValuePluginTest < Minitest::Test
105
105
  def around
106
106
  Object.const_set(:User, Class.new(ActiveRecord::Base))
107
107
  Object.const_set(:Book, Class.new(ActiveRecord::Base))
@@ -117,7 +117,7 @@ class DefaultValuePluginTest < TestCaseClass
117
117
  Object.send(:remove_const, :User)
118
118
  Object.send(:remove_const, :Book)
119
119
  Object.send(:remove_const, :Novel)
120
- ActiveSupport::Dependencies.clear
120
+ ActiveSupport::Dependencies.clear unless ActiveSupport::VERSION::MAJOR > 6
121
121
  end
122
122
 
123
123
  def test_default_value_on_attribute_methods
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: 3.4.0
4
+ version: 3.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hongli Lai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-21 00:00:00.000000000 Z
11
+ date: 2024-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: 3.2.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '7.0'
22
+ version: '7.2'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: 3.2.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '7.0'
32
+ version: '7.2'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: actionpack
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -39,7 +39,7 @@ dependencies:
39
39
  version: 3.2.0
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: '7.0'
42
+ version: '7.2'
43
43
  type: :development
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -49,7 +49,7 @@ dependencies:
49
49
  version: 3.2.0
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: '7.0'
52
+ version: '7.2'
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: railties
55
55
  requirement: !ruby/object:Gem::Requirement
@@ -59,7 +59,7 @@ dependencies:
59
59
  version: 3.2.0
60
60
  - - "<"
61
61
  - !ruby/object:Gem::Version
62
- version: '7.0'
62
+ version: '7.2'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
@@ -69,21 +69,21 @@ dependencies:
69
69
  version: 3.2.0
70
70
  - - "<"
71
71
  - !ruby/object:Gem::Version
72
- version: '7.0'
72
+ version: '7.2'
73
73
  - !ruby/object:Gem::Dependency
74
74
  name: minitest
75
75
  requirement: !ruby/object:Gem::Requirement
76
76
  requirements:
77
77
  - - ">="
78
78
  - !ruby/object:Gem::Version
79
- version: '4.2'
79
+ version: '5.0'
80
80
  type: :development
81
81
  prerelease: false
82
82
  version_requirements: !ruby/object:Gem::Requirement
83
83
  requirements:
84
84
  - - ">="
85
85
  - !ruby/object:Gem::Version
86
- version: '4.2'
86
+ version: '5.0'
87
87
  - !ruby/object:Gem::Dependency
88
88
  name: minitest-around
89
89
  requirement: !ruby/object:Gem::Requirement
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
146
  - !ruby/object:Gem::Version
147
147
  version: '0'
148
148
  requirements: []
149
- rubygems_version: 3.0.3
149
+ rubygems_version: 3.3.27
150
150
  signing_key:
151
151
  specification_version: 4
152
152
  summary: Provides a way to specify default values for ActiveRecord models