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 +4 -4
- data/CHANGELOG.md +10 -1
- data/lib/semmy/configuration.rb +1 -1
- data/lib/semmy/tasks/changelog_sections.rb +1 -1
- data/lib/semmy/version.rb +1 -1
- data/lib/semmy/version_string.rb +14 -11
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15b57afe682998646f2c1c5c42d72895b1b80a13
|
4
|
+
data.tar.gz: 9811d697c18e5f3f6754da5d91ed25b56f1a9577
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
|
data/lib/semmy/configuration.rb
CHANGED
@@ -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}
|
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.
|
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
data/lib/semmy/version_string.rb
CHANGED
@@ -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
|