act_with_flags 3.1.2 → 3.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/lint.yml +1 -1
- data/.github/workflows/rake.yml +3 -6
- data/.ruby-version +1 -1
- data/Gemfile.lock +91 -93
- data/MIT-LICENSE +3 -1
- data/README.md +5 -12
- data/act_with_flags.gemspec +0 -3
- data/lib/act_with_flags/version.rb +2 -1
- metadata +3 -35
- data/.watchr +0 -61
- data/gemfiles/rails_6.0.gemfile +0 -15
- data/gemfiles/rails_6.1.gemfile +0 -14
- data/gemfiles/rails_7.0.gemfile +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85f31137d2c12e55c9831fb363e297c245af79cd196a9f1990a8cd1047ba9503
|
4
|
+
data.tar.gz: 9a6e2f01fea005bf6e8677ea15cde979cdd0c10d9c067f47eff4a586015c4b50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 400c97f67d917b0e9416846853122a5008240fe38b8837380af9b9284f09c7c68fade3e754acdd7ce988929c01aad49325502f90b0df3cb9fc05e4cc81774afd
|
7
|
+
data.tar.gz: 3a9a277ca14297b86ec41da731e9b76141fcf69c1950b0d72e34054decedd357b3daa86e9ebfd6ab5b6a67db7af83e2a95350c3c5b8f61bb4b67f4f1fc0ad4da
|
data/.github/workflows/lint.yml
CHANGED
data/.github/workflows/rake.yml
CHANGED
@@ -1,23 +1,20 @@
|
|
1
1
|
# see also https://github.com/whitequark/parser/blob/master/.github/workflows/test.yml
|
2
2
|
name: Rake
|
3
3
|
|
4
|
-
on: push
|
4
|
+
on: [push]
|
5
5
|
|
6
6
|
jobs:
|
7
7
|
test:
|
8
8
|
strategy:
|
9
9
|
fail-fast: false
|
10
10
|
matrix:
|
11
|
-
# os: [ubuntu-latest, macos-latest]
|
12
11
|
os: [ubuntu-latest]
|
13
|
-
|
14
|
-
# ruby: [2.5, 2.6, 2.7, '3.0', head, jruby, jruby-head, truffleruby, truffleruby-head]
|
15
|
-
ruby: ["2.7.2", 3.0.1, head]
|
12
|
+
ruby: ["2.7", "3.0", "3.2", head]
|
16
13
|
test_command: ["bundle exec rake test"]
|
17
14
|
runs-on: ${{ matrix.os }}
|
18
15
|
|
19
16
|
steps:
|
20
|
-
- uses: actions/checkout@
|
17
|
+
- uses: actions/checkout@v3
|
21
18
|
- uses: ruby/setup-ruby@v1
|
22
19
|
with:
|
23
20
|
ruby-version: ${{ matrix.ruby }}
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-3.
|
1
|
+
ruby-3.2.2
|
data/Gemfile.lock
CHANGED
@@ -1,72 +1,72 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
act_with_flags (3.1.
|
4
|
+
act_with_flags (3.1.3)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
actioncable (7.0.4)
|
10
|
-
actionpack (= 7.0.4)
|
11
|
-
activesupport (= 7.0.4)
|
9
|
+
actioncable (7.0.4.3)
|
10
|
+
actionpack (= 7.0.4.3)
|
11
|
+
activesupport (= 7.0.4.3)
|
12
12
|
nio4r (~> 2.0)
|
13
13
|
websocket-driver (>= 0.6.1)
|
14
|
-
actionmailbox (7.0.4)
|
15
|
-
actionpack (= 7.0.4)
|
16
|
-
activejob (= 7.0.4)
|
17
|
-
activerecord (= 7.0.4)
|
18
|
-
activestorage (= 7.0.4)
|
19
|
-
activesupport (= 7.0.4)
|
14
|
+
actionmailbox (7.0.4.3)
|
15
|
+
actionpack (= 7.0.4.3)
|
16
|
+
activejob (= 7.0.4.3)
|
17
|
+
activerecord (= 7.0.4.3)
|
18
|
+
activestorage (= 7.0.4.3)
|
19
|
+
activesupport (= 7.0.4.3)
|
20
20
|
mail (>= 2.7.1)
|
21
21
|
net-imap
|
22
22
|
net-pop
|
23
23
|
net-smtp
|
24
|
-
actionmailer (7.0.4)
|
25
|
-
actionpack (= 7.0.4)
|
26
|
-
actionview (= 7.0.4)
|
27
|
-
activejob (= 7.0.4)
|
28
|
-
activesupport (= 7.0.4)
|
24
|
+
actionmailer (7.0.4.3)
|
25
|
+
actionpack (= 7.0.4.3)
|
26
|
+
actionview (= 7.0.4.3)
|
27
|
+
activejob (= 7.0.4.3)
|
28
|
+
activesupport (= 7.0.4.3)
|
29
29
|
mail (~> 2.5, >= 2.5.4)
|
30
30
|
net-imap
|
31
31
|
net-pop
|
32
32
|
net-smtp
|
33
33
|
rails-dom-testing (~> 2.0)
|
34
|
-
actionpack (7.0.4)
|
35
|
-
actionview (= 7.0.4)
|
36
|
-
activesupport (= 7.0.4)
|
34
|
+
actionpack (7.0.4.3)
|
35
|
+
actionview (= 7.0.4.3)
|
36
|
+
activesupport (= 7.0.4.3)
|
37
37
|
rack (~> 2.0, >= 2.2.0)
|
38
38
|
rack-test (>= 0.6.3)
|
39
39
|
rails-dom-testing (~> 2.0)
|
40
40
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
41
|
-
actiontext (7.0.4)
|
42
|
-
actionpack (= 7.0.4)
|
43
|
-
activerecord (= 7.0.4)
|
44
|
-
activestorage (= 7.0.4)
|
45
|
-
activesupport (= 7.0.4)
|
41
|
+
actiontext (7.0.4.3)
|
42
|
+
actionpack (= 7.0.4.3)
|
43
|
+
activerecord (= 7.0.4.3)
|
44
|
+
activestorage (= 7.0.4.3)
|
45
|
+
activesupport (= 7.0.4.3)
|
46
46
|
globalid (>= 0.6.0)
|
47
47
|
nokogiri (>= 1.8.5)
|
48
|
-
actionview (7.0.4)
|
49
|
-
activesupport (= 7.0.4)
|
48
|
+
actionview (7.0.4.3)
|
49
|
+
activesupport (= 7.0.4.3)
|
50
50
|
builder (~> 3.1)
|
51
51
|
erubi (~> 1.4)
|
52
52
|
rails-dom-testing (~> 2.0)
|
53
53
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
54
|
-
activejob (7.0.4)
|
55
|
-
activesupport (= 7.0.4)
|
54
|
+
activejob (7.0.4.3)
|
55
|
+
activesupport (= 7.0.4.3)
|
56
56
|
globalid (>= 0.3.6)
|
57
|
-
activemodel (7.0.4)
|
58
|
-
activesupport (= 7.0.4)
|
59
|
-
activerecord (7.0.4)
|
60
|
-
activemodel (= 7.0.4)
|
61
|
-
activesupport (= 7.0.4)
|
62
|
-
activestorage (7.0.4)
|
63
|
-
actionpack (= 7.0.4)
|
64
|
-
activejob (= 7.0.4)
|
65
|
-
activerecord (= 7.0.4)
|
66
|
-
activesupport (= 7.0.4)
|
57
|
+
activemodel (7.0.4.3)
|
58
|
+
activesupport (= 7.0.4.3)
|
59
|
+
activerecord (7.0.4.3)
|
60
|
+
activemodel (= 7.0.4.3)
|
61
|
+
activesupport (= 7.0.4.3)
|
62
|
+
activestorage (7.0.4.3)
|
63
|
+
actionpack (= 7.0.4.3)
|
64
|
+
activejob (= 7.0.4.3)
|
65
|
+
activerecord (= 7.0.4.3)
|
66
|
+
activesupport (= 7.0.4.3)
|
67
67
|
marcel (~> 1.0)
|
68
68
|
mini_mime (>= 1.1.0)
|
69
|
-
activesupport (7.0.4)
|
69
|
+
activesupport (7.0.4.3)
|
70
70
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
71
71
|
i18n (>= 1.6, < 2)
|
72
72
|
minitest (>= 5.1)
|
@@ -76,27 +76,27 @@ GEM
|
|
76
76
|
rake
|
77
77
|
thor (>= 0.14.0)
|
78
78
|
ast (2.4.2)
|
79
|
-
benchmark-ips (2.
|
79
|
+
benchmark-ips (2.12.0)
|
80
80
|
builder (3.2.4)
|
81
81
|
combustion (1.3.7)
|
82
82
|
activesupport (>= 3.0.0)
|
83
83
|
railties (>= 3.0.0)
|
84
84
|
thor (>= 0.14.6)
|
85
|
-
concurrent-ruby (1.
|
85
|
+
concurrent-ruby (1.2.2)
|
86
86
|
crass (1.0.6)
|
87
|
-
date (3.3.
|
87
|
+
date (3.3.3)
|
88
88
|
docile (1.4.0)
|
89
|
-
erubi (1.
|
90
|
-
globalid (1.
|
89
|
+
erubi (1.12.0)
|
90
|
+
globalid (1.1.0)
|
91
91
|
activesupport (>= 5.0)
|
92
92
|
i18n (1.12.0)
|
93
93
|
concurrent-ruby (~> 1.0)
|
94
94
|
json (2.6.3)
|
95
|
-
language_server-protocol (3.17.0.
|
96
|
-
loofah (2.
|
95
|
+
language_server-protocol (3.17.0.3)
|
96
|
+
loofah (2.20.0)
|
97
97
|
crass (~> 1.0.2)
|
98
98
|
nokogiri (>= 1.5.9)
|
99
|
-
mail (2.8.
|
99
|
+
mail (2.8.1)
|
100
100
|
mini_mime (>= 0.1.1)
|
101
101
|
net-imap
|
102
102
|
net-pop
|
@@ -104,8 +104,8 @@ GEM
|
|
104
104
|
marcel (1.0.2)
|
105
105
|
method_source (1.0.0)
|
106
106
|
mini_mime (1.1.2)
|
107
|
-
minitest (5.
|
108
|
-
net-imap (0.3.
|
107
|
+
minitest (5.18.0)
|
108
|
+
net-imap (0.3.4)
|
109
109
|
date
|
110
110
|
net-protocol
|
111
111
|
net-pop (0.1.2)
|
@@ -114,84 +114,84 @@ GEM
|
|
114
114
|
timeout
|
115
115
|
net-smtp (0.3.3)
|
116
116
|
net-protocol
|
117
|
-
nio4r (2.5.
|
118
|
-
nokogiri (1.
|
117
|
+
nio4r (2.5.9)
|
118
|
+
nokogiri (1.14.3-x86_64-linux)
|
119
119
|
racc (~> 1.4)
|
120
120
|
observr (1.0.5)
|
121
121
|
parallel (1.22.1)
|
122
|
-
parser (3.
|
122
|
+
parser (3.2.2.0)
|
123
123
|
ast (~> 2.4.1)
|
124
|
-
racc (1.6.
|
125
|
-
rack (2.2.4)
|
126
|
-
rack-test (2.0
|
124
|
+
racc (1.6.2)
|
125
|
+
rack (2.2.6.4)
|
126
|
+
rack-test (2.1.0)
|
127
127
|
rack (>= 1.3)
|
128
|
-
rails (7.0.4)
|
129
|
-
actioncable (= 7.0.4)
|
130
|
-
actionmailbox (= 7.0.4)
|
131
|
-
actionmailer (= 7.0.4)
|
132
|
-
actionpack (= 7.0.4)
|
133
|
-
actiontext (= 7.0.4)
|
134
|
-
actionview (= 7.0.4)
|
135
|
-
activejob (= 7.0.4)
|
136
|
-
activemodel (= 7.0.4)
|
137
|
-
activerecord (= 7.0.4)
|
138
|
-
activestorage (= 7.0.4)
|
139
|
-
activesupport (= 7.0.4)
|
128
|
+
rails (7.0.4.3)
|
129
|
+
actioncable (= 7.0.4.3)
|
130
|
+
actionmailbox (= 7.0.4.3)
|
131
|
+
actionmailer (= 7.0.4.3)
|
132
|
+
actionpack (= 7.0.4.3)
|
133
|
+
actiontext (= 7.0.4.3)
|
134
|
+
actionview (= 7.0.4.3)
|
135
|
+
activejob (= 7.0.4.3)
|
136
|
+
activemodel (= 7.0.4.3)
|
137
|
+
activerecord (= 7.0.4.3)
|
138
|
+
activestorage (= 7.0.4.3)
|
139
|
+
activesupport (= 7.0.4.3)
|
140
140
|
bundler (>= 1.15.0)
|
141
|
-
railties (= 7.0.4)
|
141
|
+
railties (= 7.0.4.3)
|
142
142
|
rails-dom-testing (2.0.3)
|
143
143
|
activesupport (>= 4.2.0)
|
144
144
|
nokogiri (>= 1.6)
|
145
|
-
rails-html-sanitizer (1.
|
146
|
-
loofah (~> 2.
|
147
|
-
railties (7.0.4)
|
148
|
-
actionpack (= 7.0.4)
|
149
|
-
activesupport (= 7.0.4)
|
145
|
+
rails-html-sanitizer (1.5.0)
|
146
|
+
loofah (~> 2.19, >= 2.19.1)
|
147
|
+
railties (7.0.4.3)
|
148
|
+
actionpack (= 7.0.4.3)
|
149
|
+
activesupport (= 7.0.4.3)
|
150
150
|
method_source
|
151
151
|
rake (>= 12.2)
|
152
152
|
thor (~> 1.0)
|
153
153
|
zeitwerk (~> 2.5)
|
154
154
|
rainbow (3.1.1)
|
155
155
|
rake (13.0.6)
|
156
|
-
regexp_parser (2.
|
156
|
+
regexp_parser (2.8.0)
|
157
157
|
rexml (3.2.5)
|
158
158
|
ricecream (0.2.1)
|
159
|
-
rubocop (1.
|
159
|
+
rubocop (1.48.1)
|
160
160
|
json (~> 2.3)
|
161
161
|
parallel (~> 1.10)
|
162
|
-
parser (>= 3.
|
162
|
+
parser (>= 3.2.0.0)
|
163
163
|
rainbow (>= 2.2.2, < 4.0)
|
164
164
|
regexp_parser (>= 1.8, < 3.0)
|
165
165
|
rexml (>= 3.2.5, < 4.0)
|
166
|
-
rubocop-ast (>= 1.
|
166
|
+
rubocop-ast (>= 1.26.0, < 2.0)
|
167
167
|
ruby-progressbar (~> 1.7)
|
168
|
-
unicode-display_width (>=
|
169
|
-
rubocop-ast (1.
|
170
|
-
parser (>= 3.
|
171
|
-
rubocop-performance (1.
|
168
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
169
|
+
rubocop-ast (1.28.0)
|
170
|
+
parser (>= 3.2.1.0)
|
171
|
+
rubocop-performance (1.16.0)
|
172
172
|
rubocop (>= 1.7.0, < 2.0)
|
173
173
|
rubocop-ast (>= 0.4.0)
|
174
|
-
ruby-progressbar (1.
|
175
|
-
simplecov (0.
|
174
|
+
ruby-progressbar (1.13.0)
|
175
|
+
simplecov (0.22.0)
|
176
176
|
docile (~> 1.1)
|
177
177
|
simplecov-html (~> 0.11)
|
178
178
|
simplecov_json_formatter (~> 0.1)
|
179
179
|
simplecov-html (0.12.3)
|
180
180
|
simplecov_json_formatter (0.1.4)
|
181
|
-
sqlite3 (1.
|
182
|
-
standard (1.
|
181
|
+
sqlite3 (1.6.2-x86_64-linux)
|
182
|
+
standard (1.26.0)
|
183
183
|
language_server-protocol (~> 3.17.0.2)
|
184
|
-
rubocop (
|
185
|
-
rubocop-performance (
|
184
|
+
rubocop (~> 1.48.1)
|
185
|
+
rubocop-performance (~> 1.16.0)
|
186
186
|
thor (1.2.1)
|
187
|
-
timeout (0.3.
|
188
|
-
tzinfo (2.0.
|
187
|
+
timeout (0.3.2)
|
188
|
+
tzinfo (2.0.6)
|
189
189
|
concurrent-ruby (~> 1.0)
|
190
|
-
unicode-display_width (2.
|
190
|
+
unicode-display_width (2.4.2)
|
191
191
|
websocket-driver (0.7.5)
|
192
192
|
websocket-extensions (>= 0.1.0)
|
193
193
|
websocket-extensions (0.1.5)
|
194
|
-
zeitwerk (2.6.
|
194
|
+
zeitwerk (2.6.7)
|
195
195
|
|
196
196
|
PLATFORMS
|
197
197
|
x86_64-linux
|
@@ -200,16 +200,14 @@ DEPENDENCIES
|
|
200
200
|
act_with_flags!
|
201
201
|
appraisal
|
202
202
|
benchmark-ips
|
203
|
-
bundler
|
204
203
|
combustion
|
205
204
|
minitest
|
206
205
|
observr
|
207
206
|
rails
|
208
|
-
rake
|
209
207
|
ricecream
|
210
208
|
simplecov
|
211
209
|
sqlite3
|
212
210
|
standard
|
213
211
|
|
214
212
|
BUNDLED WITH
|
215
|
-
2.
|
213
|
+
2.4.10
|
data/MIT-LICENSE
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019-2023 Dittmar Krall (www.matiq.com)
|
2
4
|
|
3
5
|
Permission is hereby granted, free of charge, to any person obtaining
|
4
6
|
a copy of this software and associated documentation files (the
|
data/README.md
CHANGED
@@ -7,21 +7,14 @@ A Rails gem required by key.matiq.
|
|
7
7
|
Handles booleans in "flags".
|
8
8
|
Defines setters and getters to access the booleans.
|
9
9
|
|
10
|
-
|
11
10
|
## Installation
|
12
11
|
|
13
12
|
As usual:
|
14
13
|
```ruby
|
15
14
|
# Gemfile
|
16
|
-
|
17
|
-
gem 'act_with_flags'
|
15
|
+
gem "act_with_flags"
|
18
16
|
```
|
19
|
-
|
20
|
-
or manually:
|
21
|
-
```shell
|
22
|
-
$ gem install act_with_flags
|
23
|
-
```
|
24
|
-
|
17
|
+
and run "bundle install".
|
25
18
|
|
26
19
|
## Version 3.1.1
|
27
20
|
|
@@ -128,9 +121,9 @@ Further reading:
|
|
128
121
|
- [gem bitwise](https://github.com/kenn/bitwise)
|
129
122
|
|
130
123
|
|
131
|
-
##
|
124
|
+
## Miscellaneous
|
132
125
|
|
133
|
-
Copyright (c) 2019-
|
134
|
-
|
126
|
+
Copyright (c) 2019-2023 Dittmar Krall (www.matiq.com),
|
127
|
+
released under the MIT license:
|
135
128
|
|
136
129
|
* https://opensource.org/licenses/MIT
|
data/act_with_flags.gemspec
CHANGED
@@ -18,11 +18,8 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.files = `git ls-files -z`.split("\x0")
|
19
19
|
s.require_paths = ["lib"]
|
20
20
|
|
21
|
-
s.add_development_dependency "bundler"
|
22
|
-
s.add_development_dependency "rake"
|
23
21
|
s.add_development_dependency "appraisal"
|
24
22
|
s.add_development_dependency "combustion"
|
25
|
-
|
26
23
|
s.add_development_dependency "minitest"
|
27
24
|
s.add_development_dependency "sqlite3"
|
28
25
|
end
|
metadata
CHANGED
@@ -1,43 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: act_with_flags
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dittmar Krall
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: bundler
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rake
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
13
|
- !ruby/object:Gem::Dependency
|
42
14
|
name: appraisal
|
43
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -106,7 +78,6 @@ files:
|
|
106
78
|
- ".gitignore"
|
107
79
|
- ".ruby-gemset"
|
108
80
|
- ".ruby-version"
|
109
|
-
- ".watchr"
|
110
81
|
- Appraisals
|
111
82
|
- Gemfile
|
112
83
|
- Gemfile.lock
|
@@ -114,9 +85,6 @@ files:
|
|
114
85
|
- README.md
|
115
86
|
- Rakefile
|
116
87
|
- act_with_flags.gemspec
|
117
|
-
- gemfiles/rails_6.0.gemfile
|
118
|
-
- gemfiles/rails_6.1.gemfile
|
119
|
-
- gemfiles/rails_7.0.gemfile
|
120
88
|
- lib/act_with_flags.rb
|
121
89
|
- lib/act_with_flags/admin.rb
|
122
90
|
- lib/act_with_flags/clear.rb
|
@@ -178,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
178
146
|
- !ruby/object:Gem::Version
|
179
147
|
version: '0'
|
180
148
|
requirements: []
|
181
|
-
rubygems_version: 3.
|
149
|
+
rubygems_version: 3.4.10
|
182
150
|
signing_key:
|
183
151
|
specification_version: 4
|
184
152
|
summary: act_with_flags gem
|
data/.watchr
DELETED
@@ -1,61 +0,0 @@
|
|
1
|
-
TESTING = %w[test]
|
2
|
-
HH = "#" * 22 unless defined?(HH)
|
3
|
-
H = "#" * 5 unless defined?(H)
|
4
|
-
|
5
|
-
def usage
|
6
|
-
puts <<-EOS
|
7
|
-
Ctrl-\\ or ctrl-4 Running all tests
|
8
|
-
Ctrl-C Exit
|
9
|
-
EOS
|
10
|
-
end
|
11
|
-
|
12
|
-
def run(cmd)
|
13
|
-
puts "#{HH} #{Time.now} #{HH}"
|
14
|
-
puts "#{H} #{cmd}"
|
15
|
-
system "/usr/bin/time --format '#{HH} Elapsed time %E' #{cmd}"
|
16
|
-
end
|
17
|
-
|
18
|
-
def run_it(type, files)
|
19
|
-
files.split(" ").flatten.each do |file|
|
20
|
-
case type
|
21
|
-
when "test" then run %(bundle exec ruby -I test #{file})
|
22
|
-
# when 'spec'; run %(rspec -X #{file})
|
23
|
-
else; puts "#{H} unknown type: #{type}, file: #{file}"
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
def run_all_tests
|
29
|
-
puts "\n#{HH} Running all tests #{HH}\n"
|
30
|
-
TESTING.each { |dir| run "bundle exec rake #{dir}" if File.exist?(dir) }
|
31
|
-
end
|
32
|
-
|
33
|
-
def run_matching_files(base)
|
34
|
-
base = base.split("_").first
|
35
|
-
TESTING.each { |type|
|
36
|
-
files = Dir["#{type}/**/*.rb"].select { |file| file =~ /#{base}_.*.rb/ }
|
37
|
-
run_it type, files.join(" ") unless files.empty?
|
38
|
-
}
|
39
|
-
end
|
40
|
-
|
41
|
-
TESTING.each { |type|
|
42
|
-
watch("#{type}/#{type}_helper.rb") { run_all_tests }
|
43
|
-
watch("lib/.*.rb") { run_all_tests }
|
44
|
-
watch("#{type}/.*/*_#{type}.rb") { |match| run_it type, match[0] }
|
45
|
-
watch("#{type}/data/(.*).rb") { |match|
|
46
|
-
m1 = match[1]
|
47
|
-
run_matching_files("#{type}/#{m1}/#{m1}_#{type}.rb")
|
48
|
-
}
|
49
|
-
}
|
50
|
-
|
51
|
-
%w[rb erb haml slim].each { |type|
|
52
|
-
watch("app/.*/(.*).#{type}") { |match|
|
53
|
-
run_matching_files(match[1])
|
54
|
-
}
|
55
|
-
}
|
56
|
-
|
57
|
-
# Ctrl-\ or ctrl-4
|
58
|
-
Signal.trap("QUIT") { run_all_tests }
|
59
|
-
# Ctrl-C
|
60
|
-
Signal.trap("INT") { abort("Interrupted\n") }
|
61
|
-
usage
|
data/gemfiles/rails_6.0.gemfile
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "rails", "~> 6.0.0"
|
6
|
-
|
7
|
-
group :test do
|
8
|
-
gem "observr"
|
9
|
-
gem "rubocop", require: false
|
10
|
-
gem "simplecov", require: false
|
11
|
-
gem "benchmark-ips", require: false
|
12
|
-
gem "ricecream", require: false
|
13
|
-
end
|
14
|
-
|
15
|
-
gemspec path: "../"
|
data/gemfiles/rails_6.1.gemfile
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "rails", "~> 6.0"
|
6
|
-
|
7
|
-
group :test do
|
8
|
-
gem "observr"
|
9
|
-
gem "rubocop", require: false
|
10
|
-
gem "simplecov", require: false
|
11
|
-
gem "benchmark-ips"
|
12
|
-
end
|
13
|
-
|
14
|
-
gemspec path: "../"
|
data/gemfiles/rails_7.0.gemfile
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "rails", "~> 7.0"
|
6
|
-
|
7
|
-
group :test do
|
8
|
-
gem "observr"
|
9
|
-
gem "rubocop", require: false
|
10
|
-
gem "simplecov", require: false
|
11
|
-
gem "benchmark-ips", require: false
|
12
|
-
gem "ricecream", require: false
|
13
|
-
end
|
14
|
-
|
15
|
-
gemspec path: "../"
|