act_with_flags 0.2.0 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0139e71c0c0d7efea1532b6a8060e6d0e5239a18c7505cc7df33a5b1be317127'
4
- data.tar.gz: e7e35eb32b20726610efdc96bf2c4a345a0e8f691805070bc6f2878bdf352849
3
+ metadata.gz: 7fc915221f76638c08f3c7d73337c2ceab624f6525e4bc2246edf810ad1adca8
4
+ data.tar.gz: ce62f053478b0b27c9f3c9a0d5d4f353e95d873d75e36fd8a78194c555fd7a03
5
5
  SHA512:
6
- metadata.gz: 42871f19d453f0ff4723c0ee6d4d1007e3a74ff877dc99df4c828b8f2fc1782b8dda10efbc52d5062ba16631d5428865b611ae1374d2db2e7e8eb64b75ce3f4d
7
- data.tar.gz: 49c4c7ef6e451b5593b0d4da6f2446c70696cf1514defaa586f712bcba0d87842ba52eb950f6223e2def12201b461fa101e5a3a9abcc3ec2b2b029ccb6520fbc
6
+ metadata.gz: 5b4bc81cc1fa4fa3956ac91bb63e2a56c3612e56193a9758e187c16b316514d45d4e62d1a341ca6a6ab1a4a0c109dcbdbe6efbfe5ee83f09f5152bc908f16708
7
+ data.tar.gz: aa6db748397688df46f02236f5c7fb02b2fab5a2be1884dcc432bdd2b7efe61215acf5d7e41a7b19643914633e4aa228a8265a32d441e1a62e9003512043d63e
@@ -1,79 +1,8 @@
1
- # inherit_from: .rubocop_todo.yml
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
- - '.watchr'
76
-
77
-
78
-
79
-
8
+ - 'test/**/*'
@@ -1 +1 @@
1
- ruby-2.6.4
1
+ ruby-2.6.6
@@ -8,7 +8,9 @@ bundler_args: --without production
8
8
  script: "bundle exec rake test"
9
9
 
10
10
  rvm:
11
- - 2.6.4
11
+ - 2.6.6
12
+ # - 2.6.5
13
+ # - 2.6.4
12
14
  - 2.6.1
13
15
 
14
16
  gemfile:
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 %Q{ruby -I"lib:test" -r rubygems #{file}}
20
- # when 'test'; run %Q{rails test #{file}}
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{test spec}.each { |dir| run "rake #{dir} RAILS_ENV=test" if File.exists?(dir) }
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{test spec}.each { |type|
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{test spec}.each { |type|
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
@@ -5,5 +5,7 @@ gem 'rails'
5
5
 
6
6
  group :test do
7
7
  gem 'observr'
8
+ gem 'rubocop', require: false
9
+ gem 'simplecov', require: false
8
10
  gem 'benchmark-ips'
9
11
  end
@@ -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
@@ -1,8 +1,7 @@
1
- require 'bundler/setup'
2
-
3
1
  require 'rake/testtask'
4
2
 
5
- Rake::TestTask.new(:test) do |t|
3
+ desc 'Run the tests.'
4
+ Rake::TestTask.new do |t|
6
5
  t.libs << 'lib'
7
6
  t.libs << 'test'
8
7
  t.pattern = 'test/**/*_test.rb'
@@ -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 'simplecov'
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.0' # 2019-10-04
5
- # VERSION = '0.1.0' # 2019-04-07
6
- # VERSION = '0.0.7' # 2019-03-23
7
- # VERSION = '0.0.6' # 2019-03-08
8
- # VERSION = '0.0.5' # 2019-03-05
9
- # VERSION = '0.0.4' # 2019-03-03
10
- # VERSION = '0.0.3' # 2019-03-01
11
- # VERSION = '0.0.2' # 2019-02-28
12
- # VERSION = '0.0.1' # 2019-02-24
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
@@ -1,7 +1,9 @@
1
- #require 'simplecov'
2
- #SimpleCov.start do
3
- # add_filter '/test/'
4
- #end
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.0
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: 2019-10-04 00:00:00.000000000 Z
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: '0'
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: '0'
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: '0'
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: '0'
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: '0'
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: '0'
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: '0'
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: '0'
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: '0'
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: '0'
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.6
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.