gemsmith 13.1.0 → 13.2.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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/gemsmith/cli.rb +2 -2
- data/lib/gemsmith/gem/requirement.rb +2 -2
- data/lib/gemsmith/gem/specification.rb +2 -2
- data/lib/gemsmith/generators/bundler.rb +1 -1
- data/lib/gemsmith/generators/bundler_audit.rb +1 -1
- data/lib/gemsmith/generators/circle_ci.rb +1 -1
- data/lib/gemsmith/generators/cli.rb +1 -1
- data/lib/gemsmith/generators/code_climate.rb +1 -1
- data/lib/gemsmith/generators/engine.rb +1 -1
- data/lib/gemsmith/generators/gem.rb +1 -1
- data/lib/gemsmith/generators/git.rb +1 -1
- data/lib/gemsmith/generators/git_cop.rb +1 -1
- data/lib/gemsmith/generators/git_hub.rb +1 -1
- data/lib/gemsmith/generators/guard.rb +1 -1
- data/lib/gemsmith/generators/reek.rb +1 -1
- data/lib/gemsmith/generators/rspec.rb +2 -2
- data/lib/gemsmith/generators/rubocop.rb +1 -1
- data/lib/gemsmith/helpers/cli.rb +2 -2
- data/lib/gemsmith/identity.rb +1 -1
- data/lib/gemsmith/rake/builder.rb +2 -2
- data/lib/gemsmith/templates/%gem_name%/.rubocop.yml.tt +3 -3
- data/lib/gemsmith/templates/%gem_name%/Guardfile.tt +1 -1
- data/lib/gemsmith/templates/%gem_name%/Rakefile.tt +1 -1
- data/lib/gemsmith/templates/%gem_name%/spec/rails_helper.rb.tt +1 -1
- data/lib/gemsmith/templates/%gem_name%/spec/spec_helper.rb.tt +0 -3
- metadata +15 -16
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50269b8129232be5566a3eada9226799f9ebf95cd1cd10033fd9ecce60110338
|
4
|
+
data.tar.gz: 56ecfc17ab2280cf0eabf9c56ff693a8fe2042a6d9777a2f51a2c43d69ddf0f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 180ae1b5702a28f0faae1aa3d58f42afdd4c10ef9644110110335dc53bf39f2ea02f20e36712279e28d8bd731e6e58a76ebc5de616112d91344300f5812caed3
|
7
|
+
data.tar.gz: 8317b70de611601efc8c0852be0cc013431c5a3015d1e306fa8bbaf98943f6eb7317c5b16d0a5431f61e683130529afa8469d2d44190b4cc43dd55af91e95c06
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/gemsmith/cli.rb
CHANGED
@@ -185,7 +185,7 @@ module Gemsmith
|
|
185
185
|
desc "-r, [--read=GEM]", "Open a gem in default browser."
|
186
186
|
map %w[-r --read] => :read
|
187
187
|
def read name
|
188
|
-
say_status :error, "Gem home page is not defined.", :red unless process_gem
|
188
|
+
say_status :error, "Gem home page is not defined.", :red unless process_gem name, "visit"
|
189
189
|
end
|
190
190
|
|
191
191
|
desc "-c, [--config]", "Manage gem configuration."
|
@@ -204,7 +204,7 @@ module Gemsmith
|
|
204
204
|
if options.edit? then `#{ENV["EDITOR"]} #{path}`
|
205
205
|
elsif options.info?
|
206
206
|
path ? say(path) : say("Configuration doesn't exist.")
|
207
|
-
else help
|
207
|
+
else help :config
|
208
208
|
end
|
209
209
|
end
|
210
210
|
|
@@ -13,7 +13,7 @@ module Gemsmith
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def self.version_segments version
|
16
|
-
String(version).split(Versionaire::
|
16
|
+
String(version).split(Versionaire::VERSION_DELIMITER).map(&:to_i)
|
17
17
|
end
|
18
18
|
|
19
19
|
def self.for object
|
@@ -45,7 +45,7 @@ module Gemsmith
|
|
45
45
|
|
46
46
|
def validate!
|
47
47
|
operators = self.class.operators
|
48
|
-
return true if operators.include?
|
48
|
+
return true if operators.include? operator
|
49
49
|
|
50
50
|
fail Errors::RequirementOperator,
|
51
51
|
%(Invalid gem requirement operator. Use: #{operators.join ", "}.)
|
@@ -64,9 +64,9 @@ module Gemsmith
|
|
64
64
|
attr_reader :file_path, :spec
|
65
65
|
|
66
66
|
def validate
|
67
|
-
return if spec.is_a?
|
67
|
+
return if spec.is_a? self.class.specification
|
68
68
|
|
69
|
-
fail
|
69
|
+
fail Errors::Specification, %(Unknown gem specification: "#{file_path}".)
|
70
70
|
end
|
71
71
|
end
|
72
72
|
end
|
@@ -5,7 +5,7 @@ module Gemsmith
|
|
5
5
|
# Generates Bundler Audit support.
|
6
6
|
class BundlerAudit < Base
|
7
7
|
def run
|
8
|
-
return unless configuration.dig
|
8
|
+
return unless configuration.dig :generate, :bundler_audit
|
9
9
|
|
10
10
|
cli.uncomment_lines "#{gem_name}/Rakefile", %r(require.+bundler\/audit.+)
|
11
11
|
cli.uncomment_lines "#{gem_name}/Rakefile", /Bundler\:\:Audit.+/
|
@@ -5,7 +5,7 @@ module Gemsmith
|
|
5
5
|
# Generates Command Line Interface (CLI) support.
|
6
6
|
class CLI < Base
|
7
7
|
def run
|
8
|
-
return unless configuration.dig
|
8
|
+
return unless configuration.dig :generate, :cli
|
9
9
|
|
10
10
|
template "%gem_name%/bin/%gem_name%.tt"
|
11
11
|
template "%gem_name%/lib/%gem_path%/cli.rb.tt"
|
@@ -10,7 +10,7 @@ module Gemsmith
|
|
10
10
|
|
11
11
|
def install_rails
|
12
12
|
return if rails?
|
13
|
-
return unless cli.yes?
|
13
|
+
return unless cli.yes? "Ruby on Rails is not installed. Would you like it installed (y/n)?"
|
14
14
|
|
15
15
|
cli.run "gem install rails"
|
16
16
|
end
|
@@ -13,7 +13,7 @@ module Gemsmith
|
|
13
13
|
subject = "Added Gemsmith skeleton."
|
14
14
|
body = "Built with #{Identity.version_label}."
|
15
15
|
|
16
|
-
Dir.chdir
|
16
|
+
Dir.chdir gem_root do
|
17
17
|
`git init`
|
18
18
|
`git add .`
|
19
19
|
`git commit --all --no-verify --message "#{subject}" --message "#{body}"`
|
@@ -5,7 +5,7 @@ module Gemsmith
|
|
5
5
|
# Generates Git Cop support.
|
6
6
|
class GitCop < Base
|
7
7
|
def run
|
8
|
-
return unless configuration.dig
|
8
|
+
return unless configuration.dig :generate, :git_cop
|
9
9
|
|
10
10
|
cli.uncomment_lines "#{gem_name}/Rakefile", %r(require.+git\/cop.+)
|
11
11
|
end
|
@@ -5,7 +5,7 @@ module Gemsmith
|
|
5
5
|
# Generates GitHub support.
|
6
6
|
class GitHub < Base
|
7
7
|
def run
|
8
|
-
return unless configuration.dig
|
8
|
+
return unless configuration.dig :generate, :git_hub
|
9
9
|
|
10
10
|
template "%gem_name%/.github/ISSUE_TEMPLATE.md.tt"
|
11
11
|
template "%gem_name%/.github/PULL_REQUEST_TEMPLATE.md.tt"
|
@@ -5,7 +5,7 @@ module Gemsmith
|
|
5
5
|
# Generates Reek support.
|
6
6
|
class Reek < Base
|
7
7
|
def run
|
8
|
-
return unless configuration.dig
|
8
|
+
return unless configuration.dig :generate, :reek
|
9
9
|
|
10
10
|
cli.uncomment_lines "#{gem_name}/Rakefile", /require.+reek.+/
|
11
11
|
cli.uncomment_lines "#{gem_name}/Rakefile", /Reek.+/
|
@@ -5,7 +5,7 @@ module Gemsmith
|
|
5
5
|
# Generates RSpec support.
|
6
6
|
class Rspec < Base
|
7
7
|
def run
|
8
|
-
return unless configuration.dig
|
8
|
+
return unless configuration.dig :generate, :rspec
|
9
9
|
|
10
10
|
uncomment_lines
|
11
11
|
install_templates
|
@@ -29,7 +29,7 @@ module Gemsmith
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def install_rails_helper
|
32
|
-
return unless configuration.dig
|
32
|
+
return unless configuration.dig :generate, :engine
|
33
33
|
|
34
34
|
template "#{rspec_root}/rails_helper.rb.tt"
|
35
35
|
end
|
@@ -5,7 +5,7 @@ module Gemsmith
|
|
5
5
|
# Generates Rubocop support.
|
6
6
|
class Rubocop < Base
|
7
7
|
def run
|
8
|
-
return unless configuration.dig
|
8
|
+
return unless configuration.dig :generate, :rubocop
|
9
9
|
|
10
10
|
cli.uncomment_lines "#{gem_name}/Rakefile", /require.+rubocop.+/
|
11
11
|
cli.uncomment_lines "#{gem_name}/Rakefile", /RuboCop.+/
|
data/lib/gemsmith/helpers/cli.rb
CHANGED
@@ -24,7 +24,7 @@ module Gemsmith
|
|
24
24
|
|
25
25
|
answer = answer.to_i
|
26
26
|
|
27
|
-
if (1..gems.size).cover?
|
27
|
+
if (1..gems.size).cover? answer
|
28
28
|
Gem::Specification.find name, gems[answer - 1].version.version
|
29
29
|
else
|
30
30
|
say_status :error, "Invalid option: #{answer}", :red
|
@@ -51,7 +51,7 @@ module Gemsmith
|
|
51
51
|
print_gems specs
|
52
52
|
inspect_gem pick_gem(specs, name), method
|
53
53
|
else
|
54
|
-
say_status
|
54
|
+
say_status :error, "Unable to find gem: #{name}.", :red and ""
|
55
55
|
end
|
56
56
|
end
|
57
57
|
end
|
data/lib/gemsmith/identity.rb
CHANGED
@@ -35,7 +35,7 @@ module Gemsmith
|
|
35
35
|
def build gem_spec
|
36
36
|
path = gem_spec.package_path
|
37
37
|
|
38
|
-
if kernel.system
|
38
|
+
if kernel.system "gem build #{gem_spec.name}.gemspec"
|
39
39
|
FileUtils.mkdir_p "pkg"
|
40
40
|
FileUtils.mv gem_spec.package_file_name, path
|
41
41
|
shell.confirm "Built: #{path}."
|
@@ -47,7 +47,7 @@ module Gemsmith
|
|
47
47
|
def install gem_spec
|
48
48
|
gem_name = "#{gem_spec.name} #{gem_spec.version}"
|
49
49
|
|
50
|
-
if kernel.system
|
50
|
+
if kernel.system "gem install #{gem_spec.package_path}"
|
51
51
|
shell.confirm "Installed: #{gem_name}."
|
52
52
|
else
|
53
53
|
shell.error "Unable to install: #{gem_name}."
|
@@ -1,10 +1,10 @@
|
|
1
1
|
inherit_from:
|
2
|
-
- https://raw.githubusercontent.com/bkuhlmann/code_quality/3.
|
2
|
+
- https://raw.githubusercontent.com/bkuhlmann/code_quality/3.1.0/configurations/rubocop/ruby.yml
|
3
3
|
<%- if config.dig(:generate, :rspec) -%>
|
4
|
-
- https://raw.githubusercontent.com/bkuhlmann/code_quality/3.
|
4
|
+
- https://raw.githubusercontent.com/bkuhlmann/code_quality/3.1.0/configurations/rubocop/rspec.yml
|
5
5
|
<%- end -%>
|
6
6
|
<%- if config.dig(:generate, :engine) -%>
|
7
|
-
- https://raw.githubusercontent.com/bkuhlmann/code_quality/3.
|
7
|
+
- https://raw.githubusercontent.com/bkuhlmann/code_quality/3.1.0/configurations/rubocop/rails.yml
|
8
8
|
<%- end -%>
|
9
9
|
|
10
10
|
<%- if config.dig(:generate, :cli) -%>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
guard :rspec, cmd: "bundle exec rspec --format documentation" do
|
2
|
-
watch
|
2
|
+
watch %r(^spec/.+_spec\.rb$)
|
3
3
|
watch(%r(^lib/(.+)\.rb$)) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
4
4
|
watch("spec/spec_helper.rb") { "spec" }
|
5
5
|
<%- if config.dig(:generate, :engine) -%>
|
@@ -35,7 +35,4 @@ RSpec.configure do |config|
|
|
35
35
|
expectations.syntax = :expect
|
36
36
|
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
37
37
|
end
|
38
|
-
|
39
|
-
$stdout = File.new("/dev/null", "w") if ENV["SUPPRESS_STDOUT"] == "enabled"
|
40
|
-
$stderr = File.new("/dev/null", "w") if ENV["SUPPRESS_STDERR"] == "enabled"
|
41
38
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gemsmith
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 13.
|
4
|
+
version: 13.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -10,26 +10,25 @@ bindir: bin
|
|
10
10
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25
|
+
ebMN/ylQqan2FgiAs1rpP0/D4C0MlBjoDktsT+2IyLol1KmkDB20ExJ4Sf1GRNdA
|
26
|
+
hpWOtcgqHtmrc7xzgB6BuyoYufrKKUlCO3ewTM4C375D2qO7hIdKuMOO3CdPMtSk
|
27
|
+
OrWpbzCL+nbbXqeoqiHgZaUvcyyQrGj5sQRxMTzuMXzzQxtHnuTuKrcz16HMTX/O
|
28
|
+
dKvURM+1PwDCzC5tvRwjhUJIizau6+MtkFCvJHmaAj1aZL3odcPejHj5Hxt/0CUW
|
29
|
+
y84=
|
31
30
|
-----END CERTIFICATE-----
|
32
|
-
date: 2019-
|
31
|
+
date: 2019-03-02 00:00:00.000000000 Z
|
33
32
|
dependencies:
|
34
33
|
- !ruby/object:Gem::Dependency
|
35
34
|
name: milestoner
|
@@ -135,14 +134,14 @@ dependencies:
|
|
135
134
|
requirements:
|
136
135
|
- - "~>"
|
137
136
|
- !ruby/object:Gem::Version
|
138
|
-
version: '7.
|
137
|
+
version: '7.2'
|
139
138
|
type: :runtime
|
140
139
|
prerelease: false
|
141
140
|
version_requirements: !ruby/object:Gem::Requirement
|
142
141
|
requirements:
|
143
142
|
- - "~>"
|
144
143
|
- !ruby/object:Gem::Version
|
145
|
-
version: '7.
|
144
|
+
version: '7.2'
|
146
145
|
- !ruby/object:Gem::Dependency
|
147
146
|
name: awesome_print
|
148
147
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.sig
CHANGED
Binary file
|