rsgem 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/rsgem.rb +1 -0
- data/lib/rsgem/gem.rb +5 -0
- data/lib/rsgem/support/github_actions.yml +1 -1
- data/lib/rsgem/tasks/set_required_ruby_version.rb +33 -0
- data/lib/rsgem/version.rb +1 -1
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e392882ca1119b54ef75b184ba5e1bb962b1547008048291f97890fc8af9d524
|
4
|
+
data.tar.gz: b9f5f832bccb47c09e11fdc5d9ea800853b12ae52a5e5dfa17053a3f4a5d4eef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbb346cba7c916958df3f6b59493d7686420874b948494e9d704e40759198fe0af0ea071a1de2ac85d93066a02cf3a67ce0a37779228d4fa54003f5b2bf83189
|
7
|
+
data.tar.gz: 19f0c24d253ede15f68d8377abbb43786f3a32ebfffcbefbaebe0a397e0519b107710c60d04cba3df1f5021ede8da0f7ea2aa0e370fbba3f4d364a04834ab2a2
|
data/CHANGELOG.md
CHANGED
data/lib/rsgem.rb
CHANGED
@@ -24,6 +24,7 @@ require 'rsgem/tasks/run_rubocop'
|
|
24
24
|
require 'rsgem/tasks/set_bundled_files'
|
25
25
|
require 'rsgem/tasks/set_license_file'
|
26
26
|
require 'rsgem/tasks/simple_cov_post_install'
|
27
|
+
require 'rsgem/tasks/set_required_ruby_version'
|
27
28
|
require 'rsgem/dependencies/base'
|
28
29
|
require 'rsgem/dependencies/rake'
|
29
30
|
require 'rsgem/dependencies/reek'
|
data/lib/rsgem/gem.rb
CHANGED
@@ -20,6 +20,7 @@ module RSGem
|
|
20
20
|
clean_gemspec
|
21
21
|
set_bundled_files
|
22
22
|
set_license_file
|
23
|
+
set_required_ruby_version
|
23
24
|
bundle_dependencies
|
24
25
|
run_rubocop
|
25
26
|
puts "#{context.gem_name} created"
|
@@ -86,5 +87,9 @@ module RSGem
|
|
86
87
|
def set_license_file
|
87
88
|
Tasks::SetLicenseFile.new(context: context).call
|
88
89
|
end
|
90
|
+
|
91
|
+
def set_required_ruby_version
|
92
|
+
Tasks::SetRequiredRubyVersion.new(context: context).call
|
93
|
+
end
|
89
94
|
end
|
90
95
|
end
|
@@ -29,7 +29,7 @@ jobs:
|
|
29
29
|
CC_TEST_REPORTER_ID: get_a_test_reporter_id_from_code_climate
|
30
30
|
- name: Install and config bundler
|
31
31
|
run: |
|
32
|
-
gem install bundler:1.
|
32
|
+
gem install bundler:2.1.4
|
33
33
|
- name: Generate 'Gemfile.lock' before caching gems
|
34
34
|
run: |
|
35
35
|
bundle lock --update
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RSGem
|
4
|
+
module Tasks
|
5
|
+
class SetRequiredRubyVersion < Base
|
6
|
+
OUTPUT = OutputStruct.new(name: 'Set required Ruby version')
|
7
|
+
|
8
|
+
def perform
|
9
|
+
set_required_ruby_version
|
10
|
+
write
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def set_required_ruby_version
|
16
|
+
gemspec.gsub!(
|
17
|
+
/(spec.required_ruby_version.*)=(.*)\n/,
|
18
|
+
"spec.required_ruby_version = Gem::Requirement.new('>= 2.5.0')\n"
|
19
|
+
)
|
20
|
+
end
|
21
|
+
|
22
|
+
def gemspec
|
23
|
+
@gemspec ||= File.read(context.gemspec_path)
|
24
|
+
end
|
25
|
+
|
26
|
+
def write
|
27
|
+
File.open(context.gemspec_path, 'w') do |file|
|
28
|
+
file.puts gemspec
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
data/lib/rsgem/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rsgem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Manuel Ramallo
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-cli
|
@@ -94,7 +94,7 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 0.17.1
|
97
|
-
description:
|
97
|
+
description:
|
98
98
|
email:
|
99
99
|
- ramallojuanm@gmail.com
|
100
100
|
executables:
|
@@ -146,6 +146,7 @@ files:
|
|
146
146
|
- lib/rsgem/tasks/run_rubocop.rb
|
147
147
|
- lib/rsgem/tasks/set_bundled_files.rb
|
148
148
|
- lib/rsgem/tasks/set_license_file.rb
|
149
|
+
- lib/rsgem/tasks/set_required_ruby_version.rb
|
149
150
|
- lib/rsgem/tasks/simple_cov_post_install.rb
|
150
151
|
- lib/rsgem/version.rb
|
151
152
|
homepage: https://github.com/rootstrap/rsgem
|
@@ -154,7 +155,7 @@ licenses:
|
|
154
155
|
metadata:
|
155
156
|
homepage_uri: https://github.com/rootstrap/rsgem
|
156
157
|
source_code_uri: https://github.com/rootstrap/rsgem
|
157
|
-
post_install_message:
|
158
|
+
post_install_message:
|
158
159
|
rdoc_options: []
|
159
160
|
require_paths:
|
160
161
|
- lib
|
@@ -169,8 +170,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
170
|
- !ruby/object:Gem::Version
|
170
171
|
version: '0'
|
171
172
|
requirements: []
|
172
|
-
rubygems_version: 3.2
|
173
|
-
signing_key:
|
173
|
+
rubygems_version: 3.1.2
|
174
|
+
signing_key:
|
174
175
|
specification_version: 4
|
175
176
|
summary: Generating gems the Rootstrap way
|
176
177
|
test_files: []
|