assignable_values 0.16.0 → 0.16.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +104 -0
- data/.ruby-version +1 -1
- data/CHANGELOG.md +42 -1
- data/Gemfile.4.2 +2 -2
- data/Gemfile.4.2.lock +6 -6
- data/Gemfile.5.0 +1 -1
- data/Gemfile.5.0.lock +34 -33
- data/Gemfile.5.1 +1 -1
- data/Gemfile.5.1.lock +32 -32
- data/Gemfile.5.1.pg +1 -1
- data/Gemfile.5.1.pg.lock +4 -4
- data/{Gemfile.3.2 → Gemfile.6.0.pg} +6 -6
- data/Gemfile.6.0.pg.lock +68 -0
- data/README.md +13 -10
- data/lib/assignable_values/active_record/restriction/base.rb +36 -10
- data/lib/assignable_values/active_record/restriction/scalar_attribute.rb +4 -4
- data/lib/assignable_values/version.rb +1 -1
- data/spec/assignable_values/active_record_spec.rb +179 -52
- data/spec/support/database.github.yml +13 -0
- data/spec/support/database.rb +1 -1
- data/spec/support/i18n.yml +4 -1
- data/spec/support/models.rb +3 -3
- metadata +8 -11
- data/.travis.yml +0 -64
- data/Gemfile.2.3 +0 -16
- data/Gemfile.2.3.lock +0 -40
- data/Gemfile.3.2.lock +0 -65
- data/spec/support/database.travis.yml +0 -4
data/spec/support/database.rb
CHANGED
data/spec/support/i18n.yml
CHANGED
data/spec/support/models.rb
CHANGED
@@ -8,11 +8,11 @@ class Song < ActiveRecord::Base
|
|
8
8
|
|
9
9
|
belongs_to :artist
|
10
10
|
|
11
|
-
attr_accessor :
|
11
|
+
attr_accessor :virtual_sub_genre, :virtual_sub_genres, :virtual_multi_genres
|
12
12
|
|
13
|
-
if ActiveRecord::VERSION::MAJOR < 4 || !Song.new(:
|
13
|
+
if ActiveRecord::VERSION::MAJOR < 4 || !Song.new(:multi_genres => ['test']).multi_genres.is_a?(Array)
|
14
14
|
# Rails 4 or not postgres
|
15
|
-
serialize :
|
15
|
+
serialize :multi_genres
|
16
16
|
end
|
17
17
|
|
18
18
|
end
|
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: 0.16.
|
4
|
+
version: 0.16.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henning Koch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -30,16 +30,12 @@ executables: []
|
|
30
30
|
extensions: []
|
31
31
|
extra_rdoc_files: []
|
32
32
|
files:
|
33
|
+
- ".github/workflows/test.yml"
|
33
34
|
- ".gitignore"
|
34
35
|
- ".rspec"
|
35
36
|
- ".ruby-version"
|
36
|
-
- ".travis.yml"
|
37
37
|
- CHANGELOG.md
|
38
38
|
- Gemfile
|
39
|
-
- Gemfile.2.3
|
40
|
-
- Gemfile.2.3.lock
|
41
|
-
- Gemfile.3.2
|
42
|
-
- Gemfile.3.2.lock
|
43
39
|
- Gemfile.4.2
|
44
40
|
- Gemfile.4.2.lock
|
45
41
|
- Gemfile.5.0
|
@@ -48,6 +44,8 @@ files:
|
|
48
44
|
- Gemfile.5.1.lock
|
49
45
|
- Gemfile.5.1.pg
|
50
46
|
- Gemfile.5.1.pg.lock
|
47
|
+
- Gemfile.6.0.pg
|
48
|
+
- Gemfile.6.0.pg.lock
|
51
49
|
- Gemfile.lock
|
52
50
|
- LICENSE
|
53
51
|
- README.md
|
@@ -65,9 +63,9 @@ files:
|
|
65
63
|
- spec/assignable_values/active_record_spec.rb
|
66
64
|
- spec/assignable_values/humanized_value_spec.rb
|
67
65
|
- spec/spec_helper.rb
|
66
|
+
- spec/support/database.github.yml
|
68
67
|
- spec/support/database.rb
|
69
68
|
- spec/support/database.sample.yml
|
70
|
-
- spec/support/database.travis.yml
|
71
69
|
- spec/support/i18n.yml
|
72
70
|
- spec/support/models.rb
|
73
71
|
homepage: https://github.com/makandra/assignable_values
|
@@ -89,8 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
87
|
- !ruby/object:Gem::Version
|
90
88
|
version: '0'
|
91
89
|
requirements: []
|
92
|
-
|
93
|
-
rubygems_version: 2.7.6
|
90
|
+
rubygems_version: 3.2.9
|
94
91
|
signing_key:
|
95
92
|
specification_version: 4
|
96
93
|
summary: Restrict the values assignable to ActiveRecord attributes or associations
|
@@ -98,8 +95,8 @@ test_files:
|
|
98
95
|
- spec/assignable_values/active_record_spec.rb
|
99
96
|
- spec/assignable_values/humanized_value_spec.rb
|
100
97
|
- spec/spec_helper.rb
|
98
|
+
- spec/support/database.github.yml
|
101
99
|
- spec/support/database.rb
|
102
100
|
- spec/support/database.sample.yml
|
103
|
-
- spec/support/database.travis.yml
|
104
101
|
- spec/support/i18n.yml
|
105
102
|
- spec/support/models.rb
|
data/.travis.yml
DELETED
@@ -1,64 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
|
3
|
-
rvm:
|
4
|
-
- 1.8.7
|
5
|
-
- 2.1.8
|
6
|
-
- 2.3.1
|
7
|
-
- 2.4.2
|
8
|
-
|
9
|
-
gemfile:
|
10
|
-
- Gemfile.2.3
|
11
|
-
- Gemfile.3.2
|
12
|
-
- Gemfile.4.2
|
13
|
-
- Gemfile.5.0
|
14
|
-
- Gemfile.5.1
|
15
|
-
- Gemfile.5.1.pg
|
16
|
-
|
17
|
-
matrix:
|
18
|
-
exclude:
|
19
|
-
- gemfile: Gemfile.2.3
|
20
|
-
rvm: 2.1.8
|
21
|
-
- gemfile: Gemfile.2.3
|
22
|
-
rvm: 2.3.1
|
23
|
-
- gemfile: Gemfile.2.3
|
24
|
-
rvm: 2.4.2
|
25
|
-
- gemfile: Gemfile.3.2
|
26
|
-
rvm: 2.3.1
|
27
|
-
- gemfile: Gemfile.3.2
|
28
|
-
rvm: 2.4.2
|
29
|
-
- gemfile: Gemfile.4.2
|
30
|
-
rvm: 1.8.7
|
31
|
-
- gemfile: Gemfile.4.2
|
32
|
-
rvm: 2.4.2
|
33
|
-
- gemfile: Gemfile.5.0
|
34
|
-
rvm: 2.1.8
|
35
|
-
- gemfile: Gemfile.5.0
|
36
|
-
rvm: 1.8.7
|
37
|
-
- gemfile: Gemfile.5.1
|
38
|
-
rvm: 2.1.8
|
39
|
-
- gemfile: Gemfile.5.1
|
40
|
-
rvm: 1.8.7
|
41
|
-
- gemfile: Gemfile.5.1.pg
|
42
|
-
rvm: 2.1.8
|
43
|
-
- gemfile: Gemfile.5.1.pg
|
44
|
-
rvm: 1.8.7
|
45
|
-
|
46
|
-
sudo: false
|
47
|
-
|
48
|
-
cache: bundler
|
49
|
-
|
50
|
-
notifications:
|
51
|
-
email:
|
52
|
-
- fail@makandra.de
|
53
|
-
|
54
|
-
before_script:
|
55
|
-
- psql -c 'create database assignable_values_test;' -U postgres
|
56
|
-
- mysql -e 'create database IF NOT EXISTS assignable_values_test;'
|
57
|
-
|
58
|
-
install:
|
59
|
-
# Old Travis CI bundler explodes when lockfile version doesn't match recently bumped version
|
60
|
-
- gem install bundler --version='=1.12.5'
|
61
|
-
# This is the default Travis CI install step
|
62
|
-
- bundle install --jobs=3 --retry=3 --deployment --path=${BUNDLE_PATH:-vendor/bundle}
|
63
|
-
|
64
|
-
script: bundle exec rake current_rspec
|
data/Gemfile.2.3
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
# Runtime dependencies
|
4
|
-
gem 'activerecord', '~>2.3.0'
|
5
|
-
gem 'i18n', '<0.7' # 0.7 no longer builds for Ruby 1.8.7
|
6
|
-
gem 'mysql2', '= 0.2.24'
|
7
|
-
|
8
|
-
# Development dependencies
|
9
|
-
gem 'rake', '=10.0.4'
|
10
|
-
gem 'database_cleaner', '~> 1.0.0'
|
11
|
-
gem 'rspec', '~> 1.3.0'
|
12
|
-
gem 'rspec_candy'
|
13
|
-
gem 'gemika'
|
14
|
-
|
15
|
-
# Gem under test
|
16
|
-
gem 'assignable_values', :path => '.'
|
data/Gemfile.2.3.lock
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
assignable_values (0.15.1)
|
5
|
-
activerecord (>= 2.3)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
activerecord (2.3.17)
|
11
|
-
activesupport (= 2.3.17)
|
12
|
-
activesupport (2.3.17)
|
13
|
-
database_cleaner (1.0.1)
|
14
|
-
gemika (0.3.2)
|
15
|
-
i18n (0.6.11)
|
16
|
-
mysql2 (0.2.24)
|
17
|
-
rake (10.0.4)
|
18
|
-
rspec (1.3.2)
|
19
|
-
rspec_candy (0.2.8)
|
20
|
-
rspec
|
21
|
-
sneaky-save
|
22
|
-
sneaky-save (0.0.2)
|
23
|
-
activerecord (>= 2.3.2)
|
24
|
-
|
25
|
-
PLATFORMS
|
26
|
-
ruby
|
27
|
-
|
28
|
-
DEPENDENCIES
|
29
|
-
activerecord (~> 2.3.0)
|
30
|
-
assignable_values!
|
31
|
-
database_cleaner (~> 1.0.0)
|
32
|
-
gemika
|
33
|
-
i18n (< 0.7)
|
34
|
-
mysql2 (= 0.2.24)
|
35
|
-
rake (= 10.0.4)
|
36
|
-
rspec (~> 1.3.0)
|
37
|
-
rspec_candy
|
38
|
-
|
39
|
-
BUNDLED WITH
|
40
|
-
1.16.1
|
data/Gemfile.3.2.lock
DELETED
@@ -1,65 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
assignable_values (0.15.1)
|
5
|
-
activerecord (>= 2.3)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
activemodel (3.2.22.5)
|
11
|
-
activesupport (= 3.2.22.5)
|
12
|
-
builder (~> 3.0.0)
|
13
|
-
activerecord (3.2.22.5)
|
14
|
-
activemodel (= 3.2.22.5)
|
15
|
-
activesupport (= 3.2.22.5)
|
16
|
-
arel (~> 3.0.2)
|
17
|
-
tzinfo (~> 0.3.29)
|
18
|
-
activesupport (3.2.22.5)
|
19
|
-
i18n (~> 0.6, >= 0.6.4)
|
20
|
-
multi_json (~> 1.0)
|
21
|
-
arel (3.0.3)
|
22
|
-
builder (3.0.4)
|
23
|
-
database_cleaner (1.0.1)
|
24
|
-
diff-lcs (1.2.5)
|
25
|
-
gemika (0.3.2)
|
26
|
-
i18n (0.6.11)
|
27
|
-
multi_json (1.12.1)
|
28
|
-
mysql2 (0.3.17)
|
29
|
-
rake (10.0.3)
|
30
|
-
rspec (3.5.0)
|
31
|
-
rspec-core (~> 3.5.0)
|
32
|
-
rspec-expectations (~> 3.5.0)
|
33
|
-
rspec-mocks (~> 3.5.0)
|
34
|
-
rspec-core (3.5.4)
|
35
|
-
rspec-support (~> 3.5.0)
|
36
|
-
rspec-expectations (3.5.0)
|
37
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
38
|
-
rspec-support (~> 3.5.0)
|
39
|
-
rspec-mocks (3.5.0)
|
40
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
41
|
-
rspec-support (~> 3.5.0)
|
42
|
-
rspec-support (3.5.0)
|
43
|
-
rspec_candy (0.2.8)
|
44
|
-
rspec
|
45
|
-
sneaky-save
|
46
|
-
sneaky-save (0.0.4)
|
47
|
-
activerecord (>= 3.2.0)
|
48
|
-
tzinfo (0.3.52)
|
49
|
-
|
50
|
-
PLATFORMS
|
51
|
-
ruby
|
52
|
-
|
53
|
-
DEPENDENCIES
|
54
|
-
activerecord (~> 3.2.0)
|
55
|
-
assignable_values!
|
56
|
-
database_cleaner (~> 1.0.0)
|
57
|
-
gemika
|
58
|
-
i18n (< 0.7)
|
59
|
-
mysql2 (= 0.3.17)
|
60
|
-
rake
|
61
|
-
rspec (~> 3.4)
|
62
|
-
rspec_candy
|
63
|
-
|
64
|
-
BUNDLED WITH
|
65
|
-
1.16.1
|