assignable_values 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 974063fe5e304e09553d556f1eae415a7908f16bc026e713e811cb8180bc7510
4
- data.tar.gz: 5754483e8d63baace26522a6e7885c750e0010a21ee87ce795421a917e0823d6
3
+ metadata.gz: 44f802c26aa733cde6ffe0310fdf880392a20a7f8f5b2e5ce65fed89d7c21011
4
+ data.tar.gz: fbbe479435d4bf2614df55e98269d990a85667ce58c49fc95074dfc9944da345
5
5
  SHA512:
6
- metadata.gz: 13628f9ab3a4fbe96db3a2accfd2be3d00ac711994ece3694c3e3e3d15cf46c94def5e6f53270bd1b9242eb6bae40381b545c70ca68f62bc6d032415107d3918
7
- data.tar.gz: 30833906903fb6291aad2157615631e76880a3df3d6342a057fc9993b021caa4d49173c13910aec5349b98d0af4647087fc4e18b26a7c7caba4a34b236cb9c81
6
+ metadata.gz: cd6bb917d41ecf8db5e80f55a6045fee995f50fe77ca9e4f15f830e54fe95077c4323a231a9b68e7967ec9d0059cd870f5c61de671deb424619d176cd10a3b08
7
+ data.tar.gz: e6f6a2683ef866be714c6067ffc9dbc58d3c4b35fb68a81c0c8aebfa47ce575f6e2111275af0d86526d124bba1b5387ddca17998f637c69f9f583ca825bfa5ac
@@ -69,11 +69,11 @@ jobs:
69
69
  - ruby: 2.7.3
70
70
  gemfile: Gemfile.6.1.pg
71
71
  - ruby: 2.7.3
72
- gemfile: Gemfile.7.0.pg
73
- - ruby: 3.2.0
72
+ gemfile: Gemfile.7.1.pg
73
+ - ruby: 3.3.0
74
74
  gemfile: Gemfile.6.1.pg
75
- - ruby: 3.2.0
76
- gemfile: Gemfile.7.0.pg
75
+ - ruby: 3.3.0
76
+ gemfile: Gemfile.7.1.pg
77
77
  env:
78
78
  BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
79
79
  steps:
@@ -84,6 +84,7 @@ jobs:
84
84
  ruby-version: "${{ matrix.ruby }}"
85
85
  - name: Setup database
86
86
  run: |
87
+ sudo apt-get update
87
88
  sudo apt-get install -y postgresql-client
88
89
  PGPASSWORD=postgres psql -c 'create database assignable_values_test;' -U postgres -p 5432 -h localhost
89
90
  - name: Bundle
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.2.0
1
+ 3.3.0
data/CHANGELOG.md CHANGED
@@ -12,6 +12,10 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
12
12
 
13
13
  -
14
14
 
15
+ ## 1.0.1 - 2024-08-27
16
+
17
+ - Hook into railties correctly
18
+
15
19
  ## 1.0.0 - 2024-02-14
16
20
 
17
21
  - This gem has been in productive use for 12 years now, time for a 1.0 release! 🥳
data/Gemfile CHANGED
@@ -1 +1 @@
1
- Gemfile.7.0.pg
1
+ Gemfile.7.1.pg
data/Gemfile.5.0.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- assignable_values (1.0.0)
4
+ assignable_values (1.0.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.0.0)
4
+ assignable_values (1.0.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.0.0)
4
+ assignable_values (1.0.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.0.0)
4
+ assignable_values (1.0.1)
5
5
  activerecord (>= 2.3)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  # Runtime dependencies
4
- gem 'activerecord', '~>7.0.1'
4
+ gem 'activerecord', '~>7.1.3'
5
5
  gem 'i18n'
6
6
  gem 'pg', '~> 1.3.5'
7
7
 
@@ -1,29 +1,46 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- assignable_values (1.0.0)
4
+ assignable_values (1.0.1)
5
5
  activerecord (>= 2.3)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activemodel (7.0.4.1)
11
- activesupport (= 7.0.4.1)
12
- activerecord (7.0.4.1)
13
- activemodel (= 7.0.4.1)
14
- activesupport (= 7.0.4.1)
15
- activesupport (7.0.4.1)
10
+ activemodel (7.1.3)
11
+ activesupport (= 7.1.3)
12
+ activerecord (7.1.3)
13
+ activemodel (= 7.1.3)
14
+ activesupport (= 7.1.3)
15
+ timeout (>= 0.4.0)
16
+ activesupport (7.1.3)
17
+ base64
18
+ bigdecimal
16
19
  concurrent-ruby (~> 1.0, >= 1.0.2)
20
+ connection_pool (>= 2.2.5)
21
+ drb
17
22
  i18n (>= 1.6, < 2)
18
23
  minitest (>= 5.1)
24
+ mutex_m
19
25
  tzinfo (~> 2.0)
20
- concurrent-ruby (1.2.0)
21
- database_cleaner (1.7.0)
26
+ base64 (0.2.0)
27
+ bigdecimal (3.1.6)
28
+ concurrent-ruby (1.2.3)
29
+ connection_pool (2.4.1)
30
+ database_cleaner (2.0.2)
31
+ database_cleaner-active_record (>= 2, < 3)
32
+ database_cleaner-active_record (2.1.0)
33
+ activerecord (>= 5.a)
34
+ database_cleaner-core (~> 2.0.0)
35
+ database_cleaner-core (2.0.1)
22
36
  diff-lcs (1.3)
37
+ drb (2.2.0)
38
+ ruby2_keywords
23
39
  gemika (0.8.0)
24
- i18n (1.12.0)
40
+ i18n (1.14.1)
25
41
  concurrent-ruby (~> 1.0)
26
- minitest (5.17.0)
42
+ minitest (5.22.2)
43
+ mutex_m (0.2.0)
27
44
  pg (1.3.5)
28
45
  rake (12.3.2)
29
46
  rspec (3.8.0)
@@ -42,16 +59,18 @@ GEM
42
59
  rspec_candy (0.5.1)
43
60
  rspec
44
61
  sneaky-save
62
+ ruby2_keywords (0.0.5)
45
63
  sneaky-save (0.1.3)
46
64
  activerecord (>= 3.2.0)
47
- tzinfo (2.0.5)
65
+ timeout (0.4.1)
66
+ tzinfo (2.0.6)
48
67
  concurrent-ruby (~> 1.0)
49
68
 
50
69
  PLATFORMS
51
70
  ruby
52
71
 
53
72
  DEPENDENCIES
54
- activerecord (~> 7.0.1)
73
+ activerecord (~> 7.1.3)
55
74
  assignable_values!
56
75
  database_cleaner
57
76
  gemika (~> 0.8.0)
data/Gemfile.lock CHANGED
@@ -1 +1 @@
1
- Gemfile.7.0.pg.lock
1
+ Gemfile.7.1.pg.lock
data/README.md CHANGED
@@ -5,7 +5,7 @@ assignable_values - Enums on vitamins [![Tests](https://github.com/makandra/assi
5
5
 
6
6
  We carefully enhanced the core enum functionality with small tweaks that are useful for web forms, internationalized applications and common authorization patterns.
7
7
 
8
- `assignable_values` is tested with Rails 5.1 and 6.1 on Ruby 2.5, 2.7 and 3.0.
8
+ `assignable_values` is tested with Rails 5.1, 6.1 and 7.1 on Ruby 2.5, 2.7 and 3.3.
9
9
 
10
10
 
11
11
  Restricting scalar attributes
@@ -16,5 +16,6 @@ module AssignableValues
16
16
  end
17
17
  end
18
18
 
19
- ActiveRecord::Base.send(:extend, AssignableValues::ActiveRecord)
20
-
19
+ ActiveSupport.on_load(:active_record) do
20
+ extend(AssignableValues::ActiveRecord)
21
+ end
@@ -1,3 +1,3 @@
1
1
  module AssignableValues
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -10,7 +10,11 @@ I18n.enforce_available_locales = true
10
10
  I18n.load_path = [File.join(File.dirname(__FILE__), 'support/i18n.yml')]
11
11
  I18n.default_locale = :en
12
12
 
13
- ActiveRecord::Base.default_timezone = :local
13
+ if ActiveRecord.respond_to?(:default_timezone)
14
+ ActiveRecord.default_timezone = :local
15
+ else
16
+ ActiveRecord::Base.default_timezone = :local
17
+ end
14
18
 
15
19
  Dir["#{File.dirname(__FILE__)}/support/*.rb"].sort.each {|f| require f}
16
20
 
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.0.0
4
+ version: 1.0.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-02-14 00:00:00.000000000 Z
11
+ date: 2024-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -44,8 +44,8 @@ files:
44
44
  - Gemfile.5.1.pg.lock
45
45
  - Gemfile.6.1.pg
46
46
  - Gemfile.6.1.pg.lock
47
- - Gemfile.7.0.pg
48
- - Gemfile.7.0.pg.lock
47
+ - Gemfile.7.1.pg
48
+ - Gemfile.7.1.pg.lock
49
49
  - Gemfile.lock
50
50
  - LICENSE
51
51
  - README.md
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
90
  - !ruby/object:Gem::Version
91
91
  version: '0'
92
92
  requirements: []
93
- rubygems_version: 3.4.13
93
+ rubygems_version: 3.5.3
94
94
  signing_key:
95
95
  specification_version: 4
96
96
  summary: Restrict the values assignable to ActiveRecord attributes or associations