hubstats 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- M2JhYzkwN2YzYTZjMWJkZDA3N2JiMjI5MDFhM2VmNDg5ZjdjMjhhNQ==
4
+ MmUzYjI5MzkzYWQxMDk0MTIxNGMyZjI5MGZiYTY3M2U3MjM3ZDlhZg==
5
5
  data.tar.gz: !binary |-
6
- YmU5YWU3ZDllNzNjYjE3NDAxZWQ4YjRmZDFkOGM1ZTQ3NmVlNTJiOA==
6
+ NDFlNTIwYjY2ZmQyY2M0Y2VlMjlmZWJkNTJkMDlmYzExNDM0NDBlYg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NmM5NzFkOWFmOTI2NjA3MjE1YmU2NTE3MTI4NGY0NmY0NTI3ZDg4Mjg0OWVk
10
- OGRhNWExNGQzYzVhYTRhMjE5YmM0MjdkNTUwYjNiNzUwZDYzNzdlMjIwMTUx
11
- YmExOGNmZDdjNjQyN2JjZDgxYTUyNWVlZmJhNzA0NmMzOGIzY2M=
9
+ ODM3NTBjNDViYWE5OGJlMmEzOGU1MDkwZDE5OTQ5NTdjMDJlZDYxY2YzN2Y4
10
+ MzYzOWY2ZmEzYTRmZGFiZTE1MzZkMzdhYTExOTk5MTFmNWI4MDc5YzU5NzAz
11
+ MDU4OGVmMjFlNTRlNDMxMzZlYmVmZDc2M2QyZjI1MDMzOWUzMzE=
12
12
  data.tar.gz: !binary |-
13
- MWVkN2M1ZjZiZjNlMWM3ZGExNGJlNzMzNDMwMDNhYTQ2MDFlNDhkNDQxMDlm
14
- N2QzNjg2YTU1ZmQ2YmU2ZDQyYmZkMWRiMGZmMjgwMWY5MWMzZjMwZDQ0MzNk
15
- ODYwMjA0YTkyMzg1YjYwM2U4ZjMwOGI1ZGFiYTFjYmNjNzliYjQ=
13
+ MDEzNDMyZDY1NGE2N2JlODc2OTE3ZTIxMzA4ZDdiMmRkNGU2ZWIyOGIzY2M3
14
+ OTU5MTg1ZjQ5YjRmY2MzNjI1ZTRkMmViNDBjNzM3YjBhZDM4MDAyYWIyZDZh
15
+ MzM5NjkxNDY0ODdiNjM2NWUxNDU1NzJiYjkxMzRjNjBhZTA4NTQ=
@@ -26,10 +26,9 @@ module Hubstats
26
26
  path = ["repos",repo_name,kind].join('/')
27
27
  octo = client({:auto_paginate => true })
28
28
  octo.paginate(path, options) do |data, last_response|
29
- data.each{|v| route(v,kind,repo_name)}
30
- data = last_response.data
29
+ last_response.data.each{|v| route(v,kind,repo_name)}.clear
31
30
  wait_limit(1,octo.rate_limit)
32
- end
31
+ end.each{|v| route(v,kind,repo_name)}.clear
33
32
  end
34
33
 
35
34
  def self.create_hook(repo)
@@ -53,10 +52,11 @@ module Hubstats
53
52
  :active => true
54
53
  }
55
54
  )
56
-
57
55
  puts "Hook on #{repo.full_name} successfully created"
58
56
  rescue Octokit::UnprocessableEntity
59
57
  puts "Hook on #{repo.full_name} already existed"
58
+ rescue Octokit::NotFound
59
+ puts "You don't have sufficient privledges to add an event hook to #{repo.full_name}"
60
60
  end
61
61
  end
62
62
 
@@ -1,3 +1,3 @@
1
1
  module Hubstats
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
@@ -5,4 +5,4 @@
5
5
 
6
6
  config: # Must include either org_name || repo_list
7
7
  # org_name: sportngin
8
- repo_list: ['sportngin/stat_ngin', 'sportngin/hubstats']
8
+ repo_list: ['elliothursh/jumbler', 'sportngin/hubstats']
@@ -0,0 +1,40 @@
1
+ # This migration comes from hubstats (originally 20140604130339)
2
+ class CreateHubstatsPullRequests < ActiveRecord::Migration
3
+ def change
4
+ create_table :hubstats_pull_requests do |t|
5
+ t.integer :id
6
+ t.string :url
7
+ t.string :html_url
8
+ t.string :diff_url
9
+ t.string :patch_url
10
+ t.string :issue_url
11
+ t.string :commits_url
12
+ t.string :review_comments_url
13
+ t.string :review_comment_url
14
+ t.string :comments_url
15
+ t.string :statuses_url
16
+ t.integer :number
17
+ t.string :state
18
+ t.string :title
19
+ t.string :body
20
+ t.string :created_at
21
+ t.string :updated_at
22
+ t.string :closed_at
23
+ t.string :merged_at
24
+ t.string :merge_commit_sha
25
+ t.string :merged
26
+ t.string :mergeable
27
+ t.integer :comments
28
+ t.integer :commits
29
+ t.integer :additions
30
+ t.integer :deletions
31
+ t.integer :changed_files
32
+ t.belongs_to :user
33
+ t.belongs_to :repo
34
+ t.timestamps
35
+ end
36
+
37
+ add_index :hubstats_pull_requests, :user_id
38
+ add_index :hubstats_pull_requests, :repo_id
39
+ end
40
+ end
@@ -0,0 +1,25 @@
1
+ # This migration comes from hubstats (originally 20140604130457)
2
+ class CreateHubstatsUsers < ActiveRecord::Migration
3
+ def change
4
+ create_table :hubstats_users do |t|
5
+ t.string :login
6
+ t.integer :id
7
+ t.string :avatar_url
8
+ t.string :gravatar_id
9
+ t.string :url
10
+ t.string :html_url
11
+ t.string :followers_url
12
+ t.string :following_url
13
+ t.string :gists_url
14
+ t.string :starred_url
15
+ t.string :subscriptions_url
16
+ t.string :organizations_url
17
+ t.string :repos_url
18
+ t.string :events_url
19
+ t.string :received_events_url
20
+ t.string :role
21
+ t.boolean :site_admin
22
+ t.timestamps
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,27 @@
1
+ # This migration comes from hubstats (originally 20140604130504)
2
+ class CreateHubstatsComments < ActiveRecord::Migration
3
+ def change
4
+ create_table :hubstats_comments do |t|
5
+ t.integer :id
6
+ t.string :html_url
7
+ t.string :url
8
+ t.string :pull_request_url
9
+ t.string :diff_hunk
10
+ t.integer :path
11
+ t.integer :position
12
+ t.string :original_position
13
+ t.string :line
14
+ t.string :commit_id
15
+ t.string :original_commit_id
16
+ t.string :body
17
+ t.string :kind
18
+ t.belongs_to :user
19
+ t.belongs_to :pull_request
20
+ t.belongs_to :repo
21
+ t.timestamps
22
+ end
23
+
24
+ add_index :hubstats_comments, :user_id
25
+ add_index :hubstats_comments, :pull_request_id
26
+ end
27
+ end
@@ -0,0 +1,48 @@
1
+ # This migration comes from hubstats (originally 20140604130550)
2
+ class CreateHubstatsRepos < ActiveRecord::Migration
3
+ def change
4
+ create_table :hubstats_repos do |t|
5
+ t.integer :id
6
+ t.string :name
7
+ t.string :full_name
8
+ t.string :homepage
9
+ t.string :language
10
+ t.string :description
11
+ t.string :default_branch
12
+ t.string :url
13
+ t.string :html_url
14
+ t.string :clone_url
15
+ t.string :git_url
16
+ t.string :ssh_url
17
+ t.string :svn_url
18
+ t.string :mirror_url
19
+ t.string :hooks_url
20
+ t.string :issue_events_url
21
+ t.string :events_url
22
+ t.string :contributors_url
23
+ t.string :git_commits_url
24
+ t.string :issue_comment_url
25
+ t.string :merges_url
26
+ t.string :issues_url
27
+ t.string :pulls_url
28
+ t.string :labels_url
29
+ t.integer :forks_count
30
+ t.integer :stargazers_count
31
+ t.integer :watches_count
32
+ t.integer :size
33
+ t.integer :open_issues_count
34
+ t.boolean :has_issues
35
+ t.boolean :has_wiki
36
+ t.boolean :has_downloads
37
+ t.boolean :private
38
+ t.boolean :fork
39
+ t.datetime :pushed_at
40
+ t.datetime :created_at
41
+ t.datetime :updated_at
42
+ t.belongs_to :owner
43
+ t.timestamps
44
+ end
45
+
46
+ add_index :hubstats_repos, :owner_id
47
+ end
48
+ end
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended to check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(:version => 20140604130550) do
14
+ ActiveRecord::Schema.define(:version => 20140702234360) do
15
15
 
16
16
  create_table "hubstats_comments", :force => true do |t|
17
17
  t.string "html_url"
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hubstats
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elliot Hursh
@@ -175,6 +175,10 @@ files:
175
175
  - test/dummy/config/octokit.yml
176
176
  - test/dummy/config/routes.rb
177
177
  - test/dummy/db/development.sqlite3
178
+ - test/dummy/db/migrate/20140702234357_create_hubstats_pull_requests.hubstats.rb
179
+ - test/dummy/db/migrate/20140702234358_create_hubstats_users.hubstats.rb
180
+ - test/dummy/db/migrate/20140702234359_create_hubstats_comments.hubstats.rb
181
+ - test/dummy/db/migrate/20140702234360_create_hubstats_repos.hubstats.rb
178
182
  - test/dummy/db/schema.rb
179
183
  - test/dummy/db/test.sqlite3
180
184
  - test/dummy/log/development.log
@@ -382,6 +386,10 @@ test_files:
382
386
  - test/dummy/config/routes.rb
383
387
  - test/dummy/config.ru
384
388
  - test/dummy/db/development.sqlite3
389
+ - test/dummy/db/migrate/20140702234357_create_hubstats_pull_requests.hubstats.rb
390
+ - test/dummy/db/migrate/20140702234358_create_hubstats_users.hubstats.rb
391
+ - test/dummy/db/migrate/20140702234359_create_hubstats_comments.hubstats.rb
392
+ - test/dummy/db/migrate/20140702234360_create_hubstats_repos.hubstats.rb
385
393
  - test/dummy/db/schema.rb
386
394
  - test/dummy/db/test.sqlite3
387
395
  - test/dummy/log/development.log