activerecord-mysql-enum 2.0.0 → 2.0.1.pre.ga.0

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: 459885e4a5040ecec66b8e13a82810c5b58a516e7b6d862540861b983ec16671
4
- data.tar.gz: 22dc3afd5d45bf3a5b7f6ca49105742ac805b9385e470983eaf38be9d22a58fb
3
+ metadata.gz: 8d75edfad144396533c66156f7233d882ca4b26f9cc5c06f436f225442255b7e
4
+ data.tar.gz: d5e687c17ccc89f6bbcdedfbb43f78508a34d0123df68b8bd6017b04c8ea2f4b
5
5
  SHA512:
6
- metadata.gz: '0219e9b653b15e4354b8e515ee815a7dd6daa99c7ccc88470017e3802096e739008ce985c67bfee9aa543f918a5a58a2a5d449c3b6f2dc00601c2412143f7df6'
7
- data.tar.gz: 2215b573018c5d3971294b2d9a672434497437c5c9f846e1ee945491ab2629f03152da44bf0a55dfa91ea17bff3e44ed964655b39aab3d6eb5e5ca748c01f1c0
6
+ metadata.gz: b4caa2673e08242823a6df1769b0a7bf955aa1e8812aff450fb47950e57e99a462811af592862c4350dfbe2dae77ed206aa502b83f9bb116cbae47cb6120664e
7
+ data.tar.gz: b87dea3dbf6c11f019e07e6a06591b8525ce557d738af8de715d14a12117c41dbdcdadc41808d4930fd7be3f2d98e5c0f9bff1a6a4dcab9c342801b30bd9fa59
@@ -2,8 +2,8 @@
2
2
  name: ActiveRecord MySQL Enum
3
3
  on: [push]
4
4
  jobs:
5
- test:
6
- name: Unit Tests
5
+ test-ruby-2:
6
+ name: Ruby 2 Unit Tests
7
7
  runs-on: ubuntu-latest
8
8
  services:
9
9
  mysql:
@@ -19,7 +19,7 @@ jobs:
19
19
  strategy:
20
20
  fail-fast: false
21
21
  matrix:
22
- ruby: [2.5.8, 2.6.5, 2.7.1]
22
+ ruby: [2.5.8, 2.6.5, 2.7]
23
23
  gemfile:
24
24
  - gemfiles/rails_5.gemfile
25
25
  - gemfiles/rails_6.gemfile
@@ -33,7 +33,42 @@ jobs:
33
33
  - uses: ruby/setup-ruby@v1
34
34
  with:
35
35
  ruby-version: ${{ matrix.ruby }}
36
- bundler: 1.17.3
36
+ bundler: 2.2.29
37
+ bundler-cache: true
38
+ - run: RAILS_ENV=test bundle exec rake db:create
39
+ - run: bundle exec rspec
40
+
41
+ test-ruby-3:
42
+ name: Ruby 3 Unit Tests
43
+ runs-on: ubuntu-latest
44
+ services:
45
+ mysql:
46
+ image: mysql:5.7
47
+ env:
48
+ MYSQL_DATABASE: activerecord_mysql_enum_test
49
+ MYSQL_USER: user
50
+ MYSQL_PASSWORD: password
51
+ MYSQL_ROOT_PASSWORD: rootpassword
52
+ ports:
53
+ - 3306:3306
54
+ options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
55
+ strategy:
56
+ fail-fast: false
57
+ matrix:
58
+ ruby: ['3.0', 3.1]
59
+ gemfile:
60
+ - gemfiles/rails_6.gemfile
61
+ env:
62
+ BUNDLE_GEMFILE: gemfiles/rails_6.gemfile
63
+ DATABASE_MYSQL_HOST: 127.0.0.1
64
+ DATABASE_MYSQL_USERNAME: user
65
+ DATABASE_MYSQL_PASSWORD: password
66
+ steps:
67
+ - uses: actions/checkout@v2
68
+ - uses: ruby/setup-ruby@v1
69
+ with:
70
+ ruby-version: ${{ matrix.ruby }}
71
+ bundler: 2.2.29
37
72
  bundler-cache: true
38
73
  - run: RAILS_ENV=test bundle exec rake db:create
39
74
  - run: bundle exec rspec
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.7.5
data/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@ Inspired by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
5
  Note: this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [2.0.1] - Unreleased
8
+ - Upgraded to Ruby 2.7 and Bundler 2.
9
+ - Added support for Ruby 3.0 and 3.1.
10
+
7
11
  ## [2.0.0] - 2021-08-10
8
12
  ### Removed
9
13
  - Dropped support for Rails less than 5
data/Gemfile CHANGED
@@ -11,5 +11,5 @@ gem 'pry'
11
11
  gem 'pry-byebug'
12
12
  gem 'rake', '~> 13.0'
13
13
  gem 'rails', '~> 5.2'
14
- gem 'rspec'
15
- gem 'rspec-rails', '~> 3.0'
14
+ gem 'rspec', '~> 3.11'
15
+ gem 'rspec-rails', '~> 5.0'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- activerecord-mysql-enum (2.0.0)
4
+ activerecord-mysql-enum (2.0.1.pre.ga.0)
5
5
  activerecord (>= 5.2, < 7)
6
6
  mysql2 (>= 0.4.5, < 0.6)
7
7
 
@@ -65,7 +65,7 @@ GEM
65
65
  thor (>= 0.19.4, < 2.0)
66
66
  tins (~> 1.6)
67
67
  crass (1.0.6)
68
- diff-lcs (1.4.4)
68
+ diff-lcs (1.5.0)
69
69
  docile (1.4.0)
70
70
  erubi (1.10.0)
71
71
  globalid (0.5.2)
@@ -123,27 +123,27 @@ GEM
123
123
  rake (>= 0.8.7)
124
124
  thor (>= 0.19.0, < 2.0)
125
125
  rake (13.0.6)
126
- rspec (3.9.0)
127
- rspec-core (~> 3.9.0)
128
- rspec-expectations (~> 3.9.0)
129
- rspec-mocks (~> 3.9.0)
130
- rspec-core (3.9.3)
131
- rspec-support (~> 3.9.3)
132
- rspec-expectations (3.9.4)
126
+ rspec (3.11.0)
127
+ rspec-core (~> 3.11.0)
128
+ rspec-expectations (~> 3.11.0)
129
+ rspec-mocks (~> 3.11.0)
130
+ rspec-core (3.11.0)
131
+ rspec-support (~> 3.11.0)
132
+ rspec-expectations (3.11.0)
133
133
  diff-lcs (>= 1.2.0, < 2.0)
134
- rspec-support (~> 3.9.0)
135
- rspec-mocks (3.9.1)
134
+ rspec-support (~> 3.11.0)
135
+ rspec-mocks (3.11.0)
136
136
  diff-lcs (>= 1.2.0, < 2.0)
137
- rspec-support (~> 3.9.0)
138
- rspec-rails (3.9.1)
139
- actionpack (>= 3.0)
140
- activesupport (>= 3.0)
141
- railties (>= 3.0)
142
- rspec-core (~> 3.9.0)
143
- rspec-expectations (~> 3.9.0)
144
- rspec-mocks (~> 3.9.0)
145
- rspec-support (~> 3.9.0)
146
- rspec-support (3.9.4)
137
+ rspec-support (~> 3.11.0)
138
+ rspec-rails (5.1.1)
139
+ actionpack (>= 5.2)
140
+ activesupport (>= 5.2)
141
+ railties (>= 5.2)
142
+ rspec-core (~> 3.10)
143
+ rspec-expectations (~> 3.10)
144
+ rspec-mocks (~> 3.10)
145
+ rspec-support (~> 3.10)
146
+ rspec-support (3.11.0)
147
147
  simplecov (0.16.1)
148
148
  docile (~> 1.1)
149
149
  json (>= 1.8, < 3)
@@ -180,8 +180,8 @@ DEPENDENCIES
180
180
  pry-byebug
181
181
  rails (~> 5.2)
182
182
  rake (~> 13.0)
183
- rspec
184
- rspec-rails (~> 3.0)
183
+ rspec (~> 3.11)
184
+ rspec-rails (~> 5.0)
185
185
 
186
186
  BUNDLED WITH
187
- 1.17.3
187
+ 2.2.29
@@ -9,7 +9,7 @@ gem "pry-byebug"
9
9
  gem "rake", "~> 13.0"
10
10
  gem "rails", "~> 5.2"
11
11
  gem "rspec"
12
- gem "rspec-rails", "~> 3.0"
12
+ gem "rspec-rails", "~> 4.0"
13
13
  gem "mysql2", "~> 0.4"
14
14
 
15
15
  gemspec path: "../"
@@ -9,7 +9,8 @@ gem "pry-byebug"
9
9
  gem "rake", "~> 13.0"
10
10
  gem "rails", "~> 6.0.0"
11
11
  gem "rspec"
12
- gem "rspec-rails", "~> 3.0"
12
+ gem "rspec-rails", "~> 4.0"
13
13
  gem "mysql2", "~> 0.5"
14
+ gem "net-smtp", require: false
14
15
 
15
16
  gemspec path: "../"
@@ -22,7 +22,7 @@ module ActiveRecord
22
22
  ActiveRecordColumnWithEnums = Enum.mysql_column_adapter
23
23
 
24
24
  module EnumColumnAdapter
25
- def initialize(*)
25
+ def initialize(*args, **kwargs, &block)
26
26
  super
27
27
 
28
28
  if type == :enum
@@ -6,7 +6,7 @@ module ActiveRecord
6
6
  def enum(*args)
7
7
  options = args.extract_options!
8
8
  column_names = args
9
- column_names.each { |name| column(name, 'enum', options) }
9
+ column_names.each { |name| column(name, 'enum', **options) }
10
10
  end
11
11
  end
12
12
  end
@@ -3,7 +3,7 @@
3
3
  module ActiveRecord
4
4
  module Mysql
5
5
  module Enum
6
- VERSION = "2.0.0"
6
+ VERSION = "2.0.1.pre.ga.0"
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-mysql-enum
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1.pre.ga.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Pohodnya
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-08-10 00:00:00.000000000 Z
12
+ date: 2022-03-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
@@ -63,6 +63,7 @@ files:
63
63
  - ".github/workflows/test.yml"
64
64
  - ".gitignore"
65
65
  - ".rspec"
66
+ - ".ruby-version"
66
67
  - Appraisals
67
68
  - CHANGELOG.md
68
69
  - Gemfile
@@ -102,11 +103,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
102
103
  version: '0'
103
104
  required_rubygems_version: !ruby/object:Gem::Requirement
104
105
  requirements:
105
- - - ">="
106
+ - - ">"
106
107
  - !ruby/object:Gem::Version
107
- version: '0'
108
+ version: 1.3.1
108
109
  requirements: []
109
- rubygems_version: 3.0.1
110
+ rubygems_version: 3.1.6
110
111
  signing_key:
111
112
  specification_version: 4
112
113
  summary: Enable enum type for the MySQL Adapter in ActiveRecord