friends 0.52 → 0.53

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
  SHA256:
3
- metadata.gz: 57f457698261d056ca29ea09b153b0917cfebc74dd1c6abf735342d4fa52aa76
4
- data.tar.gz: 47435bd44eda4f24f31f61df3cd84a7d4930fa92def6cc68b2b1111f9322a998
3
+ metadata.gz: 1be607e71eb696b1ebf8c6e46b1b561f153288ecede0c429fc93facd82a4b392
4
+ data.tar.gz: 2ea6de005359014425d32386306c0654eaa8349be0ebf19c957da3582a8c33f2
5
5
  SHA512:
6
- metadata.gz: 4c9500e8446cccad117a7110fb92f8f2871a7793f175e403100eae3455aeff473013c1fe0218481985d8a88b5949274501686187f05c0fac1aa4233b4175c1ad
7
- data.tar.gz: 18ed3d0414a30c3d21350c8190bd6b56b7caec077592e8e32952abb6570aa9f3ea26b80d6c54d381aa8f7bdedbb10ec494166e8ed5c347fd1d19f875bcd384cf
6
+ metadata.gz: e946dd33cd26ee1fdbe288cc2a2be9f0eb3eaae6bede1e47096c8b42d2af5da753b7d151b29fd75aa3aac5958d717a7141cac7e108e949961cd000e6af5f3451
7
+ data.tar.gz: 3c8e1a84fec855f17d0177de3cadd52a31bdfe51255bf77dd70dd9188be59871eec15d734e6f0b269183e330e15734653679f821d322407c6a87ca8d3f1a3b8f
@@ -55,7 +55,7 @@ promise I don't bite. 😊
55
55
 
56
56
  ## Code of Conduct
57
57
 
58
- Note that this project follows a [Code of Conduct](https://github.com/JacobEvelyn/friends/blob/master/CODE_OF_CONDUCT.md).
58
+ Note that this project follows a [Code of Conduct](https://github.com/JacobEvelyn/friends/blob/main/CODE_OF_CONDUCT.md).
59
59
  If you're a polite, reasonable person you won't have any issues!
60
60
 
61
61
  ## Financial contributions
@@ -19,6 +19,6 @@ matrix:
19
19
  - CODE_COVERAGE=true
20
20
  branches:
21
21
  only:
22
- - master # Always run on the master branch
22
+ - main # Always run on the main branch
23
23
  notifications:
24
24
  email: false
@@ -4,6 +4,18 @@
4
4
  making a small donation (🙏) with the **Sponsor** button at the top of this page to
5
5
  show you appreciate its continued development.
6
6
 
7
+ ## [v0.53](https://github.com/JacobEvelyn/friends/tree/v0.53) (2020-07-06)
8
+
9
+ [Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.52...v0.53)
10
+
11
+ **Fixed bugs:**
12
+
13
+ - undefined method error occurred when “add tag" or “add nickname” executed with no arguments [\#265](https://github.com/JacobEvelyn/friends/issues/265)
14
+
15
+ **Merged pull requests:**
16
+
17
+ - Fix for the case of add tag or add nickname args are nill [\#266](https://github.com/JacobEvelyn/friends/pull/266) ([m-t-a-n-a-k-a](https://github.com/m-t-a-n-a-k-a))
18
+
7
19
  ## [v0.52](https://github.com/JacobEvelyn/friends/tree/v0.52) (2020-06-03)
8
20
 
9
21
  [Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.51...v0.52)
@@ -92,7 +104,7 @@ show you appreciate its continued development.
92
104
 
93
105
  **Fixed bugs:**
94
106
 
95
- - Tests are failing in `master` [\#238](https://github.com/JacobEvelyn/friends/issues/238)
107
+ - Tests are failing in `main` [\#238](https://github.com/JacobEvelyn/friends/issues/238)
96
108
 
97
109
  **Merged pull requests:**
98
110
 
@@ -645,7 +657,7 @@ show you appreciate its continued development.
645
657
  **Merged pull requests:**
646
658
 
647
659
  - Highlight multiple occurrences [\#70](https://github.com/JacobEvelyn/friends/pull/70) ([GuruKhalsa](https://github.com/GuruKhalsa))
648
- - Fix Travis badge \(master only\) [\#67](https://github.com/JacobEvelyn/friends/pull/67) ([JacobEvelyn](https://github.com/JacobEvelyn))
660
+ - Fix Travis badge \(main only\) [\#67](https://github.com/JacobEvelyn/friends/pull/67) ([JacobEvelyn](https://github.com/JacobEvelyn))
649
661
  - Move activity prompt to bin/friends [\#64](https://github.com/JacobEvelyn/friends/pull/64) ([JacobEvelyn](https://github.com/JacobEvelyn))
650
662
  - Adds the --debug flag for printing backtraces on error [\#63](https://github.com/JacobEvelyn/friends/pull/63) ([JacobEvelyn](https://github.com/JacobEvelyn))
651
663
  - Move file writes to end of command actions [\#61](https://github.com/JacobEvelyn/friends/pull/61) ([JacobEvelyn](https://github.com/JacobEvelyn))
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  [![Gem Version](https://badge.fury.io/rb/friends.svg)](https://badge.fury.io/rb/friends)
2
- [![Code Coverage](https://codecov.io/gh/JacobEvelyn/friends/branch/master/graph/badge.svg)](https://codecov.io/gh/JacobEvelyn/friends)
3
- [![Build Status](https://travis-ci.com/JacobEvelyn/friends.svg?branch=master)](https://travis-ci.com/JacobEvelyn/friends)
2
+ [![Code Coverage](https://codecov.io/gh/JacobEvelyn/friends/branch/main/graph/badge.svg)](https://codecov.io/gh/JacobEvelyn/friends)
3
+ [![Build Status](https://travis-ci.com/JacobEvelyn/friends.svg?branch=main)](https://travis-ci.com/JacobEvelyn/friends)
4
4
  [![Readme Score](http://readme-score-api.herokuapp.com/score.svg?url=JacobEvelyn/friends&bust=1)](http://clayallsopp.github.io/readme-score?url=JacobEvelyn/friends)
5
5
  [![Inline docs](http://inch-ci.org/github/JacobEvelyn/friends.png)](http://inch-ci.org/github/JacobEvelyn/friends)
6
6
  [![Gem](https://img.shields.io/gem/dt/friends.svg)](https://rubygems.org/gems/friends)
@@ -181,7 +181,7 @@ The `friends.md` Markdown file that stores all of your data contains:
181
181
  ```
182
182
 
183
183
  See the example
184
- [`friends.md`](https://github.com/JacobEvelyn/friends/blob/master/friends.md)
184
+ [`friends.md`](https://github.com/JacobEvelyn/friends/blob/main/friends.md)
185
185
  file for more information.
186
186
 
187
187
  ### Global flags
@@ -956,7 +956,7 @@ If you have an idea,
956
956
  [make a GitHub issue](https://github.com/JacobEvelyn/friends/issues/new)!
957
957
  Suggestions are very very welcome, and usually are implemented very
958
958
  quickly. And if you'd like to do the implementing yourself, see the
959
- [contributing guide](https://github.com/JacobEvelyn/friends/blob/master/.github/CONTRIBUTING.md).
959
+ [contributing guide](https://github.com/JacobEvelyn/friends/blob/main/.github/CONTRIBUTING.md).
960
960
 
961
961
  A big big thanks to all of this project's lovely
962
962
  [contributors](https://github.com/JacobEvelyn/friends/graphs/contributors):
@@ -988,10 +988,10 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
988
988
 
989
989
  ## Code of Conduct
990
990
 
991
- Note that this project follows a [Code of Conduct](https://github.com/JacobEvelyn/friends/blob/master/CODE_OF_CONDUCT.md).
991
+ Note that this project follows a [Code of Conduct](https://github.com/JacobEvelyn/friends/blob/main/CODE_OF_CONDUCT.md).
992
992
  If you're a polite, reasonable person you won't have any issues!
993
993
 
994
994
  ## License
995
995
 
996
996
  Friends is released under the
997
- [MIT License](https://github.com/JacobEvelyn/friends/blob/master/LICENSE.txt).
997
+ [MIT License](https://github.com/JacobEvelyn/friends/blob/main/LICENSE.txt).
@@ -2,7 +2,7 @@
2
2
 
3
3
  These are steps for the maintainer to take to release a new version of this gem.
4
4
 
5
- 1. On the `master` branch, update the `VERSION` constant in
5
+ 1. On the `main` branch, update the `VERSION` constant in
6
6
  `lib/friends/version.rb`.
7
7
  2. Commit the change (`git add -A && git commit -m 'Bump to vX.X'`).
8
8
  3. Add a tag (`git tag -am "vX.X" vX.X`).
@@ -35,7 +35,7 @@ command :add do |add|
35
35
  add.arg_name "NAME NICKNAME"
36
36
  add.command :nickname do |add_nickname|
37
37
  add_nickname.action do |_, _, args|
38
- @introvert.add_nickname(name: args.first.strip, nickname: args[1].strip)
38
+ @introvert.add_nickname(name: args.first.to_s.strip, nickname: args[1].to_s.strip)
39
39
  @dirty = true # Mark the file for cleaning.
40
40
  end
41
41
  end
@@ -46,7 +46,7 @@ command :add do |add|
46
46
  add_tag.action do |_, _, args|
47
47
  @introvert.add_tag(
48
48
  name: args[0..-2].join(" "),
49
- tag: Tag.convert_to_tag(args.last.strip)
49
+ tag: Tag.convert_to_tag(args.last.to_s.strip)
50
50
  )
51
51
  @dirty = true # Mark the file for cleaning.
52
52
  end
@@ -203,6 +203,7 @@ module Friends
203
203
  # @param nickname [String] the nickname to add to the friend
204
204
  # @raise [FriendsError] if 0 or 2+ friends match the given name
205
205
  def add_nickname(name:, nickname:)
206
+ raise FriendsError, "Expected \"[Friend Name]\" \"[Nickname]\"" if name.empty?
206
207
  raise FriendsError, "Nickname cannot be blank" if nickname.empty?
207
208
 
208
209
  friend = thing_with_name_in(:friend, name)
@@ -216,6 +217,7 @@ module Friends
216
217
  # @param tag [String] the tag to add to the friend, of the form: "@tag"
217
218
  # @raise [FriendsError] if 0 or 2+ friends match the given name
218
219
  def add_tag(name:, tag:)
220
+ raise FriendsError, "Expected \"[Friend Name]\" \"[Tag]\"" if name.empty?
219
221
  raise FriendsError, "Tag cannot be blank" if tag == "@"
220
222
 
221
223
  friend = thing_with_name_in(:friend, name)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Friends
4
- VERSION = "0.52"
4
+ VERSION = "0.53"
5
5
  end
@@ -7,6 +7,15 @@ clean_describe "add nickname" do
7
7
 
8
8
  let(:content) { CONTENT }
9
9
 
10
+ describe "when friend name and nickname are blank" do
11
+ let(:friend_name) { nil }
12
+ let(:nickname) { nil }
13
+
14
+ it "prints an error message" do
15
+ stderr_only 'Error: Expected "[Friend Name]" "[Nickname]"'
16
+ end
17
+ end
18
+
10
19
  describe "when friend name has no matches" do
11
20
  let(:friend_name) { "Garbage" }
12
21
  let(:nickname) { "Georgie" }
@@ -7,6 +7,15 @@ clean_describe "add tag" do
7
7
 
8
8
  let(:content) { CONTENT }
9
9
 
10
+ describe "when friend name and tag are blank" do
11
+ let(:friend_name) { nil }
12
+ let(:tag) { nil }
13
+
14
+ it "prints an error message" do
15
+ stderr_only 'Error: Expected "[Friend Name]" "[Tag]"'
16
+ end
17
+ end
18
+
10
19
  describe "when friend name has no matches" do
11
20
  let(:friend_name) { "Garbage" }
12
21
  let(:tag) { "school" }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: friends
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.52'
4
+ version: '0.53'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jacob Evelyn
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-03 00:00:00.000000000 Z
11
+ date: 2020-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chronic