friends 0.46 → 0.47
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/CONTRIBUTING.md +1 -1
- data/.travis.yml +3 -1
- data/CHANGELOG.md +78 -10
- data/Gemfile +11 -0
- data/Gemfile.old +5 -0
- data/README.md +3 -2
- data/bin/friends +1 -0
- data/friends.gemspec +1 -4
- data/lib/friends/event.rb +21 -3
- data/lib/friends/introvert.rb +12 -3
- data/lib/friends/version.rb +1 -1
- data/test/add_event_helper.rb +1 -1
- data/test/commands/add/activity_spec.rb +1 -1
- data/test/commands/add/note_spec.rb +1 -1
- data/test/commands/clean_spec.rb +5 -1
- data/test/commands/help_spec.rb +20 -16
- data/test/commands/list/activities_spec.rb +31 -1
- data/test/commands/list/favorite/friends_spec.rb +12 -12
- data/test/commands/list/favorite/locations_spec.rb +43 -12
- data/test/commands/rename/friend_spec.rb +2 -2
- data/test/commands/update_spec.rb +8 -6
- data/test/default_file_spec.rb +2 -2
- data/test/helper.rb +11 -11
- metadata +4 -46
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 25d9cad547bea00a886a1e1cf33bf5b2dcea793824cb55af973c2efb5927bc1f
|
4
|
+
data.tar.gz: 850d9b4c193f081beaceee81d0721734892945e4d84a26d9a6e3ab887b38b21b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30a08967fcbd346a005e5e5b6f8a6bd44b70347306c608b6f887d788067dd15c24bb9de7895b768cef7a3c5031c189a9ddf18b1f7804e36cdf30d2757a9a6390
|
7
|
+
data.tar.gz: c234ac819732d4b56fa2a567bb18777df4dba6f5fc81ad5e406552a1462e7bdcc30aac9cf3d2bc38405a0d9fe3a3fa7f4217129113836c07859853bd04416338
|
data/.github/CONTRIBUTING.md
CHANGED
@@ -16,7 +16,7 @@ Here's what to do:
|
|
16
16
|
5. Create your feature branch
|
17
17
|
(`git checkout -b my-new-feature`).
|
18
18
|
6. Make your changes. Add or modify tests if necessary!
|
19
|
-
(Run tests with `rake test`.) Do your best to conform to
|
19
|
+
(Run tests with `bundle exec rake test`.) Do your best to conform to
|
20
20
|
existing style and commenting patterns. You can run the local version of the
|
21
21
|
`friends` script with `bundle exec bin/friends`.
|
22
22
|
7. Update the `README.md` as necessary to include your changes.
|
data/.travis.yml
CHANGED
@@ -5,14 +5,16 @@ rvm:
|
|
5
5
|
- 2.3
|
6
6
|
- 2.4
|
7
7
|
- 2.5 # 2.6 is tested below
|
8
|
+
gemfile: Gemfile.old # The latest Ruby version uses Gemfile below
|
8
9
|
script:
|
9
10
|
- bundle exec rake test
|
10
11
|
matrix:
|
11
12
|
include:
|
12
13
|
- rvm: 2.6
|
14
|
+
gemfile: Gemfile
|
13
15
|
script:
|
14
16
|
- bundle exec rake test
|
15
|
-
- gem install --no-document rubocop && rubocop
|
17
|
+
- gem install --no-document rubocop -v 0.67 && rubocop
|
16
18
|
env:
|
17
19
|
- CODE_COVERAGE=true
|
18
20
|
branches:
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# Changelog
|
2
2
|
|
3
3
|
`friends` is a volunteer project. If you find it useful, please consider
|
4
4
|
making a small donation (🙏) to show you appreciate its continued development.
|
@@ -14,7 +14,27 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
14
14
|
|
15
15
|
👆 Donate with these buttons! 👆
|
16
16
|
|
17
|
+
## [v0.47](https://github.com/JacobEvelyn/friends/tree/v0.47) (2019-12-11)
|
18
|
+
|
19
|
+
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.46...v0.47)
|
20
|
+
|
21
|
+
**Implemented enhancements:**
|
22
|
+
|
23
|
+
- Add default locations [\#152](https://github.com/JacobEvelyn/friends/issues/152)
|
24
|
+
|
25
|
+
**Fixed bugs:**
|
26
|
+
|
27
|
+
- Tests are failing in `master` [\#238](https://github.com/JacobEvelyn/friends/issues/238)
|
28
|
+
|
29
|
+
**Merged pull requests:**
|
30
|
+
|
31
|
+
- 152/add set home command to set your own location [\#243](https://github.com/JacobEvelyn/friends/pull/243) ([shen-sat](https://github.com/shen-sat))
|
32
|
+
- Separate optional test dependencies with Gemfiles [\#239](https://github.com/JacobEvelyn/friends/pull/239) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
33
|
+
- Add `bundle exec` to readme in section for running tests [\#237](https://github.com/JacobEvelyn/friends/pull/237) ([shen-sat](https://github.com/shen-sat))
|
34
|
+
- Pin RuboCop version for Travis tests [\#234](https://github.com/JacobEvelyn/friends/pull/234) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
35
|
+
|
17
36
|
## [v0.46](https://github.com/JacobEvelyn/friends/tree/v0.46) (2019-01-27)
|
37
|
+
|
18
38
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.45...v0.46)
|
19
39
|
|
20
40
|
**Fixed bugs:**
|
@@ -26,6 +46,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
26
46
|
- Fix file-reading issues with default file [\#232](https://github.com/JacobEvelyn/friends/pull/232) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
27
47
|
|
28
48
|
## [v0.45](https://github.com/JacobEvelyn/friends/tree/v0.45) (2019-01-15)
|
49
|
+
|
29
50
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.44...v0.45)
|
30
51
|
|
31
52
|
**Implemented enhancements:**
|
@@ -41,6 +62,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
41
62
|
- Scale graphs by default [\#227](https://github.com/JacobEvelyn/friends/pull/227) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
42
63
|
|
43
64
|
## [v0.44](https://github.com/JacobEvelyn/friends/tree/v0.44) (2019-01-12)
|
65
|
+
|
44
66
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.43...v0.44)
|
45
67
|
|
46
68
|
**Implemented enhancements:**
|
@@ -59,9 +81,10 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
59
81
|
|
60
82
|
- Test against Ruby 2.6 [\#225](https://github.com/JacobEvelyn/friends/pull/225) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
61
83
|
- Change default from ./friends.md to ~/friends.md [\#223](https://github.com/JacobEvelyn/friends/pull/223) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
62
|
-
- Update semverse requirement from ~\> 2.0 to \>= 2, \< 4 [\#217](https://github.com/JacobEvelyn/friends/pull/217) ([dependabot[bot]](https://github.com/apps/dependabot))
|
84
|
+
- Update semverse requirement from ~\> 2.0 to \>= 2, \< 4 [\#217](https://github.com/JacobEvelyn/friends/pull/217) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
63
85
|
|
64
86
|
## [v0.43](https://github.com/JacobEvelyn/friends/tree/v0.43) (2018-11-25)
|
87
|
+
|
65
88
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.42...v0.43)
|
66
89
|
|
67
90
|
**Implemented enhancements:**
|
@@ -82,6 +105,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
82
105
|
- Fix contributing guide link [\#212](https://github.com/JacobEvelyn/friends/pull/212) ([Nitemice](https://github.com/Nitemice))
|
83
106
|
|
84
107
|
## [v0.42](https://github.com/JacobEvelyn/friends/tree/v0.42) (2018-09-22)
|
108
|
+
|
85
109
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.41...v0.42)
|
86
110
|
|
87
111
|
**Fixed bugs:**
|
@@ -93,6 +117,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
93
117
|
- Fix uninitialized constant error with `friends update` [\#208](https://github.com/JacobEvelyn/friends/pull/208) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
94
118
|
|
95
119
|
## [v0.41](https://github.com/JacobEvelyn/friends/tree/v0.41) (2018-09-22)
|
120
|
+
|
96
121
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.40...v0.41)
|
97
122
|
|
98
123
|
**Merged pull requests:**
|
@@ -100,6 +125,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
100
125
|
- Improve post-install message and rearrange constants [\#206](https://github.com/JacobEvelyn/friends/pull/206) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
101
126
|
|
102
127
|
## [v0.40](https://github.com/JacobEvelyn/friends/tree/v0.40) (2018-09-22)
|
128
|
+
|
103
129
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.39...v0.40)
|
104
130
|
|
105
131
|
**Implemented enhancements:**
|
@@ -111,6 +137,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
111
137
|
- Page all output, and remove --limit options [\#205](https://github.com/JacobEvelyn/friends/pull/205) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
112
138
|
|
113
139
|
## [v0.39](https://github.com/JacobEvelyn/friends/tree/v0.39) (2018-08-02)
|
140
|
+
|
114
141
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.38...v0.39)
|
115
142
|
|
116
143
|
**Fixed bugs:**
|
@@ -122,6 +149,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
122
149
|
- Correctly handle duplicate new friends/locations when editing [\#204](https://github.com/JacobEvelyn/friends/pull/204) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
123
150
|
|
124
151
|
## [v0.38](https://github.com/JacobEvelyn/friends/tree/v0.38) (2018-07-24)
|
152
|
+
|
125
153
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.37...v0.38)
|
126
154
|
|
127
155
|
**Implemented enhancements:**
|
@@ -134,9 +162,10 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
134
162
|
- Give name-matching priority to full-text matches [\#203](https://github.com/JacobEvelyn/friends/pull/203) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
135
163
|
- Prevent the addition of blank events, names, and locations [\#200](https://github.com/JacobEvelyn/friends/pull/200) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
136
164
|
- Fix Rubocop errors [\#196](https://github.com/JacobEvelyn/friends/pull/196) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
137
|
-
- Update rake requirement to ~\> 12.3 [\#194](https://github.com/JacobEvelyn/friends/pull/194) ([dependabot[bot]](https://github.com/apps/dependabot))
|
165
|
+
- Update rake requirement to ~\> 12.3 [\#194](https://github.com/JacobEvelyn/friends/pull/194) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
138
166
|
|
139
167
|
## [v0.37](https://github.com/JacobEvelyn/friends/tree/v0.37) (2018-02-24)
|
168
|
+
|
140
169
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.36...v0.37)
|
141
170
|
|
142
171
|
**Implemented enhancements:**
|
@@ -149,6 +178,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
149
178
|
- Dashes and colons [\#191](https://github.com/JacobEvelyn/friends/pull/191) ([adiabatic](https://github.com/adiabatic))
|
150
179
|
|
151
180
|
## [v0.36](https://github.com/JacobEvelyn/friends/tree/v0.36) (2018-01-17)
|
181
|
+
|
152
182
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.35...v0.36)
|
153
183
|
|
154
184
|
**Implemented enhancements:**
|
@@ -169,17 +199,15 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
169
199
|
- Add advanced search \(grep\) examples to README [\#188](https://github.com/JacobEvelyn/friends/pull/188) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
170
200
|
|
171
201
|
## [v0.35](https://github.com/JacobEvelyn/friends/tree/v0.35) (2018-01-14)
|
202
|
+
|
172
203
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.34...v0.35)
|
173
204
|
|
174
205
|
**Implemented enhancements:**
|
175
206
|
|
176
207
|
- Add notes [\#175](https://github.com/JacobEvelyn/friends/issues/175)
|
177
208
|
|
178
|
-
**Merged pull requests:**
|
179
|
-
|
180
|
-
- Add ability to add notes [\#187](https://github.com/JacobEvelyn/friends/pull/187) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
181
|
-
|
182
209
|
## [v0.34](https://github.com/JacobEvelyn/friends/tree/v0.34) (2018-01-10)
|
210
|
+
|
183
211
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.33...v0.34)
|
184
212
|
|
185
213
|
**Implemented enhancements:**
|
@@ -191,6 +219,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
191
219
|
- Always sort activities stably within a date [\#185](https://github.com/JacobEvelyn/friends/pull/185) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
192
220
|
|
193
221
|
## [v0.33](https://github.com/JacobEvelyn/friends/tree/v0.33) (2017-08-22)
|
222
|
+
|
194
223
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.32...v0.33)
|
195
224
|
|
196
225
|
**Implemented enhancements:**
|
@@ -198,6 +227,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
198
227
|
- Prevent dates without years from being in the future [\#181](https://github.com/JacobEvelyn/friends/pull/181) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
199
228
|
|
200
229
|
## [v0.32](https://github.com/JacobEvelyn/friends/tree/v0.32) (2017-07-25)
|
230
|
+
|
201
231
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.31...v0.32)
|
202
232
|
|
203
233
|
**Fixed bugs:**
|
@@ -209,6 +239,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
209
239
|
- Fix gli dependency [\#179](https://github.com/JacobEvelyn/friends/pull/179) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
210
240
|
|
211
241
|
## [v0.31](https://github.com/JacobEvelyn/friends/tree/v0.31) (2017-06-02)
|
242
|
+
|
212
243
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.30...v0.31)
|
213
244
|
|
214
245
|
**Implemented enhancements:**
|
@@ -232,6 +263,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
232
263
|
- Remove warnings when running tests [\#169](https://github.com/JacobEvelyn/friends/pull/169) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
233
264
|
|
234
265
|
## [v0.30](https://github.com/JacobEvelyn/friends/tree/v0.30) (2017-05-30)
|
266
|
+
|
235
267
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.29...v0.30)
|
236
268
|
|
237
269
|
**Implemented enhancements:**
|
@@ -251,6 +283,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
251
283
|
- Correct code coverage calculations [\#164](https://github.com/JacobEvelyn/friends/pull/164) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
252
284
|
|
253
285
|
## [v0.29](https://github.com/JacobEvelyn/friends/tree/v0.29) (2017-03-18)
|
286
|
+
|
254
287
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.28...v0.29)
|
255
288
|
|
256
289
|
**Implemented enhancements:**
|
@@ -264,6 +297,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
264
297
|
- Restructuring [\#155](https://github.com/JacobEvelyn/friends/pull/155) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
265
298
|
|
266
299
|
## [v0.28](https://github.com/JacobEvelyn/friends/tree/v0.28) (2016-06-25)
|
300
|
+
|
267
301
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.27...v0.28)
|
268
302
|
|
269
303
|
**Implemented enhancements:**
|
@@ -275,6 +309,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
275
309
|
- Colorize `list friends` and add --colorless flag [\#151](https://github.com/JacobEvelyn/friends/pull/151) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
276
310
|
|
277
311
|
## [v0.27](https://github.com/JacobEvelyn/friends/tree/v0.27) (2016-06-22)
|
312
|
+
|
278
313
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.26...v0.27)
|
279
314
|
|
280
315
|
**Implemented enhancements:**
|
@@ -298,6 +333,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
298
333
|
- Add Gemnasium integration with README badge [\#142](https://github.com/JacobEvelyn/friends/pull/142) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
299
334
|
|
300
335
|
## [v0.26](https://github.com/JacobEvelyn/friends/tree/v0.26) (2016-05-23)
|
336
|
+
|
301
337
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.25...v0.26)
|
302
338
|
|
303
339
|
**Fixed bugs:**
|
@@ -308,8 +344,10 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
308
344
|
**Merged pull requests:**
|
309
345
|
|
310
346
|
- Fix deserialization for friends with tags and no nicknames [\#141](https://github.com/JacobEvelyn/friends/pull/141) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
347
|
+
- Make tag-migration code simpler [\#138](https://github.com/JacobEvelyn/friends/pull/138) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
311
348
|
|
312
349
|
## [v0.25](https://github.com/JacobEvelyn/friends/tree/v0.25) (2016-05-22)
|
350
|
+
|
313
351
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.24...v0.25)
|
314
352
|
|
315
353
|
**Closed issues:**
|
@@ -318,10 +356,10 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
318
356
|
|
319
357
|
**Merged pull requests:**
|
320
358
|
|
321
|
-
- Make tag-migration code simpler [\#138](https://github.com/JacobEvelyn/friends/pull/138) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
322
359
|
- Add rubocop run to TravisCI [\#135](https://github.com/JacobEvelyn/friends/pull/135) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
323
360
|
|
324
361
|
## [v0.24](https://github.com/JacobEvelyn/friends/tree/v0.24) (2016-05-17)
|
362
|
+
|
325
363
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.23...v0.24)
|
326
364
|
|
327
365
|
**Implemented enhancements:**
|
@@ -337,6 +375,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
337
375
|
- Change tags to `@tag` format, auto-migrate old tags, and fix set loading issue [\#134](https://github.com/JacobEvelyn/friends/pull/134) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
338
376
|
|
339
377
|
## [v0.23](https://github.com/JacobEvelyn/friends/tree/v0.23) (2016-05-16)
|
378
|
+
|
340
379
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.22...v0.23)
|
341
380
|
|
342
381
|
**Implemented enhancements:**
|
@@ -349,6 +388,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
349
388
|
- Allow graph to be filtered by friend, location and hashtag [\#129](https://github.com/JacobEvelyn/friends/pull/129) ([andypearson](https://github.com/andypearson))
|
350
389
|
|
351
390
|
## [v0.22](https://github.com/JacobEvelyn/friends/tree/v0.22) (2016-05-14)
|
391
|
+
|
352
392
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.21...v0.22)
|
353
393
|
|
354
394
|
**Fixed bugs:**
|
@@ -356,6 +396,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
356
396
|
- Fix `undefined variable "limit"` errors [\#128](https://github.com/JacobEvelyn/friends/issues/128)
|
357
397
|
|
358
398
|
## [v0.21](https://github.com/JacobEvelyn/friends/tree/v0.21) (2016-05-14)
|
399
|
+
|
359
400
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.20...v0.21)
|
360
401
|
|
361
402
|
**Implemented enhancements:**
|
@@ -369,6 +410,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
369
410
|
- Remove need to quote for `add friend` and `add activity` [\#123](https://github.com/JacobEvelyn/friends/pull/123) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
370
411
|
|
371
412
|
## [v0.20](https://github.com/JacobEvelyn/friends/tree/v0.20) (2016-05-08)
|
413
|
+
|
372
414
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.19...v0.20)
|
373
415
|
|
374
416
|
**Implemented enhancements:**
|
@@ -385,6 +427,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
385
427
|
- Implement hashtags [\#118](https://github.com/JacobEvelyn/friends/pull/118) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
386
428
|
|
387
429
|
## [v0.19](https://github.com/JacobEvelyn/friends/tree/v0.19) (2016-05-02)
|
430
|
+
|
388
431
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.18...v0.19)
|
389
432
|
|
390
433
|
**Implemented enhancements:**
|
@@ -396,6 +439,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
396
439
|
- Add `list favorite locations` command [\#115](https://github.com/JacobEvelyn/friends/pull/115) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
397
440
|
|
398
441
|
## [v0.18](https://github.com/JacobEvelyn/friends/tree/v0.18) (2016-05-02)
|
442
|
+
|
399
443
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.17...v0.18)
|
400
444
|
|
401
445
|
**Implemented enhancements:**
|
@@ -416,6 +460,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
416
460
|
- Organize documentation in README [\#110](https://github.com/JacobEvelyn/friends/pull/110) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
417
461
|
|
418
462
|
## [v0.17](https://github.com/JacobEvelyn/friends/tree/v0.17) (2016-03-28)
|
463
|
+
|
419
464
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.16...v0.17)
|
420
465
|
|
421
466
|
**Implemented enhancements:**
|
@@ -439,6 +484,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
439
484
|
- Add documentation for `graph` and `stats` commands [\#102](https://github.com/JacobEvelyn/friends/pull/102) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
440
485
|
|
441
486
|
## [v0.16](https://github.com/JacobEvelyn/friends/tree/v0.16) (2016-03-23)
|
487
|
+
|
442
488
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.15...v0.16)
|
443
489
|
|
444
490
|
**Implemented enhancements:**
|
@@ -450,9 +496,11 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
450
496
|
- Allow `graph` without arguments to graph all activities \(Closes \#83\) [\#85](https://github.com/JacobEvelyn/friends/pull/85) ([andypearson](https://github.com/andypearson))
|
451
497
|
|
452
498
|
## [v0.15](https://github.com/JacobEvelyn/friends/tree/v0.15) (2016-03-11)
|
499
|
+
|
453
500
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.14...v0.15)
|
454
501
|
|
455
502
|
## [v0.14](https://github.com/JacobEvelyn/friends/tree/v0.14) (2016-03-11)
|
503
|
+
|
456
504
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.13...v0.14)
|
457
505
|
|
458
506
|
**Implemented enhancements:**
|
@@ -464,6 +512,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
464
512
|
- Allow natural-language dates [\#82](https://github.com/JacobEvelyn/friends/pull/82) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
465
513
|
|
466
514
|
## [v0.13](https://github.com/JacobEvelyn/friends/tree/v0.13) (2016-01-21)
|
515
|
+
|
467
516
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.12...v0.13)
|
468
517
|
|
469
518
|
**Fixed bugs:**
|
@@ -480,6 +529,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
480
529
|
- Update RuboCop and fix many offenses [\#79](https://github.com/JacobEvelyn/friends/pull/79) ([codyjroberts](https://github.com/codyjroberts))
|
481
530
|
|
482
531
|
## [v0.12](https://github.com/JacobEvelyn/friends/tree/v0.12) (2016-01-16)
|
532
|
+
|
483
533
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.11...v0.12)
|
484
534
|
|
485
535
|
**Implemented enhancements:**
|
@@ -493,6 +543,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
493
543
|
- Add rename friend [\#75](https://github.com/JacobEvelyn/friends/pull/75) ([codyjroberts](https://github.com/codyjroberts))
|
494
544
|
|
495
545
|
## [v0.11](https://github.com/JacobEvelyn/friends/tree/v0.11) (2016-01-13)
|
546
|
+
|
496
547
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.10...v0.11)
|
497
548
|
|
498
549
|
**Fixed bugs:**
|
@@ -506,6 +557,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
506
557
|
- Fix bug in how dates are deserialized [\#73](https://github.com/JacobEvelyn/friends/pull/73) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
507
558
|
|
508
559
|
## [v0.10](https://github.com/JacobEvelyn/friends/tree/v0.10) (2016-01-12)
|
560
|
+
|
509
561
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.9...v0.10)
|
510
562
|
|
511
563
|
**Implemented enhancements:**
|
@@ -532,6 +584,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
532
584
|
- Remove require\_relative from codebase [\#59](https://github.com/JacobEvelyn/friends/pull/59) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
533
585
|
|
534
586
|
## [v0.9](https://github.com/JacobEvelyn/friends/tree/v0.9) (2016-01-07)
|
587
|
+
|
535
588
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.8...v0.9)
|
536
589
|
|
537
590
|
**Implemented enhancements:**
|
@@ -543,6 +596,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
543
596
|
- Add stats command [\#55](https://github.com/JacobEvelyn/friends/pull/55) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
544
597
|
|
545
598
|
## [v0.8](https://github.com/JacobEvelyn/friends/tree/v0.8) (2016-01-06)
|
599
|
+
|
546
600
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.7...v0.8)
|
547
601
|
|
548
602
|
**Implemented enhancements:**
|
@@ -559,6 +613,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
559
613
|
- Add badgefury.io badge [\#49](https://github.com/JacobEvelyn/friends/pull/49) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
560
614
|
|
561
615
|
## [v0.7](https://github.com/JacobEvelyn/friends/tree/v0.7) (2016-01-05)
|
616
|
+
|
562
617
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.6...v0.7)
|
563
618
|
|
564
619
|
**Fixed bugs:**
|
@@ -576,6 +631,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
576
631
|
- Update README URLs based on HTTP redirects [\#46](https://github.com/JacobEvelyn/friends/pull/46) ([ReadmeCritic](https://github.com/ReadmeCritic))
|
577
632
|
|
578
633
|
## [v0.6](https://github.com/JacobEvelyn/friends/tree/v0.6) (2016-01-03)
|
634
|
+
|
579
635
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.5...v0.6)
|
580
636
|
|
581
637
|
**Merged pull requests:**
|
@@ -583,6 +639,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
583
639
|
- Test versions [\#41](https://github.com/JacobEvelyn/friends/pull/41) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
584
640
|
|
585
641
|
## [v0.5](https://github.com/JacobEvelyn/friends/tree/v0.5) (2016-01-03)
|
642
|
+
|
586
643
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.4...v0.5)
|
587
644
|
|
588
645
|
**Fixed bugs:**
|
@@ -594,9 +651,11 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
594
651
|
- Make activities on same day chronologically ordered [\#38](https://github.com/JacobEvelyn/friends/pull/38) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
595
652
|
|
596
653
|
## [v0.4](https://github.com/JacobEvelyn/friends/tree/v0.4) (2015-11-14)
|
654
|
+
|
597
655
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.3...v0.4)
|
598
656
|
|
599
657
|
## [v0.3](https://github.com/JacobEvelyn/friends/tree/v0.3) (2015-11-11)
|
658
|
+
|
600
659
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.2...v0.3)
|
601
660
|
|
602
661
|
**Implemented enhancements:**
|
@@ -608,12 +667,15 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
608
667
|
- Auto-update? [\#8](https://github.com/JacobEvelyn/friends/issues/8)
|
609
668
|
|
610
669
|
## [v0.2](https://github.com/JacobEvelyn/friends/tree/v0.2) (2015-11-08)
|
670
|
+
|
611
671
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.1...v0.2)
|
612
672
|
|
613
673
|
## [v0.1](https://github.com/JacobEvelyn/friends/tree/v0.1) (2015-11-03)
|
674
|
+
|
614
675
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.0.6...v0.1)
|
615
676
|
|
616
677
|
## [v0.0.6](https://github.com/JacobEvelyn/friends/tree/v0.0.6) (2015-06-28)
|
678
|
+
|
617
679
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.0.5...v0.0.6)
|
618
680
|
|
619
681
|
**Implemented enhancements:**
|
@@ -621,9 +683,11 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
621
683
|
- Have robustness around name extraction from activities [\#21](https://github.com/JacobEvelyn/friends/issues/21)
|
622
684
|
|
623
685
|
## [v0.0.5](https://github.com/JacobEvelyn/friends/tree/v0.0.5) (2015-06-28)
|
686
|
+
|
624
687
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.0.4...v0.0.5)
|
625
688
|
|
626
689
|
## [v0.0.4](https://github.com/JacobEvelyn/friends/tree/v0.0.4) (2015-06-01)
|
690
|
+
|
627
691
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.0.3...v0.0.4)
|
628
692
|
|
629
693
|
**Merged pull requests:**
|
@@ -631,6 +695,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
631
695
|
- Bump version to 0.0.3 [\#33](https://github.com/JacobEvelyn/friends/pull/33) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
632
696
|
|
633
697
|
## [v0.0.3](https://github.com/JacobEvelyn/friends/tree/v0.0.3) (2015-05-28)
|
698
|
+
|
634
699
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.0.2...v0.0.3)
|
635
700
|
|
636
701
|
**Merged pull requests:**
|
@@ -639,6 +704,7 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
639
704
|
- Improve friend matching code [\#31](https://github.com/JacobEvelyn/friends/pull/31) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
640
705
|
|
641
706
|
## [v0.0.2](https://github.com/JacobEvelyn/friends/tree/v0.0.2) (2015-01-11)
|
707
|
+
|
642
708
|
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.0.1...v0.0.2)
|
643
709
|
|
644
710
|
**Implemented enhancements:**
|
@@ -661,7 +727,6 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
661
727
|
**Merged pull requests:**
|
662
728
|
|
663
729
|
- Improve documentation [\#30](https://github.com/JacobEvelyn/friends/pull/30) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
664
|
-
- Add confirm messages and --quiet switch [\#29](https://github.com/JacobEvelyn/friends/pull/29) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
665
730
|
- Put activities above friends in file [\#26](https://github.com/JacobEvelyn/friends/pull/26) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
666
731
|
- Make friend matching case-insensitive. [\#24](https://github.com/JacobEvelyn/friends/pull/24) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
667
732
|
- Basic add-activity feature in place [\#22](https://github.com/JacobEvelyn/friends/pull/22) ([JacobEvelyn](https://github.com/JacobEvelyn))
|
@@ -674,5 +739,8 @@ making a small donation (🙏) to show you appreciate its continued development.
|
|
674
739
|
|
675
740
|
## [v0.0.1](https://github.com/JacobEvelyn/friends/tree/v0.0.1) (2014-12-11)
|
676
741
|
|
742
|
+
[Full Changelog](https://github.com/JacobEvelyn/friends/compare/6e3c48fa21712027b5bfa06f744a1953b5df2303...v0.0.1)
|
743
|
+
|
744
|
+
|
677
745
|
|
678
|
-
\* *This
|
746
|
+
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
|
data/Gemfile
CHANGED
@@ -3,3 +3,14 @@
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
|
5
5
|
gemspec
|
6
|
+
|
7
|
+
group :development, :test do
|
8
|
+
gem "rubocop", "0.67"
|
9
|
+
end
|
10
|
+
|
11
|
+
group :test do
|
12
|
+
gem "codecov", "~> 0.1.14"
|
13
|
+
gem "simplecov",
|
14
|
+
git: "https://github.com/colszowka/simplecov",
|
15
|
+
ref: "cb968abf857a704364283b5dec4d9fa3d096287e"
|
16
|
+
end
|
data/Gemfile.old
ADDED
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
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.
|
3
|
+
[![Build Status](https://travis-ci.com/JacobEvelyn/friends.svg?branch=master)](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)
|
@@ -26,7 +26,8 @@ Extrovert-approved.
|
|
26
26
|
|
27
27
|
**NOTE: Participation is encouraged! Make issues, ask questions, submit pull
|
28
28
|
requests (even if it's your first time contributing to open-source—you'll get
|
29
|
-
lots of help), and give feedback
|
29
|
+
lots of help), and give feedback! This project is
|
30
|
+
[very much alive](https://github.com/JacobEvelyn/friends/issues/233)!**
|
30
31
|
|
31
32
|
## Table of Contents
|
32
33
|
|
data/bin/friends
CHANGED
data/friends.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.email = ["jacobevelyn@gmail.com"]
|
14
14
|
spec.summary = "Spend time with the people you care about."
|
15
15
|
spec.description = "Spend time with the people you care about. "\
|
16
|
-
|
16
|
+
"Introvert-tested. Extrovert-approved."
|
17
17
|
spec.homepage = "https://github.com/JacobEvelyn/friends"
|
18
18
|
spec.license = "MIT"
|
19
19
|
spec.post_install_message = Friends::POST_INSTALL_MESSAGE
|
@@ -33,10 +33,7 @@ Gem::Specification.new do |spec|
|
|
33
33
|
spec.add_dependency "semverse", ">= 2", "< 4"
|
34
34
|
spec.add_dependency "tty-pager", "~> 0.11"
|
35
35
|
|
36
|
-
spec.add_development_dependency "bundler", ">= 1.6"
|
37
|
-
spec.add_development_dependency "codecov", "~> 0.1.14"
|
38
36
|
spec.add_development_dependency "minitest", "~> 5.5"
|
39
37
|
spec.add_development_dependency "minitest-proveit", "~> 1.0"
|
40
38
|
spec.add_development_dependency "rake", "~> 12.3"
|
41
|
-
spec.add_development_dependency "simplecov", "~> 0.14"
|
42
39
|
end
|
data/lib/friends/event.rb
CHANGED
@@ -64,6 +64,7 @@ module Friends
|
|
64
64
|
|
65
65
|
attr_reader :date
|
66
66
|
attr_accessor :description
|
67
|
+
attr_writer :implicit_location
|
67
68
|
|
68
69
|
# @return [String] the command-line display text for the activity
|
69
70
|
def to_s
|
@@ -132,9 +133,13 @@ module Friends
|
|
132
133
|
end
|
133
134
|
|
134
135
|
# @param location [Location] the location to test
|
135
|
-
# @return [Boolean] true
|
136
|
+
# @return [Boolean] true if activity has location in description or it equals implicit location
|
136
137
|
def includes_location?(location)
|
137
|
-
|
138
|
+
location_in_description?(location) || location_is_implicit?(location)
|
139
|
+
end
|
140
|
+
|
141
|
+
def moved_to_location
|
142
|
+
@description[/(?<=[mM]oved to _)\w[^_]*(?=_)/]
|
138
143
|
end
|
139
144
|
|
140
145
|
# @param friend [Friend] the friend to test
|
@@ -162,10 +167,15 @@ module Friends
|
|
162
167
|
|
163
168
|
# Find the names of all locations in this description.
|
164
169
|
# @return [Array] list of all location names in the description
|
165
|
-
def
|
170
|
+
def description_location_names
|
166
171
|
@description.scan(/(?<=_)\w[^_]*(?=_)/).uniq
|
167
172
|
end
|
168
173
|
|
174
|
+
# @return [Array] list of all location names in either description or implicit_location
|
175
|
+
def location_names
|
176
|
+
@implicit_location ? [@implicit_location] : description_location_names
|
177
|
+
end
|
178
|
+
|
169
179
|
private
|
170
180
|
|
171
181
|
# Modify the description to turn inputted location names (e.g. "Atlantis")
|
@@ -330,5 +340,13 @@ module Friends
|
|
330
340
|
def <=>(other)
|
331
341
|
other.date <=> date
|
332
342
|
end
|
343
|
+
|
344
|
+
def location_in_description?(location)
|
345
|
+
description_location_names.include? location.name
|
346
|
+
end
|
347
|
+
|
348
|
+
def location_is_implicit?(location)
|
349
|
+
@implicit_location == location.name
|
350
|
+
end
|
333
351
|
end
|
334
352
|
end
|
data/lib/friends/introvert.rb
CHANGED
@@ -52,7 +52,7 @@ module Friends
|
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
|
-
event.
|
55
|
+
event.description_location_names.each do |name|
|
56
56
|
unless location_names.include? name
|
57
57
|
add_location(name: name)
|
58
58
|
location_names << name
|
@@ -658,6 +658,14 @@ module Friends
|
|
658
658
|
end
|
659
659
|
end
|
660
660
|
|
661
|
+
def set_implicit_locations!
|
662
|
+
implicit_location = nil
|
663
|
+
@activities.reverse_each do |activity|
|
664
|
+
implicit_location = activity.moved_to_location if activity.moved_to_location
|
665
|
+
activity.implicit_location = implicit_location if activity.description_location_names.empty?
|
666
|
+
end
|
667
|
+
end
|
668
|
+
|
661
669
|
# Process the friends.md file and store its contents in internal data
|
662
670
|
# structures.
|
663
671
|
def read_file
|
@@ -677,6 +685,7 @@ module Friends
|
|
677
685
|
# Parse the line and update the parsing state.
|
678
686
|
state = parse_line!(line, line_num: line_num, state: state)
|
679
687
|
end
|
688
|
+
set_implicit_locations!
|
680
689
|
|
681
690
|
set_n_activities!(:friend)
|
682
691
|
set_n_activities!(:location)
|
@@ -710,8 +719,8 @@ module Friends
|
|
710
719
|
|
711
720
|
begin
|
712
721
|
instance_variable_get("@#{stage.id}") << stage.klass.deserialize(line)
|
713
|
-
rescue =>
|
714
|
-
bad_line(
|
722
|
+
rescue => ex # rubocop:disable Style/RescueStandardError
|
723
|
+
bad_line(ex, line_num)
|
715
724
|
end
|
716
725
|
|
717
726
|
state
|
data/lib/friends/version.rb
CHANGED
data/test/add_event_helper.rb
CHANGED
@@ -56,7 +56,7 @@ def description_parsing_specs(test_stdout: true)
|
|
56
56
|
let(:description) { " " }
|
57
57
|
|
58
58
|
it "prints an error message" do
|
59
|
-
subject[:stderr].must_equal(
|
59
|
+
value(subject[:stderr]).must_equal(
|
60
60
|
ensure_trailing_newline_unless_empty("Error: Blank #{event} not added")
|
61
61
|
)
|
62
62
|
end
|
data/test/commands/clean_spec.rb
CHANGED
@@ -15,7 +15,7 @@ clean_describe "clean" do
|
|
15
15
|
let(:content) { nil }
|
16
16
|
|
17
17
|
it "does not create the file" do
|
18
|
-
File.exist?(filename).must_equal false
|
18
|
+
value(File.exist?(filename)).must_equal false
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
@@ -74,6 +74,7 @@ clean_describe "clean" do
|
|
74
74
|
<<-CONTENT
|
75
75
|
### Activities:
|
76
76
|
- 2017-01-01: Celebrated the new year in _Paris_ with **Marie Curie** and her husband **Pierre Curie**. **Marie Curie** loves _Paris_!
|
77
|
+
- 2016-12-31: Moved to _London_.
|
77
78
|
|
78
79
|
### Notes:
|
79
80
|
- 2017-01-01: I just learned that **Jacques Cousteau** is thinking about moving from _Gironde_ to _The Lost City of Atlantis_ (_Gironde_ did seem a bit too terrestrial for him).
|
@@ -90,6 +91,7 @@ clean_describe "clean" do
|
|
90
91
|
file_equals <<-CONTENT
|
91
92
|
### Activities:
|
92
93
|
- 2017-01-01: Celebrated the new year in _Paris_ with **Marie Curie** and her husband **Pierre Curie**. **Marie Curie** loves _Paris_!
|
94
|
+
- 2016-12-31: Moved to _London_.
|
93
95
|
|
94
96
|
### Notes:
|
95
97
|
- 2017-01-01: I just learned that **Jacques Cousteau** is thinking about moving from _Gironde_ to _The Lost City of Atlantis_ (_Gironde_ did seem a bit too terrestrial for him).
|
@@ -102,6 +104,7 @@ clean_describe "clean" do
|
|
102
104
|
|
103
105
|
### Locations:
|
104
106
|
- Gironde
|
107
|
+
- London
|
105
108
|
- NYC
|
106
109
|
- Paris
|
107
110
|
- The Lost City of Atlantis
|
@@ -113,6 +116,7 @@ clean_describe "clean" do
|
|
113
116
|
Friend added: \"Marie Curie\"
|
114
117
|
Friend added: \"Pierre Curie\"
|
115
118
|
Location added: \"Paris\"
|
119
|
+
Location added: \"London\"
|
116
120
|
Friend added: \"Jacques Cousteau\"
|
117
121
|
Location added: \"Gironde\"
|
118
122
|
Location added: \"The Lost City of Atlantis\"
|
data/test/commands/help_spec.rb
CHANGED
@@ -8,15 +8,17 @@ clean_describe "help" do
|
|
8
8
|
|
9
9
|
describe "with no subcommand passed" do
|
10
10
|
it "prints overall help message" do
|
11
|
-
subject[:stderr].must_equal ""
|
12
|
-
subject[:status].must_equal 0
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
11
|
+
value(subject[:stderr]).must_equal ""
|
12
|
+
value(subject[:status]).must_equal 0
|
13
|
+
value(
|
14
|
+
[
|
15
|
+
"NAME",
|
16
|
+
"SYNOPSIS",
|
17
|
+
"VERSION",
|
18
|
+
"GLOBAL OPTIONS",
|
19
|
+
"COMMANDS"
|
20
|
+
].all? { |msg| subject[:stdout].include? msg }
|
21
|
+
).must_equal true
|
20
22
|
end
|
21
23
|
end
|
22
24
|
|
@@ -24,13 +26,15 @@ clean_describe "help" do
|
|
24
26
|
subject { run_cmd("help graph") }
|
25
27
|
|
26
28
|
it "prints subcommand help message" do
|
27
|
-
subject[:stderr].must_equal ""
|
28
|
-
subject[:status].must_equal 0
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
29
|
+
value(subject[:stderr]).must_equal ""
|
30
|
+
value(subject[:status]).must_equal 0
|
31
|
+
value(
|
32
|
+
[
|
33
|
+
"NAME",
|
34
|
+
"SYNOPSIS",
|
35
|
+
"COMMAND OPTIONS"
|
36
|
+
].all? { |msg| subject[:stdout].include? msg }
|
37
|
+
).must_equal true
|
34
38
|
end
|
35
39
|
end
|
36
40
|
|
@@ -52,8 +52,38 @@ clean_describe "list activities" do
|
|
52
52
|
stdout_only "2014-12-31: Celebrated the new year in Paris with Marie Curie. @partying"
|
53
53
|
end
|
54
54
|
end
|
55
|
-
end
|
56
55
|
|
56
|
+
describe "when implicit location is set" do
|
57
|
+
let(:location_name) { "atlantis" }
|
58
|
+
let(:content) do
|
59
|
+
<<-FILE
|
60
|
+
### Activities:
|
61
|
+
- 2015-01-30: Went to a museum with **George Washington Carver**.
|
62
|
+
- 2015-01-29: moved to _Paris_.
|
63
|
+
- 2015-01-01: Got lunch with **Grace Hopper** and **George Washington Carver**. @food
|
64
|
+
- 2014-12-31: Celebrated the new year in _Paris_ with **Marie Curie**. @partying @food
|
65
|
+
- 2014-12-30: Moved to _Atlantis_.
|
66
|
+
- 2014-12-29: Talked to **George Washington Carver** on the phone for an hour.
|
67
|
+
|
68
|
+
### Friends:
|
69
|
+
- George Washington Carver
|
70
|
+
- Marie Curie [Atlantis] @science
|
71
|
+
- Grace Hopper (a.k.a. The Admiral a.k.a. Amazing Grace) [Paris] @navy @science
|
72
|
+
|
73
|
+
### Locations:
|
74
|
+
- Atlantis
|
75
|
+
- Paris
|
76
|
+
FILE
|
77
|
+
end
|
78
|
+
|
79
|
+
it "matches location case-insensitively" do
|
80
|
+
stdout_only <<-OUTPUT
|
81
|
+
2015-01-01: Got lunch with Grace Hopper and George Washington Carver. @food
|
82
|
+
2014-12-30: Moved to Atlantis.
|
83
|
+
OUTPUT
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
57
87
|
describe "--with" do
|
58
88
|
subject { run_cmd("list activities --with #{friend_name}") }
|
59
89
|
|
@@ -79,34 +79,34 @@ FILE
|
|
79
79
|
end
|
80
80
|
|
81
81
|
it "uses tied ranks" do
|
82
|
-
subject[:stderr].must_equal ""
|
83
|
-
subject[:status].must_equal 0
|
82
|
+
value(subject[:stderr]).must_equal ""
|
83
|
+
value(subject[:status]).must_equal 0
|
84
84
|
|
85
85
|
lines = subject[:stdout].split("\n")
|
86
|
-
lines[1].must_match(/1\. Friend (A|B)/)
|
87
|
-
lines[2].must_match(/1\. Friend (A|B)/)
|
88
|
-
lines[3].must_include "3. Friend"
|
86
|
+
value(lines[1]).must_match(/1\. Friend (A|B)/)
|
87
|
+
value(lines[2]).must_match(/1\. Friend (A|B)/)
|
88
|
+
value(lines[3]).must_include "3. Friend"
|
89
89
|
end
|
90
90
|
|
91
91
|
it "only uses the word 'activities' for the first item, even when a tie" do
|
92
|
-
subject[:stderr].must_equal ""
|
93
|
-
subject[:status].must_equal 0
|
92
|
+
value(subject[:stderr]).must_equal ""
|
93
|
+
value(subject[:status]).must_equal 0
|
94
94
|
|
95
95
|
lines = subject[:stdout].split("\n")
|
96
|
-
lines[1].must_include "activities"
|
97
|
-
lines[2].wont_include "activities"
|
96
|
+
value(lines[1]).must_include "activities"
|
97
|
+
value(lines[2]).wont_include "activities"
|
98
98
|
end
|
99
99
|
|
100
100
|
it "indents based on the highest rank number, not the number of friends" do
|
101
|
-
subject[:stderr].must_equal ""
|
102
|
-
subject[:status].must_equal 0
|
101
|
+
value(subject[:stderr]).must_equal ""
|
102
|
+
value(subject[:status]).must_equal 0
|
103
103
|
|
104
104
|
# Since there are 10 friends, a naive implementation would pad our output
|
105
105
|
# assuming the (numerically) highest rank is "10." but since the highest
|
106
106
|
# rank is a tie, we never display a double-digit rank, so we don't need to
|
107
107
|
# pad our output for double digits.
|
108
108
|
lines = subject[:stdout].split("\n")
|
109
|
-
lines.last.must_include "3. Friend"
|
109
|
+
value(lines.last).must_include "3. Friend"
|
110
110
|
end
|
111
111
|
end
|
112
112
|
end
|
@@ -84,34 +84,65 @@ FILE
|
|
84
84
|
end
|
85
85
|
|
86
86
|
it "uses tied ranks" do
|
87
|
-
subject[:stderr].must_equal ""
|
88
|
-
subject[:status].must_equal 0
|
87
|
+
value(subject[:stderr]).must_equal ""
|
88
|
+
value(subject[:status]).must_equal 0
|
89
89
|
|
90
90
|
lines = subject[:stdout].split("\n")
|
91
|
-
lines[1].must_match(/1\. Location (A|B)/)
|
92
|
-
lines[2].must_match(/1\. Location (A|B)/)
|
93
|
-
lines[3].must_include "3. Location"
|
91
|
+
value(lines[1]).must_match(/1\. Location (A|B)/)
|
92
|
+
value(lines[2]).must_match(/1\. Location (A|B)/)
|
93
|
+
value(lines[3]).must_include "3. Location"
|
94
94
|
end
|
95
95
|
|
96
96
|
it "only uses the word 'activities' for the first item, even when a tie" do
|
97
|
-
subject[:stderr].must_equal ""
|
98
|
-
subject[:status].must_equal 0
|
97
|
+
value(subject[:stderr]).must_equal ""
|
98
|
+
value(subject[:status]).must_equal 0
|
99
99
|
|
100
100
|
lines = subject[:stdout].split("\n")
|
101
|
-
lines[1].must_include "activities"
|
102
|
-
lines[2].wont_include "activities"
|
101
|
+
value(lines[1]).must_include "activities"
|
102
|
+
value(lines[2]).wont_include "activities"
|
103
103
|
end
|
104
104
|
|
105
105
|
it "indents based on the highest rank number, not the number of locations" do
|
106
|
-
subject[:stderr].must_equal ""
|
107
|
-
subject[:status].must_equal 0
|
106
|
+
value(subject[:stderr]).must_equal ""
|
107
|
+
value(subject[:status]).must_equal 0
|
108
108
|
|
109
109
|
# Since there are 10 friends, a naive implementation would pad our output
|
110
110
|
# assuming the (numerically) highest rank is "10." but since the highest
|
111
111
|
# rank is a tie, we never display a double-digit rank, so we don't need to
|
112
112
|
# pad our output for double digits.
|
113
113
|
lines = subject[:stdout].split("\n")
|
114
|
-
lines.last.must_include "3. Location"
|
114
|
+
value(lines.last).must_include "3. Location"
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
describe "when implied locations are set" do
|
119
|
+
let(:content) do
|
120
|
+
<<-FILE
|
121
|
+
### Activities:
|
122
|
+
- 2015-01-30: Went to a museum with **George Washington Carver**.
|
123
|
+
- 2015-01-29: moved to _Paris_.
|
124
|
+
- 2015-01-01: Got lunch with **Grace Hopper** and **George Washington Carver**. @food
|
125
|
+
- 2014-12-31: Celebrated the new year in _Paris_ with **Marie Curie**. @partying @food
|
126
|
+
- 2014-12-30: Moved to _Atlantis_.
|
127
|
+
- 2014-12-29: Talked to **George Washington Carver** on the phone for an hour.
|
128
|
+
|
129
|
+
### Friends:
|
130
|
+
- George Washington Carver
|
131
|
+
- Marie Curie [Atlantis] @science
|
132
|
+
- Grace Hopper (a.k.a. The Admiral a.k.a. Amazing Grace) [Paris] @navy @science
|
133
|
+
|
134
|
+
### Locations:
|
135
|
+
- Atlantis
|
136
|
+
- Paris
|
137
|
+
FILE
|
138
|
+
end
|
139
|
+
|
140
|
+
it "lists locations in order of decreasing activity" do
|
141
|
+
stdout_only <<-OUTPUT
|
142
|
+
Your favorite locations:
|
143
|
+
1. Paris (3 activities)
|
144
|
+
2. Atlantis (2)
|
145
|
+
OUTPUT
|
115
146
|
end
|
116
147
|
end
|
117
148
|
end
|
@@ -33,7 +33,7 @@ clean_describe "rename friend" do
|
|
33
33
|
end
|
34
34
|
|
35
35
|
it "updates friend name in activities" do
|
36
|
-
run_cmd("list activities")[:stdout].must_equal <<-FILE
|
36
|
+
value(run_cmd("list activities")[:stdout]).must_equal <<-FILE
|
37
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.
|
38
38
|
2015-11-01: Grace Hopper and I went to Marie's Diner. George had to cancel at the last minute. @food
|
39
39
|
2015-01-04: Got lunch with Grace Hopper and George Washington Carver. @food
|
@@ -41,7 +41,7 @@ clean_describe "rename friend" do
|
|
41
41
|
2014-11-15: Talked to George Washington Carver on the phone for an hour.
|
42
42
|
FILE
|
43
43
|
subject
|
44
|
-
run_cmd("list activities")[:stdout].must_equal <<-FILE
|
44
|
+
value(run_cmd("list activities")[:stdout]).must_equal <<-FILE
|
45
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.
|
46
46
|
2015-11-01: Grace Hopper and I went to Marie's Diner. George had to cancel at the last minute. @food
|
47
47
|
2015-01-04: Got lunch with Grace Hopper and George Washington. @food
|
@@ -7,14 +7,16 @@ clean_describe "update" do
|
|
7
7
|
let(:content) { nil }
|
8
8
|
|
9
9
|
it "prints a status message" do
|
10
|
-
subject[:stderr].must_equal ""
|
11
|
-
subject[:status].must_equal 0
|
12
|
-
|
10
|
+
value(subject[:stderr]).must_equal ""
|
11
|
+
value(subject[:status]).must_equal 0
|
12
|
+
value(
|
13
|
+
[/Updated to friends/, /Already up-to-date/].one? { |m| subject[:stdout] =~ m }
|
14
|
+
).must_equal true
|
13
15
|
end
|
14
16
|
|
15
17
|
it "prints the post-install message" do
|
16
|
-
subject[:stderr].must_equal ""
|
17
|
-
subject[:status].must_equal 0
|
18
|
-
subject[:stdout].must_include Friends::POST_INSTALL_MESSAGE
|
18
|
+
value(subject[:stderr]).must_equal ""
|
19
|
+
value(subject[:status]).must_equal 0
|
20
|
+
value(subject[:stdout]).must_include Friends::POST_INSTALL_MESSAGE
|
19
21
|
end
|
20
22
|
end
|
data/test/default_file_spec.rb
CHANGED
@@ -18,14 +18,14 @@ if ENV["TRAVIS"] == "true"
|
|
18
18
|
# https://github.com/JacobEvelyn/friends/issues/231
|
19
19
|
it "creates a new file and adds to it multiple times" do
|
20
20
|
# File does not exist at first.
|
21
|
-
File.exist?(filename).must_equal false
|
21
|
+
value(File.exist?(filename)).must_equal false
|
22
22
|
|
23
23
|
`bundle exec bin/friends add friend Mohandas Karamchand Gandhi`
|
24
24
|
`bundle exec bin/friends add friend Sojourner Truth`
|
25
25
|
`bundle exec bin/friends add activity 1859-11-30: Lunch with **Harriet Tubman** in _Auburn_.`
|
26
26
|
`bundle exec bin/friends add note "1851-05-29: Sojourner Truth's speech"`
|
27
27
|
|
28
|
-
File.read(filename).must_equal <<-FILE
|
28
|
+
value(File.read(filename)).must_equal <<-FILE
|
29
29
|
### Activities:
|
30
30
|
- 1859-11-30: Lunch with **Harriet Tubman** in _Auburn_.
|
31
31
|
|
data/test/helper.rb
CHANGED
@@ -108,35 +108,35 @@ end
|
|
108
108
|
|
109
109
|
def stdout_only(expected)
|
110
110
|
puts subject[:stderr] unless subject[:stderr] == ""
|
111
|
-
subject[:stdout].must_equal ensure_trailing_newline_unless_empty(expected)
|
112
|
-
subject[:stderr].must_equal ""
|
113
|
-
subject[:status].must_equal 0
|
111
|
+
value(subject[:stdout]).must_equal ensure_trailing_newline_unless_empty(expected)
|
112
|
+
value(subject[:stderr]).must_equal ""
|
113
|
+
value(subject[:status]).must_equal 0
|
114
114
|
end
|
115
115
|
|
116
116
|
def stderr_only(expected)
|
117
|
-
subject[:stdout].must_equal ""
|
118
|
-
subject[:stderr].must_equal ensure_trailing_newline_unless_empty(expected)
|
119
|
-
subject[:status].must_be :>, 0
|
117
|
+
value(subject[:stdout]).must_equal ""
|
118
|
+
value(subject[:stderr]).must_equal ensure_trailing_newline_unless_empty(expected)
|
119
|
+
value(subject[:status]).must_be :>, 0
|
120
120
|
end
|
121
121
|
|
122
122
|
def file_equals(expected)
|
123
123
|
subject
|
124
|
-
File.read(filename).must_equal expected
|
124
|
+
value(File.read(filename)).must_equal expected
|
125
125
|
end
|
126
126
|
|
127
127
|
def line_changed(expected_old, expected_new)
|
128
128
|
index = File.read(filename).split("\n").index(expected_old)
|
129
|
-
index.must_be_kind_of Numeric # Not nil, so we know that `expected_old` was found.
|
129
|
+
value(index).must_be_kind_of Numeric # Not nil, so we know that `expected_old` was found.
|
130
130
|
subject
|
131
|
-
File.read(filename).split("\n")[index].must_equal expected_new
|
131
|
+
value(File.read(filename).split("\n")[index]).must_equal expected_new
|
132
132
|
end
|
133
133
|
|
134
134
|
def line_added(expected)
|
135
135
|
n_initial_lines = File.read(filename).split("\n").size
|
136
136
|
subject
|
137
137
|
lines = File.read(filename).split("\n")
|
138
|
-
lines.index(expected).must_be_kind_of Numeric # Not nil, so we know
|
139
|
-
lines.size.must_equal(n_initial_lines + 1) # Line was added, not changed.
|
138
|
+
value(lines.index(expected)).must_be_kind_of Numeric # Not nil, so we know `expected` was found.
|
139
|
+
value(lines.size).must_equal(n_initial_lines + 1) # Line was added, not changed.
|
140
140
|
end
|
141
141
|
|
142
142
|
def clean_describe(desc, &block)
|
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.47'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jacob Evelyn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chronic
|
@@ -86,34 +86,6 @@ dependencies:
|
|
86
86
|
- - "~>"
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '0.11'
|
89
|
-
- !ruby/object:Gem::Dependency
|
90
|
-
name: bundler
|
91
|
-
requirement: !ruby/object:Gem::Requirement
|
92
|
-
requirements:
|
93
|
-
- - ">="
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
version: '1.6'
|
96
|
-
type: :development
|
97
|
-
prerelease: false
|
98
|
-
version_requirements: !ruby/object:Gem::Requirement
|
99
|
-
requirements:
|
100
|
-
- - ">="
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: '1.6'
|
103
|
-
- !ruby/object:Gem::Dependency
|
104
|
-
name: codecov
|
105
|
-
requirement: !ruby/object:Gem::Requirement
|
106
|
-
requirements:
|
107
|
-
- - "~>"
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: 0.1.14
|
110
|
-
type: :development
|
111
|
-
prerelease: false
|
112
|
-
version_requirements: !ruby/object:Gem::Requirement
|
113
|
-
requirements:
|
114
|
-
- - "~>"
|
115
|
-
- !ruby/object:Gem::Version
|
116
|
-
version: 0.1.14
|
117
89
|
- !ruby/object:Gem::Dependency
|
118
90
|
name: minitest
|
119
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -156,20 +128,6 @@ dependencies:
|
|
156
128
|
- - "~>"
|
157
129
|
- !ruby/object:Gem::Version
|
158
130
|
version: '12.3'
|
159
|
-
- !ruby/object:Gem::Dependency
|
160
|
-
name: simplecov
|
161
|
-
requirement: !ruby/object:Gem::Requirement
|
162
|
-
requirements:
|
163
|
-
- - "~>"
|
164
|
-
- !ruby/object:Gem::Version
|
165
|
-
version: '0.14'
|
166
|
-
type: :development
|
167
|
-
prerelease: false
|
168
|
-
version_requirements: !ruby/object:Gem::Requirement
|
169
|
-
requirements:
|
170
|
-
- - "~>"
|
171
|
-
- !ruby/object:Gem::Version
|
172
|
-
version: '0.14'
|
173
131
|
description: Spend time with the people you care about. Introvert-tested. Extrovert-approved.
|
174
132
|
email:
|
175
133
|
- jacobevelyn@gmail.com
|
@@ -188,6 +146,7 @@ files:
|
|
188
146
|
- CHANGELOG.md
|
189
147
|
- CODE_OF_CONDUCT.md
|
190
148
|
- Gemfile
|
149
|
+
- Gemfile.old
|
191
150
|
- LICENSE.txt
|
192
151
|
- README.md
|
193
152
|
- RELEASING.md
|
@@ -271,8 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
271
230
|
- !ruby/object:Gem::Version
|
272
231
|
version: '0'
|
273
232
|
requirements: []
|
274
|
-
|
275
|
-
rubygems_version: 2.6.8
|
233
|
+
rubygems_version: 3.0.3
|
276
234
|
signing_key:
|
277
235
|
specification_version: 4
|
278
236
|
summary: Spend time with the people you care about.
|