githubstats 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/LICENSE +1 -1
- data/README.md +6 -5
- data/githubstats.gemspec +1 -1
- data/lib/githubstats.rb +0 -2
- data/lib/githubstats/data.rb +10 -7
- metadata +2 -33
- data/Gemfile.lock +0 -77
- data/vendor/cache/ast-1.1.0.gem +0 -0
- data/vendor/cache/basiccache-0.0.29.gem +0 -0
- data/vendor/cache/coveralls-0.7.0.gem +0 -0
- data/vendor/cache/curb-0.8.5.gem +0 -0
- data/vendor/cache/diff-lcs-1.2.5.gem +0 -0
- data/vendor/cache/docile-1.1.1.gem +0 -0
- data/vendor/cache/fuubar-1.3.2.gem +0 -0
- data/vendor/cache/hashr-0.0.22.gem +0 -0
- data/vendor/cache/json-1.8.1.gem +0 -0
- data/vendor/cache/mime-types-2.0.gem +0 -0
- data/vendor/cache/multi_json-1.8.2.gem +0 -0
- data/vendor/cache/parser-2.1.2.gem +0 -0
- data/vendor/cache/powerpack-0.0.9.gem +0 -0
- data/vendor/cache/rainbow-1.99.1.gem +0 -0
- data/vendor/cache/rake-10.1.1.gem +0 -0
- data/vendor/cache/rest-client-1.6.7.gem +0 -0
- data/vendor/cache/rspec-2.14.1.gem +0 -0
- data/vendor/cache/rspec-core-2.14.7.gem +0 -0
- data/vendor/cache/rspec-expectations-2.14.4.gem +0 -0
- data/vendor/cache/rspec-mocks-2.14.4.gem +0 -0
- data/vendor/cache/rubocop-0.16.0.gem +0 -0
- data/vendor/cache/ruby-progressbar-1.4.0.gem +0 -0
- data/vendor/cache/simplecov-0.8.2.gem +0 -0
- data/vendor/cache/simplecov-html-0.8.0.gem +0 -0
- data/vendor/cache/slop-3.4.7.gem +0 -0
- data/vendor/cache/term-ansicolor-1.2.2.gem +0 -0
- data/vendor/cache/thor-0.18.1.gem +0 -0
- data/vendor/cache/timecop-0.7.1.gem +0 -0
- data/vendor/cache/tins-0.13.1.gem +0 -0
- data/vendor/cache/travis-lint-1.7.0.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f048fa1050eaeced997fab55246044442b89bb99
|
4
|
+
data.tar.gz: 31dc4d874e769a58581c7f399b1ab144ad3f87cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72068389a925a86268169e0ed45a0e6165a80f3e86a89a0f9b3cce933d70e1fab9b841d24dfbcb3897cdc1d29e455269b34608794c9615599e9fa030d53d78fd
|
7
|
+
data.tar.gz: 36fecf9a36365e48e3494f27da1dfb345c1b97cdc247db002746cc47da2c99cc5e21c615847672b9760ba0319f184438a1dfcb879cb059cc016d23405346665d
|
data/.gitignore
CHANGED
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
GithubStats
|
2
2
|
=========
|
3
3
|
|
4
|
-
[![Gem Version](https://
|
5
|
-
[![Dependency Status](https://
|
6
|
-
[![Code Climate](https://
|
7
|
-
[![Coverage Status](https://
|
8
|
-
[![Build Status](https://
|
4
|
+
[![Gem Version](https://img.shields.io/gem/v/githubstats.svg)](https://rubygems.org/gems/githubstats)
|
5
|
+
[![Dependency Status](https://img.shields.io/gemnasium/akerl/githubstats.svg)](https://gemnasium.com/akerl/githubstats)
|
6
|
+
[![Code Climate](https://img.shields.io/codeclimate/github/akerl/githubstats.svg)](https://codeclimate.com/github/akerl/githubstats)
|
7
|
+
[![Coverage Status](https://img.shields.io/coveralls/akerl/githubstats.svg)](https://coveralls.io/r/akerl/githubstats)
|
8
|
+
[![Build Status](https://img.shields.io/travis/akerl/githubstats.svg)](https://travis-ci.org/akerl/githubstats)
|
9
|
+
[![MIT Licensed](https://img.shields.io/badge/license-MIT-green.svg)](https://tldrlegal.com/license/mit-license)
|
9
10
|
|
10
11
|
Grabs Github contribution statistics and presents it in an easily consumable format.
|
11
12
|
|
data/githubstats.gemspec
CHANGED
data/lib/githubstats.rb
CHANGED
@@ -13,7 +13,6 @@ end
|
|
13
13
|
|
14
14
|
##
|
15
15
|
# Definitions of user objects for GithubStats
|
16
|
-
|
17
16
|
module GithubStats
|
18
17
|
##
|
19
18
|
# Helper method for creating new user objects
|
@@ -29,7 +28,6 @@ module GithubStats
|
|
29
28
|
|
30
29
|
##
|
31
30
|
# User object
|
32
|
-
|
33
31
|
class User
|
34
32
|
attr_reader :name, :url, :data, :last_updated
|
35
33
|
|
data/lib/githubstats/data.rb
CHANGED
@@ -3,7 +3,6 @@ require 'date'
|
|
3
3
|
|
4
4
|
##
|
5
5
|
# Definition of data objects for GithubStats
|
6
|
-
|
7
6
|
module GithubStats
|
8
7
|
##
|
9
8
|
# This is the magic constant used for determining outliers
|
@@ -17,7 +16,6 @@ module GithubStats
|
|
17
16
|
|
18
17
|
##
|
19
18
|
# Data class for calculations
|
20
|
-
|
21
19
|
class Data
|
22
20
|
##
|
23
21
|
# MethodCacher provides computation caching
|
@@ -152,12 +150,17 @@ module GithubStats
|
|
152
150
|
# Pad the dataset to full week increments
|
153
151
|
|
154
152
|
def pad(fill_value = -1, data = @raw.clone)
|
153
|
+
data = _pad data, 0, fill_value, 0
|
154
|
+
_pad data, -1, fill_value, 6
|
155
|
+
end
|
156
|
+
|
157
|
+
private
|
158
|
+
|
159
|
+
def _pad(data, index, fill_value, goal)
|
160
|
+
mod = index * -2 - 1 # 0 index moves -1 in time, -1 move +1 in time
|
155
161
|
point = GithubStats::Datapoint
|
156
|
-
until data.
|
157
|
-
data.
|
158
|
-
end
|
159
|
-
until data.last.date.wday == 6
|
160
|
-
data << point.new(data.last.date + 1, fill_value)
|
162
|
+
until data[index].date.wday == goal
|
163
|
+
data.insert index, point.new(data[index].date + mod, fill_value)
|
161
164
|
end
|
162
165
|
data
|
163
166
|
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.
|
4
|
+
version: 0.2.7
|
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-
|
11
|
+
date: 2014-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curb
|
@@ -177,7 +177,6 @@ files:
|
|
177
177
|
- ".rubocop.yml"
|
178
178
|
- ".travis.yml"
|
179
179
|
- Gemfile
|
180
|
-
- Gemfile.lock
|
181
180
|
- LICENSE
|
182
181
|
- README.md
|
183
182
|
- Rakefile
|
@@ -194,36 +193,6 @@ files:
|
|
194
193
|
- spec/githubstats/data_spec.rb
|
195
194
|
- spec/githubstats_spec.rb
|
196
195
|
- spec/spec_helper.rb
|
197
|
-
- vendor/cache/ast-1.1.0.gem
|
198
|
-
- vendor/cache/basiccache-0.0.29.gem
|
199
|
-
- vendor/cache/coveralls-0.7.0.gem
|
200
|
-
- vendor/cache/curb-0.8.5.gem
|
201
|
-
- vendor/cache/diff-lcs-1.2.5.gem
|
202
|
-
- vendor/cache/docile-1.1.1.gem
|
203
|
-
- vendor/cache/fuubar-1.3.2.gem
|
204
|
-
- vendor/cache/hashr-0.0.22.gem
|
205
|
-
- vendor/cache/json-1.8.1.gem
|
206
|
-
- vendor/cache/mime-types-2.0.gem
|
207
|
-
- vendor/cache/multi_json-1.8.2.gem
|
208
|
-
- vendor/cache/parser-2.1.2.gem
|
209
|
-
- vendor/cache/powerpack-0.0.9.gem
|
210
|
-
- vendor/cache/rainbow-1.99.1.gem
|
211
|
-
- vendor/cache/rake-10.1.1.gem
|
212
|
-
- vendor/cache/rest-client-1.6.7.gem
|
213
|
-
- vendor/cache/rspec-2.14.1.gem
|
214
|
-
- vendor/cache/rspec-core-2.14.7.gem
|
215
|
-
- vendor/cache/rspec-expectations-2.14.4.gem
|
216
|
-
- vendor/cache/rspec-mocks-2.14.4.gem
|
217
|
-
- vendor/cache/rubocop-0.16.0.gem
|
218
|
-
- vendor/cache/ruby-progressbar-1.4.0.gem
|
219
|
-
- vendor/cache/simplecov-0.8.2.gem
|
220
|
-
- vendor/cache/simplecov-html-0.8.0.gem
|
221
|
-
- vendor/cache/slop-3.4.7.gem
|
222
|
-
- vendor/cache/term-ansicolor-1.2.2.gem
|
223
|
-
- vendor/cache/thor-0.18.1.gem
|
224
|
-
- vendor/cache/timecop-0.7.1.gem
|
225
|
-
- vendor/cache/tins-0.13.1.gem
|
226
|
-
- vendor/cache/travis-lint-1.7.0.gem
|
227
196
|
homepage: https://github.com/akerl/githubstats
|
228
197
|
licenses:
|
229
198
|
- MIT
|
data/Gemfile.lock
DELETED
@@ -1,77 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
githubstats (0.2.6)
|
5
|
-
basiccache
|
6
|
-
curb
|
7
|
-
json
|
8
|
-
|
9
|
-
GEM
|
10
|
-
remote: https://rubygems.org/
|
11
|
-
specs:
|
12
|
-
ast (1.1.0)
|
13
|
-
basiccache (0.0.29)
|
14
|
-
coveralls (0.7.0)
|
15
|
-
multi_json (~> 1.3)
|
16
|
-
rest-client
|
17
|
-
simplecov (>= 0.7)
|
18
|
-
term-ansicolor
|
19
|
-
thor
|
20
|
-
curb (0.8.5)
|
21
|
-
diff-lcs (1.2.5)
|
22
|
-
docile (1.1.1)
|
23
|
-
fuubar (1.3.2)
|
24
|
-
rspec (>= 2.14.0, < 3.1.0)
|
25
|
-
ruby-progressbar (~> 1.3)
|
26
|
-
hashr (0.0.22)
|
27
|
-
json (1.8.1)
|
28
|
-
mime-types (2.0)
|
29
|
-
multi_json (1.8.2)
|
30
|
-
parser (2.1.2)
|
31
|
-
ast (~> 1.1)
|
32
|
-
slop (~> 3.4, >= 3.4.5)
|
33
|
-
powerpack (0.0.9)
|
34
|
-
rainbow (1.99.1)
|
35
|
-
rake (10.1.1)
|
36
|
-
rest-client (1.6.7)
|
37
|
-
mime-types (>= 1.16)
|
38
|
-
rspec (2.14.1)
|
39
|
-
rspec-core (~> 2.14.0)
|
40
|
-
rspec-expectations (~> 2.14.0)
|
41
|
-
rspec-mocks (~> 2.14.0)
|
42
|
-
rspec-core (2.14.7)
|
43
|
-
rspec-expectations (2.14.4)
|
44
|
-
diff-lcs (>= 1.1.3, < 2.0)
|
45
|
-
rspec-mocks (2.14.4)
|
46
|
-
rubocop (0.16.0)
|
47
|
-
parser (~> 2.1)
|
48
|
-
powerpack (~> 0.0.6)
|
49
|
-
rainbow (>= 1.1.4)
|
50
|
-
ruby-progressbar (1.4.0)
|
51
|
-
simplecov (0.8.2)
|
52
|
-
docile (~> 1.1.0)
|
53
|
-
multi_json
|
54
|
-
simplecov-html (~> 0.8.0)
|
55
|
-
simplecov-html (0.8.0)
|
56
|
-
slop (3.4.7)
|
57
|
-
term-ansicolor (1.2.2)
|
58
|
-
tins (~> 0.8)
|
59
|
-
thor (0.18.1)
|
60
|
-
timecop (0.7.1)
|
61
|
-
tins (0.13.1)
|
62
|
-
travis-lint (1.7.0)
|
63
|
-
hashr (~> 0.0.22)
|
64
|
-
|
65
|
-
PLATFORMS
|
66
|
-
ruby
|
67
|
-
|
68
|
-
DEPENDENCIES
|
69
|
-
coveralls
|
70
|
-
fuubar
|
71
|
-
githubstats!
|
72
|
-
parser
|
73
|
-
rake
|
74
|
-
rspec
|
75
|
-
rubocop
|
76
|
-
timecop
|
77
|
-
travis-lint
|
data/vendor/cache/ast-1.1.0.gem
DELETED
Binary file
|
Binary file
|
Binary file
|
data/vendor/cache/curb-0.8.5.gem
DELETED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/vendor/cache/json-1.8.1.gem
DELETED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/vendor/cache/slop-3.4.7.gem
DELETED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|