active_record_bitmask 1.0.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +5 -14
- data/.rubocop.yml +1 -1
- data/Appraisals +11 -4
- data/CHANGELOG.md +4 -1
- data/active_record_bitmask.gemspec +2 -2
- data/gemfiles/6.1_stable.gemfile +1 -1
- data/gemfiles/7.0_stable.gemfile +1 -1
- data/gemfiles/{5.0_stable.gemfile → 7.1_stable.gemfile} +3 -3
- data/gemfiles/{6.0_stable.gemfile → 7.2_stable.gemfile} +1 -1
- data/lib/active_record_bitmask/model.rb +7 -7
- data/lib/active_record_bitmask/version.rb +1 -1
- metadata +8 -10
- data/gemfiles/5.1_stable.gemfile +0 -13
- data/gemfiles/5.2_stable.gemfile +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64ab7df76d1fa3c85e97580355997027d965cf28ace42d4d7722fde9a137f1c9
|
4
|
+
data.tar.gz: 1570c8e12db122ef3aaed1db19b82bb847b206949e1f1ef691b88d120743ab67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2975d669a61ff04be5401c434fa220620d6e082fc0097cf77c9f7dd56760e4160d5f8512062f49b4a4c8f25162af1adfe1cdd179df15ac4f2ab3f84085472bd
|
7
|
+
data.tar.gz: ce25db01ff1255e799c12788d43d63811d7138e2df1f8bb48672423d9096e6ea7c535be9d282f37c96df5de2fefcb877639ba2f7ac89d067d919afcf38ece486
|
data/.github/workflows/ci.yml
CHANGED
@@ -14,10 +14,10 @@ jobs:
|
|
14
14
|
runs-on: ubuntu-latest
|
15
15
|
strategy:
|
16
16
|
matrix:
|
17
|
-
ruby-version: ['3.1', '3.2']
|
17
|
+
ruby-version: ['3.1', '3.2', '3.3']
|
18
18
|
|
19
19
|
steps:
|
20
|
-
- uses: actions/checkout@
|
20
|
+
- uses: actions/checkout@v4
|
21
21
|
- name: Set up Ruby
|
22
22
|
uses: ruby/setup-ruby@v1
|
23
23
|
with:
|
@@ -30,21 +30,12 @@ jobs:
|
|
30
30
|
runs-on: ubuntu-latest
|
31
31
|
strategy:
|
32
32
|
matrix:
|
33
|
-
gemfile: ['6.0_stable', '
|
34
|
-
ruby-version: ['
|
35
|
-
exclude:
|
36
|
-
- ruby-version: '3.2'
|
37
|
-
gemfile: '6.0_stable'
|
38
|
-
- ruby-version: '3.1'
|
39
|
-
gemfile: '6.0_stable'
|
40
|
-
- ruby-version: '2.5'
|
41
|
-
gemfile: '7.0_stable'
|
42
|
-
- ruby-version: '2.6'
|
43
|
-
gemfile: '7.0_stable'
|
33
|
+
gemfile: ['6.1_stable', '7.0_stable', '7.1_stable', '7.2_stable']
|
34
|
+
ruby-version: ['3.1', '3.2', '3.3']
|
44
35
|
env:
|
45
36
|
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
|
46
37
|
steps:
|
47
|
-
- uses: actions/checkout@
|
38
|
+
- uses: actions/checkout@v4
|
48
39
|
- name: Set up Ruby
|
49
40
|
uses: ruby/setup-ruby@v1
|
50
41
|
with:
|
data/.rubocop.yml
CHANGED
data/Appraisals
CHANGED
@@ -1,13 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
appraise '6.0-stable' do
|
4
|
-
gem 'activerecord', '~> 6.0.0'
|
5
|
-
end
|
6
|
-
|
7
3
|
appraise '6.1-stable' do
|
8
4
|
gem 'activerecord', '~> 6.1.0'
|
5
|
+
gem 'sqlite3', '~> 1.7.0'
|
9
6
|
end
|
10
7
|
|
11
8
|
appraise '7.0-stable' do
|
12
9
|
gem 'activerecord', '~> 7.0.0'
|
10
|
+
gem 'sqlite3', '~> 1.7.0'
|
11
|
+
end
|
12
|
+
|
13
|
+
appraise '7.1-stable' do
|
14
|
+
gem 'activerecord', '~> 7.1.0'
|
15
|
+
gem 'sqlite3', '~> 1.7.0'
|
16
|
+
end
|
17
|
+
|
18
|
+
appraise '7.2-stable' do
|
19
|
+
gem 'activerecord', '~> 7.2.0'
|
13
20
|
end
|
data/CHANGELOG.md
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.summary = 'Simple bitmask attribute support for ActiveRecord'
|
15
15
|
spec.homepage = 'https://github.com/alpaca-tc/active_record_bitmask'
|
16
16
|
|
17
|
-
spec.required_ruby_version = '>=
|
17
|
+
spec.required_ruby_version = '>= 3.1.0'
|
18
18
|
|
19
19
|
spec.metadata = {
|
20
20
|
'homepage_uri' => 'https://github.com/alpaca-tc/active_record_bitmask',
|
@@ -28,5 +28,5 @@ Gem::Specification.new do |spec|
|
|
28
28
|
end
|
29
29
|
spec.require_paths = ['lib']
|
30
30
|
|
31
|
-
spec.add_dependency 'activerecord', '>= 6.
|
31
|
+
spec.add_dependency 'activerecord', '>= 6.1'
|
32
32
|
end
|
data/gemfiles/6.1_stable.gemfile
CHANGED
data/gemfiles/7.0_stable.gemfile
CHANGED
@@ -3,11 +3,11 @@
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
|
5
5
|
gem "pry"
|
6
|
-
gem "rubocop", "
|
6
|
+
gem "rubocop", "1.28.2"
|
7
7
|
gem "appraisal"
|
8
8
|
gem "rake"
|
9
9
|
gem "rspec"
|
10
|
-
gem "sqlite3", "~> 1.
|
11
|
-
gem "activerecord", "~>
|
10
|
+
gem "sqlite3", "~> 1.7.0"
|
11
|
+
gem "activerecord", "~> 7.1.0"
|
12
12
|
|
13
13
|
gemspec path: "../"
|
@@ -51,21 +51,21 @@ module ActiveRecordBitmask
|
|
51
51
|
private
|
52
52
|
|
53
53
|
def define_bitmask_attribute(attribute, map)
|
54
|
-
if ActiveRecord.gem_version >= Gem::Version.new('7.
|
54
|
+
if ActiveRecord.gem_version >= Gem::Version.new('7.2.0')
|
55
|
+
# Greater than or equal to 7.0.0
|
56
|
+
decorate_attributes([attribute]) do |name, subtype|
|
57
|
+
ActiveRecordBitmask::BitmaskType.new(name, map, subtype)
|
58
|
+
end
|
59
|
+
elsif ActiveRecord.gem_version >= Gem::Version.new('7.0.0')
|
55
60
|
# Greater than or equal to 7.0.0
|
56
61
|
attribute(attribute) do |subtype|
|
57
62
|
ActiveRecordBitmask::BitmaskType.new(attribute, map, subtype)
|
58
63
|
end
|
59
|
-
|
64
|
+
else
|
60
65
|
# Equal to 6.1.0
|
61
66
|
decorate_attribute_type(attribute) do |subtype|
|
62
67
|
ActiveRecordBitmask::BitmaskType.new(attribute, map, subtype)
|
63
68
|
end
|
64
|
-
else
|
65
|
-
# Less than 6.1.0
|
66
|
-
decorate_attribute_type(attribute, :bitmask) do |subtype|
|
67
|
-
ActiveRecordBitmask::BitmaskType.new(attribute, map, subtype)
|
68
|
-
end
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_record_bitmask
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- alpaca-tc
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '6.
|
19
|
+
version: '6.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '6.
|
26
|
+
version: '6.1'
|
27
27
|
description:
|
28
28
|
email:
|
29
29
|
- alpaca-tc@alpaca.tc
|
@@ -41,12 +41,10 @@ files:
|
|
41
41
|
- README.md
|
42
42
|
- Rakefile
|
43
43
|
- active_record_bitmask.gemspec
|
44
|
-
- gemfiles/5.0_stable.gemfile
|
45
|
-
- gemfiles/5.1_stable.gemfile
|
46
|
-
- gemfiles/5.2_stable.gemfile
|
47
|
-
- gemfiles/6.0_stable.gemfile
|
48
44
|
- gemfiles/6.1_stable.gemfile
|
49
45
|
- gemfiles/7.0_stable.gemfile
|
46
|
+
- gemfiles/7.1_stable.gemfile
|
47
|
+
- gemfiles/7.2_stable.gemfile
|
50
48
|
- lib/active_record_bitmask.rb
|
51
49
|
- lib/active_record_bitmask/attribute_methods.rb
|
52
50
|
- lib/active_record_bitmask/attribute_methods/query.rb
|
@@ -70,14 +68,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
70
68
|
requirements:
|
71
69
|
- - ">="
|
72
70
|
- !ruby/object:Gem::Version
|
73
|
-
version:
|
71
|
+
version: 3.1.0
|
74
72
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
73
|
requirements:
|
76
74
|
- - ">="
|
77
75
|
- !ruby/object:Gem::Version
|
78
76
|
version: '0'
|
79
77
|
requirements: []
|
80
|
-
rubygems_version: 3.
|
78
|
+
rubygems_version: 3.3.26
|
81
79
|
signing_key:
|
82
80
|
specification_version: 4
|
83
81
|
summary: Simple bitmask attribute support for ActiveRecord
|
data/gemfiles/5.1_stable.gemfile
DELETED
data/gemfiles/5.2_stable.gemfile
DELETED