assignable_values 1.1.0 → 1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 50d91e6c4106d54f8633e3a77ccb71e8965e4c22201574980eaf15ffea0ed7ac
4
- data.tar.gz: 57d2765dab9e0b60030c08822ee55e478b5c0acb6e7601047047219da2efcabc
3
+ metadata.gz: 4d3f5f5330d96f6c1f6c6dbeabc274d8effa885438634b1838464f2699955aac
4
+ data.tar.gz: 7bd4369a6cf54379268c9ea169a2a6c98fe9ab09f424e495016dcbc405f1525a
5
5
  SHA512:
6
- metadata.gz: a32ca256400f51a6d6fd9654cb745003608394aede06a92b58af2de81f1ac42147137c59de775f5d730e882c770fa1921e0f0c3272c7c2307091d08d7b25c9f2
7
- data.tar.gz: 0a6fb7760c54e0ae6c162002d819d0cae6c39601c5e7851444a1e5773f547b9c5d2c76e15423def89e620f601b4686ad0fd7768c35bcd1534b09856251362f87
6
+ metadata.gz: d3dc0f63c34dd4dfddb7f3ebbc10489403c17249e660338cafbb3732ca86019a7e09f7e428f4c1e4c8e25d4cc2375194ad6332d802e3f7d68647f1a2018c59f2
7
+ data.tar.gz: eef181f993e85e42f1fac008b51507cb51c4a00b7297f78651d15654456272dc84427bff79164c1a8e8d917eca35eea7151803ed75e27a299e750f1ec5b70cc5
@@ -74,6 +74,9 @@ jobs:
74
74
  gemfile: Gemfile.6.1.pg
75
75
  - ruby: 3.3.0
76
76
  gemfile: Gemfile.7.1.pg
77
+ - ruby: 3.3.6
78
+ gemfile: Gemfile.8.0.pg
79
+
77
80
  env:
78
81
  BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
79
82
  steps:
data/CHANGELOG.md CHANGED
@@ -12,6 +12,12 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
12
12
 
13
13
  -
14
14
 
15
+ ## 1.1.1 - 2025-01-09
16
+
17
+ ### Compatible changes
18
+
19
+ - Add Rails 8 support
20
+
15
21
  ## 1.1.0 - 2024-12-05
16
22
 
17
23
  ### Compatible changes
data/Gemfile.5.0.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- assignable_values (1.1.0)
4
+ assignable_values (1.1.1)
5
5
  activerecord (>= 2.3)
6
6
 
7
7
  GEM
data/Gemfile.5.1.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- assignable_values (1.1.0)
4
+ assignable_values (1.1.1)
5
5
  activerecord (>= 2.3)
6
6
 
7
7
  GEM
data/Gemfile.5.1.pg.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- assignable_values (1.1.0)
4
+ assignable_values (1.1.1)
5
5
  activerecord (>= 2.3)
6
6
 
7
7
  GEM
data/Gemfile.6.1.pg.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- assignable_values (1.1.0)
4
+ assignable_values (1.1.1)
5
5
  activerecord (>= 2.3)
6
6
 
7
7
  GEM
data/Gemfile.7.1.pg.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- assignable_values (1.1.0)
4
+ assignable_values (1.1.1)
5
5
  activerecord (>= 2.3)
6
6
 
7
7
  GEM
data/Gemfile.8.0.pg ADDED
@@ -0,0 +1,16 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Runtime dependencies
4
+ gem 'activerecord', '~>8.0.0'
5
+ gem 'i18n'
6
+ gem 'pg'
7
+
8
+ # Development dependencies
9
+ gem 'rake'
10
+ gem 'database_cleaner'
11
+ gem 'rspec'
12
+ gem 'rspec_candy'
13
+ gem 'gemika', '~> 0.8.0'
14
+
15
+ # Gem under test
16
+ gem 'assignable_values', :path => '.'
@@ -0,0 +1,89 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ assignable_values (1.1.1)
5
+ activerecord (>= 2.3)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activemodel (8.0.0.1)
11
+ activesupport (= 8.0.0.1)
12
+ activerecord (8.0.0.1)
13
+ activemodel (= 8.0.0.1)
14
+ activesupport (= 8.0.0.1)
15
+ timeout (>= 0.4.0)
16
+ activesupport (8.0.0.1)
17
+ base64
18
+ benchmark (>= 0.3)
19
+ bigdecimal
20
+ concurrent-ruby (~> 1.0, >= 1.3.1)
21
+ connection_pool (>= 2.2.5)
22
+ drb
23
+ i18n (>= 1.6, < 2)
24
+ logger (>= 1.4.2)
25
+ minitest (>= 5.1)
26
+ securerandom (>= 0.3)
27
+ tzinfo (~> 2.0, >= 2.0.5)
28
+ uri (>= 0.13.1)
29
+ base64 (0.2.0)
30
+ benchmark (0.4.0)
31
+ bigdecimal (3.1.8)
32
+ concurrent-ruby (1.3.4)
33
+ connection_pool (2.4.1)
34
+ database_cleaner (2.1.0)
35
+ database_cleaner-active_record (>= 2, < 3)
36
+ database_cleaner-active_record (2.2.0)
37
+ activerecord (>= 5.a)
38
+ database_cleaner-core (~> 2.0.0)
39
+ database_cleaner-core (2.0.1)
40
+ diff-lcs (1.5.1)
41
+ drb (2.2.1)
42
+ gemika (0.8.3)
43
+ i18n (1.14.6)
44
+ concurrent-ruby (~> 1.0)
45
+ logger (1.6.3)
46
+ minitest (5.25.4)
47
+ pg (1.5.9)
48
+ rake (13.2.1)
49
+ rspec (3.13.0)
50
+ rspec-core (~> 3.13.0)
51
+ rspec-expectations (~> 3.13.0)
52
+ rspec-mocks (~> 3.13.0)
53
+ rspec-core (3.13.2)
54
+ rspec-support (~> 3.13.0)
55
+ rspec-expectations (3.13.3)
56
+ diff-lcs (>= 1.2.0, < 2.0)
57
+ rspec-support (~> 3.13.0)
58
+ rspec-mocks (3.13.2)
59
+ diff-lcs (>= 1.2.0, < 2.0)
60
+ rspec-support (~> 3.13.0)
61
+ rspec-support (3.13.2)
62
+ rspec_candy (0.5.1)
63
+ rspec
64
+ sneaky-save
65
+ securerandom (0.4.0)
66
+ sneaky-save (0.1.3)
67
+ activerecord (>= 3.2.0)
68
+ timeout (0.4.2)
69
+ tzinfo (2.0.6)
70
+ concurrent-ruby (~> 1.0)
71
+ uri (1.0.2)
72
+
73
+ PLATFORMS
74
+ ruby
75
+ x86_64-linux
76
+
77
+ DEPENDENCIES
78
+ activerecord (~> 8.0.0)
79
+ assignable_values!
80
+ database_cleaner
81
+ gemika (~> 0.8.0)
82
+ i18n
83
+ pg
84
+ rake
85
+ rspec
86
+ rspec_candy
87
+
88
+ BUNDLED WITH
89
+ 2.5.22
@@ -88,7 +88,7 @@ module AssignableValues
88
88
 
89
89
  unless multiple
90
90
  define_method :"humanized_#{restriction.property.to_s.pluralize}" do
91
- ActiveSupport::Deprecation.warn("humanized_<value>s is deprecated, use humanized_assignable_<value>s instead", caller)
91
+ ActiveSupport::Deprecation.new.warn("humanized_<value>s is deprecated, use humanized_assignable_<value>s instead", caller)
92
92
  restriction.humanized_assignable_values(self)
93
93
  end
94
94
  end
@@ -8,7 +8,7 @@ class HumanizableString < String
8
8
  end
9
9
 
10
10
  def humanized
11
- ActiveSupport::Deprecation.warn("assignable_<value>.humanized is deprecated, use humanized_assignable_<value>s.humanized instead", caller)
11
+ ActiveSupport::Deprecation.new.warn("assignable_<value>.humanized is deprecated, use humanized_assignable_<value>s.humanized instead", caller)
12
12
  @humanization
13
13
  end
14
14
 
@@ -1,3 +1,3 @@
1
1
  module AssignableValues
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.1'
3
3
  end
@@ -1277,9 +1277,17 @@ describe AssignableValues::ActiveRecord do
1277
1277
  %w[pop rock]
1278
1278
  end
1279
1279
  end
1280
- ActiveSupport::Deprecation.should_receive(:warn)
1280
+ deprecation_instance = instance_double(ActiveSupport::Deprecation)
1281
+ allow(ActiveSupport::Deprecation).to receive(:new).and_return(deprecation_instance)
1282
+ allow(deprecation_instance).to receive(:warn)
1283
+
1281
1284
  genres = klass.new.humanized_genres
1282
1285
  genres.collect(&:humanized).should == ['Pop music', 'Rock music']
1286
+
1287
+ expect(deprecation_instance).to have_received(:warn).with(
1288
+ "humanized_<value>s is deprecated, use humanized_assignable_<value>s instead",
1289
+ instance_of(Array)
1290
+ )
1283
1291
  end
1284
1292
 
1285
1293
  it "should define a method #humanized on assignable string values, which return up the value's' translation" do
@@ -1288,8 +1296,16 @@ describe AssignableValues::ActiveRecord do
1288
1296
  %w[pop rock]
1289
1297
  end
1290
1298
  end
1291
- ActiveSupport::Deprecation.should_receive(:warn).at_least(:once)
1299
+ deprecation_instance = instance_double(ActiveSupport::Deprecation)
1300
+ allow(ActiveSupport::Deprecation).to receive(:new).and_return(deprecation_instance)
1301
+ allow(deprecation_instance).to receive(:warn)
1302
+
1292
1303
  klass.new.assignable_genres.collect(&:humanized).should == ['Pop music', 'Rock music']
1304
+
1305
+ expect(deprecation_instance).to have_received(:warn).with(
1306
+ "assignable_<value>.humanized is deprecated, use humanized_assignable_<value>s.humanized instead",
1307
+ instance_of(Array)
1308
+ ).at_least(:once)
1293
1309
  end
1294
1310
 
1295
1311
  it 'should not define a method #humanized on values that are not strings' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: assignable_values
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henning Koch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-05 00:00:00.000000000 Z
11
+ date: 2025-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -46,6 +46,8 @@ files:
46
46
  - Gemfile.6.1.pg.lock
47
47
  - Gemfile.7.1.pg
48
48
  - Gemfile.7.1.pg.lock
49
+ - Gemfile.8.0.pg
50
+ - Gemfile.8.0.pg.lock
49
51
  - Gemfile.lock
50
52
  - LICENSE
51
53
  - README.md