gemsmith 5.5.0 → 5.6.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 46f785c516971e71adbeb85ed2f8e71a3e7536db
4
- data.tar.gz: 0fea0e8db0142967159df3166f4f573d99b2b575
3
+ metadata.gz: c8fae3eed50e6c041a0468c15d995f955f2a12e0
4
+ data.tar.gz: d7c8f707c174b7e5f3c80d40a007a56b3d651338
5
5
  SHA512:
6
- metadata.gz: 7bb76e0b8e17098e5d5e989328ebde25b63aeec24ffe218ac4d53aa616c7fd8dca560ecd70577f0920848552b07fd2046c40d073ee95445dddc21b4aac12c4b0
7
- data.tar.gz: 5ffb90f966efbc280a8fa1d910adc595c381b796bf1abca11d6d6eca838bdecce409a120a6367822d7312f1543e265574db30b65fcf2039ab958bfbbf55cce09
6
+ metadata.gz: ec5db0c1fafa1130cb9edaeaacd570bd9f58c352cc0b10fb0a70300f561e8b2f881cede25541b69eb6b5d8325715577383a9dc39dfb9d8377a925927b8174fdc
7
+ data.tar.gz: 3d2f2b54e0b818b5a75229dafa41b0f08b5eda1301521d1c72266bed7c2336192d46305edb929f9d919f68e98939188addb8dc93643a075ae55533debf710e67
Binary file
data.tar.gz.sig CHANGED
Binary file
data/README.md CHANGED
@@ -48,8 +48,8 @@ A command line interface for smithing new Ruby gems.
48
48
  - Supports [Travis CI](http://travis-ci.org).
49
49
  - Provides the ability to open the source code of any gem within your favorite editor.
50
50
  - Provides the ability to read the documentation of any gem within your default browser.
51
- - Adds commonly needed README, [CHANGELOG](CHANGELOG.md), [CONTRIBUTING](CONTRIBUTING.md), [LICENSE](LICENSE.md), etc.
52
- template files.
51
+ - Adds commonly needed [README](README.md), [CHANGELOG](CHANGELOG.md), [CONTRIBUTING](CONTRIBUTING.md),
52
+ [LICENSE](LICENSE.md), etc. template files.
53
53
 
54
54
  # Requirements
55
55
 
@@ -138,13 +138,13 @@ For more gem creation options, type: gemsmith help create
138
138
 
139
139
  Once a gem skeleton has been created, the following tasks are available within the project via Bundler (i.e. rake -T):
140
140
 
141
- rake build # Build gemsmith-5.4.0.gem into the pkg directory
141
+ rake build # Build example-0.1.0.gem into the pkg directory
142
142
  rake clean # Clean gem artifacts
143
- rake install # Build and install gemsmith-5.4.0.gem into system gems
144
- rake install:local # Build and install gemsmith-5.4.0.gem into system gems without network access
145
- rake publish # Build, tag v5.4.0 (signed), and push gemsmith-5.4.0.gem to RubyGems
143
+ rake install # Build and install example-0.1.0.gem into system gems
144
+ rake install:local # Build and install example-0.1.0.gem into system gems without network access
145
+ rake publish # Build, tag v0.1.0 (signed), and push example-0.1.0.gem to RubyGems
146
146
  rake readme:toc # Update README Table of Contents
147
- rake release # Create tag v5.4.0 and build and push gemsmith-5.4.0.gem to Rubygems
147
+ rake release # Create tag v0.1.0 and build and push example-0.1.0.gem to Rubygems
148
148
  rake rubocop # Run RuboCop
149
149
  rake rubocop:auto_correct # Auto-correct RuboCop offenses
150
150
  rake spec # Run RSpec code examples
@@ -1,5 +1,5 @@
1
1
  module Gemsmith
2
- # The canonical source of gem information.
2
+ # Gem identity information.
3
3
  module Identity
4
4
  def self.name
5
5
  "gemsmith"
@@ -10,7 +10,7 @@ module Gemsmith
10
10
  end
11
11
 
12
12
  def self.version
13
- "5.5.0"
13
+ "5.6.0"
14
14
  end
15
15
 
16
16
  def self.version_label
@@ -2,7 +2,7 @@ require "bundler/ui/shell"
2
2
 
3
3
  module Gemsmith
4
4
  module Rake
5
- # Enhances gem publishing with build functionality. Meant to be wrapped in Rake tasks.
5
+ # Provides gem build functionality. Meant to be wrapped in Rake tasks.
6
6
  class Build
7
7
  def initialize shell: Bundler::UI::Shell.new, kernel: Kernel
8
8
  @shell = shell
@@ -1,62 +1,43 @@
1
- require "bundler/ui/shell"
1
+ require "milestoner"
2
2
 
3
3
  module Gemsmith
4
4
  module Rake
5
- # Enhances gem publishing with release functionality. Meant to be wrapped in Rake tasks.
5
+ # Provides gem release functionality. Meant to be wrapped in Rake tasks.
6
6
  class Release
7
7
  def initialize gem_spec_path = Dir.glob("#{Dir.pwd}/*.gemspec").first,
8
- shell: Bundler::UI::Shell.new,
9
- kernel: Kernel
8
+ bundler: Bundler,
9
+ tagger: Milestoner::Tagger.new,
10
+ shell: Bundler::UI::Shell.new
10
11
 
11
12
  @gem_spec_path = gem_spec_path
13
+ @tagger = tagger
12
14
  @shell = shell
13
- @kernel = kernel
14
-
15
- @gem_spec = load_gem_spec
16
- end
17
-
18
- def name
19
- gem_spec.name
15
+ @gem_spec = bundler.load_gemspec gem_spec_path.to_s
16
+ rescue Errno::ENOENT
17
+ @shell.error "Invalid gemspec file path: #{@gem_spec_path}."
20
18
  end
21
19
 
22
- def version
20
+ def version_number
23
21
  gem_spec.version.version
24
22
  end
25
23
 
26
- def version_formatted
27
- "v#{version}"
24
+ def version_label
25
+ "v#{version_number}"
28
26
  end
29
27
 
30
- def package_file_name
31
- "#{name}-#{version}.gem"
28
+ def gem_file_name
29
+ "#{gem_spec.name}-#{version_number}.gem"
32
30
  end
33
31
 
34
- def tag
35
- shell.error(%(Tag #{version_formatted} exists!)) && return if tagged?
36
-
37
- return if kernel.system %(git tag --sign --annotate "#{version_formatted}" --message "Version #{version}.")
38
-
39
- kernel.system "git tag -d #{version_formatted}"
40
- shell.error %(Removed "#{version_formatted}" due to errors.)
41
- end
42
-
43
- def push
44
- kernel.system "git push --tags"
32
+ def publish
33
+ tagger.create version_number, sign: true
34
+ rescue Milestoner::Errors::Base => error
35
+ shell.error error.message
45
36
  end
46
37
 
47
38
  private
48
39
 
49
- attr_reader :gem_spec_path, :gem_spec, :shell, :kernel
50
-
51
- def load_gem_spec
52
- Bundler.load_gemspec gem_spec_path.to_s
53
- rescue Errno::ENOENT
54
- shell.error "Invalid gemspec file path: #{gem_spec_path}."
55
- end
56
-
57
- def tagged?
58
- kernel.system %(git show #{version_formatted})
59
- end
40
+ attr_reader :gem_spec_path, :gem_spec, :tagger, :shell
60
41
  end
61
42
  end
62
43
  end
@@ -31,10 +31,9 @@ module Gemsmith
31
31
  build.clean!
32
32
  end
33
33
 
34
- desc "Build, tag #{release.version_formatted} (signed), and push #{release.package_file_name} to RubyGems"
34
+ desc "Build, tag #{release.version_label} (signed), and push #{release.gem_file_name} to RubyGems"
35
35
  task publish: [:clean, :build, "release:guard_clean"] do
36
- release.tag
37
- release.push
36
+ release.publish
38
37
  ::Rake::Task["release:rubygem_push"].invoke
39
38
  end
40
39
  end
@@ -1,5 +1,5 @@
1
1
  module <%= config[:gem_class] %>
2
- # The canonical source of gem information.
2
+ # Gem identity information.
3
3
  module Identity
4
4
  def self.name
5
5
  "<%= config[:gem_name] %>"
@@ -2,7 +2,7 @@ RSpec.configure do |config|
2
2
  config.order = "random"
3
3
  config.filter_run focus: true
4
4
  config.run_all_when_everything_filtered = true
5
- config.example_status_persistence_file_path = "./tmp/rspec/examples.txt"
5
+ config.example_status_persistence_file_path = "./tmp/rspec-status.txt"
6
6
 
7
7
  config.mock_with :rspec do |mocks|
8
8
  mocks.verify_partial_doubles = true
@@ -14,9 +14,10 @@ RSpec.configure do |config|
14
14
  config.include RSpec::Kit::TempDirContext
15
15
 
16
16
  config.before do |example|
17
- if example.metadata[:temp_dir]
18
- FileUtils.rm_rf(temp_dir) if File.exist?(temp_dir)
19
- FileUtils.mkdir_p(temp_dir)
20
- end
17
+ FileUtils.mkdir_p(temp_dir) if example.metadata[:temp_dir]
18
+ end
19
+
20
+ config.after do |example|
21
+ FileUtils.rm_rf(temp_dir) if example.metadata[:temp_dir]
21
22
  end
22
23
  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: 5.5.0
4
+ version: 5.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -30,7 +30,7 @@ cert_chain:
30
30
  aSif+qBc6oHD7EQWPF5cZkzkIURuwNwPBngZGxIKaMAgRhjGFXzUMAaq++r59cS9
31
31
  xTfQ4k6fglKEgpnLAXiKdo2c8Ym+X4rIKFfedQ==
32
32
  -----END CERTIFICATE-----
33
- date: 2015-09-17 00:00:00.000000000 Z
33
+ date: 2015-09-27 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: thor
@@ -60,6 +60,20 @@ dependencies:
60
60
  - - "~>"
61
61
  - !ruby/object:Gem::Version
62
62
  version: '2.1'
63
+ - !ruby/object:Gem::Dependency
64
+ name: milestoner
65
+ requirement: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '1.0'
70
+ type: :runtime
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - "~>"
75
+ - !ruby/object:Gem::Version
76
+ version: '1.0'
63
77
  - !ruby/object:Gem::Dependency
64
78
  name: rake
65
79
  requirement: !ruby/object:Gem::Requirement
metadata.gz.sig CHANGED
@@ -1,2 +1 @@
1
- �����e��s5˧�&�d1e��b}����VW�Ȯ�&��|�+q�؄>��m}a`K�����G< �����aX�5n
2
- Z�� b��5�]l&\�ݯ��U`��);�A�"/���ˣ%�~�t��� ��� �=������0�����R�s�T�L4�ZkQ�H� ���)�bB����p<�{�:���[G_��\Œ�!��n�PFMȿ��]A)fO$��F�����A��D���+��f�` ��9p�
1
+ *��D4��6����ԟK_���Q����b�~���F��|j��[=f��C�<�f�{���сh5{Q7���\�&�-��9���Mvr�oϦ�fѕH����u�?0[�> 7kn�]�����%�Ѝ�G