githubstats 0.2.11 → 0.2.12

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: cb8ef76596226769178ec449463ee6c33323db3c
4
- data.tar.gz: 3c334d28466c0be1381a6c0d806a49dd070c5f41
3
+ metadata.gz: c3ccae06472947c9c150cad5223f0321f6840964
4
+ data.tar.gz: 6979d5968d6dcc5222ca8c29d5a21d5aad94e609
5
5
  SHA512:
6
- metadata.gz: 22996177e8247b09befb2d531842016cc07d4dfdada2d90942ad4c1f8c0cd67083b1d5a176abc617155161f9c2a9c2d00ede3f63649223d83297dd7777457488
7
- data.tar.gz: cc470e53d95684f3bca845a66a60b61a265283ff71bce7dbd2bcf46b22b4ec7f052d36fbbb83c0ac3fc74ac040994c6c9b2585803ced01b6136a818f572d15e1
6
+ metadata.gz: b8af7498a704f76c9db58e65c2f42e7b69e543f62363c1b5fafe1dd0b3b120e1b945f6b92a3c940d131c6a166a5669f49ab7d235a975484b34c0d6f33871f049
7
+ data.tar.gz: 92d954c75aed7d68a8713e0c1c64b4696b14fce82dd54cbce9ebec05561663817501857ada2d7f3387d2040a1d47b3e1bc8502ffe34450e50c47d5a1f154c687
data/.travis.yml CHANGED
@@ -1,6 +1,8 @@
1
1
  language: ruby
2
2
  cache: bundler
3
3
  rvm:
4
+ - 2.1.2
5
+ - 2.1.1
4
6
  - 2.1.0
5
7
  - 2.0.0
6
8
  - 1.9.3
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ desc 'Run tests'
6
6
  RSpec::Core::RakeTask.new(:spec)
7
7
 
8
8
  desc 'Run Rubocop on the gem'
9
- Rubocop::RakeTask.new(:rubocop) do |task|
9
+ RuboCop::RakeTask.new(:rubocop) do |task|
10
10
  task.patterns = ['lib/**/*.rb', 'spec/**/*.rb']
11
11
  task.fail_on_error = true
12
12
  end
data/bin/githubstats CHANGED
@@ -1,6 +1,11 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'githubstats'
4
+ require 'optparse'
5
+
6
+ opt = OptionParser.new do |opts|
7
+ opts.banner = 'Usage: githubstats [-h] [USER]'
8
+ end.parse!
4
9
 
5
10
  user = GithubStats.new ARGV.first
6
11
 
data/githubstats.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'githubstats'
3
- s.version = '0.2.11'
3
+ s.version = '0.2.12'
4
4
  s.date = Time.now.strftime("%Y-%m-%d")
5
5
 
6
6
  s.summary = 'Present Github contributions stats in a consumable format'
@@ -18,9 +18,9 @@ Gem::Specification.new do |s|
18
18
  s.add_runtime_dependency 'basiccache', '~> 0.1.0'
19
19
 
20
20
  s.add_development_dependency 'timecop', '~> 0.7.1'
21
- s.add_development_dependency 'rubocop', '~> 0.20.1'
22
- s.add_development_dependency 'rake', '~> 10.3.0'
21
+ s.add_development_dependency 'rubocop', '~> 0.24.0'
22
+ s.add_development_dependency 'rake', '~> 10.3.2'
23
23
  s.add_development_dependency 'coveralls', '~> 0.7.0'
24
- s.add_development_dependency 'rspec', '~> 2.14.1'
25
- s.add_development_dependency 'fuubar', '~> 1.3.2'
24
+ s.add_development_dependency 'rspec', '~> 3.0.0'
25
+ s.add_development_dependency 'fuubar', '~> 2.0.0.rc1'
26
26
  end
@@ -66,9 +66,8 @@ module GithubStats
66
66
  # All streaks for a user
67
67
 
68
68
  def streaks
69
- streaks = @raw.reduce(Array.new(1, [])) do |acc, point|
69
+ streaks = @raw.each_with_object(Array.new(1, [])) do |point, acc|
70
70
  point.score == 0 ? acc << [] : acc.last << point
71
- acc
72
71
  end
73
72
  streaks.reject! { |s| s.empty? }
74
73
  streaks
@@ -60,9 +60,9 @@ describe GithubStats do
60
60
  end
61
61
 
62
62
  it 'truthfully handles respond_to? queries' do
63
- expect(named_user.respond_to? :to_s).to be_true
64
- expect(named_user.respond_to? :today).to be_true
65
- expect(named_user.respond_to? :abcd).to be_false
63
+ expect(named_user.respond_to? :to_s).to be_truthy
64
+ expect(named_user.respond_to? :today).to be_truthy
65
+ expect(named_user.respond_to? :abcd).to be_falsey
66
66
  end
67
67
  end
68
68
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: githubstats
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.11
4
+ version: 0.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Les Aker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-17 00:00:00.000000000 Z
11
+ date: 2014-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: curb
@@ -58,28 +58,28 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.20.1
61
+ version: 0.24.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.20.1
68
+ version: 0.24.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 10.3.0
75
+ version: 10.3.2
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 10.3.0
82
+ version: 10.3.2
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: coveralls
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -100,28 +100,28 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 2.14.1
103
+ version: 3.0.0
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 2.14.1
110
+ version: 3.0.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: fuubar
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 1.3.2
117
+ version: 2.0.0.rc1
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 1.3.2
124
+ version: 2.0.0.rc1
125
125
  description: Pulls the statistics from Github's user contribution chart and provides
126
126
  an interface for analyzing that data
127
127
  email: me@lesaker.org
@@ -189,3 +189,4 @@ test_files:
189
189
  - spec/githubstats/data_spec.rb
190
190
  - spec/githubstats_spec.rb
191
191
  - spec/spec_helper.rb
192
+ has_rdoc: