semmy 0.2.0 → 0.2.1

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: 1b3f7405b45d85b2fbad72f6bf800de454f6c079
4
- data.tar.gz: 3d79221017ce08e3aa5fb6dcbf9d0b5db3bf11f8
3
+ metadata.gz: 15b57afe682998646f2c1c5c42d72895b1b80a13
4
+ data.tar.gz: 9811d697c18e5f3f6754da5d91ed25b56f1a9577
5
5
  SHA512:
6
- metadata.gz: 670ce446aaa00a4b44e11411b5a474e091679a77a49b5ebc8b512490565b84527e83366c51440ff30eb2c01499a80150e0c804bd8d81ce7290ac9f41e0007e0e
7
- data.tar.gz: 86f4c2005019a02441117b931f0eb4064321158f17d9ec589671df01d1739d34bc531f06b78759b7d80ac18da8e9d6674a3f333d3befe922171c7beb032565c4
6
+ metadata.gz: 8be9bd569465595894313a4b37862b062fef870cc0ad90be29db7dd99337258e0bab23017cbae107dafb35fd2c5a877e279fd33b19105fa44559ea281f6c9744
7
+ data.tar.gz: 4734cbc6470c17fd6f4f257c6a4643387005f6a593ca4145e183b9b4a3eee4a7c51456604ae788aa115604fee67ae333b76c144bb4e840a013e25937a5cb993f
data/CHANGELOG.md CHANGED
@@ -1,10 +1,19 @@
1
1
  # CHANGELOG
2
2
 
3
+ ### Version 0.2.1
4
+
5
+ 2016-06-09
6
+
7
+ [Compare changes](https://github.com/tf/semmy/compare/v0.2.0...v0.2.1)
8
+
9
+ - Fix default GitHub compare url.
10
+ - Add link comparing to last patch level for stable release.
11
+
3
12
  ### Version 0.2.0
4
13
 
5
14
  2016-06-09
6
15
 
7
- [Compare changes](https://github.com/tf/semmy/compare/v0.1.0..v0.2.0)
16
+ [Compare changes](https://github.com/tf/semmy/compare/v0.1.0...v0.2.0)
8
17
 
9
18
  - Fine tune default commit messages.
10
19
 
@@ -28,7 +28,7 @@ module Semmy
28
28
 
29
29
  @changelog_path = 'CHANGELOG.md'
30
30
  @changelog_version_section_heading = '### Version %{version}'
31
- @changelog_compare_url = '%{repository}/compare/%{old_version_tag}..%{new_version_tag}'
31
+ @changelog_compare_url = '%{repository}/compare/%{old_version_tag}...%{new_version_tag}'
32
32
  @changelog_unrelased_section_heading = '### Changes on `master`'
33
33
  @changelog_unrelased_section_blank_slate = 'None so far.'
34
34
 
@@ -5,7 +5,7 @@ module Semmy
5
5
  namespace 'changelog' do
6
6
  task 'close_section' do
7
7
  new_version = Project.version
8
- old_version = VersionString.previous_minor(new_version)
8
+ old_version = VersionString.previous_version(new_version)
9
9
  homepage = Gemspec.homepage
10
10
 
11
11
  Shell.info("Inserting #{new_version} section " \
data/lib/semmy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Semmy
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
@@ -32,17 +32,6 @@ module Semmy
32
32
  components.join('.')
33
33
  end
34
34
 
35
- def previous_minor(version)
36
- components = version.split('.').map(&:to_i)
37
-
38
- if components[1] == 0
39
- fail(NoPreviousMinor, "Cannot get previous minor of #{version}.")
40
- end
41
-
42
- components[1] -= 1
43
- components.join('.')
44
- end
45
-
46
35
  def minor_only(version)
47
36
  version.split('.')[0..1].join('.')
48
37
  end
@@ -56,5 +45,19 @@ module Semmy
56
45
  patch: components[2]
57
46
  }
58
47
  end
48
+
49
+ def previous_version(version)
50
+ components = version.split('.').map(&:to_i)
51
+
52
+ if components[2] > 0
53
+ components[2] -= 1
54
+ elsif components[1] > 0
55
+ components[1] -= 1
56
+ else
57
+ fail(NoPreviousMinor, "Cannot get previous version of #{version}.")
58
+ end
59
+
60
+ components.join('.')
61
+ end
59
62
  end
60
63
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: semmy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Fischbach