doit 1.0.1 → 1.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 062ff1abf6d388eaef7a3bc4ce063c24e2c7b99deff85250dbb0b499170b1200
4
- data.tar.gz: e2f62709fda2f9e1deb32daeb0026ea9c58c8dc64751c877d275be95d546dc10
3
+ metadata.gz: 3eb0f0645c47b1d209a75de9fcc49d0b99752769764599b0fac889b3ad6423f0
4
+ data.tar.gz: 726b353579f963e6655bf56fdf49dfcd60004826ee838e3bd7f5a6c168e48bd7
5
5
  SHA512:
6
- metadata.gz: 8e90e343ee283fe75597223adc64937058647e243b810872aca1f08bf8cfac7708846e89002de4823aba8d40063113a4f7c30a0a44c7a507853557cdbb7b201d
7
- data.tar.gz: 6a3590e52412da8e5f55532c04a784d65f36e19915e8779714c0ea2ebad8df3997cf294dfa44c456ea8ef96e1f8da43b1290f67b27883b888f293cee0eccdcfb
6
+ metadata.gz: 6234c4eeb92cc4a76c59836f7292e1c806526909e0a74d7dfa5a7a21631c56af1f041d7a149878013def8a9d6ceebd74b2f848d27a4caaec69702742a7807a74
7
+ data.tar.gz: d825858a3dd19251ee4dfaaddaef4aef8e338dfc9d6219be66119a298fc149ff3a7db2fc400051ee699a7d30bc6e11b8152597b55b2fa9963b82f1456e500190
@@ -0,0 +1,30 @@
1
+ # see also https://github.com/whitequark/parser/blob/master/.github/workflows/test.yml
2
+ name: Rake
3
+
4
+ #on: [push, pull_request]
5
+ on: [push]
6
+
7
+ jobs:
8
+ test:
9
+ strategy:
10
+ fail-fast: false
11
+ matrix:
12
+ # os: [ubuntu-latest, macos-latest]
13
+ os: [ubuntu-latest]
14
+ # Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
15
+ # ruby: [2.5, 2.6, 2.7, '3.0', head, jruby, jruby-head, truffleruby, truffleruby-head]
16
+ ruby: ["2.7.2", "2.7.3", "3.0.1"]
17
+ test_command: ["bundle exec rake test"]
18
+ runs-on: ${{ matrix.os }}
19
+
20
+ steps:
21
+ - uses: actions/checkout@v2
22
+ - uses: ruby/setup-ruby@v1
23
+ with:
24
+ ruby-version: ${{ matrix.ruby }}
25
+ - name: Bundle install
26
+ run: |
27
+ bundle config path /home/runner/bundle
28
+ bundle install
29
+ bundle update
30
+ - run: ${{ matrix.test_command }}
data/.rubocop.yml CHANGED
@@ -2,6 +2,7 @@ inherit_from:
2
2
  - ~/configs/.rubocop.yml
3
3
 
4
4
  AllCops:
5
+ NewCops: enable
5
6
  Include:
6
7
  - 'lib/**/*.rb'
7
8
 
data/.watchr CHANGED
@@ -1,3 +1,4 @@
1
+ TESTING = %w[test]
1
2
  HH = '#' * 22 unless defined?(HH)
2
3
  H = '#' * 5 unless defined?(H)
3
4
 
@@ -16,32 +17,34 @@ end
16
17
 
17
18
  def run_it(type, file)
18
19
  case type
19
- when 'test'; run %Q(ruby -I"lib:test" -r rubygems #{file})
20
+ when 'test'; run %(bundle exec ruby -I test #{file})
20
21
  else; puts "#{H} unknown type: #{type}, file: #{file}"
21
22
  end
22
23
  end
23
24
 
24
25
  def run_all_tests
25
26
  puts "\n#{HH} Running all tests #{HH}\n"
26
- %w[test].each { |dir| run "rake #{dir}" if File.exist?(dir) }
27
+ TESTING.each { |dir| run "bundle exec rake #{dir}" if File.exist?(dir) }
27
28
  end
28
29
 
29
30
  def run_matching_files(base)
30
31
  base = base.split('_').first
31
- %w[test spec].each { |type|
32
+ TESTING.each { |type|
32
33
  files = Dir["#{type}/**/*.rb"].select { |file| file =~ /#{base}_.*\.rb/ }
33
34
  run_it type, files.join(' ') unless files.empty?
34
35
  }
35
36
  end
36
37
 
37
- %w[test spec].each { |type|
38
+ TESTING.each { |type|
38
39
  watch("#{type}/#{type}_helper\.rb") { run_all_tests }
40
+ watch('lib/.*\.rb') { run_all_tests }
39
41
  watch("#{type}/.*/*_#{type}\.rb") { |match| run_it type, match[0] }
40
42
  watch("#{type}/data/(.*)\.rb") { |match|
41
43
  m1 = match[1]
42
44
  run_matching_files("#{type}/#{m1}/#{m1}_#{type}.rb")
43
45
  }
44
46
  }
47
+
45
48
  %w[rb erb haml slim].each { |type|
46
49
  watch("app/.*/(.*)\.#{type}") { |match|
47
50
  run_matching_files(match[1])
data/Gemfile.lock CHANGED
@@ -1,42 +1,42 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- doit (1.0.1)
4
+ doit (1.0.2)
5
5
  micro-optparse (~> 1)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
10
  ast (2.4.2)
11
- docile (1.3.5)
11
+ docile (1.4.0)
12
12
  micro-optparse (1.2.1)
13
13
  minitest (5.14.4)
14
14
  observr (1.0.5)
15
15
  parallel (1.20.1)
16
- parser (3.0.1.0)
16
+ parser (3.0.1.1)
17
17
  ast (~> 2.4.1)
18
18
  rainbow (3.0.0)
19
19
  rake (13.0.3)
20
20
  regexp_parser (2.1.1)
21
21
  rexml (3.2.5)
22
- rubocop (1.13.0)
22
+ rubocop (1.17.0)
23
23
  parallel (~> 1.10)
24
24
  parser (>= 3.0.0.0)
25
25
  rainbow (>= 2.2.2, < 4.0)
26
26
  regexp_parser (>= 1.8, < 3.0)
27
27
  rexml
28
- rubocop-ast (>= 1.2.0, < 2.0)
28
+ rubocop-ast (>= 1.7.0, < 2.0)
29
29
  ruby-progressbar (~> 1.7)
30
30
  unicode-display_width (>= 1.4.0, < 3.0)
31
- rubocop-ast (1.4.1)
32
- parser (>= 2.7.1.5)
31
+ rubocop-ast (1.7.0)
32
+ parser (>= 3.0.1.1)
33
33
  ruby-progressbar (1.11.0)
34
34
  simplecov (0.21.2)
35
35
  docile (~> 1.1)
36
36
  simplecov-html (~> 0.11)
37
37
  simplecov_json_formatter (~> 0.1)
38
38
  simplecov-html (0.12.3)
39
- simplecov_json_formatter (0.1.2)
39
+ simplecov_json_formatter (0.1.3)
40
40
  unicode-display_width (2.0.0)
41
41
 
42
42
  PLATFORMS
@@ -53,4 +53,4 @@ DEPENDENCIES
53
53
  simplecov
54
54
 
55
55
  BUNDLED WITH
56
- 2.2.6
56
+ 2.2.17
data/lib/globals.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  # rubocop: disable all
2
2
 
3
3
  module Globals
4
- VERSION = '1.0.1' # 2021-04-21
4
+ VERSION = '1.0.2' # 2021-06-26
5
+ # VERSION = '1.0.1' # 2021-04-21
5
6
  # VERSION = '1.0.0' # 2020-10-26
6
7
  # VERSION = '0.3.9' # 2020-07-17
7
8
  # VERSION = '0.3.8' # 2020-02-26
data/test/test_helper.rb CHANGED
@@ -1,7 +1,8 @@
1
- require 'simplecov'
2
- SimpleCov.start do
3
- add_filter 'test'
4
- command_name 'Minitest'
1
+ if ENV['COVERAGE']
2
+ require 'simplecov'
3
+ SimpleCov.start do
4
+ add_filter '/test/'
5
+ end
5
6
  end
6
7
 
7
8
  require 'what'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dittmar Krall
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-22 00:00:00.000000000 Z
11
+ date: 2021-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: micro-optparse
@@ -89,6 +89,7 @@ extra_rdoc_files: []
89
89
  files:
90
90
  - ".doit/hello"
91
91
  - ".doit/hello.yml"
92
+ - ".github/workflows/rake.yml"
92
93
  - ".gitignore"
93
94
  - ".rubocop.yml"
94
95
  - ".ruby-gemset"