bake-modernize 0.4.0 → 0.4.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fea13e5c2e3fcd66112afc8a45ce73c8760c3fde20e41ddae6bd3186fa88254
|
4
|
+
data.tar.gz: c1650d4d8ef208d904a022b7a7d79f42b6185e09c03e97e52ccf00456ef17c96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9eb6cd98a7905a5604a147efc6a5fa499d557d3a0f5e6efecc93cce8d6e3cd3c32e1aa9ef9b407c7931d268f6f2a375c42e28751e04133cb3d090295457fefcc
|
7
|
+
data.tar.gz: '02709ab19c0c432ae4ff011007c14061c29f1a1c66caff18562b25db008d76dc0d310a1315d487e69b46f1459a3822abf192fce59f5dcac7d36d88da2042c649'
|
data/bake/modernize/actions.rb
CHANGED
@@ -18,8 +18,7 @@ def update(root:)
|
|
18
18
|
Bake::Modernize.copy_template(template_root, root)
|
19
19
|
|
20
20
|
readme_path = File.expand_path("README.md", root)
|
21
|
-
|
22
|
-
self.update_badges(readme_path, repository_url)
|
21
|
+
update_badges(readme_path, repository_url(root))
|
23
22
|
end
|
24
23
|
|
25
24
|
private
|
@@ -33,7 +32,7 @@ def repository_url(root)
|
|
33
32
|
end
|
34
33
|
end
|
35
34
|
|
36
|
-
def badge_for(repository_url
|
35
|
+
def badge_for(repository_url)
|
37
36
|
"[![Development Status](#{repository_url}/workflows/Development/badge.svg)](#{repository_url}/actions?workflow=Development)"
|
38
37
|
end
|
39
38
|
|
data/bake/modernize/gemspec.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
# Rewrite the current gemspec.
|
3
3
|
def gemspec
|
4
|
-
path =
|
4
|
+
path = default_gemspec_path
|
5
5
|
buffer = StringIO.new
|
6
6
|
|
7
7
|
update(path: path, output: buffer)
|
@@ -11,11 +11,11 @@ end
|
|
11
11
|
|
12
12
|
# Rewrite the specified gemspec.
|
13
13
|
# @param
|
14
|
-
def update(path:
|
14
|
+
def update(path: default_gemspec_path, output: $stdout)
|
15
15
|
spec = Gem::Specification.load(path)
|
16
16
|
|
17
17
|
root = File.dirname(path)
|
18
|
-
version_path =
|
18
|
+
version_path = version_path(root)
|
19
19
|
|
20
20
|
constant = File.read(version_path)
|
21
21
|
.scan(/module\s+(.*?)$/)
|
@@ -70,14 +70,15 @@ def update(path: self.default_gemspec_path, output: $stdout)
|
|
70
70
|
end
|
71
71
|
|
72
72
|
if required_ruby_version = spec.required_ruby_version
|
73
|
-
|
74
|
-
|
73
|
+
unless required_ruby_version.none?
|
74
|
+
output.puts "\t"
|
75
|
+
output.puts "\tspec.required_ruby_version = #{required_ruby_version.to_s.inspect}"
|
76
|
+
end
|
75
77
|
end
|
76
78
|
|
77
|
-
if spec.
|
79
|
+
if spec.runtime_dependencies.any?
|
78
80
|
output.puts "\t"
|
79
|
-
spec.
|
80
|
-
next unless dependency.type == :runtime
|
81
|
+
spec.runtime_dependencies.sort.each do |dependency|
|
81
82
|
output.puts "\tspec.add_dependency #{format_dependency(dependency)}"
|
82
83
|
end
|
83
84
|
end
|
data/lib/bake/modernize.rb
CHANGED
@@ -34,12 +34,10 @@ jobs:
|
|
34
34
|
|
35
35
|
steps:
|
36
36
|
- uses: actions/checkout@v2
|
37
|
-
- uses: ruby/setup-ruby@
|
37
|
+
- uses: ruby/setup-ruby@master
|
38
38
|
with:
|
39
39
|
ruby-version: ${{matrix.ruby}}
|
40
|
-
|
41
|
-
- name: Install dependencies
|
42
|
-
run: ${{matrix.env}} bundle install
|
40
|
+
bundler-cache: true
|
43
41
|
|
44
42
|
- name: Run tests
|
45
43
|
timeout-minutes: 5
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bake-modernize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async-http
|
@@ -121,9 +121,9 @@ require_paths:
|
|
121
121
|
- lib
|
122
122
|
required_ruby_version: !ruby/object:Gem::Requirement
|
123
123
|
requirements:
|
124
|
-
- - "
|
124
|
+
- - ">="
|
125
125
|
- !ruby/object:Gem::Version
|
126
|
-
version: '
|
126
|
+
version: '0'
|
127
127
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - ">="
|