changelog-rb 0.2.1 → 0.2.2

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
  SHA1:
3
- metadata.gz: b861cb41af911658613f9d6d835c8b5f3b8b22de
4
- data.tar.gz: 9a566e455e8c8406aad7c04742d869e1985f491d
3
+ metadata.gz: ddf2750e177944dc94670ae72327331ca39c907a
4
+ data.tar.gz: 65202dc3bb69293f50b5c48760dffb6fbe08ec4c
5
5
  SHA512:
6
- metadata.gz: 50119559a74dc146f80ad3343ea989c843cc827a4f13b9ad24f1717646aefa1ac7edaa48cb194fc261afe77a2557c7a1590c33ce1659456d9d91cef6c0020240
7
- data.tar.gz: 474246b9e8b243a73f3f4fc7ff62c6bc8ee5de912cd1661edfe5f24667cd3229a64950dd368adde8d0e787c1ce3c8068b1b625ad1f6e6644cc7fcf89ecb76c3b
6
+ metadata.gz: 4d99b2de63256ff545f762328faf6efeb122b3793d0f6f0dcbaf52739d95b082e3fdb5b918b6d5793dda0e06c71697d44ddf5041025ae35fdc20a121aa41360f
7
+ data.tar.gz: 80b17e77f011fa35016bc526feba5a2158c0f804bc35da60ba169701c3d53845eba4099fee444515b82f0294d93e134374533919a8d4acc47485d98d32881703
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.2.2] - 2017-11-03
6
+ ### Changed
7
+ - ✨ Updated print to handle non 2 numbers version tag (e.g. 0.3, 1.5) (@pinglamb)
8
+
5
9
  ## [0.2.1] - 2017-09-28
6
10
  ### Changed
7
11
  - ✨ Improved the error message of the changelog add command (@pinglamb)
@@ -40,8 +44,9 @@
40
44
  - ✨ Make print supports version folders (@pinglamb)
41
45
  - ✨ Support getting title from git commit (@pinglamb)
42
46
 
43
- [Unreleased]: https://github.com/pinglamb/changelog-rb/compare/0.2.1...HEAD
44
- [0.2.1]: https://github.com/pinglamb/changelog-rb/compare/v0.2.0...0.2.1
47
+ [Unreleased]: https://github.com/pinglamb/changelog-rb/compare/0.2.2...HEAD
48
+ [0.2.2]: https://github.com/pinglamb/changelog-rb/compare/v0.2.1...0.2.2
49
+ [0.2.1]: https://github.com/pinglamb/changelog-rb/compare/v0.2.0...v0.2.1
45
50
  [0.2.0]: https://github.com/pinglamb/changelog-rb/compare/v0.1.3...v0.2.0
46
51
  [0.1.3]: https://github.com/pinglamb/changelog-rb/compare/v0.1.2...v0.1.3
47
52
  [0.1.2]: https://github.com/pinglamb/changelog-rb/compare/v0.1.1...v0.1.2
@@ -0,0 +1 @@
1
+ date: 2017-11-03
@@ -0,0 +1,4 @@
1
+ type: Changed
2
+ title: >
3
+ ✨ Updated print to handle non 2 numbers version tag (e.g. 0.3, 1.5)
4
+ author: pinglamb
@@ -45,7 +45,14 @@ module Changelog
45
45
  def version_folders
46
46
  (Dir[File.join(destination_root, 'changelog/*')] - [
47
47
  File.join(destination_root, "changelog/unreleased")
48
- ]).collect {|path| File.basename(path)}.sort_by {|version| Semantic::Version.new(version)}.reverse
48
+ ]).collect {|path| File.basename(path)}.sort_by {|version|
49
+ if version.match Semantic::Version::SemVerRegexp
50
+ Semantic::Version.new(version)
51
+ elsif version.match /\A(0|[1-9]\d*)\.(0|[1-9]\d*)\Z/
52
+ # Example: 0.3, 1.5, convert it to 0.3.0, 1.5.0
53
+ Semantic::Version.new("#{version}.0")
54
+ end
55
+ }.reverse
49
56
  end
50
57
  end
51
58
  end
@@ -1,3 +1,3 @@
1
1
  module Changelog
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: changelog-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - pinglamb
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-09-28 00:00:00.000000000 Z
11
+ date: 2017-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -148,6 +148,8 @@ files:
148
148
  - changelog/0.2.1/fixed_a_problem_that_options_symbolize_keys_will_return_nil_and_cases_argument_error.yml
149
149
  - changelog/0.2.1/improved_the_error_message_of_the_changelog_add_command.yml
150
150
  - changelog/0.2.1/tag.yml
151
+ - changelog/0.2.2/tag.yml
152
+ - changelog/0.2.2/updated_print_to_handle_non_2_numbers_version_tag_e_g_0_3_1_5.yml
151
153
  - changelog/unreleased/.gitkeep
152
154
  - exe/changelog
153
155
  - lib/changelog-rb.rb