milestoner 2.1.0 → 2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 39afdf175e411b721bac1150563d6c487da9de55
4
- data.tar.gz: dabed3f7a2512b4844b31de00151f7c12d92a126
3
+ metadata.gz: 1c9069703d542f4240535b561b66d0281abedfc1
4
+ data.tar.gz: fffc9ae8af389de2d28c4f87385d3f288172fff9
5
5
  SHA512:
6
- metadata.gz: 1c50301337b7997a6b792904f687e757038cdfb19c745974d81ff9a9183b6b9c9b2f65861fec9c05b598b6ea2b26b8d7c4970daaffadae2329ed14c70c5a49de
7
- data.tar.gz: 3932e384a6436d812e4e3af30e16b9f960c74d5d6a226898bc6b515b83710d1bab1bdd4f17e0841a62381cac604fb777cfa6afb5374d3d952a7c0b35e0fd026d
6
+ metadata.gz: 078922346541fb99108b8be870d5ac926d2b338ebfa5b7524d546d5cf76fec806e0443fd10a7ef5dc3c162e894c48fac4c6123f8b05165406f3c149eb467e549
7
+ data.tar.gz: bf20f9b2b67ba672cb89e1a9b8fee361d53ffa1621990d173024633b08d456705ed51cc60b401857a4326d101d0f38aeddc20c83dc57d6c9cc3e0a60506a3445
Binary file
data.tar.gz.sig CHANGED
Binary file
data/README.md CHANGED
@@ -14,6 +14,7 @@ A command line interface for releasing Git repository milestones.
14
14
  # Table of Contents
15
15
 
16
16
  - [Features](#features)
17
+ - [Screencasts](#screencasts)
17
18
  - [Requirements](#requirements)
18
19
  - [Setup](#setup)
19
20
  - [Usage](#usage)
@@ -35,8 +36,7 @@ A command line interface for releasing Git repository milestones.
35
36
  - Ensures [Semantic Versioning](http://semver.org) of Git repository tags:
36
37
  - Format: `v<major>.<minor>.<maintenance>`.
37
38
  - Example: `v0.1.0`.
38
- - Ensures Git commits since last tag (or since initialization of repository if no tags exist) are included within each
39
- Git tag message.
39
+ - Ensures Git commits since last tag (or initialization of repository) are included within each Git tag message.
40
40
  - Ensures Git commit messages are grouped by prefix, in order defined, for each Git tag message. Prefix defaults (can be
41
41
  customized):
42
42
  - Fixed
@@ -50,6 +50,8 @@ A command line interface for releasing Git repository milestones.
50
50
  - Ensures Git commit messages are sanitized by removing extra spaces and `[ci skip]` text within each Git tag message.
51
51
  - Provides optional security for signing Git tags with [GnuPG](https://www.gnupg.org) signing key.
52
52
 
53
+ # Screencasts
54
+
53
55
  [![asciicast](https://asciinema.org/a/26561.png)](https://asciinema.org/a/26561)
54
56
 
55
57
  # Requirements
@@ -62,7 +64,7 @@ A command line interface for releasing Git repository milestones.
62
64
 
63
65
  For a secure install, type the following (recommended):
64
66
 
65
- gem cert --add <(curl -Ls https://www.alchemists.io/gem-public.pem)
67
+ gem cert --add <(curl --location --silent https://www.alchemists.io/gem-public.pem)
66
68
  gem install milestoner --trust-policy MediumSecurity
67
69
 
68
70
  NOTE: A HighSecurity trust policy would be best but MediumSecurity enables signed gem verification while
@@ -8,8 +8,12 @@ module Milestoner
8
8
  File.exist? File.join(Dir.pwd, ".git")
9
9
  end
10
10
 
11
+ def git_commits?
12
+ system "git log > /dev/null 2>&1"
13
+ end
14
+
11
15
  def git_remote?
12
- !`git config remote.origin.url`.empty?
16
+ system "git config remote.origin.url"
13
17
  end
14
18
  end
15
19
  end
@@ -12,7 +12,7 @@ module Milestoner
12
12
  end
13
13
 
14
14
  def self.version
15
- "2.1.0"
15
+ "2.2.0"
16
16
  end
17
17
 
18
18
  def self.version_label
@@ -11,6 +11,9 @@ module Milestoner
11
11
  def publish version, sign: false
12
12
  tagger.create version, sign: sign
13
13
  pusher.push
14
+ rescue Errors::Git => error
15
+ tagger.delete version
16
+ raise error.class, error.message
14
17
  end
15
18
 
16
19
  private
@@ -55,17 +55,24 @@ module Milestoner
55
55
  end
56
56
 
57
57
  def create version = version_number, sign: false
58
- fail(Errors::Git) unless git_supported?
59
58
  @version_number = validate_version version
59
+ fail(Errors::Git) unless git_supported?
60
+ fail(Errors::Git, "Unable to tag without commits.") unless git_commits?
60
61
  fail(Errors::DuplicateTag, "Duplicate tag exists: #{version_label}.") if duplicate?
61
62
  create_tag sign: sign
62
63
  end
63
64
 
64
- def destroy
65
+ def delete version = version_number
66
+ @version_number = validate_version version
65
67
  fail(Errors::Git) unless git_supported?
66
68
  Open3.capture3 "git tag --delete #{version_label}" if duplicate?
67
69
  end
68
70
 
71
+ def destroy
72
+ warn "[DEPRECATION]: #destroy is deprecated, use #delete instead."
73
+ delete
74
+ end
75
+
69
76
  private
70
77
 
71
78
  def validate_version version
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: milestoner
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.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: 2016-01-21 00:00:00.000000000 Z
33
+ date: 2016-03-14 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: thor
@@ -347,7 +347,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
347
347
  version: '0'
348
348
  requirements: []
349
349
  rubyforge_project:
350
- rubygems_version: 2.5.1
350
+ rubygems_version: 2.6.1
351
351
  signing_key:
352
352
  specification_version: 4
353
353
  summary: A command line interface for releasing Git repository milestones.
metadata.gz.sig CHANGED
Binary file