hubstats 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.rdoc +13 -3
- data/lib/generators/hubstats/install_generator.rb +2 -2
- data/{config → lib/generators/hubstats}/octokit.example.yml +0 -0
- data/lib/generators/hubstats/octokit.rb +10 -0
- data/lib/hubstats/version.rb +1 -1
- data/test/dummy/config/octokit.yml +1 -1
- metadata +4 -19
- data/test/dummy/tmp/pids/server.pid +0 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
M2UxN2Y5NTM2M2I3NzczNmFkOWM4N2Y1YmY5NWE3ZGZjMDA2YzdkZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YWE1Yzg2Y2ZiODBlNmExMjBlYmMxNTM2ZWM4MzBmNGNiYzg1ODQ1OQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MmFhNjI5YWYxNThjNzM3NWIwMWMzMDFmMTY4MGYwMDgzNzVmZmEzYmIxODM2
|
10
|
+
YmY0OTNiMjc3ODc4MTRjZGY1NjI1Nzg3YWIyMTA4MTdkZWE3YmZmNzlhZTVm
|
11
|
+
M2FlYmQ2ZGJiZGY1ZTdlN2YyNjFmNGJjOTU5OTVjY2MzZTk0Nzc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OTA0ZmM3Y2ZhOGJhNDE2NGY3ZTFkNmU0ZGNjODNhMjAwODdkMjY5ZGM0OGFi
|
14
|
+
MjA3ODNlZWZhMDIyMDQyZDAwY2ExN2JiN2M5OTdiNGYyNDk3NTkyNjVmMmU1
|
15
|
+
Zjc1NTY2OWUwNmMyMWNhYjZmNzE5NzcwNzcyZmEwNTYxZTdhMTI=
|
data/README.rdoc
CHANGED
@@ -3,7 +3,7 @@ Github statistics
|
|
3
3
|
This project rocks and uses MIT-LICENSE.
|
4
4
|
|
5
5
|
= Authentication
|
6
|
-
Hubstats needs github credentials to access your
|
6
|
+
Hubstats needs github credentials to access your repos, these can be setup in one of two ways.
|
7
7
|
== Environment Variables
|
8
8
|
Hubstats uses OAUTH access tokens stored in ENV["GITHUB_API_TOKEN"] or for Application Authentication in ENV["CLIENT_ID"] and ENV["CLIENT_SECRET"]
|
9
9
|
|
@@ -13,7 +13,17 @@ Run rails generate hubstats:install from your app's directory to set it up.
|
|
13
13
|
|
14
14
|
= Configuration
|
15
15
|
Hubstats needs to know what repos for it to watch. You can set it to watch either an entire organization or a list of specific repos.
|
16
|
-
These are set in octokit.yml,
|
16
|
+
These are set in octokit.yml, if you used environment variables for Authentication, you still must generate the octokit.yml using rails generate hubstats:install.
|
17
17
|
|
18
18
|
= Setup
|
19
|
-
Run rake hubstats:
|
19
|
+
Run rake hubstats:install:migrations
|
20
|
+
Run rake hubstats:setup to run the necessary migrations and start pulling data from github.
|
21
|
+
Add 'mount Hubstats::Engine => "/hubstats"' to your apps routes file
|
22
|
+
|
23
|
+
|
24
|
+
=TL:DR
|
25
|
+
-rails generate hubstats:install
|
26
|
+
-add oauth tokens and repos to watch to octokit.yml
|
27
|
+
-rake hubstats:install:migrations
|
28
|
+
-rake hubstats:setup
|
29
|
+
-Add 'mount Hubstats::Engine => "/hubstats"' to your routes file
|
@@ -1,10 +1,10 @@
|
|
1
1
|
module Hubstats
|
2
2
|
class InstallGenerator < ::Rails::Generators::Base
|
3
3
|
|
4
|
-
source_root File.expand_path('
|
5
|
-
|
4
|
+
source_root File.expand_path('../', __FILE__)
|
6
5
|
def octokit_initializer
|
7
6
|
copy_file "octokit.example.yml", "#{Rails.root}/config/octokit.yml"
|
7
|
+
copy_file "octokit.rb", "#{Rails.root}/config/initializers/octokit.rb"
|
8
8
|
end
|
9
9
|
|
10
10
|
end
|
File without changes
|
@@ -0,0 +1,10 @@
|
|
1
|
+
if Pathname("#{Rails.root}/config/octokit.yml").exist?
|
2
|
+
octo = YAML.load_file("#{Rails.root}/config/octokit.yml").with_indifferent_access
|
3
|
+
if (octo[:config].has_key?(:org_name) || octo[:config].has_key?(:repo_list))
|
4
|
+
OCTOCONF = octo[:config]
|
5
|
+
else
|
6
|
+
raise "Must include repos or organization to watch"
|
7
|
+
end
|
8
|
+
|
9
|
+
Hubstats::GithubAPI.configure(octo[:auth])
|
10
|
+
end
|
data/lib/hubstats/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hubstats
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elliot Hursh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -38,20 +38,6 @@ dependencies:
|
|
38
38
|
- - ! '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: sqlite3
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ! '>='
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ! '>='
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: rspec-rails
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -148,13 +134,14 @@ files:
|
|
148
134
|
- app/views/hubstats/users/index.html.erb
|
149
135
|
- app/views/hubstats/users/show.html.erb
|
150
136
|
- app/views/layouts/hubstats/application.html.erb
|
151
|
-
- config/octokit.example.yml
|
152
137
|
- config/routes.rb
|
153
138
|
- db/migrate/20140604130339_create_hubstats_pull_requests.rb
|
154
139
|
- db/migrate/20140604130457_create_hubstats_users.rb
|
155
140
|
- db/migrate/20140604130504_create_hubstats_comments.rb
|
156
141
|
- db/migrate/20140604130550_create_hubstats_repos.rb
|
157
142
|
- lib/generators/hubstats/install_generator.rb
|
143
|
+
- lib/generators/hubstats/octokit.example.yml
|
144
|
+
- lib/generators/hubstats/octokit.rb
|
158
145
|
- lib/hubstats.rb
|
159
146
|
- lib/hubstats/engine.rb
|
160
147
|
- lib/hubstats/events_handler.rb
|
@@ -305,7 +292,6 @@ files:
|
|
305
292
|
- test/dummy/tmp/cache/assets/E37/920/sprockets%2Fdecfac8e297916ee0fd0b3ac3ec9b478
|
306
293
|
- test/dummy/tmp/cache/assets/E47/EB0/sprockets%2F76ebce7bcd98e7b75ef79eec62bb9c31
|
307
294
|
- test/dummy/tmp/cache/assets/E56/230/sprockets%2F58da9342a714fbced3dd9cab5dae22bf
|
308
|
-
- test/dummy/tmp/pids/server.pid
|
309
295
|
- test/functional/hubstats/splash_controller_test.rb
|
310
296
|
- test/hubstats_test.rb
|
311
297
|
- test/integration/navigation_test.rb
|
@@ -478,7 +464,6 @@ test_files:
|
|
478
464
|
- test/dummy/tmp/cache/assets/E37/920/sprockets%2Fdecfac8e297916ee0fd0b3ac3ec9b478
|
479
465
|
- test/dummy/tmp/cache/assets/E47/EB0/sprockets%2F76ebce7bcd98e7b75ef79eec62bb9c31
|
480
466
|
- test/dummy/tmp/cache/assets/E56/230/sprockets%2F58da9342a714fbced3dd9cab5dae22bf
|
481
|
-
- test/dummy/tmp/pids/server.pid
|
482
467
|
- test/functional/hubstats/splash_controller_test.rb
|
483
468
|
- test/hubstats_test.rb
|
484
469
|
- test/integration/navigation_test.rb
|
@@ -1 +0,0 @@
|
|
1
|
-
9570
|