friends 0.6 → 0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 570271cf143a70ffed2baed973616dfb679dad6b
4
- data.tar.gz: 56a32772b4ff4551c18d306bc41ef1d6234a4855
3
+ metadata.gz: 31207f725992ac7187316680df58868b100dc206
4
+ data.tar.gz: 15bffe0f9b8b706f0bb671b82e9fbd9dc73916bb
5
5
  SHA512:
6
- metadata.gz: e50211fd64ad03a931371fe59f68c811e3a23f21f0da3a8bb7cdc15cc1d126ac0494546fd595bcf7e629af17d5347e90ef8c295f168f92c1d3afb74ba04d3270
7
- data.tar.gz: 10b654ee04a93f7fe65cf15a892b7bbd5c73e13a1ae33d15f020511a064f8a533432787307d4a09d013e047af50e5d60b432037d6babf00110db6302d3af2323
6
+ metadata.gz: 19450d3a00b67d617644fcffb4834222fefb195b8388e0334a89886e6fea06e220b8204e8be7c9406fe939c62b2c61696f62e4d90fd480a3779b1013912947d4
7
+ data.tar.gz: ac9e03e6871c202fdfc53377d12678ee41ecf63d144d49d977dd1e31773e3b257a41e87e3f0e6e28c84874b6f1ddb47ca5d810a9a788ef66e3d4ba3cd2c7c4a2
@@ -0,0 +1,77 @@
1
+ # Change Log
2
+
3
+ ## [v0.7](https://github.com/JacobEvelyn/friends/tree/v0.7) (2016-01-05)
4
+ [Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.6...v0.7)
5
+
6
+ **Fixed bugs:**
7
+
8
+ - Error: undefined method `n\_activities' for nil:NilClass [\#44](https://github.com/JacobEvelyn/friends/issues/44)
9
+ - Documentation link doesn't work [\#43](https://github.com/JacobEvelyn/friends/issues/43)
10
+
11
+ **Merged pull requests:**
12
+
13
+ - Fix `suggest` command for low number of friends [\#48](https://github.com/JacobEvelyn/friends/pull/48) ([JacobEvelyn](https://github.com/JacobEvelyn))
14
+ - Update README URLs based on HTTP redirects [\#46](https://github.com/JacobEvelyn/friends/pull/46) ([ReadmeCritic](https://github.com/ReadmeCritic))
15
+
16
+ ## [v0.6](https://github.com/JacobEvelyn/friends/tree/v0.6) (2016-01-03)
17
+ [Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.5...v0.6)
18
+
19
+ **Merged pull requests:**
20
+
21
+ - Test versions [\#41](https://github.com/JacobEvelyn/friends/pull/41) ([JacobEvelyn](https://github.com/JacobEvelyn))
22
+
23
+ ## [v0.5](https://github.com/JacobEvelyn/friends/tree/v0.5) (2016-01-03)
24
+ [Full Changelog](https://github.com/JacobEvelyn/friends/compare/v0.4...v0.5)
25
+
26
+ **Fixed bugs:**
27
+
28
+ - Activities added on the same day have their order reversed [\#37](https://github.com/JacobEvelyn/friends/issues/37)
29
+
30
+ **Merged pull requests:**
31
+
32
+ - Make activities on same day chronologically ordered [\#38](https://github.com/JacobEvelyn/friends/pull/38) ([JacobEvelyn](https://github.com/JacobEvelyn))
33
+
34
+ ## [v0.4](https://github.com/JacobEvelyn/friends/tree/v0.4) (2015-11-14)
35
+ **Implemented enhancements:**
36
+
37
+ - Be able to enter activity with normal prompt [\#34](https://github.com/JacobEvelyn/friends/issues/34)
38
+ - Add confirmation after commands \(and --quiet\) [\#28](https://github.com/JacobEvelyn/friends/issues/28)
39
+ - Have activity dates default to today if none provided [\#27](https://github.com/JacobEvelyn/friends/issues/27)
40
+ - Create file if none exists [\#25](https://github.com/JacobEvelyn/friends/issues/25)
41
+ - Add more detailed usage example to README. [\#23](https://github.com/JacobEvelyn/friends/issues/23)
42
+ - Have robustness around name extraction from activities [\#21](https://github.com/JacobEvelyn/friends/issues/21)
43
+ - Put activities before friends in friends.md [\#20](https://github.com/JacobEvelyn/friends/issues/20)
44
+ - Friend name lookups should be case-insensitive [\#18](https://github.com/JacobEvelyn/friends/issues/18)
45
+ - Friends should be able to have nicknames [\#17](https://github.com/JacobEvelyn/friends/issues/17)
46
+ - Add ability to change friend name [\#16](https://github.com/JacobEvelyn/friends/issues/16)
47
+ - Add link to RubyDoc in README [\#12](https://github.com/JacobEvelyn/friends/issues/12)
48
+ - Release to RubyGems [\#10](https://github.com/JacobEvelyn/friends/issues/10)
49
+ - Auto-update? [\#8](https://github.com/JacobEvelyn/friends/issues/8)
50
+ - Gracefully handle friend name conflicts in all commands [\#7](https://github.com/JacobEvelyn/friends/issues/7)
51
+ - Be able to list activities [\#6](https://github.com/JacobEvelyn/friends/issues/6)
52
+ - Be able to add activities [\#5](https://github.com/JacobEvelyn/friends/issues/5)
53
+ - Be able to add new friends [\#4](https://github.com/JacobEvelyn/friends/issues/4)
54
+ - Respect params for new file location [\#3](https://github.com/JacobEvelyn/friends/issues/3)
55
+ - Comment all classes and methods \(YARD\) [\#2](https://github.com/JacobEvelyn/friends/issues/2)
56
+ - Add more test coverage [\#1](https://github.com/JacobEvelyn/friends/issues/1)
57
+
58
+ **Merged pull requests:**
59
+
60
+ - Bump version to 0.0.3 [\#33](https://github.com/JacobEvelyn/friends/pull/33) ([JacobEvelyn](https://github.com/JacobEvelyn))
61
+ - Allow limiting of activity lists [\#32](https://github.com/JacobEvelyn/friends/pull/32) ([JacobEvelyn](https://github.com/JacobEvelyn))
62
+ - Improve friend matching code [\#31](https://github.com/JacobEvelyn/friends/pull/31) ([JacobEvelyn](https://github.com/JacobEvelyn))
63
+ - Improve documentation [\#30](https://github.com/JacobEvelyn/friends/pull/30) ([JacobEvelyn](https://github.com/JacobEvelyn))
64
+ - Add confirm messages and --quiet switch [\#29](https://github.com/JacobEvelyn/friends/pull/29) ([JacobEvelyn](https://github.com/JacobEvelyn))
65
+ - Put activities above friends in file [\#26](https://github.com/JacobEvelyn/friends/pull/26) ([JacobEvelyn](https://github.com/JacobEvelyn))
66
+ - Make friend matching case-insensitive. [\#24](https://github.com/JacobEvelyn/friends/pull/24) ([JacobEvelyn](https://github.com/JacobEvelyn))
67
+ - Basic add-activity feature in place [\#22](https://github.com/JacobEvelyn/friends/pull/22) ([JacobEvelyn](https://github.com/JacobEvelyn))
68
+ - Feature/list activities [\#19](https://github.com/JacobEvelyn/friends/pull/19) ([JacobEvelyn](https://github.com/JacobEvelyn))
69
+ - Switch from Thor to GLI [\#15](https://github.com/JacobEvelyn/friends/pull/15) ([JacobEvelyn](https://github.com/JacobEvelyn))
70
+ - Add more Introvert tests and command-line arg handling [\#14](https://github.com/JacobEvelyn/friends/pull/14) ([JacobEvelyn](https://github.com/JacobEvelyn))
71
+ - Ignore gem files [\#13](https://github.com/JacobEvelyn/friends/pull/13) ([JacobEvelyn](https://github.com/JacobEvelyn))
72
+ - Clean up gemspec dependencies [\#11](https://github.com/JacobEvelyn/friends/pull/11) ([JacobEvelyn](https://github.com/JacobEvelyn))
73
+ - Clean up README [\#9](https://github.com/JacobEvelyn/friends/pull/9) ([JacobEvelyn](https://github.com/JacobEvelyn))
74
+
75
+
76
+
77
+ \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
@@ -0,0 +1,50 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, and in the interest of
4
+ fostering an open and welcoming community, we pledge to respect all people who
5
+ contribute through reporting issues, posting feature requests, updating
6
+ documentation, submitting pull requests or patches, and other activities.
7
+
8
+ We are committed to making participation in this project a harassment-free
9
+ experience for everyone, regardless of level of experience, gender, gender
10
+ identity and expression, sexual orientation, disability, personal appearance,
11
+ body size, race, ethnicity, age, religion, or nationality.
12
+
13
+ Examples of unacceptable behavior by participants include:
14
+
15
+ * The use of sexualized language or imagery
16
+ * Personal attacks
17
+ * Trolling or insulting/derogatory comments
18
+ * Public or private harassment
19
+ * Publishing other's private information, such as physical or electronic
20
+ addresses, without explicit permission
21
+ * Other unethical or unprofessional conduct
22
+
23
+ Project maintainers have the right and responsibility to remove, edit, or
24
+ reject comments, commits, code, wiki edits, issues, and other contributions
25
+ that are not aligned to this Code of Conduct, or to ban temporarily or
26
+ permanently any contributor for other behaviors that they deem inappropriate,
27
+ threatening, offensive, or harmful.
28
+
29
+ By adopting this Code of Conduct, project maintainers commit themselves to
30
+ fairly and consistently applying these principles to every aspect of managing
31
+ this project. Project maintainers who do not follow or enforce the Code of
32
+ Conduct may be permanently removed from the project team.
33
+
34
+ This Code of Conduct applies both within project spaces and in public spaces
35
+ when an individual is representing the project or its community.
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
38
+ reported by contacting a project maintainer at [INSERT EMAIL ADDRESS]. All
39
+ complaints will be reviewed and investigated and will result in a response that
40
+ is deemed necessary and appropriate to the circumstances. Maintainers are
41
+ obligated to maintain confidentiality with regard to the reporter of an
42
+ incident.
43
+
44
+
45
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
46
+ version 1.3.0, available at
47
+ [http://contributor-covenant.org/version/1/3/0/][version]
48
+
49
+ [homepage]: http://contributor-covenant.org
50
+ [version]: http://contributor-covenant.org/version/1/3/0/
data/README.md CHANGED
@@ -178,7 +178,7 @@ $ friends list activities --help
178
178
  ## Documentation
179
179
 
180
180
  In case you're *really* interested, we have
181
- [documentation](http://www.rubydoc.info/JacobEvelyn/friends).
181
+ [documentation](http://www.rubydoc.info/github/JacobEvelyn/friends).
182
182
 
183
183
  ## Contributing
184
184
 
@@ -195,7 +195,7 @@ quickly. And if you'd like to do the implementing yourself:
195
195
 
196
196
  **Make sure your changes have appropriate tests (`rake test`) and
197
197
  conform to the Rubocop style specified. This project uses
198
- [overcommit](https://github.com/causes/overcommit) to enforce good
198
+ [overcommit](https://github.com/brigade/overcommit) to enforce good
199
199
  code.**
200
200
 
201
201
  ## License
@@ -159,10 +159,11 @@ command :suggest do |suggest|
159
159
  suggestions = @introvert.suggest
160
160
 
161
161
  puts "Distant friend: "\
162
- "#{Paint[suggestions[:distant].sample, :bold, :magenta]}"
162
+ "#{Paint[suggestions[:distant].sample || 'None found', :bold, :magenta]}"
163
163
  puts "Moderate friend: "\
164
- "#{Paint[suggestions[:moderate].sample, :bold, :magenta]}"
165
- puts "Close friend: #{Paint[suggestions[:close].sample, :bold, :magenta]}"
164
+ "#{Paint[suggestions[:moderate].sample || 'None found', :bold, :magenta]}"
165
+ puts "Close friend: "\
166
+ "#{Paint[suggestions[:close].sample || 'None found', :bold, :magenta]}"
166
167
  end
167
168
  end
168
169
 
@@ -188,8 +188,12 @@ module Friends
188
188
 
189
189
  output = Hash.new { |h, k| h[k] = [] }
190
190
 
191
+ # Set initial value in case there are no friends and the while loop is
192
+ # never entered.
193
+ output[:distant] = []
194
+
191
195
  # First, get not-so-good friends.
192
- while sorted_friends.first.n_activities < 2
196
+ while !sorted_friends.empty? && sorted_friends.first.n_activities < 2
193
197
  output[:distant] << sorted_friends.shift.name
194
198
  end
195
199
 
@@ -1,3 +1,3 @@
1
1
  module Friends
2
- VERSION = "0.6"
2
+ VERSION = "0.7"
3
3
  end
@@ -300,6 +300,18 @@ describe Friends::Introvert do
300
300
  end
301
301
  end
302
302
  end
303
+
304
+ it "doesn't choke when there are no friends" do
305
+ stub_friends([]) do
306
+ stub_activities([]) do
307
+ subject.must_equal(
308
+ distant: [],
309
+ moderate: [],
310
+ close: []
311
+ )
312
+ end
313
+ end
314
+ end
303
315
  end
304
316
 
305
317
  describe "#graph" do
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.6'
4
+ version: '0.7'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jacob Evelyn
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-03 00:00:00.000000000 Z
11
+ date: 2016-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gli
@@ -121,6 +121,8 @@ files:
121
121
  - ".rubocop.yml"
122
122
  - ".ruby-version"
123
123
  - ".travis.yml"
124
+ - CHANGELOG.md
125
+ - CODE_OF_CONDUCT.md
124
126
  - Gemfile
125
127
  - LICENSE.txt
126
128
  - README.md