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: b5660d2b458ce7e925d73a74ac927c6de742c7501a13419034964b3826097d25
4
- data.tar.gz: dbbb922b7cb6ac927879ff70902412f224c307a8acac93a231d552a4f743c0a9
3
+ metadata.gz: 7fea13e5c2e3fcd66112afc8a45ce73c8760c3fde20e41ddae6bd3186fa88254
4
+ data.tar.gz: c1650d4d8ef208d904a022b7a7d79f42b6185e09c03e97e52ccf00456ef17c96
5
5
  SHA512:
6
- metadata.gz: 59a24357d2c10a15473c7f59501622c69d9e7f66e96f2e8dfd70a28e9393661d673fce25a67e79591f830f861d3312caca45d5d0d0ac8e84ebd59582f8cf5bcb
7
- data.tar.gz: 586f9a2a5b6dde034e92a51165167d0bb7b167d717df92ab2ce72aa9e9592d68f30855055bb2f2416b5d80588b3c4e9cb9da7f7fb06e5461f7469034a52511bf
6
+ metadata.gz: 9eb6cd98a7905a5604a147efc6a5fa499d557d3a0f5e6efecc93cce8d6e3cd3c32e1aa9ef9b407c7931d268f6f2a375c42e28751e04133cb3d090295457fefcc
7
+ data.tar.gz: '02709ab19c0c432ae4ff011007c14061c29f1a1c66caff18562b25db008d76dc0d310a1315d487e69b46f1459a3822abf192fce59f5dcac7d36d88da2042c649'
@@ -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
- repository_url = self.repository_url(root)
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 = self.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
 
@@ -1,7 +1,7 @@
1
1
 
2
2
  # Rewrite the current gemspec.
3
3
  def gemspec
4
- path = self.default_gemspec_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: self.default_gemspec_path, output: $stdout)
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 = self.version_path(root)
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
- output.puts "\t"
74
- output.puts "\tspec.required_ruby_version = #{required_ruby_version.to_s.inspect}"
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.dependencies.any?
79
+ if spec.runtime_dependencies.any?
78
80
  output.puts "\t"
79
- spec.dependencies.sort.each do |dependency|
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
@@ -19,8 +19,8 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  require "bake/modernize/version"
22
-
23
22
  require 'build/files/glob'
23
+ require 'fileutils'
24
24
 
25
25
  module Bake
26
26
  module Modernize
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Bake
22
22
  module Modernize
23
- VERSION = "0.4.0"
23
+ VERSION = "0.4.5"
24
24
  end
25
25
  end
@@ -34,12 +34,10 @@ jobs:
34
34
 
35
35
  steps:
36
36
  - uses: actions/checkout@v2
37
- - uses: ruby/setup-ruby@v1
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.0
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-07-09 00:00:00.000000000 Z
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: '2.5'
126
+ version: '0'
127
127
  required_rubygems_version: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - ">="