gouteur 1.2.0 → 1.3.0
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/.github/workflows/build.yml +2 -1
- data/.gitignore +1 -0
- data/CHANGELOG.md +10 -0
- data/README.md +2 -1
- data/lib/gouteur/checker.rb +20 -11
- data/lib/gouteur/cli.rb +8 -3
- data/lib/gouteur/null.rb +3 -0
- data/lib/gouteur/repo.rb +7 -1
- data/lib/gouteur/version.rb +1 -1
- data/lib/gouteur.rb +1 -0
- metadata +3 -3
- data/Gemfile.lock +0 -111
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '00098007006dc0f35add3bdd75050030c58615b570c2ad2ac3e3000cba0262f4'
|
|
4
|
+
data.tar.gz: 5b946e3476cb6b41e8f28f9867993b7eaf5ff93e3cc3bfc2a9ad7ae971d6dc99
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bc3ca7b924e97d8d3853e0e6d172d7108e6fbadee6f9ea36387827236a4987fb3419774f6387a5795d2f99cd2d27c3ad672b9658a3318b057bb8afd94161e62f
|
|
7
|
+
data.tar.gz: 205d72b14399f22afa20c244f49d6cca3a0cb19706fd3e6aacbf85958df42ac534b914cdfe6d4ec92dcfec0eb0fae5a48614a5ee866bdbcb694707ed641dce78
|
data/.github/workflows/build.yml
CHANGED
|
@@ -8,7 +8,7 @@ jobs:
|
|
|
8
8
|
|
|
9
9
|
strategy:
|
|
10
10
|
matrix:
|
|
11
|
-
ruby: [ '3.
|
|
11
|
+
ruby: [ '3.4', '4.0' ]
|
|
12
12
|
|
|
13
13
|
steps:
|
|
14
14
|
- uses: actions/checkout@v4
|
|
@@ -24,6 +24,7 @@ jobs:
|
|
|
24
24
|
gem update --system
|
|
25
25
|
gem install bundler -v 4.0.9
|
|
26
26
|
bundle install --jobs 4
|
|
27
|
+
BUNDLE_GEMFILE=spec/gouteur/example_repo/Gemfile bundle install --jobs 4
|
|
27
28
|
- name: Build
|
|
28
29
|
run: |
|
|
29
30
|
bundle exec rake
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -67,11 +67,12 @@ repos:
|
|
|
67
67
|
- uri: https://github.com/someone/some_gem
|
|
68
68
|
ref: some_specific_branch # default is the default branch
|
|
69
69
|
subdir: the_actual_gem # if gem is in a subdir of the repo
|
|
70
|
-
before:
|
|
70
|
+
before: set_up_special_dependency # bundle is always installed
|
|
71
71
|
tasks: ['rspec', 'rake foo'] # default is `rake`
|
|
72
72
|
name: cool_gem # defaults to repo name from uri, e.g. `some_gem`
|
|
73
73
|
locked: true # prevents setting an incompatible VERSION
|
|
74
74
|
force: true # forces test even if VERSION is incompatible
|
|
75
|
+
quick: true # test only against changes, not the original code
|
|
75
76
|
```
|
|
76
77
|
|
|
77
78
|
### Manual usage
|
data/lib/gouteur/checker.rb
CHANGED
|
@@ -3,16 +3,17 @@ require 'yaml'
|
|
|
3
3
|
module Gouteur
|
|
4
4
|
# main process class
|
|
5
5
|
class Checker
|
|
6
|
-
attr_reader :repo, :force
|
|
6
|
+
attr_reader :repo, :force, :quick
|
|
7
7
|
|
|
8
|
-
def self.call(repo, silent: false, force:
|
|
9
|
-
new(repo, silent: silent, force: force).call
|
|
8
|
+
def self.call(repo, silent: false, force: Null, quick: Null)
|
|
9
|
+
new(repo, silent: silent, force: force, quick: quick).call
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
-
def initialize(repo, silent: false, force:
|
|
12
|
+
def initialize(repo, silent: false, force: Null, quick: Null)
|
|
13
13
|
@repo = repo
|
|
14
14
|
@silent = silent
|
|
15
|
-
@force = force
|
|
15
|
+
@force = force.equal?(Null) ? repo&.force? : force
|
|
16
|
+
@quick = quick.equal?(Null) ? repo&.quick? : quick
|
|
16
17
|
end
|
|
17
18
|
|
|
18
19
|
def call
|
|
@@ -20,13 +21,9 @@ module Gouteur
|
|
|
20
21
|
prepare
|
|
21
22
|
check_dependence
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
pre_check_with_old_dependency_code
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
repo.remove_host_from_gemspecs if force
|
|
27
|
-
install_adapted_bundle or return handle_incompatible_semver
|
|
28
|
-
|
|
29
|
-
run_tasks(adapted: true)
|
|
26
|
+
inject_and_check_with_new_dependency_code
|
|
30
27
|
|
|
31
28
|
[true, Message.success(repo: repo)]
|
|
32
29
|
rescue Gouteur::Error => e
|
|
@@ -45,6 +42,18 @@ module Gouteur
|
|
|
45
42
|
raise(Error, Message.no_dependence(repo: repo))
|
|
46
43
|
end
|
|
47
44
|
|
|
45
|
+
def pre_check_with_old_dependency_code
|
|
46
|
+
run_tasks(adapted: false) unless quick
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def inject_and_check_with_new_dependency_code
|
|
50
|
+
repo.gemfile.create_adapted(drop_version_constraint: force)
|
|
51
|
+
repo.remove_host_from_gemspecs if force
|
|
52
|
+
install_adapted_bundle or return handle_incompatible_semver
|
|
53
|
+
|
|
54
|
+
run_tasks(adapted: true)
|
|
55
|
+
end
|
|
56
|
+
|
|
48
57
|
def run_tasks(adapted: false)
|
|
49
58
|
repo.tasks.empty? && raise(Error, Message.no_tasks(repo: repo))
|
|
50
59
|
repo.tasks.each { |task| run_task(task, adapted: adapted) }
|
data/lib/gouteur/cli.rb
CHANGED
|
@@ -15,14 +15,15 @@ module Gouteur
|
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
repos.all? do |repo|
|
|
18
|
-
success, message =
|
|
18
|
+
success, message = Checker.call(repo, force: @force, quick: @quick)
|
|
19
19
|
puts '', message, ''
|
|
20
20
|
success
|
|
21
21
|
end
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
def option_parser
|
|
25
|
-
@force =
|
|
25
|
+
@force = Null
|
|
26
|
+
@quick = Null
|
|
26
27
|
|
|
27
28
|
OptionParser.new do |opts|
|
|
28
29
|
opts.banner = <<~SH
|
|
@@ -40,6 +41,10 @@ module Gouteur
|
|
|
40
41
|
@force = true
|
|
41
42
|
end
|
|
42
43
|
|
|
44
|
+
opts.on("-q", "--quick", "Test only changes, skip pre-test with original code") do
|
|
45
|
+
@quick = true
|
|
46
|
+
end
|
|
47
|
+
|
|
43
48
|
opts.on("-v", "--version", "Show gouteur version") do
|
|
44
49
|
puts "gouteur #{Gouteur::VERSION}"
|
|
45
50
|
exit
|
|
@@ -60,7 +65,7 @@ module Gouteur
|
|
|
60
65
|
if dotfile_repo = dotfile_repos.find { |r| r.name == arg }
|
|
61
66
|
dotfile_repo
|
|
62
67
|
else
|
|
63
|
-
|
|
68
|
+
Repo.new(uri: arg)
|
|
64
69
|
end
|
|
65
70
|
end
|
|
66
71
|
end
|
data/lib/gouteur/null.rb
ADDED
data/lib/gouteur/repo.rb
CHANGED
|
@@ -14,7 +14,8 @@ module Gouteur
|
|
|
14
14
|
tasks: 'rake',
|
|
15
15
|
locked: false,
|
|
16
16
|
force: false,
|
|
17
|
-
subdir: nil
|
|
17
|
+
subdir: nil,
|
|
18
|
+
quick: false
|
|
18
19
|
)
|
|
19
20
|
@uri = uri
|
|
20
21
|
@name = name || extract_name_from_uri(uri)
|
|
@@ -24,6 +25,7 @@ module Gouteur
|
|
|
24
25
|
@locked = !!locked
|
|
25
26
|
@force = !!force
|
|
26
27
|
@subdir = subdir
|
|
28
|
+
@quick = !!quick
|
|
27
29
|
end
|
|
28
30
|
|
|
29
31
|
def fetch
|
|
@@ -63,6 +65,10 @@ module Gouteur
|
|
|
63
65
|
@force
|
|
64
66
|
end
|
|
65
67
|
|
|
68
|
+
def quick?
|
|
69
|
+
@quick
|
|
70
|
+
end
|
|
71
|
+
|
|
66
72
|
def remove_host_from_gemspecs
|
|
67
73
|
Dir[File.join(bundle_path, '*.gemspec')].each do |gemspec_path|
|
|
68
74
|
content = File.read(gemspec_path)
|
data/lib/gouteur/version.rb
CHANGED
data/lib/gouteur.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gouteur
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Janosch Müller
|
|
@@ -24,7 +24,6 @@ files:
|
|
|
24
24
|
- ".rubocop.yml"
|
|
25
25
|
- CHANGELOG.md
|
|
26
26
|
- Gemfile
|
|
27
|
-
- Gemfile.lock
|
|
28
27
|
- LICENSE.txt
|
|
29
28
|
- README.md
|
|
30
29
|
- Rakefile
|
|
@@ -40,6 +39,7 @@ files:
|
|
|
40
39
|
- lib/gouteur/gemfile.rb
|
|
41
40
|
- lib/gouteur/host.rb
|
|
42
41
|
- lib/gouteur/message.rb
|
|
42
|
+
- lib/gouteur/null.rb
|
|
43
43
|
- lib/gouteur/rake_task.rb
|
|
44
44
|
- lib/gouteur/repo.rb
|
|
45
45
|
- lib/gouteur/shell.rb
|
|
@@ -65,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
65
65
|
- !ruby/object:Gem::Version
|
|
66
66
|
version: '0'
|
|
67
67
|
requirements: []
|
|
68
|
-
rubygems_version: 4.0.
|
|
68
|
+
rubygems_version: 4.0.23
|
|
69
69
|
specification_version: 4
|
|
70
70
|
summary: See if your lib is still digestible.
|
|
71
71
|
test_files: []
|
data/Gemfile.lock
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
gouteur (1.1.0)
|
|
5
|
-
|
|
6
|
-
PATH
|
|
7
|
-
remote: spec/gouteur/example_repo
|
|
8
|
-
specs:
|
|
9
|
-
example_repo (0.1.0)
|
|
10
|
-
|
|
11
|
-
GEM
|
|
12
|
-
remote: https://rubygems.org/
|
|
13
|
-
specs:
|
|
14
|
-
ast (2.4.3)
|
|
15
|
-
date (3.5.1)
|
|
16
|
-
debug (1.11.1)
|
|
17
|
-
irb (~> 1.10)
|
|
18
|
-
reline (>= 0.3.8)
|
|
19
|
-
diff-lcs (1.6.2)
|
|
20
|
-
docile (1.4.1)
|
|
21
|
-
erb (6.0.2)
|
|
22
|
-
io-console (0.8.2)
|
|
23
|
-
irb (1.17.0)
|
|
24
|
-
pp (>= 0.6.0)
|
|
25
|
-
prism (>= 1.3.0)
|
|
26
|
-
rdoc (>= 4.0.0)
|
|
27
|
-
reline (>= 0.4.2)
|
|
28
|
-
json (2.19.3)
|
|
29
|
-
language_server-protocol (3.17.0.5)
|
|
30
|
-
lint_roller (1.1.0)
|
|
31
|
-
parallel (1.28.0)
|
|
32
|
-
parser (3.3.11.1)
|
|
33
|
-
ast (~> 2.4.1)
|
|
34
|
-
racc
|
|
35
|
-
pp (0.6.3)
|
|
36
|
-
prettyprint
|
|
37
|
-
prettyprint (0.2.0)
|
|
38
|
-
prism (1.9.0)
|
|
39
|
-
psych (5.3.1)
|
|
40
|
-
date
|
|
41
|
-
stringio
|
|
42
|
-
racc (1.8.1)
|
|
43
|
-
rainbow (3.1.1)
|
|
44
|
-
rake (13.3.1)
|
|
45
|
-
rdoc (7.2.0)
|
|
46
|
-
erb
|
|
47
|
-
psych (>= 4.0.0)
|
|
48
|
-
tsort
|
|
49
|
-
regexp_parser (2.12.0)
|
|
50
|
-
relaxed-rubocop (2.5)
|
|
51
|
-
reline (0.6.3)
|
|
52
|
-
io-console (~> 0.5)
|
|
53
|
-
rexml (3.4.4)
|
|
54
|
-
rspec (3.13.2)
|
|
55
|
-
rspec-core (~> 3.13.0)
|
|
56
|
-
rspec-expectations (~> 3.13.0)
|
|
57
|
-
rspec-mocks (~> 3.13.0)
|
|
58
|
-
rspec-core (3.13.6)
|
|
59
|
-
rspec-support (~> 3.13.0)
|
|
60
|
-
rspec-expectations (3.13.5)
|
|
61
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
62
|
-
rspec-support (~> 3.13.0)
|
|
63
|
-
rspec-mocks (3.13.8)
|
|
64
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
65
|
-
rspec-support (~> 3.13.0)
|
|
66
|
-
rspec-support (3.13.7)
|
|
67
|
-
rubocop (1.86.0)
|
|
68
|
-
json (~> 2.3)
|
|
69
|
-
language_server-protocol (~> 3.17.0.2)
|
|
70
|
-
lint_roller (~> 1.1.0)
|
|
71
|
-
parallel (~> 1.10)
|
|
72
|
-
parser (>= 3.3.0.2)
|
|
73
|
-
rainbow (>= 2.2.2, < 4.0)
|
|
74
|
-
regexp_parser (>= 2.9.3, < 3.0)
|
|
75
|
-
rubocop-ast (>= 1.49.0, < 2.0)
|
|
76
|
-
ruby-progressbar (~> 1.7)
|
|
77
|
-
unicode-display_width (>= 2.4.0, < 4.0)
|
|
78
|
-
rubocop-ast (1.49.1)
|
|
79
|
-
parser (>= 3.3.7.2)
|
|
80
|
-
prism (~> 1.7)
|
|
81
|
-
ruby-progressbar (1.13.0)
|
|
82
|
-
simplecov (0.22.0)
|
|
83
|
-
docile (~> 1.1)
|
|
84
|
-
simplecov-html (~> 0.11)
|
|
85
|
-
simplecov_json_formatter (~> 0.1)
|
|
86
|
-
simplecov-cobertura (3.1.0)
|
|
87
|
-
rexml
|
|
88
|
-
simplecov (~> 0.19)
|
|
89
|
-
simplecov-html (0.13.2)
|
|
90
|
-
simplecov_json_formatter (0.1.4)
|
|
91
|
-
stringio (3.2.0)
|
|
92
|
-
tsort (0.2.0)
|
|
93
|
-
unicode-display_width (3.2.0)
|
|
94
|
-
unicode-emoji (~> 4.1)
|
|
95
|
-
unicode-emoji (4.2.0)
|
|
96
|
-
|
|
97
|
-
PLATFORMS
|
|
98
|
-
ruby
|
|
99
|
-
|
|
100
|
-
DEPENDENCIES
|
|
101
|
-
debug
|
|
102
|
-
example_repo (= 0.1.0)!
|
|
103
|
-
gouteur!
|
|
104
|
-
rake (~> 13.0)
|
|
105
|
-
relaxed-rubocop
|
|
106
|
-
rspec (~> 3.0)
|
|
107
|
-
rubocop (~> 1.7)
|
|
108
|
-
simplecov-cobertura
|
|
109
|
-
|
|
110
|
-
BUNDLED WITH
|
|
111
|
-
4.0.9
|