gemsmith 13.1.0 → 13.2.0

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: 1165e16ef8f7d0af31a75aee51deb1170299dd79c0794ccb989078e275ca3dc7
4
- data.tar.gz: 471aed4063ff9122cc7141a3f55b59fa047741b389e2ea03b6a7fc37cb1def1a
3
+ metadata.gz: 50269b8129232be5566a3eada9226799f9ebf95cd1cd10033fd9ecce60110338
4
+ data.tar.gz: 56ecfc17ab2280cf0eabf9c56ff693a8fe2042a6d9777a2f51a2c43d69ddf0f5
5
5
  SHA512:
6
- metadata.gz: 6cc182b14a6244e3a38af9b1631de1ef75385d9d7582b32f26b1e17d0b98612d6082571520b0369974505be9632d00829d3fcb8c676d5920e81159fa199d316a
7
- data.tar.gz: 83d4ed6e6bb644dcb5c9e0d537e7860b92cf40ba6468f8a4b5f502b05659178a30881aa49d5dbbc0b399028d32a845c37f98c35aca700a27ffbb62bc624dc37e
6
+ metadata.gz: 180ae1b5702a28f0faae1aa3d58f42afdd4c10ef9644110110335dc53bf39f2ea02f20e36712279e28d8bd731e6e58a76ebc5de616112d91344300f5812caed3
7
+ data.tar.gz: 8317b70de611601efc8c0852be0cc013431c5a3015d1e306fa8bbaf98943f6eb7317c5b16d0a5431f61e683130529afa8469d2d44190b4cc43dd55af91e95c06
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -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(name, "visit")
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(:config)
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::Version::DELIMITER).map(&:to_i)
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?(operator)
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?(self.class.specification)
67
+ return if spec.is_a? self.class.specification
68
68
 
69
- fail(Errors::Specification, %(Unknown gem specification: "#{file_path}".))
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 support.
6
6
  class Bundler < Base
7
7
  def run
8
- Dir.chdir(gem_root) do
8
+ Dir.chdir gem_root do
9
9
  cli.say_status :info, "Installing gem dependencies...", :green
10
10
  cli.run "bundle install"
11
11
  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(:generate, :bundler_audit)
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 Circle CI support.
6
6
  class CircleCI < Base
7
7
  def run
8
- return unless configuration.dig(:generate, :circle_ci)
8
+ return unless configuration.dig :generate, :circle_ci
9
9
 
10
10
  template "%gem_name%/circle.yml.tt"
11
11
  end
@@ -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(:generate, :cli)
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"
@@ -5,7 +5,7 @@ module Gemsmith
5
5
  # Generates Code Climate support.
6
6
  class CodeClimate < Base
7
7
  def run
8
- return unless configuration.dig(:generate, :code_climate)
8
+ return unless configuration.dig :generate, :code_climate
9
9
 
10
10
  template "%gem_name%/.codeclimate.yml.tt"
11
11
  end
@@ -10,7 +10,7 @@ module Gemsmith
10
10
 
11
11
  def install_rails
12
12
  return if rails?
13
- return unless cli.yes?("Ruby on Rails is not installed. Would you like it installed (y/n)?")
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
@@ -6,7 +6,7 @@ module Gemsmith
6
6
  class Gem < Base
7
7
  def run
8
8
  create_files
9
- cli.chmod "#{configuration.dig(:gem, :name)}/bin/setup", 0o755
9
+ cli.chmod "#{configuration.dig :gem, :name}/bin/setup", 0o755
10
10
  end
11
11
 
12
12
  private
@@ -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(gem_root) do
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(:generate, :git_cop)
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(:generate, :git_hub)
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 Guard support.
6
6
  class Guard < Base
7
7
  def run
8
- return unless configuration.dig(:generate, :guard)
8
+ return unless configuration.dig :generate, :guard
9
9
 
10
10
  template "%gem_name%/Guardfile.tt"
11
11
  end
@@ -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(:generate, :reek)
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(:generate, :rspec)
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(:generate, :engine)
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(:generate, :rubocop)
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.+/
@@ -24,7 +24,7 @@ module Gemsmith
24
24
 
25
25
  answer = answer.to_i
26
26
 
27
- if (1..gems.size).cover?(answer)
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(:error, "Unable to find gem: #{name}.", :red) and ""
54
+ say_status :error, "Unable to find gem: #{name}.", :red and ""
55
55
  end
56
56
  end
57
57
  end
@@ -12,7 +12,7 @@ module Gemsmith
12
12
  end
13
13
 
14
14
  def self.version
15
- "13.1.0"
15
+ "13.2.0"
16
16
  end
17
17
 
18
18
  def self.version_label
@@ -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("gem build #{gem_spec.name}.gemspec")
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("gem install #{gem_spec.package_path}")
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.0.0/configurations/rubocop/ruby.yml
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.0.0/configurations/rubocop/rspec.yml
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.0.0/configurations/rubocop/rails.yml
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(%r(^spec/.+_spec\.rb$))
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) -%>
@@ -7,7 +7,7 @@ begin
7
7
  # require "rubocop/rake_task"
8
8
 
9
9
  # Bundler::Audit::Task.new
10
- # RSpec::Core::RakeTask.new(:spec)
10
+ # RSpec::Core::RakeTask.new :spec
11
11
  # Reek::Rake::Task.new
12
12
  # RuboCop::RakeTask.new
13
13
  rescue LoadError => error
@@ -1,5 +1,5 @@
1
1
  ENV["RAILS_ENV"] ||= "test"
2
- require File.expand_path "../dummy/config/environment", __FILE__
2
+ require File.expand_path "dummy/config/environment", __dir__
3
3
  ENV["RAILS_ROOT"] ||= File.dirname(__FILE__) + "/dummy"
4
4
 
5
5
  require "spec_helper"
@@ -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.1.0
4
+ version: 13.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -10,26 +10,25 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDQDCCAiigAwIBAgIBATANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpicm9v
14
- a2UvREM9YWxjaGVtaXN0cy9EQz1pbzAeFw0xODAyMTQxNTA4NDVaFw0xOTAyMTQx
15
- NTA4NDVaMCUxIzAhBgNVBAMMGmJyb29rZS9EQz1hbGNoZW1pc3RzL0RDPWlvMIIB
13
+ MIIC/jCCAeagAwIBAgIBAjANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpicm9v
14
+ a2UvREM9YWxjaGVtaXN0cy9EQz1pbzAeFw0xOTAyMTcxNjAxMTFaFw0yMDAyMTcx
15
+ NjAxMTFaMCUxIzAhBgNVBAMMGmJyb29rZS9EQz1hbGNoZW1pc3RzL0RDPWlvMIIB
16
16
  IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6l1qpXTiomH1RfMRloyw7MiE
17
17
  xyVx/x8Yc3EupdH7uhNaTXQGyORN6aOY//1QXXMHIZ9tW74nZLhesWMSUMYy0XhB
18
18
  brs+KkurHnc9FnEJAbG7ebGvl/ncqZt72nQvaxpDxvuCBHgJAz+8i5wl6FhLw+oT
19
19
  9z0A8KcGhz67SdcoQiD7qiCjL/2NTeWHOzkpPrdGlt088+VerEEGf5I13QCvaftP
20
20
  D5vkU0YlAm1r98BymuJlcQ1qdkVEI1d48ph4kcS0S0nv1RiuyVb6TCAR3Nu3VaVq
21
21
  3fPzZKJLZBx67UvXdbdicWPiUR75elI4PXpLIic3xytaF52ZJYyKZCNZJhNwfQID
22
- AQABo3sweTAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQU0nzow9vc
23
- 2CdikiiE3fJhP/gY4ggwHwYDVR0RBBgwFoEUYnJvb2tlQGFsY2hlbWlzdHMuaW8w
24
- HwYDVR0SBBgwFoEUYnJvb2tlQGFsY2hlbWlzdHMuaW8wDQYJKoZIhvcNAQELBQAD
25
- ggEBAImQPNpkb90nkDUCJ4ivQNKK1LCebOjqZnOWGC4HxndvBQBqj78MTZifoODl
26
- uPBY4fSnnpVGph+Y1OTWw/xhk3HE2AH0GDGC9xbM75qrg3/+a4D81pM94B6zuBdA
27
- 7hxUy4kByawrii833IidV0zkI4lCombTNicc8JWXXSlL2G/sWPLndNvn5rzoyyRT
28
- pPOLYGdB4hqUam3hBgLOsYIOVp+yXMvj0gvk/Djq8IR2P1RS4NZU7HHD485xkBfL
29
- 4Zrsxi713z6sndd9JBAm4G7mJiV93MsuCM5N4ZDY7XaxIhvctNSNhX/Yn8LLdtGI
30
- b4jw5t40FKyNUvLPPXYAvQALBtk=
22
+ AQABozkwNzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQU0nzow9vc
23
+ 2CdikiiE3fJhP/gY4ggwDQYJKoZIhvcNAQELBQADggEBANgfX7kPZkJvsbdWMvbe
24
+ DUUYxRTqTUzCDpLd2p3sQvgLMKjTNSKt6CFq/kh+98b6RCgO6DqiVfxvOEq02dvf
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-02-02 00:00:00.000000000 Z
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.0'
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.0'
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