friends 0.36 → 0.37
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/.github/CONTRIBUTING.md +66 -0
- data/.github/ISSUE_TEMPLATE.md +6 -0
- data/{PULL_REQUEST_TEMPLATE.md → .github/PULL_REQUEST_TEMPLATE.md} +0 -0
- data/CHANGELOG.md +20 -3
- data/README.md +51 -16
- data/lib/friends.rb +1 -1
- data/lib/friends/version.rb +1 -1
- data/test/commands/add/tag_spec.rb +14 -7
- data/test/commands/edit_spec.rb +3 -0
- data/test/commands/list/activities_spec.rb +2 -0
- data/test/commands/list/friends_spec.rb +15 -0
- data/test/commands/list/tags_spec.rb +14 -0
- data/test/commands/remove/tag_spec.rb +12 -1
- data/test/commands/rename/friend_spec.rb +2 -0
- data/test/commands/set/location_spec.rb +2 -1
- data/test/commands/stats_spec.rb +4 -4
- data/test/helper.rb +6 -0
- metadata +5 -4
- data/CONTRIBUTING.md +0 -44
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 149a16ce90d50f7fc56732aab02d9c27c3304cf3
|
|
4
|
+
data.tar.gz: 3c45801a69f2ba00a13d2e08cdb1c25e3425eba7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2de1ef2a453e3a2a0e757888abe17824ea80b7212002f0cdc9240c4ecbef4c2f5e4e564ed923af6c10425206b2920975f5344c0b247a3974c0da33b608e0b780
|
|
7
|
+
data.tar.gz: 768405774cdf4c0561f16ccf57e3611b37b5397f1e1ca195dd9837a8d001422eab17ef7ced9da59c6968becd12413f56f0b6e28ffea263f30bed36989ce33854
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
If you're reading this, it means you want to contribute to this project. Hooray!
|
|
4
|
+
|
|
5
|
+
Here's what to do:
|
|
6
|
+
|
|
7
|
+
1. If you're looking for a task to work on, check the
|
|
8
|
+
["up-for-grabs" issues](https://github.com/JacobEvelyn/friends/labels/upforgrabs). If you see something there that catches your
|
|
9
|
+
eye, leave a comment indicating you'll work on it and
|
|
10
|
+
it's yours! If you already have something to work on,
|
|
11
|
+
that's great as well!
|
|
12
|
+
2. Fork the repository (https://github.com/JacobEvelyn/friends/fork).
|
|
13
|
+
3. Clone your forked repository.
|
|
14
|
+
4. From within the repository directory, run
|
|
15
|
+
`bundle install` to install all dependencies needed for development.
|
|
16
|
+
5. Create your feature branch
|
|
17
|
+
(`git checkout -b my-new-feature`).
|
|
18
|
+
6. Make your changes. Add or modify tests if necessary!
|
|
19
|
+
(Run tests with `rake test`.) Do your best to conform to
|
|
20
|
+
existing style and commenting patterns. You can run the local version of the
|
|
21
|
+
`friends` script with `bundle exec bin/friends`.
|
|
22
|
+
7. Update the `README.md` as necessary to include your changes.
|
|
23
|
+
8. Check your changes for code style by running `bundle exec rubocop .` in
|
|
24
|
+
the repository directory. You may see output indicating that some lines
|
|
25
|
+
differ from the style guidelines. Change your code so that Rubocop gives
|
|
26
|
+
no warnings or errors (and don't hesitate to reach out if you don't know how!—this practice is meant to keep the code clean but it shouldn't be
|
|
27
|
+
scary and it's totally fine to need help!).
|
|
28
|
+
9. Commit your changes
|
|
29
|
+
(`git commit -am "Add some feature"`).
|
|
30
|
+
10. Push your changes to GitHub, and open a pull request.
|
|
31
|
+
11. Your code will be reviewed and merged as quickly as
|
|
32
|
+
possible!
|
|
33
|
+
12. Check yourself out on the [contributors page](https://github.com/JacobEvelyn/friends/graphs/contributors)! Look at how cool you are!
|
|
34
|
+
|
|
35
|
+
If you have any questions at all or get stuck on any step,
|
|
36
|
+
don't hesitate to
|
|
37
|
+
[open a GitHub issue](https://github.com/JacobEvelyn/friends/issues/new)!
|
|
38
|
+
I'll respond as quickly as I can, and I'm friendly! I
|
|
39
|
+
promise I don't bite. 😊
|
|
40
|
+
|
|
41
|
+
## Code of Conduct
|
|
42
|
+
|
|
43
|
+
Note that this project follows a [Code of Conduct](https://github.com/JacobEvelyn/friends/blob/master/CODE_OF_CONDUCT.md).
|
|
44
|
+
If you're a polite, reasonable person you won't have any issues!
|
|
45
|
+
|
|
46
|
+
## Financial contributions
|
|
47
|
+
|
|
48
|
+
`friends` is a volunteer project. If you find it useful, please consider
|
|
49
|
+
making a small donation (🙏) to show you appreciate its continued development.
|
|
50
|
+
|
|
51
|
+
👇 Donate with these buttons! 👇
|
|
52
|
+
|
|
53
|
+
[/badge.svg>)](https://opencollective.com/friends#backer) [/badge.svg>)](https://opencollective.com/friends#sponsor)
|
|
54
|
+
[](https://www.patreon.com/jacobevelyn)
|
|
55
|
+
[](https://liberapay.com/jacobevelyn/donate)
|
|
56
|
+
[](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=jacobevelyn%40gmail%2ecom&lc=US&item_name=Development%20of%20JacobEvelyn%2ffriends%20%28GitHub%20repository%29&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHostedGuest)
|
|
57
|
+
[](https://flattr.com/submit/auto?user_id=jacobevelyn&url=https://github.com/JacobEvelyn/friends&title=friends&tags=github&category=software)
|
|
58
|
+
[](https://nrobinson2000.github.io/donate-bitcoin?address=1CFu6gWpmS89EnitPPdYssZhFMRWx5qhW4&amount=10&name=support-friends-development)
|
|
59
|
+
|
|
60
|
+
👆 Donate with these buttons! 👆
|
|
61
|
+
|
|
62
|
+
## Contributors
|
|
63
|
+
|
|
64
|
+
Thank you to all the lovely people who have already contributed to `friends`!
|
|
65
|
+
You folks make `friends` great.
|
|
66
|
+
<a href="graphs/contributors"><img src="https://opencollective.com/friends/contributors.svg?width=890" /></a>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<!-- Love friends? Please consider making a small donation (🙏) to show you appreciate its continued development:
|
|
2
|
+
|
|
3
|
+
👉 https://opencollective.com/friends/donate
|
|
4
|
+
👉 https://www.patreon.com/jacobevelyn
|
|
5
|
+
👉 https://liberapay.com/jacobevelyn/donate
|
|
6
|
+
👉 ...or for more ways to donate (PayPal, Flattr, Bitcoin) see the README. -->
|
|
File without changes
|
data/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,32 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
3
|
`friends` is a volunteer project. If you find it useful, please consider
|
|
4
|
-
making a small donation to show
|
|
4
|
+
making a small donation (🙏) to show you appreciate its continued development.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
👇 Donate with these buttons! 👇
|
|
7
|
+
|
|
8
|
+
[/badge.svg>)](https://opencollective.com/friends#backer) [/badge.svg>)](https://opencollective.com/friends#sponsor)
|
|
7
9
|
[](https://www.patreon.com/jacobevelyn)
|
|
8
10
|
[](https://liberapay.com/jacobevelyn/donate)
|
|
9
11
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=jacobevelyn%40gmail%2ecom&lc=US&item_name=Development%20of%20JacobEvelyn%2ffriends%20%28GitHub%20repository%29&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHostedGuest)
|
|
10
12
|
[](https://flattr.com/submit/auto?user_id=jacobevelyn&url=https://github.com/JacobEvelyn/friends&title=friends&tags=github&category=software)
|
|
11
13
|
[](https://nrobinson2000.github.io/donate-bitcoin?address=1CFu6gWpmS89EnitPPdYssZhFMRWx5qhW4&amount=10&name=support-friends-development)
|
|
12
14
|
|
|
15
|
+
👆 Donate with these buttons! 👆
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## [v0.37](https://github.com/JacobEvelyn/friends/tree/v0.37) (2018-02-24)
|
|
19
|
+
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.36...v0.37)
|
|
20
|
+
|
|
21
|
+
**Implemented enhancements:**
|
|
22
|
+
|
|
23
|
+
- Allow \(some\) punctuation in tags [\#186](https://github.com/JacobEvelyn/friends/issues/186)
|
|
24
|
+
|
|
25
|
+
**Merged pull requests:**
|
|
26
|
+
|
|
27
|
+
- Activating Open Collective [\#193](https://github.com/JacobEvelyn/friends/pull/193) ([monkeywithacupcake](https://github.com/monkeywithacupcake))
|
|
28
|
+
- Dashes and colons [\#191](https://github.com/JacobEvelyn/friends/pull/191) ([adiabatic](https://github.com/adiabatic))
|
|
29
|
+
|
|
13
30
|
## [v0.36](https://github.com/JacobEvelyn/friends/tree/v0.36) (2018-01-17)
|
|
14
31
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.35...v0.36)
|
|
15
32
|
|
|
@@ -533,4 +550,4 @@ making a small donation to show me you appreciate its continued development.
|
|
|
533
550
|
## [v0.0.1](https://github.com/JacobEvelyn/friends/tree/v0.0.1) (2014-12-11)
|
|
534
551
|
|
|
535
552
|
|
|
536
|
-
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
|
|
553
|
+
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
|
data/README.md
CHANGED
|
@@ -7,22 +7,26 @@
|
|
|
7
7
|
[](https://rubygems.org/gems/friends)
|
|
8
8
|
|
|
9
9
|
`friends` is a volunteer project. If you find it useful, please consider
|
|
10
|
-
making a small donation to show
|
|
10
|
+
making a small donation (🙏) to show you appreciate its continued development.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
👇 Donate with these buttons! 👇
|
|
13
|
+
|
|
14
|
+
[/badge.svg>)](#backers) [/badge.svg>)](#sponsors)
|
|
13
15
|
[](https://www.patreon.com/jacobevelyn)
|
|
14
16
|
[](https://liberapay.com/jacobevelyn/donate)
|
|
15
17
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=jacobevelyn%40gmail%2ecom&lc=US&item_name=Development%20of%20JacobEvelyn%2ffriends%20%28GitHub%20repository%29&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHostedGuest)
|
|
16
18
|
[](https://flattr.com/submit/auto?user_id=jacobevelyn&url=https://github.com/JacobEvelyn/friends&title=friends&tags=github&category=software)
|
|
17
19
|
[](https://nrobinson2000.github.io/donate-bitcoin?address=1CFu6gWpmS89EnitPPdYssZhFMRWx5qhW4&amount=10&name=support-friends-development)
|
|
18
20
|
|
|
21
|
+
👆 Donate with these buttons! 👆
|
|
22
|
+
|
|
19
23
|
# `friends`
|
|
20
24
|
|
|
21
25
|
Spend time with the people you care about. Introvert-tested.
|
|
22
26
|
Extrovert-approved.
|
|
23
27
|
|
|
24
|
-
**NOTE: Participation is encouraged! Make
|
|
25
|
-
|
|
28
|
+
**NOTE: Participation is encouraged! Make issues, ask questions, submit pull
|
|
29
|
+
requests (even if it's your first time contributing to open-source—you'll get
|
|
26
30
|
lots of help), and give feedback!**
|
|
27
31
|
|
|
28
32
|
## Table of Contents
|
|
@@ -118,7 +122,7 @@ Easy, huh?
|
|
|
118
122
|
* **Locations**: The places in which _activities_ happen. (Examples: `Paris`,
|
|
119
123
|
`Marie's Diner`)
|
|
120
124
|
* **Tags**: A way to categorize your _activities_ with tags of your
|
|
121
|
-
choosing. (Examples: `@exercise`, `@school`)
|
|
125
|
+
choosing. Tags may contain colons and hyphens inside them. (Examples: `@exercise:running`, `@school`, `@science:indoors:agronomy-with-hydroponics`)
|
|
122
126
|
* **Notes**: Any additional information you want to record about a _friend_
|
|
123
127
|
or _location_. (Example: `John and Jane got engaged.`)
|
|
124
128
|
|
|
@@ -282,8 +286,8 @@ Tags will be colored if they're provided (though this README can't display
|
|
|
282
286
|
color so you'll just have to have faith here):
|
|
283
287
|
|
|
284
288
|
```bash
|
|
285
|
-
$ friends add activity The office softball team wins a game! @work @exercise
|
|
286
|
-
Activity added: "2017-05-05: The office softball team wins a game! @work @exercise"
|
|
289
|
+
$ friends add activity The office softball team wins a game! @work @exercise:sports
|
|
290
|
+
Activity added: "2017-05-05: The office softball team wins a game! @work @exercise:sports"
|
|
287
291
|
```
|
|
288
292
|
|
|
289
293
|
You can of course specify a date for the activity:
|
|
@@ -575,7 +579,7 @@ Lists recent activities:
|
|
|
575
579
|
```bash
|
|
576
580
|
$ friends list activities
|
|
577
581
|
2018-01-04: Got lunch with Grace Hopper and George Washington Carver. @food
|
|
578
|
-
2017-12-31: Celebrated the new year with Marie Curie in New York City. @partying
|
|
582
|
+
2017-12-31: Celebrated the new year with Marie Curie in New York City. @partying:ball-drop
|
|
579
583
|
2017-11-15: Talked to George Washington Carver on the phone for an hour.
|
|
580
584
|
```
|
|
581
585
|
|
|
@@ -584,7 +588,7 @@ You can adjust how many activities are shown:
|
|
|
584
588
|
```bash
|
|
585
589
|
$ friends list activities --limit 2
|
|
586
590
|
2018-01-04: Got lunch with Grace Hopper and George Washington Carver. @food
|
|
587
|
-
2017-12-31: Celebrated the new year with Marie Curie in New York City. @partying
|
|
591
|
+
2017-12-31: Celebrated the new year with Marie Curie in New York City. @partying:ball-drop
|
|
588
592
|
```
|
|
589
593
|
|
|
590
594
|
Or only list the activities you did with a certain friend:
|
|
@@ -606,7 +610,7 @@ Or filter your activities by location:
|
|
|
606
610
|
|
|
607
611
|
```bash
|
|
608
612
|
$ friends list activities --in "New York"
|
|
609
|
-
2017-12-31: Celebrated the new year with Marie Curie in New York City. @partying
|
|
613
|
+
2017-12-31: Celebrated the new year with Marie Curie in New York City. @partying:ball-drop
|
|
610
614
|
```
|
|
611
615
|
|
|
612
616
|
Or by tag:
|
|
@@ -628,12 +632,12 @@ Or by date:
|
|
|
628
632
|
```bash
|
|
629
633
|
$ friends list activities --since 'December 31st 2017'
|
|
630
634
|
2018-01-04: Got lunch with Grace Hopper and George Washington Carver. @food
|
|
631
|
-
2017-12-31: Celebrated the new year with Marie Curie in New York City. @partying
|
|
635
|
+
2017-12-31: Celebrated the new year with Marie Curie in New York City. @partying:ball-drop
|
|
632
636
|
```
|
|
633
637
|
|
|
634
638
|
```bash
|
|
635
639
|
$ friends list activities --until 'December 31st 2017'
|
|
636
|
-
2017-12-31: Celebrated the new year with Marie Curie in New York City. @partying
|
|
640
|
+
2017-12-31: Celebrated the new year with Marie Curie in New York City. @partying:ball-drop
|
|
637
641
|
2017-11-15: Talked to George Washington Carver on the phone for an hour.
|
|
638
642
|
```
|
|
639
643
|
|
|
@@ -927,16 +931,47 @@ In case you're _really_ interested, we have documentation on
|
|
|
927
931
|
## Contributing (it's encouraged!)
|
|
928
932
|
|
|
929
933
|
If you have an idea,
|
|
930
|
-
[make a GitHub
|
|
934
|
+
[make a GitHub issue](https://github.com/JacobEvelyn/friends/issues/new)!
|
|
931
935
|
Suggestions are very very welcome, and usually are implemented very
|
|
932
936
|
quickly. And if you'd like to do the implementing yourself, see the
|
|
933
937
|
[contributing guide](https://github.com/JacobEvelyn/friends/blob/master/CONTRIBUTING.md).
|
|
934
938
|
|
|
935
939
|
A big big thanks to all of this project's lovely
|
|
936
|
-
[contributors](https://github.com/JacobEvelyn/friends/graphs/contributors)
|
|
940
|
+
[contributors](https://github.com/JacobEvelyn/friends/graphs/contributors):
|
|
941
|
+
|
|
942
|
+
<a href="https://github.com/JacobEvelyn/friends/graphs/contributors"><img src="https://opencollective.com/friends/contributors.svg?width=890" /></a>
|
|
943
|
+
|
|
944
|
+
Another way to contribute is to make a donation with any of these buttons:
|
|
945
|
+
|
|
946
|
+
[/badge.svg>)](https://opencollective.com/friends#backer) [/badge.svg>)](https://opencollective.com/friends#sponsor)
|
|
947
|
+
[](https://www.patreon.com/jacobevelyn)
|
|
948
|
+
[](https://liberapay.com/jacobevelyn/donate)
|
|
949
|
+
[](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=jacobevelyn%40gmail%2ecom&lc=US&item_name=Development%20of%20JacobEvelyn%2ffriends%20%28GitHub%20repository%29&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHostedGuest)
|
|
950
|
+
[](https://flattr.com/submit/auto?user_id=jacobevelyn&url=https://github.com/JacobEvelyn/friends&title=friends&tags=github&category=software)
|
|
951
|
+
[](https://nrobinson2000.github.io/donate-bitcoin?address=1CFu6gWpmS89EnitPPdYssZhFMRWx5qhW4&amount=10&name=support-friends-development)
|
|
952
|
+
|
|
953
|
+
👆 Donate with these buttons right here! 👆
|
|
954
|
+
|
|
955
|
+
### Backers
|
|
956
|
+
|
|
957
|
+
Thank you to all backers! 🙏 [[Become a backer](https://opencollective.com/friends#backer)]
|
|
958
|
+
|
|
959
|
+
<a href="https://opencollective.com/friends#backers" target="_blank"><img src="https://opencollective.com/friends/backers.svg?width=890"></a>
|
|
960
|
+
|
|
961
|
+
### Sponsors
|
|
962
|
+
|
|
963
|
+
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/friends#sponsor)]
|
|
937
964
|
|
|
938
|
-
|
|
939
|
-
|
|
965
|
+
<a href="https://opencollective.com/friends/sponsor/0/website" target="_blank"><img src="https://opencollective.com/friends/sponsor/0/avatar.svg"></a>
|
|
966
|
+
<a href="https://opencollective.com/friends/sponsor/1/website" target="_blank"><img src="https://opencollective.com/friends/sponsor/1/avatar.svg"></a>
|
|
967
|
+
<a href="https://opencollective.com/friends/sponsor/2/website" target="_blank"><img src="https://opencollective.com/friends/sponsor/2/avatar.svg"></a>
|
|
968
|
+
<a href="https://opencollective.com/friends/sponsor/3/website" target="_blank"><img src="https://opencollective.com/friends/sponsor/3/avatar.svg"></a>
|
|
969
|
+
<a href="https://opencollective.com/friends/sponsor/4/website" target="_blank"><img src="https://opencollective.com/friends/sponsor/4/avatar.svg"></a>
|
|
970
|
+
<a href="https://opencollective.com/friends/sponsor/5/website" target="_blank"><img src="https://opencollective.com/friends/sponsor/5/avatar.svg"></a>
|
|
971
|
+
<a href="https://opencollective.com/friends/sponsor/6/website" target="_blank"><img src="https://opencollective.com/friends/sponsor/6/avatar.svg"></a>
|
|
972
|
+
<a href="https://opencollective.com/friends/sponsor/7/website" target="_blank"><img src="https://opencollective.com/friends/sponsor/7/avatar.svg"></a>
|
|
973
|
+
<a href="https://opencollective.com/friends/sponsor/8/website" target="_blank"><img src="https://opencollective.com/friends/sponsor/8/avatar.svg"></a>
|
|
974
|
+
<a href="https://opencollective.com/friends/sponsor/9/website" target="_blank"><img src="https://opencollective.com/friends/sponsor/9/avatar.svg"></a>
|
|
940
975
|
|
|
941
976
|
## Code of Conduct
|
|
942
977
|
|
data/lib/friends.rb
CHANGED
data/lib/friends/version.rb
CHANGED
|
@@ -29,35 +29,42 @@ clean_describe "add tag" do
|
|
|
29
29
|
|
|
30
30
|
describe "when friend name has one match" do
|
|
31
31
|
let(:friend_name) { "George" }
|
|
32
|
-
let(:tag) { "school" }
|
|
32
|
+
let(:tag) { "school:tuskegee-institute" }
|
|
33
33
|
|
|
34
34
|
it "adds tag to friend" do
|
|
35
|
-
line_changed
|
|
35
|
+
line_changed(
|
|
36
|
+
"- George Washington Carver",
|
|
37
|
+
"- George Washington Carver @school:tuskegee-institute"
|
|
38
|
+
)
|
|
36
39
|
end
|
|
37
40
|
|
|
38
41
|
it "prints an output message" do
|
|
39
|
-
stdout_only 'Tag added to friend: "George Washington Carver @school"'
|
|
42
|
+
stdout_only 'Tag added to friend: "George Washington Carver @school:tuskegee-institute"'
|
|
40
43
|
end
|
|
41
44
|
|
|
42
45
|
describe "when tag is passed with @" do
|
|
43
|
-
let(:tag) { "@school" }
|
|
46
|
+
let(:tag) { "@school:tuskegee-institute" }
|
|
44
47
|
|
|
45
48
|
it "adds tag to friend" do
|
|
46
|
-
line_changed
|
|
49
|
+
line_changed(
|
|
50
|
+
"- George Washington Carver",
|
|
51
|
+
"- George Washington Carver @school:tuskegee-institute"
|
|
52
|
+
)
|
|
47
53
|
end
|
|
48
54
|
|
|
49
55
|
it "prints an output message" do
|
|
50
|
-
stdout_only 'Tag added to friend: "George Washington Carver @school"'
|
|
56
|
+
stdout_only 'Tag added to friend: "George Washington Carver @school:tuskegee-institute"'
|
|
51
57
|
end
|
|
52
58
|
end
|
|
53
59
|
|
|
54
60
|
describe "when friend already has tags" do
|
|
55
61
|
let(:friend_name) { "Marie" }
|
|
62
|
+
let(:tag) { "school:ecole-normale-superieure" }
|
|
56
63
|
|
|
57
64
|
it "allows for multiple tags" do
|
|
58
65
|
line_changed(
|
|
59
66
|
"- Marie Curie [Atlantis] @science",
|
|
60
|
-
"- Marie Curie [Atlantis] @science @school"
|
|
67
|
+
"- Marie Curie [Atlantis] @science @school:ecole-normale-superieure"
|
|
61
68
|
)
|
|
62
69
|
end
|
|
63
70
|
end
|
data/test/commands/edit_spec.rb
CHANGED
|
@@ -77,6 +77,7 @@ Not cleaning file: "#{filename}" ("exit 1 #" did not exit successfully)
|
|
|
77
77
|
let(:cleaned_edited_content) do
|
|
78
78
|
<<-EXPECTED_CONTENT
|
|
79
79
|
### Activities:
|
|
80
|
+
- 2018-02-06: @science:indoors:agronomy-with-hydroponics: **Norman Borlaug** and **George Washington Carver** scored a tour of _Atlantis_' hydroponics gardens through wetplants@example.org and they took me along.
|
|
80
81
|
- 2015-11-01: **Grace Hopper** and I went to _Marie's Diner_. George had to cancel at the last minute. @food
|
|
81
82
|
- 2015-01-04: Got lunch with **Grace Hopper** and **George Washington Carver**. @food
|
|
82
83
|
- 2014-12-31: Celebrated the new year in _Paris_ with **Marie Curie**. @partying
|
|
@@ -94,6 +95,8 @@ Not cleaning file: "#{filename}" ("exit 1 #" did not exit successfully)
|
|
|
94
95
|
- George Washington Carver
|
|
95
96
|
- Grace Hopper (a.k.a. The Admiral a.k.a. Amazing Grace) [Paris] @navy @science
|
|
96
97
|
- Marie Curie [Atlantis] @science
|
|
98
|
+
- Norman Borlaug (a.k.a. Norm) @science @science:outdoors @science:outdoors:agronomy
|
|
99
|
+
- Stanislav Petrov (a.k.a. Stan) @doesnt-trust-computers @doesnt-trust-computers:military-uses
|
|
97
100
|
|
|
98
101
|
### Locations:
|
|
99
102
|
- Atlantis
|
|
@@ -30,6 +30,7 @@ clean_describe "list activities" do
|
|
|
30
30
|
stdout_only <<-OUTPUT
|
|
31
31
|
2015-01-04: Got lunch with Grace Hopper and George Washington Carver. @food
|
|
32
32
|
2015-11-01: Grace Hopper and I went to Marie's Diner. George had to cancel at the last minute. @food
|
|
33
|
+
2018-02-06: @science:indoors:agronomy-with-hydroponics: Norman Borlaug and George Washington Carver scored a tour of Atlantis' hydroponics gardens through wetplants@example.org and they took me along.
|
|
33
34
|
2014-11-15: Talked to George Washington Carver on the phone for an hour.
|
|
34
35
|
2014-12-31: Celebrated the new year in Paris with Marie Curie. @partying
|
|
35
36
|
OUTPUT
|
|
@@ -155,6 +156,7 @@ FILE
|
|
|
155
156
|
stdout_only <<-OUTPUT
|
|
156
157
|
2015-01-04: Got lunch with Grace Hopper and George Washington Carver. @food
|
|
157
158
|
2015-11-01: Grace Hopper and I went to Marie's Diner. George had to cancel at the last minute. @food
|
|
159
|
+
2018-02-06: @science:indoors:agronomy-with-hydroponics: Norman Borlaug and George Washington Carver scored a tour of Atlantis' hydroponics gardens through wetplants@example.org and they took me along.
|
|
158
160
|
OUTPUT
|
|
159
161
|
end
|
|
160
162
|
end
|
|
@@ -31,6 +31,8 @@ clean_describe "list friends" do
|
|
|
31
31
|
George Washington Carver
|
|
32
32
|
Marie Curie
|
|
33
33
|
Grace Hopper
|
|
34
|
+
Stanislav Petrov
|
|
35
|
+
Norman Borlaug
|
|
34
36
|
OUTPUT
|
|
35
37
|
end
|
|
36
38
|
|
|
@@ -42,6 +44,8 @@ Grace Hopper
|
|
|
42
44
|
George Washington Carver
|
|
43
45
|
Marie Curie [Atlantis] @science
|
|
44
46
|
Grace Hopper (a.k.a. The Admiral a.k.a. Amazing Grace) [Paris] @navy @science
|
|
47
|
+
Stanislav Petrov (a.k.a. Stan) @doesnt-trust-computers @doesnt-trust-computers:military-uses
|
|
48
|
+
Norman Borlaug (a.k.a. Norm) @science @science:outdoors @science:outdoors:agronomy
|
|
45
49
|
OUTPUT
|
|
46
50
|
end
|
|
47
51
|
end
|
|
@@ -71,6 +75,7 @@ Grace Hopper (a.k.a. The Admiral a.k.a. Amazing Grace) [Paris] @navy @science
|
|
|
71
75
|
stdout_only <<-OUTPUT
|
|
72
76
|
Marie Curie
|
|
73
77
|
Grace Hopper
|
|
78
|
+
Norman Borlaug
|
|
74
79
|
OUTPUT
|
|
75
80
|
end
|
|
76
81
|
|
|
@@ -98,6 +103,16 @@ Neil Armstrong
|
|
|
98
103
|
OUTPUT
|
|
99
104
|
end
|
|
100
105
|
end
|
|
106
|
+
|
|
107
|
+
describe "when a tag is passed with colons and dashes" do
|
|
108
|
+
subject { run_cmd("list friends --tagged doesnt-trust-computers:military-uses") }
|
|
109
|
+
|
|
110
|
+
it "matches tag" do
|
|
111
|
+
stdout_only <<-OUTPUT
|
|
112
|
+
Stanislav Petrov
|
|
113
|
+
OUTPUT
|
|
114
|
+
end
|
|
115
|
+
end
|
|
101
116
|
end
|
|
102
117
|
end
|
|
103
118
|
end
|
|
@@ -28,11 +28,16 @@ clean_describe "list tags" do
|
|
|
28
28
|
|
|
29
29
|
it "lists unique tags" do
|
|
30
30
|
stdout_only <<-OUTPUT
|
|
31
|
+
@doesnt-trust-computers
|
|
32
|
+
@doesnt-trust-computers:military-uses
|
|
31
33
|
@food
|
|
32
34
|
@navy
|
|
33
35
|
@partying
|
|
34
36
|
@school
|
|
35
37
|
@science
|
|
38
|
+
@science:indoors:agronomy-with-hydroponics
|
|
39
|
+
@science:outdoors
|
|
40
|
+
@science:outdoors:agronomy
|
|
36
41
|
OUTPUT
|
|
37
42
|
end
|
|
38
43
|
|
|
@@ -43,6 +48,7 @@ clean_describe "list tags" do
|
|
|
43
48
|
stdout_only <<-OUTPUT
|
|
44
49
|
@food
|
|
45
50
|
@partying
|
|
51
|
+
@science:indoors:agronomy-with-hydroponics
|
|
46
52
|
OUTPUT
|
|
47
53
|
end
|
|
48
54
|
end
|
|
@@ -63,8 +69,12 @@ clean_describe "list tags" do
|
|
|
63
69
|
|
|
64
70
|
it "lists unique tags from friends" do
|
|
65
71
|
stdout_only <<-OUTPUT
|
|
72
|
+
@doesnt-trust-computers
|
|
73
|
+
@doesnt-trust-computers:military-uses
|
|
66
74
|
@navy
|
|
67
75
|
@science
|
|
76
|
+
@science:outdoors
|
|
77
|
+
@science:outdoors:agronomy
|
|
68
78
|
OUTPUT
|
|
69
79
|
end
|
|
70
80
|
end
|
|
@@ -74,9 +84,13 @@ clean_describe "list tags" do
|
|
|
74
84
|
|
|
75
85
|
it "lists unique tags from friends and notes" do
|
|
76
86
|
stdout_only <<-OUTPUT
|
|
87
|
+
@doesnt-trust-computers
|
|
88
|
+
@doesnt-trust-computers:military-uses
|
|
77
89
|
@navy
|
|
78
90
|
@school
|
|
79
91
|
@science
|
|
92
|
+
@science:outdoors
|
|
93
|
+
@science:outdoors:agronomy
|
|
80
94
|
OUTPUT
|
|
81
95
|
end
|
|
82
96
|
end
|
|
@@ -41,13 +41,24 @@ clean_describe "remove tag" do
|
|
|
41
41
|
let(:tag) { "science" }
|
|
42
42
|
|
|
43
43
|
it "removes tag from friend" do
|
|
44
|
-
line_changed "- Marie Curie [Atlantis] @science",
|
|
44
|
+
line_changed "- Marie Curie [Atlantis] @science",
|
|
45
|
+
"- Marie Curie [Atlantis]"
|
|
45
46
|
end
|
|
46
47
|
|
|
47
48
|
it "prints an output message" do
|
|
48
49
|
stdout_only 'Tag removed from friend: "Marie Curie [Atlantis]"'
|
|
49
50
|
end
|
|
50
51
|
|
|
52
|
+
describe "when tag has colons and dashes" do
|
|
53
|
+
let(:friend_name) { "Stanislav Petrov" }
|
|
54
|
+
let(:tag) { "doesnt-trust-computers:military-uses" }
|
|
55
|
+
|
|
56
|
+
it "removes tag from friend" do
|
|
57
|
+
stdout_only 'Tag removed from friend: "Stanislav Petrov (a.k.a. Stan) '\
|
|
58
|
+
'@doesnt-trust-computers"'
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
|
|
51
62
|
describe "when tag is passed with @" do
|
|
52
63
|
let(:tag) { "@science" }
|
|
53
64
|
|
|
@@ -34,6 +34,7 @@ clean_describe "rename friend" do
|
|
|
34
34
|
|
|
35
35
|
it "updates friend name in activities" do
|
|
36
36
|
run_cmd("list activities")[:stdout].must_equal <<-FILE
|
|
37
|
+
2018-02-06: @science:indoors:agronomy-with-hydroponics: Norman Borlaug and George Washington Carver scored a tour of Atlantis' hydroponics gardens through wetplants@example.org and they took me along.
|
|
37
38
|
2015-11-01: Grace Hopper and I went to Marie's Diner. George had to cancel at the last minute. @food
|
|
38
39
|
2015-01-04: Got lunch with Grace Hopper and George Washington Carver. @food
|
|
39
40
|
2014-12-31: Celebrated the new year in Paris with Marie Curie. @partying
|
|
@@ -41,6 +42,7 @@ clean_describe "rename friend" do
|
|
|
41
42
|
FILE
|
|
42
43
|
subject
|
|
43
44
|
run_cmd("list activities")[:stdout].must_equal <<-FILE
|
|
45
|
+
2018-02-06: @science:indoors:agronomy-with-hydroponics: Norman Borlaug and George Washington scored a tour of Atlantis' hydroponics gardens through wetplants@example.org and they took me along.
|
|
44
46
|
2015-11-01: Grace Hopper and I went to Marie's Diner. George had to cancel at the last minute. @food
|
|
45
47
|
2015-01-04: Got lunch with Grace Hopper and George Washington. @food
|
|
46
48
|
2014-12-31: Celebrated the new year in Paris with Marie Curie. @partying
|
|
@@ -35,7 +35,8 @@ clean_describe "set location" do
|
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
it "updates existing location" do
|
|
38
|
-
line_changed "- Marie Curie [Atlantis] @science",
|
|
38
|
+
line_changed "- Marie Curie [Atlantis] @science",
|
|
39
|
+
"- Marie Curie [Paris] @science"
|
|
39
40
|
end
|
|
40
41
|
end
|
|
41
42
|
|
data/test/commands/stats_spec.rb
CHANGED
|
@@ -40,12 +40,12 @@ Total time elapsed: 0 days
|
|
|
40
40
|
|
|
41
41
|
it "returns the content" do
|
|
42
42
|
stdout_only <<-OUTPUT
|
|
43
|
-
Total activities:
|
|
44
|
-
Total friends:
|
|
43
|
+
Total activities: 5
|
|
44
|
+
Total friends: 5
|
|
45
45
|
Total locations: 3
|
|
46
46
|
Total notes: 4
|
|
47
|
-
Total tags:
|
|
48
|
-
Total time elapsed:
|
|
47
|
+
Total tags: 10
|
|
48
|
+
Total time elapsed: 1179 days
|
|
49
49
|
OUTPUT
|
|
50
50
|
end
|
|
51
51
|
|
data/test/helper.rb
CHANGED
|
@@ -26,6 +26,7 @@ require "friends"
|
|
|
26
26
|
|
|
27
27
|
CONTENT = <<-FILE.freeze
|
|
28
28
|
### Activities:
|
|
29
|
+
- 2018-02-06: @science:indoors:agronomy-with-hydroponics: **Norman Borlaug** and **George Washington Carver** scored a tour of _Atlantis_' hydroponics gardens through wetplants@example.org and they took me along.
|
|
29
30
|
- 2015-11-01: **Grace Hopper** and I went to _Marie's Diner_. George had to cancel at the last minute. @food
|
|
30
31
|
- 2015-01-04: Got lunch with **Grace Hopper** and **George Washington Carver**. @food
|
|
31
32
|
- 2014-12-31: Celebrated the new year in _Paris_ with **Marie Curie**. @partying
|
|
@@ -41,6 +42,8 @@ CONTENT = <<-FILE.freeze
|
|
|
41
42
|
- George Washington Carver
|
|
42
43
|
- Grace Hopper (a.k.a. The Admiral a.k.a. Amazing Grace) [Paris] @navy @science
|
|
43
44
|
- Marie Curie [Atlantis] @science
|
|
45
|
+
- Norman Borlaug (a.k.a. Norm) @science @science:outdoors @science:outdoors:agronomy
|
|
46
|
+
- Stanislav Petrov (a.k.a. Stan) @doesnt-trust-computers @doesnt-trust-computers:military-uses
|
|
44
47
|
|
|
45
48
|
### Locations:
|
|
46
49
|
- Atlantis
|
|
@@ -53,6 +56,7 @@ SCRAMBLED_CONTENT = <<-FILE.freeze
|
|
|
53
56
|
### Activities:
|
|
54
57
|
- 2015-01-04: Got lunch with **Grace Hopper** and **George Washington Carver**. @food
|
|
55
58
|
- 2015-11-01: **Grace Hopper** and I went to _Marie's Diner_. George had to cancel at the last minute. @food
|
|
59
|
+
- 2018-02-06: @science:indoors:agronomy-with-hydroponics: **Norman Borlaug** and **George Washington Carver** scored a tour of _Atlantis_' hydroponics gardens through wetplants@example.org and they took me along.
|
|
56
60
|
- 2014-11-15: Talked to **George Washington Carver** on the phone for an hour.
|
|
57
61
|
- 2014-12-31: Celebrated the new year in _Paris_ with **Marie Curie**. @partying
|
|
58
62
|
|
|
@@ -66,6 +70,8 @@ SCRAMBLED_CONTENT = <<-FILE.freeze
|
|
|
66
70
|
- George Washington Carver
|
|
67
71
|
- Marie Curie [Atlantis] @science
|
|
68
72
|
- Grace Hopper (a.k.a. The Admiral a.k.a. Amazing Grace) [Paris] @navy @science
|
|
73
|
+
- Stanislav Petrov (a.k.a. Stan) @doesnt-trust-computers @doesnt-trust-computers:military-uses
|
|
74
|
+
- Norman Borlaug (a.k.a. Norm) @science @science:outdoors @science:outdoors:agronomy
|
|
69
75
|
|
|
70
76
|
### Locations:
|
|
71
77
|
- Paris
|
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.
|
|
4
|
+
version: '0.37'
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jacob Evelyn
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-02-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: chronic
|
|
@@ -172,16 +172,17 @@ executables:
|
|
|
172
172
|
extensions: []
|
|
173
173
|
extra_rdoc_files: []
|
|
174
174
|
files:
|
|
175
|
+
- ".github/CONTRIBUTING.md"
|
|
176
|
+
- ".github/ISSUE_TEMPLATE.md"
|
|
177
|
+
- ".github/PULL_REQUEST_TEMPLATE.md"
|
|
175
178
|
- ".gitignore"
|
|
176
179
|
- ".overcommit.yml"
|
|
177
180
|
- ".rubocop.yml"
|
|
178
181
|
- ".travis.yml"
|
|
179
182
|
- CHANGELOG.md
|
|
180
183
|
- CODE_OF_CONDUCT.md
|
|
181
|
-
- CONTRIBUTING.md
|
|
182
184
|
- Gemfile
|
|
183
185
|
- LICENSE.txt
|
|
184
|
-
- PULL_REQUEST_TEMPLATE.md
|
|
185
186
|
- README.md
|
|
186
187
|
- RELEASING.md
|
|
187
188
|
- Rakefile
|
data/CONTRIBUTING.md
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# Contributing
|
|
2
|
-
|
|
3
|
-
If you're reading this, it means you want to contribute to this project. Hooray!
|
|
4
|
-
|
|
5
|
-
Here's what to do:
|
|
6
|
-
|
|
7
|
-
1. If you're looking for a task to work on, check the
|
|
8
|
-
["up-for-grabs" Issues](https://github.com/JacobEvelyn/friends/labels/upforgrabs). If you see something there that catches your
|
|
9
|
-
eye, leave a comment indicating you'll work on it and
|
|
10
|
-
it's yours! If you already have something to work on,
|
|
11
|
-
that's great as well!
|
|
12
|
-
2. Fork the repository (https://github.com/JacobEvelyn/friends/fork).
|
|
13
|
-
3. Clone your forked repository.
|
|
14
|
-
4. From within the repository directory, run
|
|
15
|
-
`bundle install` to install all dependencies needed for development.
|
|
16
|
-
5. Create your feature branch
|
|
17
|
-
(`git checkout -b my-new-feature`).
|
|
18
|
-
6. Make your changes. Add or modify tests if necessary!
|
|
19
|
-
(Run tests with `rake test`.) Do your best to conform to
|
|
20
|
-
existing style and commenting patterns. You can run the local version of the
|
|
21
|
-
`friends` script with `bundle exec bin/friends`.
|
|
22
|
-
7. Update the `README.md` as necessary to include your changes.
|
|
23
|
-
8. Check your changes for code style by running `bundle exec rubocop .` in
|
|
24
|
-
the repository directory. You may see output indicating that some lines
|
|
25
|
-
differ from the style guidelines. Change your code so that Rubocop gives
|
|
26
|
-
no warnings or errors (and don't hesitate to reach out if you don't know how!—this practice is meant to keep the code clean but it shouldn't be
|
|
27
|
-
scary and it's totally fine to need help!).
|
|
28
|
-
8. Commit your changes
|
|
29
|
-
(`git commit -am "Add some feature"`).
|
|
30
|
-
9. Push your changes to GitHub, and open a Pull Request.
|
|
31
|
-
10. Your code will be reviewed and merged as quickly as
|
|
32
|
-
possible!
|
|
33
|
-
11. Check yourself out on the [contributors page](https://github.com/JacobEvelyn/friends/graphs/contributors)! Look at how cool you are!
|
|
34
|
-
|
|
35
|
-
If you have any questions at all or get stuck on any step,
|
|
36
|
-
don't hesitate to
|
|
37
|
-
[open a GitHub Issue](https://github.com/JacobEvelyn/friends/issues/new)!
|
|
38
|
-
I'll respond as quickly as I can, and I'm friendly! I
|
|
39
|
-
promise I don't bite. 😊
|
|
40
|
-
|
|
41
|
-
## Code of Conduct
|
|
42
|
-
|
|
43
|
-
Note that this project follows a [Code of Conduct](https://github.com/JacobEvelyn/friends/blob/master/CODE_OF_CONDUCT.md).
|
|
44
|
-
If you're a polite, reasonable person you won't have any issues!
|