changelog-rb 0.2.0 → 0.2.1

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: 9b400fbd98a3ba8c72eacd7efaa886728678bc47
4
- data.tar.gz: 645481df358ac35c6135a89415883c6cfa45c767
3
+ metadata.gz: b861cb41af911658613f9d6d835c8b5f3b8b22de
4
+ data.tar.gz: 9a566e455e8c8406aad7c04742d869e1985f491d
5
5
  SHA512:
6
- metadata.gz: 2937bad47ffa7d384246a65d4c9506ef29f6de49a891a4eb9466dbd1dd3e5c5567dd74e5365622367a8564e78ed7b0cb825ebbd27742dbe6569104cfccfcb3bf
7
- data.tar.gz: 56489e36a716f871fad52e780b4d8dfd99d49d79d279324c0c1b058ef639bbe3c0f12cb2b75a381cea5f8bcb9f632018755919a60993ee78cbec29818ff93052
6
+ metadata.gz: 50119559a74dc146f80ad3343ea989c843cc827a4f13b9ad24f1717646aefa1ac7edaa48cb194fc261afe77a2557c7a1590c33ce1659456d9d91cef6c0020240
7
+ data.tar.gz: 474246b9e8b243a73f3f4fc7ff62c6bc8ee5de912cd1661edfe5f24667cd3229a64950dd368adde8d0e787c1ce3c8068b1b625ad1f6e6644cc7fcf89ecb76c3b
data/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.2.1] - 2017-09-28
6
+ ### Changed
7
+ - ✨ Improved the error message of the changelog add command (@pinglamb)
8
+
9
+ ### Fixed
10
+ - 🐛 Fixed a problem that options.symbolize_keys will return nil and cases argument error (@pinglamb)
11
+
5
12
  ## [0.2.0] - 2017-09-19
6
13
  ### Added
7
14
  - ✨ Include compare url at the bottom if it is github (@pinglamb)
@@ -33,8 +40,9 @@
33
40
  - ✨ Make print supports version folders (@pinglamb)
34
41
  - ✨ Support getting title from git commit (@pinglamb)
35
42
 
36
- [Unreleased]: https://github.com/pinglamb/changelog-rb/compare/0.2.0...HEAD
37
- [0.2.0]: https://github.com/pinglamb/changelog-rb/compare/v0.1.3...0.2.0
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
45
+ [0.2.0]: https://github.com/pinglamb/changelog-rb/compare/v0.1.3...v0.2.0
38
46
  [0.1.3]: https://github.com/pinglamb/changelog-rb/compare/v0.1.2...v0.1.3
39
47
  [0.1.2]: https://github.com/pinglamb/changelog-rb/compare/v0.1.1...v0.1.2
40
48
  [0.1.1]: https://github.com/pinglamb/changelog-rb/compare/v0.1.0...v0.1.1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- changelog-rb (0.2.0)
4
+ changelog-rb (0.2.1)
5
5
  activesupport
6
6
  semantic
7
7
  thor
data/README.md CHANGED
@@ -39,7 +39,7 @@ Or install it yourself as:
39
39
  - removed_something.yml
40
40
  ```
41
41
 
42
- All the pending/unreleased changelog items should be in the `unreleased` folder. Once you release a new version, the corresoding changelog items in `unreleased` should be moved over to `[RELEASE VERSION]` folder.
42
+ All the pending/unreleased changelog items should be in the `unreleased` folder. Once you release a new version, the corresponding changelog items in `unreleased` should be moved over to `[RELEASE VERSION]` folder.
43
43
 
44
44
  The `tag.yml` in release folder is for recording the date of release.
45
45
 
@@ -0,0 +1,4 @@
1
+ type: Fixed
2
+ title: >
3
+ 🐛 Fixed a problem that options.symbolize_keys will return nil and cases argument error
4
+ author: pinglamb
@@ -0,0 +1,4 @@
1
+ type: Changed
2
+ title: >
3
+ ✨ Improved the error message of the changelog add command
4
+ author: pinglamb
@@ -0,0 +1 @@
1
+ date: 2017-09-28
data/lib/changelog/add.rb CHANGED
@@ -22,10 +22,18 @@ module Changelog
22
22
  @nature = nature.presence || extract_nature_from_title(@title)
23
23
  @author = author.presence || Changelog::Helpers::Shell.system_user
24
24
 
25
- raise 'title is blank' if @title.blank?
26
- raise 'nature is blank' if @nature.blank?
27
- raise 'nature is invalid' unless @nature.in?(Changelog.natures)
28
- raise 'author is blank' if @author.blank?
25
+ if @title.blank?
26
+ return say("Error: title is blank\nchangelog add TITLE\nchangelog add -g")
27
+ end
28
+ if @nature.blank?
29
+ return say("Error: nature is blank\nchangelog add TITLE -t [#{Changelog.natures.join('|')}]")
30
+ end
31
+ unless @nature.in?(Changelog.natures)
32
+ return say("Error: nature is invalid\nchangelog add TITLE -t [#{Changelog.natures.join('|')}]")
33
+ end
34
+ if @author.blank?
35
+ return say("Error: author is blank\nchangelog add TITLE -u [author]")
36
+ end
29
37
 
30
38
  filename = @title.parameterize.underscore
31
39
 
data/lib/changelog/cli.rb CHANGED
@@ -35,7 +35,7 @@ module Changelog
35
35
  lazy_default: '',
36
36
  aliases: %w(-g)
37
37
  def add(title = '')
38
- Changelog::Add.new.go(title, options.symbolize_keys)
38
+ Changelog::Add.new.go(title, **options.to_hash.symbolize_keys)
39
39
  end
40
40
 
41
41
  desc 'tag VERSION', 'Tag the unreleased changes to a version'
@@ -45,7 +45,7 @@ module Changelog
45
45
  lazy_default: nil,
46
46
  aliases: %w(-d)
47
47
  def tag(version)
48
- Changelog::Tag.new.go(version, options.symbolize_keys)
48
+ Changelog::Tag.new.go(version, **options.to_hash.symbolize_keys)
49
49
  end
50
50
 
51
51
  desc 'untag VERSION', 'Moved the changes from version folder to unreleased'
@@ -1,3 +1,3 @@
1
1
  module Changelog
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
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.0
4
+ version: 0.2.1
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-19 00:00:00.000000000 Z
11
+ date: 2017-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -145,6 +145,9 @@ files:
145
145
  - changelog/0.1.3/tag.yml
146
146
  - changelog/0.2.0/include_compare_url_at_the_bottom_if_it_is_github.yml
147
147
  - changelog/0.2.0/tag.yml
148
+ - changelog/0.2.1/fixed_a_problem_that_options_symbolize_keys_will_return_nil_and_cases_argument_error.yml
149
+ - changelog/0.2.1/improved_the_error_message_of_the_changelog_add_command.yml
150
+ - changelog/0.2.1/tag.yml
148
151
  - changelog/unreleased/.gitkeep
149
152
  - exe/changelog
150
153
  - lib/changelog-rb.rb