doit 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +30 -0
- data/.rubocop.yml +1 -0
- data/.watchr +7 -4
- data/Gemfile.lock +9 -9
- data/lib/globals.rb +2 -1
- data/test/test_helper.rb +5 -4
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3eb0f0645c47b1d209a75de9fcc49d0b99752769764599b0fac889b3ad6423f0
|
4
|
+
data.tar.gz: 726b353579f963e6655bf56fdf49dfcd60004826ee838e3bd7f5a6c168e48bd7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
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 %
|
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
|
-
|
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
|
-
|
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
|
-
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
32
|
-
parser (>=
|
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.
|
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.
|
56
|
+
2.2.17
|
data/lib/globals.rb
CHANGED
data/test/test_helper.rb
CHANGED
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.
|
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-
|
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"
|