act_with_flags 0.2.0 → 0.2.3
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 +4 -4
- data/.rubocop.yml +3 -74
- data/.ruby-version +1 -1
- data/.travis.yml +3 -1
- data/.watchr +6 -11
- data/Gemfile +2 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +2 -3
- data/act_with_flags.gemspec +6 -7
- data/lib/act_with_flags/version.rb +13 -9
- data/test/internal/app/assets/config/manifest.js +1 -0
- data/test/test_helper.rb +7 -4
- metadata +30 -42
- data/LICENSE +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fc915221f76638c08f3c7d73337c2ceab624f6525e4bc2246edf810ad1adca8
|
4
|
+
data.tar.gz: ce62f053478b0b27c9f3c9a0d5d4f353e95d873d75e36fd8a78194c555fd7a03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b4bc81cc1fa4fa3956ac91bb63e2a56c3612e56193a9758e187c16b316514d45d4e62d1a341ca6a6ab1a4a0c109dcbdbe6efbfe5ee83f09f5152bc908f16708
|
7
|
+
data.tar.gz: aa6db748397688df46f02236f5c7fb02b2fab5a2be1884dcc432bdd2b7efe61215acf5d7e41a7b19643914633e4aa228a8265a32d441e1a62e9003512043d63e
|
data/.rubocop.yml
CHANGED
@@ -1,79 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
# rubocop --auto-gen-config
|
4
|
-
# rubocop
|
5
|
-
# rubocop:disable all
|
6
|
-
|
7
|
-
#inherit_from: .rubocop_todo.yml
|
1
|
+
inherit_from:
|
2
|
+
- ~/configs/.rubocop.yml
|
8
3
|
|
9
4
|
AllCops:
|
10
5
|
Include:
|
11
|
-
- 'app/**/*.rb'
|
12
|
-
- 'bin/**/*.rb'
|
13
|
-
- 'lib/**/*.rb'
|
14
|
-
|
15
|
-
- 'config/**/*.rb'
|
16
|
-
- 'db/**/*.rb'
|
17
6
|
- 'lib/**/*.rb'
|
18
|
-
- 'test/**/*.rb' # 581 offenses
|
19
|
-
- '**/*.gemfile'
|
20
|
-
- '**/*.gemspec'
|
21
|
-
- '**/*.rake'
|
22
|
-
- '**/*.ru'
|
23
|
-
- '**/Gemfile'
|
24
|
-
# - '**/Rakefile'
|
25
|
-
|
26
|
-
#AllCops:
|
27
|
-
# Exclude:
|
28
|
-
# - 'db/**/*'
|
29
|
-
# - 'config/**/*'
|
30
|
-
# - 'script/**/*'
|
31
|
-
# - 'bin/{rails,rake}'
|
32
|
-
# - 'spec/**/*'
|
33
|
-
# - !ruby/regexp /old_and_unused\.rb$/
|
34
|
-
|
35
|
-
Bundler/OrderedGems:
|
36
|
-
Exclude:
|
37
|
-
- 'Gemfile'
|
38
|
-
|
39
|
-
Layout/AccessModifierIndentation:
|
40
|
-
Enabled: false
|
41
|
-
Layout/AlignArray:
|
42
|
-
Enabled: false
|
43
|
-
Layout/CommentIndentation:
|
44
|
-
Enabled: false
|
45
|
-
Layout/EmptyLinesAroundAccessModifier:
|
46
|
-
Enabled: false
|
47
|
-
Layout/EmptyLinesAroundBlockBody:
|
48
|
-
Enabled: false
|
49
|
-
Layout/EmptyLinesAroundClassBody:
|
50
|
-
Enabled: false
|
51
|
-
Layout/ExtraSpacing:
|
52
|
-
Enabled: false
|
53
|
-
Layout/IndentFirstArrayElement:
|
54
|
-
Enabled: false
|
55
|
-
Layout/IndentationWidth:
|
56
|
-
Enabled: false
|
57
|
-
Layout/LeadingCommentSpace:
|
58
|
-
Enabled: false
|
59
|
-
Layout/Tab:
|
60
|
-
Enabled: false
|
61
|
-
|
62
|
-
Lint/UnusedBlockArgument:
|
63
|
-
Enabled: false
|
64
|
-
|
65
|
-
Style/BlockDelimiters:
|
66
|
-
Enabled: false
|
67
|
-
Style/Documentation:
|
68
|
-
Enabled: false
|
69
|
-
Style/FormatString:
|
70
|
-
Enabled: false
|
71
|
-
Style/FrozenStringLiteralComment:
|
72
|
-
Enabled: false
|
73
|
-
Style/WhenThen:
|
74
7
|
Exclude:
|
75
|
-
- '
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
8
|
+
- 'test/**/*'
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-2.6.
|
1
|
+
ruby-2.6.6
|
data/.travis.yml
CHANGED
data/.watchr
CHANGED
@@ -16,35 +16,30 @@ end
|
|
16
16
|
|
17
17
|
def run_it(type, file)
|
18
18
|
case type
|
19
|
-
when 'test'; run %
|
20
|
-
# when '
|
21
|
-
# when 'spec'; run %Q{rspec -X #{file}}
|
19
|
+
when 'test'; run %(ruby -I test #{file})
|
20
|
+
# when 'spec'; run %(rspec -X #{file})
|
22
21
|
else; puts "#{H} unknown type: #{type}, file: #{file}"
|
23
22
|
end
|
24
23
|
end
|
25
24
|
|
26
25
|
def run_all_tests
|
27
26
|
puts "\n#{HH} Running all tests #{HH}\n"
|
28
|
-
%w
|
27
|
+
%w[test spec].each { |dir| run "rake #{dir}" if File.exist?(dir) }
|
29
28
|
end
|
30
29
|
|
31
30
|
def run_matching_files(base)
|
32
31
|
base = base.split('_').first
|
33
|
-
%w
|
32
|
+
%w[test spec].each { |type|
|
34
33
|
files = Dir["#{type}/**/*.rb"].select { |file| file =~ /#{base}_.*\.rb/ }
|
35
34
|
run_it type, files.join(' ') unless files.empty?
|
36
35
|
}
|
37
36
|
end
|
38
37
|
|
39
|
-
%w
|
38
|
+
%w[test spec].each { |type|
|
40
39
|
watch("#{type}/#{type}_helper\.rb") { run_all_tests }
|
40
|
+
watch('lib/.*\.rb') { run_all_tests }
|
41
41
|
watch("#{type}/.*/*_#{type}\.rb") { |match| run_it type, match[0] }
|
42
42
|
}
|
43
|
-
%w{rb erb haml slim}.each { |type|
|
44
|
-
watch("app/.*/.*\.#{type}") { |m|
|
45
|
-
run_matching_files("#{m[0].split('/').at(2).split('.').first}")
|
46
|
-
}
|
47
|
-
}
|
48
43
|
|
49
44
|
# Ctrl-\ or ctrl-4
|
50
45
|
Signal.trap('QUIT') { run_all_tests }
|
data/Gemfile
CHANGED
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2019-2020 Dittmar Krall - www.matique.com
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
CHANGED
data/act_with_flags.gemspec
CHANGED
@@ -18,12 +18,11 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
19
19
|
s.require_paths = ['lib']
|
20
20
|
|
21
|
-
s.add_development_dependency 'bundler'
|
22
|
-
s.add_development_dependency 'rake'
|
23
|
-
s.add_development_dependency 'appraisal'
|
24
|
-
s.add_development_dependency 'combustion'
|
21
|
+
s.add_development_dependency 'bundler', '~>1'
|
22
|
+
s.add_development_dependency 'rake', '~>13'
|
23
|
+
s.add_development_dependency 'appraisal', '~> 2'
|
24
|
+
s.add_development_dependency 'combustion', '~> 1'
|
25
25
|
|
26
|
-
s.add_development_dependency 'minitest'
|
27
|
-
s.add_development_dependency '
|
28
|
-
s.add_development_dependency 'sqlite3'
|
26
|
+
s.add_development_dependency 'minitest', '~> 5.0'
|
27
|
+
s.add_development_dependency 'sqlite3', '~> 1'
|
29
28
|
end
|
@@ -1,13 +1,17 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
# rubocop: disable all
|
2
3
|
|
3
4
|
module ActWithFlags
|
4
|
-
VERSION = '0.2.
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
#
|
5
|
+
VERSION = '0.2.3' # 2020-07-14
|
6
|
+
# VERSION = '0.2.2' # 2020-04-27
|
7
|
+
# VERSION = '0.2.1' # 2020-03-01
|
8
|
+
# VERSION = '0.2.0' # 2019-10-04
|
9
|
+
# VERSION = '0.1.0' # 2019-04-07
|
10
|
+
# VERSION = '0.0.7' # 2019-03-23
|
11
|
+
# VERSION = '0.0.6' # 2019-03-08
|
12
|
+
# VERSION = '0.0.5' # 2019-03-05
|
13
|
+
# VERSION = '0.0.4' # 2019-03-03
|
14
|
+
# VERSION = '0.0.3' # 2019-03-01
|
15
|
+
# VERSION = '0.0.2' # 2019-02-28
|
16
|
+
# VERSION = '0.0.1' # 2019-02-24
|
13
17
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
//= link_tree ../images
|
data/test/test_helper.rb
CHANGED
@@ -1,7 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
if ENV['COVERAGE']
|
2
|
+
require 'simplecov'
|
3
|
+
SimpleCov.start do
|
4
|
+
add_filter '/test/'
|
5
|
+
end
|
6
|
+
end
|
5
7
|
|
6
8
|
require "combustion"
|
7
9
|
Combustion.path = "test/internal"
|
@@ -10,6 +12,7 @@ Combustion.initialize! :all
|
|
10
12
|
require 'rails/test_help'
|
11
13
|
require 'minitest/autorun'
|
12
14
|
require 'minitest/benchmark'
|
15
|
+
#require 'capybara/rails'
|
13
16
|
|
14
17
|
def reset_order
|
15
18
|
Order.act_with_flags.reset if Order.act_with_flags
|
metadata
CHANGED
@@ -1,113 +1,99 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: act_with_flags
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.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: 2020-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '1'
|
20
20
|
type: :development
|
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: '
|
26
|
+
version: '1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '13'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '13'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: appraisal
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '2'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '2'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: combustion
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '1'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '1'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: minitest
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
75
|
+
version: '5.0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: simplecov
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
82
|
+
version: '5.0'
|
97
83
|
- !ruby/object:Gem::Dependency
|
98
84
|
name: sqlite3
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
100
86
|
requirements:
|
101
|
-
- - "
|
87
|
+
- - "~>"
|
102
88
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
89
|
+
version: '1'
|
104
90
|
type: :development
|
105
91
|
prerelease: false
|
106
92
|
version_requirements: !ruby/object:Gem::Requirement
|
107
93
|
requirements:
|
108
|
-
- - "
|
94
|
+
- - "~>"
|
109
95
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
96
|
+
version: '1'
|
111
97
|
description: Handles flags in a Rails model instance
|
112
98
|
email:
|
113
99
|
- dittmar.krall@matique.de
|
@@ -124,7 +110,7 @@ files:
|
|
124
110
|
- Appraisals
|
125
111
|
- Gemfile
|
126
112
|
- Gemfile.lock
|
127
|
-
- LICENSE
|
113
|
+
- MIT-LICENSE
|
128
114
|
- README.md
|
129
115
|
- Rakefile
|
130
116
|
- act_with_flags.gemspec
|
@@ -140,6 +126,7 @@ files:
|
|
140
126
|
- test/clear_test.rb
|
141
127
|
- test/inheritance_any_test.rb
|
142
128
|
- test/inheritance_test.rb
|
129
|
+
- test/internal/app/assets/config/manifest.js
|
143
130
|
- test/internal/app/controllers/application_controller.rb
|
144
131
|
- test/internal/app/controllers/orders_controller.rb
|
145
132
|
- test/internal/app/models/application_record.rb
|
@@ -181,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
181
168
|
- !ruby/object:Gem::Version
|
182
169
|
version: '0'
|
183
170
|
requirements: []
|
184
|
-
rubygems_version: 3.0.
|
171
|
+
rubygems_version: 3.0.8
|
185
172
|
signing_key:
|
186
173
|
specification_version: 4
|
187
174
|
summary: act_with_flags gem
|
@@ -190,6 +177,7 @@ test_files:
|
|
190
177
|
- test/clear_test.rb
|
191
178
|
- test/inheritance_any_test.rb
|
192
179
|
- test/inheritance_test.rb
|
180
|
+
- test/internal/app/assets/config/manifest.js
|
193
181
|
- test/internal/app/controllers/application_controller.rb
|
194
182
|
- test/internal/app/controllers/orders_controller.rb
|
195
183
|
- test/internal/app/models/application_record.rb
|
data/LICENSE
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2019 Dittmar Krall (matique UG)
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
13
|
-
copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|