assignable_values 0.16.4 → 0.16.5

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: fcf4880911a30c8f39fe52bb5b018226a899b7ea1b6fa0f4b232d54e198abf83
4
- data.tar.gz: cb52c389c399947480293f65a69d29a2ca6f7ac02de1d743d52a68a1593ba6c2
3
+ metadata.gz: f048184ed974a9878de297fd61fb4839872c0f3d420ca4fc7404c9ed4afd985c
4
+ data.tar.gz: b6a3a9e3fbdbb135130ff94e61abfc54702762e1fc517aba0f75a0e71cf550aa
5
5
  SHA512:
6
- metadata.gz: c68e65b8fd131d928af7e0ebe32999ade79163cc44059718c8032d17ca2331abfbf1d0c1babe35378f0816edd22ba67e5c6c7ad296348e0608ea492ed7d72383
7
- data.tar.gz: '08479bf3b543772e9a8810c4cdec60d72979fa152bc445c4e4f7029e5c4909b02c1484f8a40d0044b091e0ece3f068859ebb026ae797912d0d829da9fd682ded'
6
+ metadata.gz: 788afc6930322071801a893621d516c733ab0bcd2a60bda0e9898d4d7711955d69a8ca2659e2cd6d693cf33134884a9c323372615300eb0103cf3da294442eda
7
+ data.tar.gz: 381ec97d744d0b97a2eef32aa9b2e03a03b157a3cf1537abdf1bd95a8e090ddc6ddcb11ae56653f4efe9be5cb8126cf4a64d4a234e3efab88ebeb819caf86c0c
@@ -0,0 +1,104 @@
1
+ ---
2
+ name: Tests
3
+ 'on':
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+ branches:
9
+ - master
10
+ jobs:
11
+ test_mysql:
12
+ runs-on: ubuntu-20.04
13
+ services:
14
+ mysql:
15
+ image: mysql:5.6
16
+ env:
17
+ MYSQL_ROOT_PASSWORD: password
18
+ ports:
19
+ - 3306:3306
20
+ options: >-
21
+ --health-cmd="mysqladmin ping"
22
+ --health-interval=10s
23
+ --health-timeout=5s
24
+ --health-retries=3
25
+ strategy:
26
+ fail-fast: false
27
+ matrix:
28
+ include:
29
+ - ruby: 2.3.8
30
+ gemfile: Gemfile.4.2
31
+ - ruby: 2.3.8
32
+ gemfile: Gemfile.5.0
33
+ - ruby: 2.3.8
34
+ gemfile: Gemfile.5.1
35
+ - ruby: 2.4.2
36
+ gemfile: Gemfile.5.0
37
+ - ruby: 2.4.2
38
+ gemfile: Gemfile.5.1
39
+ - ruby: 2.5.3
40
+ gemfile: Gemfile.5.0
41
+ - ruby: 2.5.3
42
+ gemfile: Gemfile.5.1
43
+ env:
44
+ BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
45
+ steps:
46
+ - uses: actions/checkout@v2
47
+ - name: Install ruby
48
+ uses: ruby/setup-ruby@v1
49
+ with:
50
+ ruby-version: "${{ matrix.ruby }}"
51
+ - name: Install database client
52
+ run: |
53
+ sudo apt-get update
54
+ sudo apt-get install -y mysql-client libmariadbclient-dev
55
+ - name: Bundle
56
+ run: |
57
+ gem install bundler:2.1.4
58
+ bundle install --no-deployment
59
+ - name: Setup databases
60
+ run: |
61
+ mysql -e 'create database IF NOT EXISTS assignable_values_test;' -u root --password=password -P 3306 -h 127.0.0.1
62
+ - name: Run tests
63
+ run: bundle exec rspec
64
+ test_pg:
65
+ runs-on: ubuntu-20.04
66
+ services:
67
+ postgres:
68
+ image: postgres
69
+ env:
70
+ POSTGRES_PASSWORD: postgres
71
+ options: "--health-cmd pg_isready --health-interval 10s --health-timeout 5s
72
+ --health-retries 5"
73
+ ports:
74
+ - 5432:5432
75
+ strategy:
76
+ fail-fast: false
77
+ matrix:
78
+ include:
79
+ - ruby: 2.3.8
80
+ gemfile: Gemfile.5.1.pg
81
+ - ruby: 2.4.2
82
+ gemfile: Gemfile.5.1.pg
83
+ - ruby: 2.5.3
84
+ gemfile: Gemfile.5.1.pg
85
+ - ruby: 2.5.3
86
+ gemfile: Gemfile.6.0.pg
87
+ env:
88
+ BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
89
+ steps:
90
+ - uses: actions/checkout@v2
91
+ - name: Install ruby
92
+ uses: ruby/setup-ruby@v1
93
+ with:
94
+ ruby-version: "${{ matrix.ruby }}"
95
+ - name: Setup database
96
+ run: |
97
+ sudo apt-get install -y postgresql-client
98
+ PGPASSWORD=postgres psql -c 'create database assignable_values_test;' -U postgres -p 5432 -h localhost
99
+ - name: Bundle
100
+ run: |
101
+ gem install bundler:2.1.4
102
+ bundle install --no-deployment
103
+ - name: Run tests
104
+ run: bundle exec rspec
data/CHANGELOG.md CHANGED
@@ -8,6 +8,12 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
8
8
 
9
9
  ### Compatible changes
10
10
 
11
+ ## 0.16.5 - 2021-01-10
12
+
13
+ ### Compatible changes
14
+
15
+ - Previously assigned values are no longer duplicated when calling the assignable_values method (fixes #32)
16
+
11
17
  ## 0.16.4 - 2020-10-15
12
18
 
13
19
  ### Compatible changes
data/Gemfile.4.2 CHANGED
@@ -3,14 +3,14 @@ source 'https://rubygems.org'
3
3
  # Runtime dependencies
4
4
  gem 'activerecord', '~>4.2.0'
5
5
  gem 'i18n', '~>0.7.0'
6
- gem 'mysql2', '~> 0.3.17'
6
+ gem 'mysql2'
7
7
 
8
8
  # Development dependencies
9
9
  gem 'rake'
10
10
  gem 'database_cleaner'
11
11
  gem 'rspec', '~> 3.4'
12
12
  gem 'rspec_candy'
13
- gem 'gemika'
13
+ gem 'gemika', '>= 0.5.0'
14
14
 
15
15
  # Gem under test
16
16
  gem 'assignable_values', :path => '.'
data/Gemfile.4.2.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- assignable_values (0.16.4)
4
+ assignable_values (0.16.5)
5
5
  activerecord (>= 2.3)
6
6
 
7
7
  GEM
@@ -24,11 +24,11 @@ GEM
24
24
  builder (3.2.2)
25
25
  database_cleaner (1.5.3)
26
26
  diff-lcs (1.2.5)
27
- gemika (0.3.2)
27
+ gemika (0.5.0)
28
28
  i18n (0.7.0)
29
29
  json (1.8.3)
30
30
  minitest (5.9.1)
31
- mysql2 (0.3.20)
31
+ mysql2 (0.4.10)
32
32
  rake (10.3.2)
33
33
  rspec (3.5.0)
34
34
  rspec-core (~> 3.5.0)
@@ -59,12 +59,12 @@ DEPENDENCIES
59
59
  activerecord (~> 4.2.0)
60
60
  assignable_values!
61
61
  database_cleaner
62
- gemika
62
+ gemika (>= 0.5.0)
63
63
  i18n (~> 0.7.0)
64
- mysql2 (~> 0.3.17)
64
+ mysql2
65
65
  rake
66
66
  rspec (~> 3.4)
67
67
  rspec_candy
68
68
 
69
69
  BUNDLED WITH
70
- 1.16.4
70
+ 2.1.4
data/Gemfile.5.0 CHANGED
@@ -10,7 +10,7 @@ gem 'rake'
10
10
  gem 'database_cleaner'
11
11
  gem 'rspec'
12
12
  gem 'rspec_candy'
13
- gem 'gemika'
13
+ gem 'gemika', '>= 0.5.0'
14
14
 
15
15
  # Gem under test
16
16
  gem 'assignable_values', :path => '.'
data/Gemfile.5.0.lock CHANGED
@@ -1,52 +1,53 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- assignable_values (0.16.4)
4
+ assignable_values (0.16.5)
5
5
  activerecord (>= 2.3)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activemodel (5.0.0.1)
11
- activesupport (= 5.0.0.1)
12
- activerecord (5.0.0.1)
13
- activemodel (= 5.0.0.1)
14
- activesupport (= 5.0.0.1)
10
+ activemodel (5.0.7.2)
11
+ activesupport (= 5.0.7.2)
12
+ activerecord (5.0.7.2)
13
+ activemodel (= 5.0.7.2)
14
+ activesupport (= 5.0.7.2)
15
15
  arel (~> 7.0)
16
- activesupport (5.0.0.1)
16
+ activesupport (5.0.7.2)
17
17
  concurrent-ruby (~> 1.0, >= 1.0.2)
18
- i18n (~> 0.7)
18
+ i18n (>= 0.7, < 2)
19
19
  minitest (~> 5.1)
20
20
  tzinfo (~> 1.1)
21
21
  arel (7.1.4)
22
- concurrent-ruby (1.0.2)
23
- database_cleaner (1.5.3)
24
- diff-lcs (1.2.5)
25
- gemika (0.3.2)
26
- i18n (0.7.0)
27
- minitest (5.9.1)
28
- mysql2 (0.4.5)
29
- rake (11.3.0)
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)
22
+ concurrent-ruby (1.1.7)
23
+ database_cleaner (1.8.5)
24
+ diff-lcs (1.4.4)
25
+ gemika (0.5.0)
26
+ i18n (1.8.5)
27
+ concurrent-ruby (~> 1.0)
28
+ minitest (5.14.2)
29
+ mysql2 (0.5.3)
30
+ rake (13.0.1)
31
+ rspec (3.10.0)
32
+ rspec-core (~> 3.10.0)
33
+ rspec-expectations (~> 3.10.0)
34
+ rspec-mocks (~> 3.10.0)
35
+ rspec-core (3.10.0)
36
+ rspec-support (~> 3.10.0)
37
+ rspec-expectations (3.10.0)
37
38
  diff-lcs (>= 1.2.0, < 2.0)
38
- rspec-support (~> 3.5.0)
39
- rspec-mocks (3.5.0)
39
+ rspec-support (~> 3.10.0)
40
+ rspec-mocks (3.10.0)
40
41
  diff-lcs (>= 1.2.0, < 2.0)
41
- rspec-support (~> 3.5.0)
42
- rspec-support (3.5.0)
43
- rspec_candy (0.4.1)
42
+ rspec-support (~> 3.10.0)
43
+ rspec-support (3.10.0)
44
+ rspec_candy (0.5.1)
44
45
  rspec
45
46
  sneaky-save
46
- sneaky-save (0.1.2)
47
+ sneaky-save (0.1.3)
47
48
  activerecord (>= 3.2.0)
48
- thread_safe (0.3.5)
49
- tzinfo (1.2.2)
49
+ thread_safe (0.3.6)
50
+ tzinfo (1.2.7)
50
51
  thread_safe (~> 0.1)
51
52
 
52
53
  PLATFORMS
@@ -56,7 +57,7 @@ DEPENDENCIES
56
57
  activerecord (~> 5.0.0)
57
58
  assignable_values!
58
59
  database_cleaner
59
- gemika
60
+ gemika (>= 0.5.0)
60
61
  i18n
61
62
  mysql2
62
63
  rake
@@ -64,4 +65,4 @@ DEPENDENCIES
64
65
  rspec_candy
65
66
 
66
67
  BUNDLED WITH
67
- 1.16.4
68
+ 2.1.4
data/Gemfile.5.1 CHANGED
@@ -10,7 +10,7 @@ gem 'rake'
10
10
  gem 'database_cleaner'
11
11
  gem 'rspec'
12
12
  gem 'rspec_candy'
13
- gem 'gemika'
13
+ gem 'gemika', '>= 0.5.0'
14
14
 
15
15
  # Gem under test
16
16
  gem 'assignable_values', :path => '.'
data/Gemfile.5.1.lock CHANGED
@@ -1,53 +1,53 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- assignable_values (0.16.4)
4
+ assignable_values (0.16.5)
5
5
  activerecord (>= 2.3)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activemodel (5.1.4)
11
- activesupport (= 5.1.4)
12
- activerecord (5.1.4)
13
- activemodel (= 5.1.4)
14
- activesupport (= 5.1.4)
10
+ activemodel (5.1.7)
11
+ activesupport (= 5.1.7)
12
+ activerecord (5.1.7)
13
+ activemodel (= 5.1.7)
14
+ activesupport (= 5.1.7)
15
15
  arel (~> 8.0)
16
- activesupport (5.1.4)
16
+ activesupport (5.1.7)
17
17
  concurrent-ruby (~> 1.0, >= 1.0.2)
18
- i18n (~> 0.7)
18
+ i18n (>= 0.7, < 2)
19
19
  minitest (~> 5.1)
20
20
  tzinfo (~> 1.1)
21
21
  arel (8.0.0)
22
- concurrent-ruby (1.0.5)
23
- database_cleaner (1.6.1)
24
- diff-lcs (1.3)
25
- gemika (0.3.2)
26
- i18n (0.9.0)
22
+ concurrent-ruby (1.1.7)
23
+ database_cleaner (1.8.5)
24
+ diff-lcs (1.4.4)
25
+ gemika (0.5.0)
26
+ i18n (1.8.5)
27
27
  concurrent-ruby (~> 1.0)
28
- minitest (5.10.3)
29
- mysql2 (0.4.9)
30
- rake (12.1.0)
31
- rspec (3.7.0)
32
- rspec-core (~> 3.7.0)
33
- rspec-expectations (~> 3.7.0)
34
- rspec-mocks (~> 3.7.0)
35
- rspec-core (3.7.0)
36
- rspec-support (~> 3.7.0)
37
- rspec-expectations (3.7.0)
28
+ minitest (5.14.2)
29
+ mysql2 (0.5.3)
30
+ rake (13.0.1)
31
+ rspec (3.10.0)
32
+ rspec-core (~> 3.10.0)
33
+ rspec-expectations (~> 3.10.0)
34
+ rspec-mocks (~> 3.10.0)
35
+ rspec-core (3.10.0)
36
+ rspec-support (~> 3.10.0)
37
+ rspec-expectations (3.10.0)
38
38
  diff-lcs (>= 1.2.0, < 2.0)
39
- rspec-support (~> 3.7.0)
40
- rspec-mocks (3.7.0)
39
+ rspec-support (~> 3.10.0)
40
+ rspec-mocks (3.10.0)
41
41
  diff-lcs (>= 1.2.0, < 2.0)
42
- rspec-support (~> 3.7.0)
43
- rspec-support (3.7.0)
44
- rspec_candy (0.4.1)
42
+ rspec-support (~> 3.10.0)
43
+ rspec-support (3.10.0)
44
+ rspec_candy (0.5.1)
45
45
  rspec
46
46
  sneaky-save
47
- sneaky-save (0.1.2)
47
+ sneaky-save (0.1.3)
48
48
  activerecord (>= 3.2.0)
49
49
  thread_safe (0.3.6)
50
- tzinfo (1.2.3)
50
+ tzinfo (1.2.7)
51
51
  thread_safe (~> 0.1)
52
52
 
53
53
  PLATFORMS
@@ -57,7 +57,7 @@ DEPENDENCIES
57
57
  activerecord (~> 5.1.0)
58
58
  assignable_values!
59
59
  database_cleaner
60
- gemika
60
+ gemika (>= 0.5.0)
61
61
  i18n
62
62
  mysql2
63
63
  rake
@@ -65,4 +65,4 @@ DEPENDENCIES
65
65
  rspec_candy
66
66
 
67
67
  BUNDLED WITH
68
- 1.17.3
68
+ 2.1.4
data/Gemfile.5.1.pg CHANGED
@@ -10,7 +10,7 @@ gem 'rake'
10
10
  gem 'database_cleaner'
11
11
  gem 'rspec'
12
12
  gem 'rspec_candy'
13
- gem 'gemika'
13
+ gem 'gemika', '>= 0.5.0'
14
14
 
15
15
  # Gem under test
16
16
  gem 'assignable_values', :path => '.'
data/Gemfile.5.1.pg.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- assignable_values (0.16.4)
4
+ assignable_values (0.16.5)
5
5
  activerecord (>= 2.3)
6
6
 
7
7
  GEM
@@ -22,7 +22,7 @@ GEM
22
22
  concurrent-ruby (1.0.5)
23
23
  database_cleaner (1.6.1)
24
24
  diff-lcs (1.3)
25
- gemika (0.3.2)
25
+ gemika (0.5.0)
26
26
  i18n (0.9.0)
27
27
  concurrent-ruby (~> 1.0)
28
28
  minitest (5.10.3)
@@ -57,7 +57,7 @@ DEPENDENCIES
57
57
  activerecord (~> 5.1.0)
58
58
  assignable_values!
59
59
  database_cleaner
60
- gemika
60
+ gemika (>= 0.5.0)
61
61
  i18n
62
62
  pg (< 1)
63
63
  rake
@@ -65,4 +65,4 @@ DEPENDENCIES
65
65
  rspec_candy
66
66
 
67
67
  BUNDLED WITH
68
- 1.16.4
68
+ 2.1.4
data/Gemfile.6.0.pg CHANGED
@@ -10,7 +10,7 @@ gem 'rake'
10
10
  gem 'database_cleaner'
11
11
  gem 'rspec'
12
12
  gem 'rspec_candy'
13
- gem 'gemika'
13
+ gem 'gemika', '>= 0.5.0'
14
14
 
15
15
  # Gem under test
16
16
  gem 'assignable_values', :path => '.'
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- assignable_values - Enums on vitamins [![Build Status](https://secure.travis-ci.org/makandra/assignable_values.png?branch=master)](https://travis-ci.org/makandra/assignable_values)
1
+ assignable_values - Enums on vitamins [![Tests](https://github.com/makandra/assignable_values/workflows/Tests/badge.svg)](https://github.com/makandra/assignable_values/actions)
2
2
  =====================================
3
3
 
4
4
  `assignable_values` lets you restrict the values that can be assigned to attributes or associations of ActiveRecord models. You can think of it as enums where the list of allowed values is generated at runtime and the value is checked during validation.
@@ -351,19 +351,19 @@ There are tests in `spec`. We only accept PRs with tests. To run tests:
351
351
 
352
352
  - Install Ruby 2.3.8
353
353
  - Create a local test database `assignable_values_test` in both MySQL and PostgreSQL (see
354
- `.travis.yml` for commands to do so)
354
+ `.github/workflows/test.yml` for commands to do so)
355
355
  - Copy `spec/support/database.sample.yml` to `spec/support/database.yml` and enter your local
356
356
  credentials for the test databases (postgres entry is not required if you are using a socket
357
357
  connection)
358
358
  - Install development dependencies using `bundle install`
359
359
  - Run tests using `bundle exec rake current_rspec`
360
360
 
361
- We recommend to test large changes against multiple versions of Ruby and multiple dependency sets. Supported combinations are configured in `.travis.yml`. We provide some rake tasks to help with this:
361
+ We recommend to test large changes against multiple versions of Ruby and multiple dependency sets. Supported combinations are configured in `.github/workflows/test.yml`. We provide some rake tasks to help with this:
362
362
 
363
363
  - Install development dependencies using `bundle exec rake matrix:install`
364
364
  - Run tests using `bundle exec rake matrix:spec`
365
365
 
366
- Note that we have configured Travis CI to automatically run tests in all supported Ruby versions and dependency sets after each push. We will only merge pull requests after a green Travis build.
366
+ Note that we have configured GitHub Actions to automatically run tests in all supported Ruby versions and dependency sets after each push. We will only merge pull requests after a green GitHub Actions run.
367
367
 
368
368
  I'm very eager to keep this gem leightweight and on topic. If you're unsure whether a change would make it into the gem, [talk to me beforehand](mailto:henning.koch@makandra.de).
369
369
 
@@ -55,7 +55,7 @@ module AssignableValues
55
55
  old_value = previously_saved_value(record)
56
56
  if @options[:multiple]
57
57
  if old_value.is_a?(Array)
58
- additional_assignable_values |= old_value
58
+ additional_assignable_values = old_value
59
59
  end
60
60
  elsif !old_value.blank? && !current_values.include?(old_value)
61
61
  additional_assignable_values << old_value
@@ -69,7 +69,7 @@ module AssignableValues
69
69
 
70
70
  if additional_assignable_values.present?
71
71
  # will not keep current_values scoped
72
- additional_assignable_values + current_values
72
+ additional_assignable_values | current_values
73
73
  else
74
74
  current_values
75
75
  end
@@ -1,3 +1,3 @@
1
1
  module AssignableValues
2
- VERSION = '0.16.4'
2
+ VERSION = '0.16.5'
3
3
  end
@@ -828,6 +828,16 @@ describe AssignableValues::ActiveRecord do
828
828
  klass.new.assignable_genres.should == []
829
829
  end
830
830
 
831
+ it 'should not return saved value twice (BUGFIX)' do
832
+ klass = Song.disposable_copy do
833
+ assignable_values_for :multi_genres, :multiple => true do
834
+ %w[pop rock]
835
+ end
836
+ end
837
+ record = klass.create!(:multi_genres => ['pop'])
838
+ record.assignable_multi_genres.should eq ['pop', 'rock']
839
+ end
840
+
831
841
  it 'should prepend a previously saved value to the top of the list, even if is no longer allowed' do
832
842
  klass = Song.disposable_copy do
833
843
  assignable_values_for :genre do
@@ -0,0 +1,13 @@
1
+ mysql:
2
+ database: assignable_values_test
3
+ username: root
4
+ password: password
5
+ host: 127.0.0.1
6
+ port: 3306
7
+
8
+ postgresql:
9
+ database: assignable_values_test
10
+ host: localhost
11
+ username: postgres
12
+ password: postgres
13
+ port: 5432
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
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: 2020-10-15 00:00:00.000000000 Z
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
@@ -67,9 +63,9 @@ files:
67
63
  - spec/assignable_values/active_record_spec.rb
68
64
  - spec/assignable_values/humanized_value_spec.rb
69
65
  - spec/spec_helper.rb
66
+ - spec/support/database.github.yml
70
67
  - spec/support/database.rb
71
68
  - spec/support/database.sample.yml
72
- - spec/support/database.travis.yml
73
69
  - spec/support/i18n.yml
74
70
  - spec/support/models.rb
75
71
  homepage: https://github.com/makandra/assignable_values
@@ -91,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
87
  - !ruby/object:Gem::Version
92
88
  version: '0'
93
89
  requirements: []
94
- rubygems_version: 3.1.4
90
+ rubygems_version: 3.2.9
95
91
  signing_key:
96
92
  specification_version: 4
97
93
  summary: Restrict the values assignable to ActiveRecord attributes or associations
@@ -99,8 +95,8 @@ test_files:
99
95
  - spec/assignable_values/active_record_spec.rb
100
96
  - spec/assignable_values/humanized_value_spec.rb
101
97
  - spec/spec_helper.rb
98
+ - spec/support/database.github.yml
102
99
  - spec/support/database.rb
103
100
  - spec/support/database.sample.yml
104
- - spec/support/database.travis.yml
105
101
  - spec/support/i18n.yml
106
102
  - spec/support/models.rb
data/.travis.yml DELETED
@@ -1,81 +0,0 @@
1
- language: ruby
2
-
3
- dist: trusty
4
-
5
- rvm:
6
- - 1.8.7
7
- - 2.1.8
8
- - 2.3.8
9
- - 2.4.2
10
- - 2.5.3
11
-
12
- gemfile:
13
- - Gemfile.2.3
14
- - Gemfile.3.2
15
- - Gemfile.4.2
16
- - Gemfile.5.0
17
- - Gemfile.5.1
18
- - Gemfile.5.1.pg
19
- - Gemfile.6.0.pg
20
-
21
- matrix:
22
- exclude:
23
- - gemfile: Gemfile.2.3
24
- rvm: 2.1.8
25
- - gemfile: Gemfile.2.3
26
- rvm: 2.3.8
27
- - gemfile: Gemfile.2.3
28
- rvm: 2.4.2
29
- - gemfile: Gemfile.2.3
30
- rvm: 2.5.3
31
- - gemfile: Gemfile.3.2
32
- rvm: 2.3.8
33
- - gemfile: Gemfile.3.2
34
- rvm: 2.4.2
35
- - gemfile: Gemfile.3.2
36
- rvm: 2.5.3
37
- - gemfile: Gemfile.4.2
38
- rvm: 1.8.7
39
- - gemfile: Gemfile.4.2
40
- rvm: 2.4.2
41
- - gemfile: Gemfile.4.2
42
- rvm: 2.5.3
43
- - gemfile: Gemfile.5.0
44
- rvm: 1.8.7
45
- - gemfile: Gemfile.5.0
46
- rvm: 2.1.8
47
- - gemfile: Gemfile.5.1
48
- rvm: 1.8.7
49
- - gemfile: Gemfile.5.1
50
- rvm: 2.1.8
51
- - gemfile: Gemfile.5.1.pg
52
- rvm: 1.8.7
53
- - gemfile: Gemfile.5.1.pg
54
- rvm: 2.1.8
55
- - gemfile: Gemfile.6.0.pg
56
- rvm: 1.8.7
57
- - gemfile: Gemfile.6.0.pg
58
- rvm: 2.1.8
59
- - gemfile: Gemfile.6.0.pg
60
- rvm: 2.3.8
61
- - gemfile: Gemfile.6.0.pg
62
- rvm: 2.4.2
63
-
64
- addons:
65
- postgresql: "9.4"
66
-
67
- sudo: false
68
-
69
- cache: bundler
70
-
71
- before_script:
72
- - psql -c 'create database assignable_values_test;' -U postgres
73
- - mysql -e 'create database IF NOT EXISTS assignable_values_test;'
74
-
75
- install:
76
- # Old Travis CI bundler explodes when lockfile version doesn't match recently bumped version
77
- - gem install bundler --version='=1.17.3'
78
- # This is the default Travis CI install step
79
- - bundle install --jobs=3 --retry=3 --deployment --path=${BUNDLE_PATH:-vendor/bundle}
80
-
81
- 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.16.4)
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 DELETED
@@ -1,16 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Runtime dependencies
4
- gem 'activerecord', '~>3.2.0'
5
- gem 'i18n', '<0.7'
6
- gem 'mysql2', '= 0.3.17'
7
-
8
- # Development dependencies
9
- gem 'rake'
10
- gem 'database_cleaner', '~> 1.0.0'
11
- gem 'rspec', '~> 3.4'
12
- gem 'rspec_candy'
13
- gem 'gemika'
14
-
15
- # Gem under test
16
- gem 'assignable_values', :path => '.'
data/Gemfile.3.2.lock DELETED
@@ -1,65 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- assignable_values (0.16.4)
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
@@ -1,4 +0,0 @@
1
- mysql:
2
- database: assignable_values_test
3
- username: travis
4
- password: