flag_shih_tzu 0.3.19 → 0.3.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +61 -36
- data/CHANGELOG.md +5 -0
- data/LICENSE +18 -19
- data/README.md +11 -20
- data/gemfiles/Gemfile.activerecord-2.3.x +3 -3
- data/gemfiles/Gemfile.activerecord-3.0.x +3 -3
- data/gemfiles/Gemfile.activerecord-3.1.x +3 -3
- data/gemfiles/Gemfile.activerecord-3.2.x +3 -3
- data/gemfiles/Gemfile.activerecord-4.0.x +3 -3
- data/gemfiles/Gemfile.activerecord-4.1.x +3 -3
- data/gemfiles/Gemfile.activerecord-4.2.x +3 -3
- data/lib/flag_shih_tzu.rb +12 -0
- data/lib/flag_shih_tzu/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 860a532b61aec6f40e462a59d766bbac95f654275c8c0e10eedf078f88cbe0ae
|
4
|
+
data.tar.gz: d56a05cba13f94b22af3a187b78241488104a95de05ea315f13b48b1f14ad0f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad3e7222164f83df925b0a0f5ef61ac12a9e93235af35974f697e8755f0bfddddf6b084e7bae483a96b587ba37ba52ac096d3a3f41b53c4dfe467c58dd808c22
|
7
|
+
data.tar.gz: 12f5bb7194d55e086f5522e1afa0a12be2c127fce20d7cea7902d246572b9c14dbc11cd664de153146570ba401df4091e01efa38bade008ebdc3feaf9ff728bf
|
data/.travis.yml
CHANGED
@@ -1,16 +1,43 @@
|
|
1
|
-
|
1
|
+
env:
|
2
|
+
global:
|
3
|
+
- JRUBY_OPTS="-Xcli.debug=true --debug"
|
4
|
+
- CC_TEST_REPORTER_ID=4c2a52b278d6f4b4cbd204d68d8f023af85fe284d6a73ca1d522479c0b8e987c
|
5
|
+
|
6
|
+
before_script:
|
7
|
+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
8
|
+
- chmod +x ./cc-test-reporter
|
9
|
+
- ./cc-test-reporter before-build
|
10
|
+
|
11
|
+
script:
|
12
|
+
- bundle exec rspec
|
13
|
+
|
14
|
+
after_script:
|
15
|
+
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
16
|
+
|
17
|
+
before_install:
|
18
|
+
- gem update --system
|
19
|
+
- gem install bundler
|
20
|
+
|
21
|
+
install:
|
22
|
+
- bundle install
|
23
|
+
|
24
|
+
bundler_args: --no-deployment --jobs 3 --retry 3
|
25
|
+
|
2
26
|
cache: bundler
|
27
|
+
|
28
|
+
language: ruby
|
3
29
|
sudo: false
|
30
|
+
|
4
31
|
rvm:
|
5
32
|
- 1.9.3-p551
|
6
33
|
- 2.0.0-p648
|
7
34
|
- 2.1.10
|
8
|
-
- 2.2.
|
9
|
-
- 2.3.
|
10
|
-
- 2.4.
|
11
|
-
-
|
35
|
+
- 2.2.10
|
36
|
+
- 2.3.7
|
37
|
+
- 2.4.4
|
38
|
+
- 2.5.1
|
12
39
|
- jruby-1.7.26
|
13
|
-
- jruby-9.1.
|
40
|
+
- jruby-9.1.9.0
|
14
41
|
gemfile:
|
15
42
|
- gemfiles/Gemfile.activerecord-2.3.x
|
16
43
|
- gemfiles/Gemfile.activerecord-3.0.x
|
@@ -22,62 +49,60 @@ gemfile:
|
|
22
49
|
- gemfiles/Gemfile.activerecord-5.0.x
|
23
50
|
- gemfiles/Gemfile.activerecord-5.1.x
|
24
51
|
matrix:
|
25
|
-
allow_failures:
|
26
|
-
- rvm: ruby-head
|
27
52
|
exclude:
|
28
|
-
- rvm:
|
53
|
+
- rvm: jruby-9.1.5.0
|
29
54
|
gemfile: gemfiles/Gemfile.activerecord-2.3.x
|
30
|
-
- rvm:
|
55
|
+
- rvm: jruby-9.1.5.0
|
31
56
|
gemfile: gemfiles/Gemfile.activerecord-3.0.x
|
32
|
-
- rvm:
|
57
|
+
- rvm: jruby-9.1.5.0
|
33
58
|
gemfile: gemfiles/Gemfile.activerecord-3.1.x
|
34
|
-
- rvm: ruby-head
|
35
|
-
gemfile: gemfiles/Gemfile.activerecord-3.2.x
|
36
|
-
- rvm: ruby-head
|
37
|
-
gemfile: gemfiles/Gemfile.activerecord-4.0.x
|
38
|
-
- rvm: ruby-head
|
39
|
-
gemfile: gemfiles/Gemfile.activerecord-4.1.x
|
40
59
|
|
41
|
-
- rvm:
|
60
|
+
- rvm: 2.5.1
|
42
61
|
gemfile: gemfiles/Gemfile.activerecord-2.3.x
|
43
|
-
- rvm:
|
62
|
+
- rvm: 2.5.1
|
44
63
|
gemfile: gemfiles/Gemfile.activerecord-3.0.x
|
45
|
-
- rvm:
|
64
|
+
- rvm: 2.5.1
|
46
65
|
gemfile: gemfiles/Gemfile.activerecord-3.1.x
|
66
|
+
- rvm: 2.5.1
|
67
|
+
gemfile: gemfiles/Gemfile.activerecord-3.2.x
|
68
|
+
- rvm: 2.5.1
|
69
|
+
gemfile: gemfiles/Gemfile.activerecord-4.0.x
|
70
|
+
- rvm: 2.5.1
|
71
|
+
gemfile: gemfiles/Gemfile.activerecord-4.1.x
|
47
72
|
|
48
|
-
- rvm: 2.4.
|
73
|
+
- rvm: 2.4.4
|
49
74
|
gemfile: gemfiles/Gemfile.activerecord-2.3.x
|
50
|
-
- rvm: 2.4.
|
75
|
+
- rvm: 2.4.4
|
51
76
|
gemfile: gemfiles/Gemfile.activerecord-3.0.x
|
52
|
-
- rvm: 2.4.
|
77
|
+
- rvm: 2.4.4
|
53
78
|
gemfile: gemfiles/Gemfile.activerecord-3.1.x
|
54
|
-
- rvm: 2.4.
|
79
|
+
- rvm: 2.4.4
|
55
80
|
gemfile: gemfiles/Gemfile.activerecord-3.2.x
|
56
|
-
- rvm: 2.4.
|
81
|
+
- rvm: 2.4.4
|
57
82
|
gemfile: gemfiles/Gemfile.activerecord-4.0.x
|
58
|
-
- rvm: 2.4.
|
83
|
+
- rvm: 2.4.4
|
59
84
|
gemfile: gemfiles/Gemfile.activerecord-4.1.x
|
60
85
|
|
61
|
-
- rvm: 2.3.
|
86
|
+
- rvm: 2.3.7
|
62
87
|
gemfile: gemfiles/Gemfile.activerecord-2.3.x
|
63
|
-
- rvm: 2.3.
|
88
|
+
- rvm: 2.3.7
|
64
89
|
gemfile: gemfiles/Gemfile.activerecord-3.0.x
|
65
|
-
- rvm: 2.3.
|
90
|
+
- rvm: 2.3.7
|
66
91
|
gemfile: gemfiles/Gemfile.activerecord-3.1.x
|
67
|
-
- rvm: 2.3.
|
92
|
+
- rvm: 2.3.7
|
68
93
|
gemfile: gemfiles/Gemfile.activerecord-3.2.x
|
69
|
-
- rvm: 2.3.
|
94
|
+
- rvm: 2.3.7
|
70
95
|
gemfile: gemfiles/Gemfile.activerecord-4.0.x
|
71
96
|
|
72
|
-
- rvm: 2.2.
|
97
|
+
- rvm: 2.2.10
|
73
98
|
gemfile: gemfiles/Gemfile.activerecord-2.3.x
|
74
|
-
- rvm: 2.2.
|
99
|
+
- rvm: 2.2.10
|
75
100
|
gemfile: gemfiles/Gemfile.activerecord-3.0.x
|
76
|
-
- rvm: 2.2.
|
101
|
+
- rvm: 2.2.10
|
77
102
|
gemfile: gemfiles/Gemfile.activerecord-3.1.x
|
78
|
-
- rvm: 2.2.
|
103
|
+
- rvm: 2.2.10
|
79
104
|
gemfile: gemfiles/Gemfile.activerecord-3.2.x
|
80
|
-
- rvm: 2.2.
|
105
|
+
- rvm: 2.2.10
|
81
106
|
gemfile: gemfiles/Gemfile.activerecord-4.0.x
|
82
107
|
|
83
108
|
- rvm: 2.1.10
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
|
3
3
|
* Work merged into master branch goes here until it is released.
|
4
4
|
|
5
|
+
# Version 0.3.19 - MAY.15.2017
|
6
|
+
|
7
|
+
* Fixed a bug in Rails 5 support.
|
8
|
+
* Added Rails 5.1 to travis.
|
9
|
+
|
5
10
|
# Version 0.3.18 - APR.30.2017
|
6
11
|
* Switched from Fixnum to Integer for Ruby 2.4 happiness
|
7
12
|
* Fixed build for all supported Ruby and Rails versions in supported matrix
|
data/LICENSE
CHANGED
@@ -1,23 +1,22 @@
|
|
1
|
-
Copyright (c) 2012-3 {Peter Boling}[http://www.railsbling.com/]
|
2
|
-
Copyright (c) 2011 {XING AG}[http://www.xing.com/]
|
3
|
-
|
4
1
|
MIT License
|
5
2
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
3
|
+
Copyright (c) 2011 XING AG, http://www.xing.com/
|
4
|
+
Copyright (c) 2012 - 2018 Peter Boling, http://www.railsbling.com/
|
5
|
+
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
8
|
+
in the Software without restriction, including without limitation the rights
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
11
|
+
furnished to do so, subject to the following conditions:
|
13
12
|
|
14
|
-
The above copyright notice and this permission notice shall be
|
15
|
-
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
14
|
+
copies or substantial portions of the Software.
|
16
15
|
|
17
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
OF
|
23
|
-
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
22
|
+
SOFTWARE.
|
data/README.md
CHANGED
@@ -5,11 +5,11 @@ Bit fields for ActiveRecord
|
|
5
5
|
| Project | FlagShihTzu |
|
6
6
|
|------------------------ | ----------------- |
|
7
7
|
| gem name | flag_shih_tzu |
|
8
|
-
| license | MIT
|
8
|
+
| license | [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) |
|
9
9
|
| expert support | [![Get help on Codementor](https://cdn.codementor.io/badges/get_help_github.svg)](https://www.codementor.io/peterboling?utm_source=github&utm_medium=button&utm_term=peterboling&utm_campaign=github) |
|
10
|
-
| download rank
|
10
|
+
| download rank | [![Total Downloads](https://img.shields.io/gem/rt/flag_shih_tzu.svg)](https://rubygems.org/gems/flag_shih_tzu) |
|
11
11
|
| version | [![Gem Version](https://badge.fury.io/rb/flag_shih_tzu.png)](http://badge.fury.io/rb/flag_shih_tzu) |
|
12
|
-
| dependencies | [![
|
12
|
+
| dependencies | [![Depfu](https://badges.depfu.com/badges/f011a69cf2426f91483aaade580823ac/count.svg)](https://depfu.com/github/pboling/flag_shih_tzu?project_id=2685) |
|
13
13
|
| code quality | [![Code Climate](https://codeclimate.com/github/pboling/flag_shih_tzu.png)](https://codeclimate.com/github/pboling/flag_shih_tzu) |
|
14
14
|
| inline documenation | [![Inline docs](http://inch-ci.org/github/pboling/flag_shih_tzu.png)](http://inch-ci.org/github/pboling/flag_shih_tzu) |
|
15
15
|
| continuous integration | [![Build Status](https://secure.travis-ci.org/pboling/flag_shih_tzu.png?branch=master)](https://travis-ci.org/pboling/flag_shih_tzu) |
|
@@ -17,7 +17,7 @@ Bit fields for ActiveRecord
|
|
17
17
|
| homepage | [https://github.com/pboling/flag_shih_tzu][homepage] |
|
18
18
|
| documentation | [http://rdoc.info/github/pboling/flag_shih_tzu/frames][documentation] |
|
19
19
|
| live chat | [![Join the chat at https://gitter.im/pboling/flag_shih_tzu](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/pboling/flag_shih_tzu?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) |
|
20
|
-
| Spread ~♡ⓛⓞⓥⓔ♡~ | [
|
20
|
+
| Spread ~♡ⓛⓞⓥⓔ♡~ | [🌍 🌎 🌏](https://about.me/peter.boling), [🍚](https://www.crowdrise.com/helprefugeeswithhopefortomorrowliberia/fundraiser/peterboling), [➕](https://plus.google.com/+PeterBoling/posts), [👼](https://angel.co/peter-boling), [🐛](https://www.topcoder.com/members/pboling/), [:shipit:](http://coderwall.com/pboling), [![Tweet Peter](https://img.shields.io/twitter/follow/galtzo.svg?style=social&label=Follow)](http://twitter.com/galtzo) |
|
21
21
|
|
22
22
|
## Summary
|
23
23
|
|
@@ -213,6 +213,12 @@ has_flags 1 => :spock,
|
|
213
213
|
Calling `has_flags`, as shown above on the 'features' column, creates the following instance methods
|
214
214
|
on Spaceship:
|
215
215
|
|
216
|
+
Spaceship#all_features # [:warpdrive, :shields, :electrolytes]
|
217
|
+
Spaceship#selected_features
|
218
|
+
Spaceship#select_all_features
|
219
|
+
Spaceship#unselect_all_features
|
220
|
+
Spaceship#selected_features=
|
221
|
+
|
216
222
|
Spaceship#warpdrive
|
217
223
|
Spaceship#warpdrive?
|
218
224
|
Spaceship#warpdrive=
|
@@ -220,11 +226,6 @@ on Spaceship:
|
|
220
226
|
Spaceship#not_warpdrive?
|
221
227
|
Spaceship#not_warpdrive=
|
222
228
|
Spaceship#warpdrive_changed?
|
223
|
-
Spaceship#all_warpdrives
|
224
|
-
Spaceship#selected_warpdrives
|
225
|
-
Spaceship#select_all_warpdrives
|
226
|
-
Spaceship#unselect_all_warpdrives
|
227
|
-
Spaceship#selected_warpdrives=
|
228
229
|
Spaceship#has_warpdrive?
|
229
230
|
|
230
231
|
Spaceship#shields
|
@@ -234,11 +235,6 @@ on Spaceship:
|
|
234
235
|
Spaceship#not_shields?
|
235
236
|
Spaceship#not_shields=
|
236
237
|
Spaceship#shields_changed?
|
237
|
-
Spaceship#all_shields
|
238
|
-
Spaceship#selected_shields
|
239
|
-
Spaceship#select_all_shields
|
240
|
-
Spaceship#unselect_all_shields
|
241
|
-
Spaceship#selected_shields=
|
242
238
|
Spaceship#has_shield?
|
243
239
|
|
244
240
|
Spaceship#electrolytes
|
@@ -248,11 +244,6 @@ on Spaceship:
|
|
248
244
|
Spaceship#not_electrolytes?
|
249
245
|
Spaceship#not_electrolytes=
|
250
246
|
Spaceship#electrolytes_changed?
|
251
|
-
Spaceship#all_electrolytes
|
252
|
-
Spaceship#selected_electrolytes
|
253
|
-
Spaceship#select_all_electrolytes
|
254
|
-
Spaceship#unselect_all_electrolytes
|
255
|
-
Spaceship#selected_electrolytes=
|
256
247
|
Spaceship#has_electrolyte?
|
257
248
|
|
258
249
|
|
@@ -534,7 +525,7 @@ More information on the changes for 0.3.X: [pboling/flag_shih_tzu/wiki/Changes-f
|
|
534
525
|
|
535
526
|
## Alternatives
|
536
527
|
|
537
|
-
I
|
528
|
+
I discovered in October 2015 that Michael Grosser had created a competing tool, `bitfields`, way back in 2010, exactly a year after this tool was created. It was a very surreal moment, as I had thought this was the only game in town and it was when I began using and hacking on it. Once I got over that moment I became excited, because competition makes things better, right? So, now I am looking forward to a shootout some lazy Saturday. Until then there's this: http://www.railsbling.com/posts/why-use-flag_shih_tzu/
|
538
529
|
|
539
530
|
There is little that `bitfields` does better. The code is [less efficient](https://github.com/grosser/bitfields/blob/master/lib/bitfields.rb#L186 "recalculating and throwing away much of the result in many places"), albeit more readable, not as well tested, has almost zero inline documentation, and simply can't do many of the things I've built into `flag_shih_tzu`. If you are still on legacy Ruby or legacy Rails, or using jRuby, then use `flag_shih_tzu`. If you need multiple flag columns on a single model, use `flag_shih_tzu`.
|
540
531
|
|
@@ -6,12 +6,12 @@ gem "mime-types", "< 2.0.0", :platforms => [:ruby_18]
|
|
6
6
|
|
7
7
|
gem "activerecord", "~> 2.3.0"
|
8
8
|
gem "sqlite3", "~> 1.3", :platforms => [:ruby]
|
9
|
-
gem "activerecord-jdbcsqlite3-adapter", :platforms => [:jruby]
|
9
|
+
gem "activerecord-jdbcsqlite3-adapter", "~> 1.3.23", :platforms => [:jruby]
|
10
10
|
gem "mysql", :platforms => [:ruby_19]
|
11
11
|
gem "activerecord-mysql2-adapter", :platforms => [:ruby_20]
|
12
|
-
gem "activerecord-jdbcmysql-adapter", :platforms => [:jruby]
|
12
|
+
gem "activerecord-jdbcmysql-adapter", "~> 1.3.23", :platforms => [:jruby]
|
13
13
|
gem "pg", :platforms => [:ruby_18]
|
14
|
-
gem "activerecord-jdbcpostgresql-adapter", :platforms => [:jruby]
|
14
|
+
gem "activerecord-jdbcpostgresql-adapter", "~> 1.3.23", :platforms => [:jruby]
|
15
15
|
gem "tins", "~> 1.6.0", :platforms => [:ruby_19, :jruby] # released August 13, 2015
|
16
16
|
gem "term-ansicolor", "~> 1.3.2", :platforms => [:ruby_19, :jruby] # released June 23, 2015
|
17
17
|
gem "unparser", "0.2.4", :platforms => [:ruby_19, :ruby_20, :jruby] # released May 30, 2015
|
@@ -6,12 +6,12 @@ gem "mime-types", "< 2.0.0", :platforms => [:ruby_18]
|
|
6
6
|
|
7
7
|
gem "activerecord", "~> 3.0.0"
|
8
8
|
gem "sqlite3", "~> 1.3", :platforms => [:ruby]
|
9
|
-
gem "activerecord-jdbcsqlite3-adapter", :platforms => [:jruby]
|
9
|
+
gem "activerecord-jdbcsqlite3-adapter", "~> 1.3.23", :platforms => [:jruby]
|
10
10
|
gem "mysql", :platforms => [:ruby_19]
|
11
11
|
gem "activerecord-mysql2-adapter", :platforms => [:ruby_20]
|
12
|
-
gem "activerecord-jdbcmysql-adapter", :platforms => [:jruby]
|
12
|
+
gem "activerecord-jdbcmysql-adapter", "~> 1.3.23", :platforms => [:jruby]
|
13
13
|
gem "pg", :platforms => [:ruby_18]
|
14
|
-
gem "activerecord-jdbcpostgresql-adapter", :platforms => [:jruby]
|
14
|
+
gem "activerecord-jdbcpostgresql-adapter", "~> 1.3.23", :platforms => [:jruby]
|
15
15
|
gem "tins", "~> 1.6.0", :platforms => [:ruby_19, :jruby] # released August 13, 2015
|
16
16
|
gem "term-ansicolor", "~> 1.3.2", :platforms => [:ruby_19, :jruby] # released June 23, 2015
|
17
17
|
gem "unparser", "0.2.4", :platforms => [:ruby_19, :ruby_20, :jruby] # released May 30, 2015
|
@@ -6,12 +6,12 @@ gem "mime-types", "< 2.0.0", :platforms => [:ruby_18]
|
|
6
6
|
|
7
7
|
gem "activerecord", "~> 3.1.0"
|
8
8
|
gem "sqlite3", "~> 1.3", :platforms => [:ruby]
|
9
|
-
gem "activerecord-jdbcsqlite3-adapter", :platforms => [:jruby]
|
9
|
+
gem "activerecord-jdbcsqlite3-adapter", "~> 1.3.23", :platforms => [:jruby]
|
10
10
|
gem "mysql", :platforms => [:ruby_19]
|
11
11
|
gem "activerecord-mysql2-adapter", :platforms => [:ruby_20]
|
12
|
-
gem "activerecord-jdbcmysql-adapter", :platforms => [:jruby]
|
12
|
+
gem "activerecord-jdbcmysql-adapter", "~> 1.3.23", :platforms => [:jruby]
|
13
13
|
gem "pg", :platforms => [:ruby_18]
|
14
|
-
gem "activerecord-jdbcpostgresql-adapter", :platforms => [:jruby]
|
14
|
+
gem "activerecord-jdbcpostgresql-adapter", "~> 1.3.23", :platforms => [:jruby]
|
15
15
|
gem "tins", "~> 1.6.0", :platforms => [:ruby_19, :jruby] # released August 13, 2015
|
16
16
|
gem "term-ansicolor", "~> 1.3.2", :platforms => [:ruby_19, :jruby] # released June 23, 2015
|
17
17
|
gem "unparser", "0.2.4", :platforms => [:ruby_19, :ruby_20, :jruby] # released May 30, 2015
|
@@ -6,12 +6,12 @@ gem "mime-types", "< 2.0.0", :platforms => [:ruby_18]
|
|
6
6
|
|
7
7
|
gem "activerecord", "~> 3.2.0"
|
8
8
|
gem "sqlite3", "~> 1.3", :platforms => [:ruby]
|
9
|
-
gem "activerecord-jdbcsqlite3-adapter", :platforms => [:jruby]
|
9
|
+
gem "activerecord-jdbcsqlite3-adapter", "~> 1.3.23", :platforms => [:jruby]
|
10
10
|
gem "activerecord-mysql-adapter", :platforms => [:ruby_19]
|
11
11
|
gem "activerecord-mysql2-adapter", :platforms => [:ruby_20]
|
12
|
-
gem "activerecord-jdbcmysql-adapter", :platforms => [:jruby]
|
12
|
+
gem "activerecord-jdbcmysql-adapter", "~> 1.3.23", :platforms => [:jruby]
|
13
13
|
gem "pg", :platforms => [:ruby_18]
|
14
|
-
gem "activerecord-jdbcpostgresql-adapter", :platforms => [:jruby]
|
14
|
+
gem "activerecord-jdbcpostgresql-adapter", "~> 1.3.23", :platforms => [:jruby]
|
15
15
|
gem "tins", "~> 1.6.0", :platforms => [:ruby_19, :jruby] # released August 13, 2015
|
16
16
|
gem "term-ansicolor", "~> 1.3.2", :platforms => [:ruby_19, :jruby] # released June 23, 2015
|
17
17
|
gem "unparser", "0.2.4", :platforms => [:ruby_19, :ruby_20, :jruby] # released May 30, 2015
|
@@ -4,11 +4,11 @@ gemspec :path => ".."
|
|
4
4
|
|
5
5
|
gem "activerecord", "~> 4.0.0"
|
6
6
|
gem "sqlite3", "~> 1.3", :platforms => [:ruby]
|
7
|
-
gem "activerecord-jdbcsqlite3-adapter", :platforms => [:jruby]
|
7
|
+
gem "activerecord-jdbcsqlite3-adapter", "~> 1.3.23", :platforms => [:jruby]
|
8
8
|
gem "activerecord-mysql2-adapter", :platforms => [:ruby]
|
9
|
-
gem "activerecord-jdbcmysql-adapter", :platforms => [:jruby]
|
9
|
+
gem "activerecord-jdbcmysql-adapter", "~> 1.3.23", :platforms => [:jruby]
|
10
10
|
gem "pg", :platforms => [:ruby_18]
|
11
|
-
gem "activerecord-jdbcpostgresql-adapter", :platforms => [:jruby]
|
11
|
+
gem "activerecord-jdbcpostgresql-adapter", "~> 1.3.23", :platforms => [:jruby]
|
12
12
|
|
13
13
|
gem "reek", "~> 3.5.0", :platforms => [:ruby]
|
14
14
|
gem "roodi", "~> 5.0.0", :platforms => [:ruby]
|
@@ -4,11 +4,11 @@ gemspec :path => ".."
|
|
4
4
|
|
5
5
|
gem "activerecord", "~> 4.1.0"
|
6
6
|
gem "sqlite3", "~> 1.3", :platforms => [:ruby]
|
7
|
-
gem "activerecord-jdbcsqlite3-adapter", :platforms => [:jruby]
|
7
|
+
gem "activerecord-jdbcsqlite3-adapter", "~> 1.3.23", :platforms => [:jruby]
|
8
8
|
gem "activerecord-mysql2-adapter", :platforms => [:ruby]
|
9
|
-
gem "activerecord-jdbcmysql-adapter", :platforms => [:jruby]
|
9
|
+
gem "activerecord-jdbcmysql-adapter", "~> 1.3.23", :platforms => [:jruby]
|
10
10
|
gem "pg", :platforms => [:ruby_18]
|
11
|
-
gem "activerecord-jdbcpostgresql-adapter", :platforms => [:jruby]
|
11
|
+
gem "activerecord-jdbcpostgresql-adapter", "~> 1.3.23", :platforms => [:jruby]
|
12
12
|
|
13
13
|
gem "reek", "~> 3.5.0", :platforms => [:ruby]
|
14
14
|
gem "roodi", "~> 5.0.0", :platforms => [:ruby]
|
@@ -4,11 +4,11 @@ gemspec :path => ".."
|
|
4
4
|
|
5
5
|
gem "activerecord", "~> 4.2.0"
|
6
6
|
gem "sqlite3", "~> 1.3", :platforms => [:ruby]
|
7
|
-
gem "activerecord-jdbcsqlite3-adapter", :platforms => [:jruby]
|
7
|
+
gem "activerecord-jdbcsqlite3-adapter", "~> 1.3.23", :platforms => [:jruby]
|
8
8
|
gem "activerecord-mysql2-adapter", :platforms => [:ruby]
|
9
|
-
gem "activerecord-jdbcmysql-adapter", :platforms => [:jruby]
|
9
|
+
gem "activerecord-jdbcmysql-adapter", "~> 1.3.23", :platforms => [:jruby]
|
10
10
|
gem "pg", :platforms => [:ruby_18]
|
11
|
-
gem "activerecord-jdbcpostgresql-adapter", :platforms => [:jruby]
|
11
|
+
gem "activerecord-jdbcpostgresql-adapter", "~> 1.3.23", :platforms => [:jruby]
|
12
12
|
|
13
13
|
gem "reek", "~> 3.5.0", :platforms => [:ruby]
|
14
14
|
gem "roodi", "~> 5.0.0", :platforms => [:ruby]
|
data/lib/flag_shih_tzu.rb
CHANGED
@@ -180,6 +180,18 @@ To turn off this warning set check_for_column: false in has_flags definition her
|
|
180
180
|
end
|
181
181
|
end
|
182
182
|
|
183
|
+
if method_defined?(:saved_changes)
|
184
|
+
class_eval <<-EVAL, __FILE__, __LINE__ + 1
|
185
|
+
def saved_change_to_#{flag_name}?
|
186
|
+
if colmn_changes = saved_changes["#{colmn}"]
|
187
|
+
flag_bit = self.class.flag_mapping["#{colmn}"][:#{flag_name}]
|
188
|
+
(colmn_changes[0] & flag_bit) != (colmn_changes[1] & flag_bit)
|
189
|
+
else
|
190
|
+
false
|
191
|
+
end
|
192
|
+
end
|
193
|
+
EVAL
|
194
|
+
end
|
183
195
|
end
|
184
196
|
|
185
197
|
if colmn != DEFAULT_COLUMN_NAME
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flag_shih_tzu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Boling
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2018-09-08 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: activerecord
|
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
158
158
|
version: '0'
|
159
159
|
requirements: []
|
160
160
|
rubyforge_project:
|
161
|
-
rubygems_version: 2.
|
161
|
+
rubygems_version: 2.7.7
|
162
162
|
signing_key:
|
163
163
|
specification_version: 4
|
164
164
|
summary: Bit fields for ActiveRecord
|