hubstats 0.0.18 → 0.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YmQwY2MwYjcxYmJmYTYyNThjMzBjMzY2YTcwNjcwNTU1YmFhNzZlZQ==
4
+ MDIwZjQ4NTg1MjA4NzA1OTQ3ZTk4ZTVhYWUwNzFmMjE2ZWQ3YzMyYw==
5
5
  data.tar.gz: !binary |-
6
- YTMwNzc2Nzc4MzVlMWU0ZTc2ODE4MmQ0YTdiMDc4NjRjMzZhZGM4MQ==
6
+ Nzg3Y2I2Y2UxYWY5MDdkZjBlYzc3NmMzZGNiNTk4MjkzNjk2NzEyZA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YmZlOWFiYjJlNDI1YjA3MjgyODIwYzFmNGMxNGM1OGI2YjMyMzFiYTY1ZmU3
10
- YzZhMmZlNWJhOTA4NzY3YWY3ZjFkMGRmYjk2ZmU3NjJlNzVlY2EzN2YyNmU4
11
- YmM5NjNiNzk1OWZmODE2NDg3MzBjNWYyNDU5Y2I0Y2NiMGMzODI=
9
+ ZTVlZWY4ZWQ0YmJjZDY5ZWNjNTYwMTg4YjFkNTliNTBiNzgyYTAyZDZlNzY1
10
+ Yjc5OTdhMzc0Yjg4NzdhYTNjYjg0YjM4ZmI0MGQ5MDQ4NzFmMDFjNGY0YzRm
11
+ OTJlOTVjY2UwMWY3OTU1M2I3NjBhZTQwZDEwYWFiOGU4M2I2Zjc=
12
12
  data.tar.gz: !binary |-
13
- YTdiNTJjNWY5NTFmZmIyY2JmNzlmZDI0NzJiYjE4MmJmYzRhOTIwMDY4Y2Qw
14
- ZjQzNDk1MDBmYWRhNDdmMTQ1MGUzZmEwNWQ5ZmM5YzRmOTQwZWRiMTY0MTNj
15
- ODJhY2QwY2ViZGM1N2VjZDljMjY5MmI0NzY0ZjVjZGI1ZTJkOGM=
13
+ Y2I0ZDMzZDg0Mjc3YjhiYzRiYjhmMTlhOTMxMjYxZTFlYmMwNjhhMzI4Nzli
14
+ ODA4NGQ2YmRjMGVkMjQ1ZTUyNjE3ZDVhMjFjZGE2ZmU1ODhkZTdkNjJhNWEw
15
+ NGYxN2NlODVkOGM2ZDM3NjZkMmFhMzM1OWJhNmE2NjRlMGU2NTU=
data/README.rdoc CHANGED
@@ -1,29 +1,34 @@
1
1
  = Hubstats
2
- Github statistics
3
- This project rocks and uses MIT-LICENSE.
4
-
5
- = Authentication
6
- Hubstats needs github credentials to access your repos, these can be setup in one of two ways.
7
- == Environment Variables
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
-
10
- == octokit.yml
11
- Hubstats can also pull credentials from a YAML file stored in your app's config folder.
12
- Run rails generate hubstats:install from your app's directory to set it up.
13
-
14
- = Configuration
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, if you used environment variables for Authentication, you still must generate the octokit.yml using rails generate hubstats:install.
2
+ Hubstats is a rails plugin which allows you to search and monitor pull requests made across a collection of repositories. It also gives extra statistics about users and pull-requests not found on GitHub.
17
3
 
18
4
  = Setup
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
5
+ Run rails generate hubstats:install
6
+ Run rake hubstats:install:migrations
7
+ Run rake hubstats:setup to run the necessary migrations and start pulling data from github.
8
+ Add 'mount Hubstats::Engine => "/hubstats"' to your apps routes file
9
+
10
+ =Configuration
11
+ == Authentication
12
+ Hubstats needs github credentials to access your repos, these can be setup in one of two ways.
13
+ === octokit.yml
14
+ Add your GitHub API token or ClientID and Secret to octokit.yml
15
+ === Environment Variables
16
+ Hubstats can also use OAUTH access tokens stored in ENV["GITHUB_API_TOKEN"] or for Application Authentication in ENV["CLIENT_ID"] and ENV["CLIENT_SECRET"], if for some reason you don't want to store them in octokit.yml.
17
+ ==Webhooks
18
+ Hubstats uses GitHub webhooks to keep itself update. It requires you to set a secret as well as an endpoint to push to.
19
+ To generate a secret run:
20
+ ruby -rsecurerandom -e 'puts SecureRandom.hex(20)'
21
+ Set the endpoint to be:
22
+ www.yourdomain.com/hubstats/handler
23
+ ==Repositories
24
+ 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 in octokit.yml.
22
25
 
23
26
 
24
27
  =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
28
+ rails generate hubstats:install
29
+ configure octokit.yml
30
+ rake hubstats:install:migrations
31
+ rake hubstats:setup
32
+ Add 'mount Hubstats::Engine => "/hubstats"' to your routes file
33
+
34
+ This project rocks and uses MIT-LICENSE.
@@ -4,14 +4,22 @@ module Hubstats
4
4
  class EventsController < ApplicationController
5
5
 
6
6
  def handler
7
+ verify_signature(request)
8
+
7
9
  kind = request.headers['X-Github-Event']
8
10
  event = params.with_indifferent_access
9
-
10
11
  eventsHandler = Hubstats::EventsHandler.new()
11
12
  eventsHandler.route(event,kind)
12
13
 
13
14
  render :nothing => true
14
15
  end
15
16
 
17
+ private
18
+ def verify_signature(request)
19
+ request.body.rewind
20
+ payload_body = request.body.read
21
+ signature = 'sha1=' + OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha1'), Hubstats.config.webhook_endpoint, payload_body)
22
+ return 500, "Signatures didn't match!" unless Rack::Utils.secure_compare(signature, request.env['HTTP_X_HUB_SIGNATURE'])
23
+ end
16
24
  end
17
25
  end
@@ -4,7 +4,6 @@ module Hubstats
4
4
  source_root File.expand_path('../', __FILE__)
5
5
  def octokit_initializer
6
6
  copy_file "octokit.example.yml", "#{Rails.root}/config/octokit.yml"
7
- copy_file "octokit.rb", "#{Rails.root}/config/initializers/octokit.rb"
8
7
  end
9
8
 
10
9
  end
@@ -1,8 +1,11 @@
1
- auth: # Must include either access_token || (client_id && client_secret)
1
+ github_auth: # Must include either access_token || (client_id && client_secret)
2
2
  # access_token: <40 CHARACTER ACCESS TOKEN >
3
3
  # client_id: <CLIENT ID>
4
4
  # client_secret: <CLIENT SECRET>
5
5
 
6
- config: # Must include either org_name || repo_list
6
+ github_config: # Must include either org_name || repo_list
7
7
  # org_name: <ORGANIZATION NAME>
8
8
  # repo_list: [<ARRAY OF REPOS>]
9
+
10
+ webhook_secret: #<40 CHARACTER ACCESS TOKEN >
11
+ webhook_endpoint: #<url of webhook enpoint>
data/lib/hubstats.rb CHANGED
@@ -3,6 +3,7 @@ require "hub_helper"
3
3
  require "hubstats/github_api"
4
4
  require "hubstats/events_handler"
5
5
  require "active_support/core_ext/numeric"
6
+ require "hubstats/config"
6
7
 
7
8
 
8
9
  module Hubstats
@@ -32,4 +33,7 @@ module Hubstats
32
33
  }
33
34
  ]
34
35
 
36
+ def self.config
37
+ @@config ||= Hubstats::Config.parse
38
+ end
35
39
  end
@@ -0,0 +1,40 @@
1
+ require "date" # necessary to get the Date.today convenience method
2
+ require "yaml"
3
+
4
+ module Hubstats
5
+ class Config
6
+ def initialize(attributes={})
7
+ assign attributes
8
+ end
9
+
10
+ def github_auth
11
+ @github_auth
12
+ end
13
+
14
+ def github_config
15
+ @github_config
16
+ end
17
+
18
+ def webhook_secret
19
+ @webhook_secret
20
+ end
21
+
22
+ def webhook_endpoint
23
+ @webhook_endpoint
24
+ end
25
+
26
+ def self.parse
27
+ new(attributes_from_file)
28
+ end
29
+
30
+ def self.attributes_from_file
31
+ YAML.load_file("#{Rails.root}/config/octokit.yml")
32
+ end
33
+
34
+ def assign(attributes)
35
+ attributes.each do |key, value|
36
+ self.instance_variable_set("@#{key}", value)
37
+ end
38
+ end
39
+ end
40
+ end
@@ -3,7 +3,7 @@ module Hubstats
3
3
  include HubHelper
4
4
 
5
5
  cattr_accessor :auth_info
6
-
6
+
7
7
  def self.configure(options={})
8
8
  @@auth_info = {}
9
9
  if access_token = ENV['GITHUB_API_TOKEN'] || options["access_token"]
@@ -16,7 +16,7 @@ module Hubstats
16
16
  end
17
17
 
18
18
  def self.client(options={})
19
- configure() if @@auth_info.nil?
19
+ configure(Hubstats.config.github_auth) if @@auth_info.nil?
20
20
  ent = Octokit::Client.new(@@auth_info.merge(options))
21
21
  ent.user #making sure it was configured properly
22
22
  return ent
@@ -37,8 +37,9 @@ module Hubstats
37
37
  repo.full_name,
38
38
  'web',
39
39
  {
40
- :url => 'https://commissioner.sportngin.com/hubstats/handler',
41
- :content_type => 'json'
40
+ :url => Hubstats.config.webhook_endpoint,
41
+ :content_type => 'json',
42
+ :secret => Hubstats.config.webhook_secret
42
43
  },
43
44
  {
44
45
  :events => [
@@ -98,6 +99,18 @@ module Hubstats
98
99
  end
99
100
  end
100
101
 
102
+ def self.delete_hooks
103
+ puts "deleting hooks"
104
+ Hubstats::Repo.find_each do |repo|
105
+ Hubstats::GithubAPI.client.hooks(repo.full_name).each do |hook|
106
+ if hook[:config][:url] == Hubstats.config.webhook_endpoint
107
+ Hubstats::GithubAPI.client.remove_hook(repo.full_name, hook[:id])
108
+ puts "successfully deleted hook with id #{hook[:id]} and url #{hook[:config][:url]} from #{repo.full_name}"
109
+ end
110
+ end
111
+ end
112
+ end
113
+
101
114
  def self.wait_limit(grab_size,rate_limit)
102
115
  if rate_limit.remaining < grab_size
103
116
  puts "Hit Github rate limit, waiting #{Time.at(rate_limit.resets_in).utc.strftime("%H:%M:%S")} to get more"
@@ -1,3 +1,3 @@
1
1
  module Hubstats
2
- VERSION = "0.0.18"
2
+ VERSION = "0.0.19"
3
3
  end
@@ -44,6 +44,7 @@ namespace :hubstats do
44
44
 
45
45
  desc "Pull repos from Github save to database"
46
46
  task :all => :environment do
47
+
47
48
  get_repos.each do |repo|
48
49
  repo = Hubstats::Repo.create_or_update(repo)
49
50
  Hubstats::GithubAPI.create_hook(repo)
@@ -52,6 +53,7 @@ namespace :hubstats do
52
53
  Rake::Task["hubstats:populate:pulls"].execute({repo: repo})
53
54
  Rake::Task["hubstats:populate:comments"].execute({repo: repo})
54
55
  end
56
+
55
57
  puts "Finished with initial population, grabing extra info for pull requests"
56
58
  Rake::Task["hubstats:populate:update_labels"].execute
57
59
  Rake::Task["hubstats:populate:update_pulls"].execute
@@ -67,6 +69,11 @@ namespace :hubstats do
67
69
  Hubstats::GithubAPI.update_labels
68
70
  end
69
71
 
72
+ desc "deletes WebHook for all repos"
73
+ task :delete_hooks => :environment do
74
+ Hubstats::GithubAPI.delete_hooks
75
+ end
76
+
70
77
  def repo_checker(args)
71
78
  raise ArgumentError, "Must be called with repo argument. [:org/:repo]" if args.nil?
72
79
  if args.is_a? String
@@ -78,11 +85,11 @@ namespace :hubstats do
78
85
 
79
86
  def get_repos
80
87
  client = Hubstats::GithubAPI.client
81
- if OCTOCONF.has_key?(:org_name)
82
- repos = client.organization_repositories(OCTOCONF[:org_name])
88
+ if Hubstats.config.github_config.has_key?("org_name")
89
+ repos = client.organization_repositories(Hubstats.config.github_config["org_name"])
83
90
  else
84
91
  repos = []
85
- OCTOCONF[:repo_list].each do |repo|
92
+ Hubstats.config.github_config["repo_list"].each do |repo|
86
93
  repos << client.repository(repo)
87
94
  end
88
95
  end
@@ -1,8 +1,11 @@
1
-  auth: # Must include either access_token || (client_id && client_secret)
1
+ github_auth: # Must include either access_token || (client_id && client_secret)
2
2
  access_token: cec4013c4e7ef3e8e0564ed1af6cbd63b54afc71
3
3
  # client_id: <CLIENT ID>
4
4
  # client_secret: <CLIENT SECRET>
5
5
 
6
- config: # Must include either org_name || repo_list
6
+ github_config: # Must include either org_name || repo_list
7
7
  # org_name: sportngin
8
8
  repo_list: ['elliothursh/jumbler', 'sportngin/hubstats']
9
+
10
+ webhook_secret: 800d61079068d48ac44061826deb3d03152fc49a
11
+ webhook_endpoint: 'http://705ebc81.ngrok.com/hubstats/handler'
Binary file
@@ -16082,3 +16082,361 @@ Connecting to database specified by database.yml
16082
16082
   (0.5ms) ROLLBACK
16083
16083
   (0.0ms) BEGIN
16084
16084
   (0.1ms) ROLLBACK
16085
+ Connecting to database specified by database.yml
16086
+  (0.0ms) BEGIN
16087
+ Mysql2::Error: Table 'hubstats_test.hubstats_users' doesn't exist: SHOW FULL FIELDS FROM `hubstats_users`
16088
+  (0.1ms) ROLLBACK
16089
+  (0.1ms) BEGIN
16090
+  (0.1ms) ROLLBACK
16091
+  (0.1ms) BEGIN
16092
+  (0.1ms) ROLLBACK
16093
+  (0.1ms) BEGIN
16094
+  (0.1ms) ROLLBACK
16095
+  (0.1ms) BEGIN
16096
+  (0.1ms) ROLLBACK
16097
+  (0.1ms) BEGIN
16098
+ Mysql2::Error: Table 'hubstats_test.hubstats_users' doesn't exist: SHOW FULL FIELDS FROM `hubstats_users`
16099
+  (0.1ms) ROLLBACK
16100
+  (0.1ms) BEGIN
16101
+ Mysql2::Error: Table 'hubstats_test.hubstats_users' doesn't exist: SHOW FULL FIELDS FROM `hubstats_users`
16102
+  (0.1ms) ROLLBACK
16103
+  (0.1ms) BEGIN
16104
+ Mysql2::Error: Table 'hubstats_test.hubstats_repos' doesn't exist: SHOW FULL FIELDS FROM `hubstats_repos`
16105
+  (0.1ms) ROLLBACK
16106
+  (0.1ms) BEGIN
16107
+  (0.1ms) ROLLBACK
16108
+  (0.1ms) BEGIN
16109
+  (0.1ms) ROLLBACK
16110
+  (0.1ms) BEGIN
16111
+ Mysql2::Error: Table 'hubstats_test.hubstats_users' doesn't exist: SHOW FULL FIELDS FROM `hubstats_users`
16112
+  (0.1ms) ROLLBACK
16113
+  (0.1ms) BEGIN
16114
+  (0.1ms) ROLLBACK
16115
+  (0.1ms) BEGIN
16116
+  (0.1ms) ROLLBACK
16117
+  (0.1ms) BEGIN
16118
+ Mysql2::Error: Table 'hubstats_test.hubstats_users' doesn't exist: SHOW FULL FIELDS FROM `hubstats_users`
16119
+  (0.1ms) ROLLBACK
16120
+ Connecting to database specified by database.yml
16121
+  (0.1ms) BEGIN
16122
+ Hubstats::User Load (0.2ms) SELECT `hubstats_users`.* FROM `hubstats_users`
16123
+ Hubstats::User Load (0.3ms) SELECT `hubstats_users`.* FROM `hubstats_users` WHERE `hubstats_users`.`id` = 10 LIMIT 1
16124
+  (0.1ms) SAVEPOINT active_record_1
16125
+ Hubstats::User Exists (0.3ms) SELECT 1 AS one FROM `hubstats_users` WHERE `hubstats_users`.`id` = BINARY 10 LIMIT 1
16126
+ SQL (0.4ms) INSERT INTO `hubstats_users` (`avatar_url`, `created_at`, `events_url`, `followers_url`, `following_url`, `gists_url`, `gravatar_id`, `html_url`, `id`, `login`, `organizations_url`, `received_events_url`, `repos_url`, `role`, `site_admin`, `starred_url`, `subscriptions_url`, `updated_at`, `url`) VALUES (NULL, '2014-07-23 15:17:24', NULL, NULL, NULL, NULL, NULL, NULL, 10, 'johnappleseed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2014-07-23 15:17:24', NULL)
16127
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16128
+  (0.1ms) SAVEPOINT active_record_1
16129
+ Hubstats::User Exists (0.2ms) SELECT 1 AS one FROM `hubstats_users` WHERE (`hubstats_users`.`id` = BINARY 10 AND `hubstats_users`.`id` != 10) LIMIT 1
16130
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16131
+ Hubstats::User Load (0.2ms) SELECT `hubstats_users`.* FROM `hubstats_users` WHERE `hubstats_users`.`id` = 10 LIMIT 1
16132
+  (0.1ms) SAVEPOINT active_record_1
16133
+ Hubstats::User Exists (0.2ms) SELECT 1 AS one FROM `hubstats_users` WHERE (`hubstats_users`.`id` = BINARY 10 AND `hubstats_users`.`id` != 10) LIMIT 1
16134
+  (0.2ms) UPDATE `hubstats_users` SET `login` = 'elliothursh', `updated_at` = '2014-07-23 15:17:24' WHERE `hubstats_users`.`id` = 10
16135
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16136
+  (0.6ms) ROLLBACK
16137
+  (0.1ms) BEGIN
16138
+ Hubstats::User Load (0.2ms) SELECT `hubstats_users`.* FROM `hubstats_users`
16139
+ Hubstats::User Load (0.3ms) SELECT `hubstats_users`.* FROM `hubstats_users` WHERE `hubstats_users`.`id` = 10 LIMIT 1
16140
+  (0.1ms) SAVEPOINT active_record_1
16141
+ Hubstats::User Exists (0.2ms) SELECT 1 AS one FROM `hubstats_users` WHERE `hubstats_users`.`id` = BINARY 10 LIMIT 1
16142
+ SQL (0.2ms) INSERT INTO `hubstats_users` (`avatar_url`, `created_at`, `events_url`, `followers_url`, `following_url`, `gists_url`, `gravatar_id`, `html_url`, `id`, `login`, `organizations_url`, `received_events_url`, `repos_url`, `role`, `site_admin`, `starred_url`, `subscriptions_url`, `updated_at`, `url`) VALUES (NULL, '2014-07-23 15:17:25', NULL, NULL, NULL, NULL, NULL, NULL, 10, 'sigmund', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2014-07-23 15:17:25', NULL)
16143
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16144
+  (0.1ms) SAVEPOINT active_record_1
16145
+ Hubstats::User Exists (0.2ms) SELECT 1 AS one FROM `hubstats_users` WHERE (`hubstats_users`.`id` = BINARY 10 AND `hubstats_users`.`id` != 10) LIMIT 1
16146
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16147
+  (7.8ms) ROLLBACK
16148
+  (0.1ms) BEGIN
16149
+ Hubstats::User Load (0.7ms) SELECT `hubstats_users`.* FROM `hubstats_users` WHERE `hubstats_users`.`id` = 0 LIMIT 1
16150
+  (0.1ms) SAVEPOINT active_record_1
16151
+ Hubstats::User Exists (0.2ms) SELECT 1 AS one FROM `hubstats_users` WHERE `hubstats_users`.`id` = BINARY 0 LIMIT 1
16152
+ SQL (0.2ms) INSERT INTO `hubstats_users` (`avatar_url`, `created_at`, `events_url`, `followers_url`, `following_url`, `gists_url`, `gravatar_id`, `html_url`, `id`, `login`, `organizations_url`, `received_events_url`, `repos_url`, `role`, `site_admin`, `starred_url`, `subscriptions_url`, `updated_at`, `url`) VALUES (NULL, '2014-07-23 15:17:25', NULL, NULL, NULL, NULL, NULL, NULL, 0, 'norberto.williamson', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2014-07-23 15:17:25', NULL)
16153
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16154
+  (0.1ms) SAVEPOINT active_record_1
16155
+ Hubstats::User Exists (0.2ms) SELECT 1 AS one FROM `hubstats_users` WHERE (`hubstats_users`.`id` = BINARY 0 AND `hubstats_users`.`id` != 0) LIMIT 1
16156
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16157
+ Hubstats::Repo Load (0.3ms) SELECT `hubstats_repos`.* FROM `hubstats_repos` WHERE `hubstats_repos`.`id` = 101010 LIMIT 1
16158
+  (0.1ms) SAVEPOINT active_record_1
16159
+ SQL (0.3ms) INSERT INTO `hubstats_repos` (`clone_url`, `contributors_url`, `created_at`, `default_branch`, `description`, `events_url`, `fork`, `forks_count`, `full_name`, `git_commits_url`, `git_url`, `has_downloads`, `has_issues`, `has_wiki`, `homepage`, `hooks_url`, `html_url`, `id`, `issue_comment_url`, `issue_events_url`, `issues_url`, `labels_url`, `language`, `merges_url`, `mirror_url`, `name`, `open_issues_count`, `owner_id`, `private`, `pulls_url`, `pushed_at`, `size`, `ssh_url`, `stargazers_count`, `svn_url`, `updated_at`, `url`, `watches_count`) VALUES (NULL, NULL, '2014-07-23 15:17:25', NULL, NULL, NULL, NULL, NULL, 'hub/hubstats', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 101010, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Hubstats', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2014-07-23 15:17:25', NULL, NULL)
16160
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16161
+  (0.1ms) SAVEPOINT active_record_1
16162
+  (0.2ms) UPDATE `hubstats_repos` SET `updated_at` = NULL WHERE `hubstats_repos`.`id` = 101010
16163
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16164
+ Hubstats::PullRequest Load (0.2ms) SELECT `hubstats_pull_requests`.* FROM `hubstats_pull_requests` WHERE `hubstats_pull_requests`.`id` = 227384 LIMIT 1
16165
+  (0.1ms) SAVEPOINT active_record_1
16166
+ SQL (0.2ms) INSERT INTO `hubstats_pull_requests` (`additions`, `body`, `changed_files`, `closed_at`, `comments`, `comments_url`, `commits`, `commits_url`, `created_at`, `deletions`, `diff_url`, `html_url`, `id`, `issue_url`, `merge_commit_sha`, `mergeable`, `merged`, `merged_at`, `number`, `patch_url`, `repo_id`, `review_comment_url`, `review_comments_url`, `state`, `statuses_url`, `title`, `updated_at`, `url`, `user_id`) VALUES (NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2014-07-23 15:17:25', NULL, NULL, NULL, 227384, NULL, NULL, NULL, NULL, NULL, 0, NULL, 101010, NULL, NULL, NULL, NULL, NULL, '2014-07-23 15:17:25', NULL, 0)
16167
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16168
+  (0.1ms) SAVEPOINT active_record_1
16169
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16170
+  (0.8ms) ROLLBACK
16171
+  (0.1ms) BEGIN
16172
+ Hubstats::Repo Load (0.2ms) SELECT `hubstats_repos`.* FROM `hubstats_repos` WHERE `hubstats_repos`.`id` = 151 LIMIT 1
16173
+  (0.1ms) SAVEPOINT active_record_1
16174
+ SQL (0.3ms) INSERT INTO `hubstats_repos` (`clone_url`, `contributors_url`, `created_at`, `default_branch`, `description`, `events_url`, `fork`, `forks_count`, `full_name`, `git_commits_url`, `git_url`, `has_downloads`, `has_issues`, `has_wiki`, `homepage`, `hooks_url`, `html_url`, `id`, `issue_comment_url`, `issue_events_url`, `issues_url`, `labels_url`, `language`, `merges_url`, `mirror_url`, `name`, `open_issues_count`, `owner_id`, `private`, `pulls_url`, `pushed_at`, `size`, `ssh_url`, `stargazers_count`, `svn_url`, `updated_at`, `url`, `watches_count`) VALUES (NULL, NULL, '2014-07-23 15:17:25', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 151, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'HellWorld', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2014-07-23 15:17:25', NULL, NULL)
16175
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16176
+  (0.1ms) SAVEPOINT active_record_1
16177
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16178
+ Hubstats::User Load (0.2ms) SELECT `hubstats_users`.* FROM `hubstats_users` WHERE `hubstats_users`.`id` = 10 LIMIT 1
16179
+  (0.1ms) SAVEPOINT active_record_1
16180
+ Hubstats::User Exists (0.1ms) SELECT 1 AS one FROM `hubstats_users` WHERE `hubstats_users`.`id` = BINARY 10 LIMIT 1
16181
+ SQL (0.1ms) INSERT INTO `hubstats_users` (`avatar_url`, `created_at`, `events_url`, `followers_url`, `following_url`, `gists_url`, `gravatar_id`, `html_url`, `id`, `login`, `organizations_url`, `received_events_url`, `repos_url`, `role`, `site_admin`, `starred_url`, `subscriptions_url`, `updated_at`, `url`) VALUES (NULL, '2014-07-23 15:17:25', NULL, NULL, NULL, NULL, NULL, NULL, 10, 'elliothursh', NULL, NULL, NULL, 'User', NULL, NULL, NULL, '2014-07-23 15:17:25', NULL)
16182
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16183
+  (0.1ms) SAVEPOINT active_record_1
16184
+ Hubstats::User Exists (0.1ms) SELECT 1 AS one FROM `hubstats_users` WHERE (`hubstats_users`.`id` = BINARY 10 AND `hubstats_users`.`id` != 10) LIMIT 1
16185
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16186
+ Hubstats::Repo Load (0.2ms) SELECT `hubstats_repos`.* FROM `hubstats_repos` WHERE `hubstats_repos`.`id` = 151 LIMIT 1
16187
+  (0.1ms) SAVEPOINT active_record_1
16188
+  (0.2ms) UPDATE `hubstats_repos` SET `updated_at` = NULL WHERE `hubstats_repos`.`id` = 151
16189
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16190
+ Hubstats::PullRequest Load (0.2ms) SELECT `hubstats_pull_requests`.* FROM `hubstats_pull_requests` WHERE `hubstats_pull_requests`.`id` = 1000 LIMIT 1
16191
+  (0.1ms) SAVEPOINT active_record_1
16192
+ SQL (0.2ms) INSERT INTO `hubstats_pull_requests` (`additions`, `body`, `changed_files`, `closed_at`, `comments`, `comments_url`, `commits`, `commits_url`, `created_at`, `deletions`, `diff_url`, `html_url`, `id`, `issue_url`, `merge_commit_sha`, `mergeable`, `merged`, `merged_at`, `number`, `patch_url`, `repo_id`, `review_comment_url`, `review_comments_url`, `state`, `statuses_url`, `title`, `updated_at`, `url`, `user_id`) VALUES (NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2014-07-23 15:17:25', NULL, NULL, NULL, 1000, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 151, NULL, NULL, NULL, NULL, NULL, '2014-07-23 15:17:25', 'www.pull.com', 10)
16193
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16194
+  (0.1ms) SAVEPOINT active_record_1
16195
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16196
+ Hubstats::User Load (0.2ms) SELECT `hubstats_users`.* FROM `hubstats_users` WHERE `hubstats_users`.`id` = 10 LIMIT 1
16197
+  (0.1ms) SAVEPOINT active_record_1
16198
+ Hubstats::User Exists (0.2ms) SELECT 1 AS one FROM `hubstats_users` WHERE (`hubstats_users`.`id` = BINARY 10 AND `hubstats_users`.`id` != 10) LIMIT 1
16199
+  (0.2ms) UPDATE `hubstats_users` SET `role` = NULL, `updated_at` = '2014-07-23 15:17:25' WHERE `hubstats_users`.`id` = 10
16200
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16201
+ Hubstats::Comment Load (0.2ms) SELECT `hubstats_comments`.* FROM `hubstats_comments` WHERE `hubstats_comments`.`id` = 100 LIMIT 1
16202
+  (0.1ms) SAVEPOINT active_record_1
16203
+ SQL (0.2ms) INSERT INTO `hubstats_comments` (`body`, `commit_id`, `created_at`, `diff_hunk`, `html_url`, `id`, `kind`, `line`, `original_commit_id`, `original_position`, `path`, `position`, `pull_request_id`, `pull_request_url`, `repo_id`, `updated_at`, `url`, `user_id`) VALUES (NULL, NULL, '2014-07-23 15:17:25', NULL, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'www.pull.com', NULL, '2014-07-23 15:17:25', NULL, 10)
16204
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16205
+  (0.1ms) SAVEPOINT active_record_1
16206
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16207
+  (0.5ms) ROLLBACK
16208
+  (0.0ms) BEGIN
16209
+  (0.1ms) ROLLBACK
16210
+  (0.0ms) BEGIN
16211
+ Hubstats::User Load (0.2ms) SELECT `hubstats_users`.* FROM `hubstats_users` WHERE `hubstats_users`.`id` = 0 LIMIT 1
16212
+  (0.1ms) SAVEPOINT active_record_1
16213
+ Hubstats::User Exists (0.1ms) SELECT 1 AS one FROM `hubstats_users` WHERE `hubstats_users`.`id` = BINARY 0 LIMIT 1
16214
+ SQL (0.2ms) INSERT INTO `hubstats_users` (`avatar_url`, `created_at`, `events_url`, `followers_url`, `following_url`, `gists_url`, `gravatar_id`, `html_url`, `id`, `login`, `organizations_url`, `received_events_url`, `repos_url`, `role`, `site_admin`, `starred_url`, `subscriptions_url`, `updated_at`, `url`) VALUES (NULL, '2014-07-23 15:17:25', NULL, NULL, NULL, NULL, NULL, NULL, 0, 'treva', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2014-07-23 15:17:25', NULL)
16215
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16216
+  (0.0ms) SAVEPOINT active_record_1
16217
+ Hubstats::User Exists (0.1ms) SELECT 1 AS one FROM `hubstats_users` WHERE (`hubstats_users`.`id` = BINARY 0 AND `hubstats_users`.`id` != 0) LIMIT 1
16218
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16219
+ Hubstats::PullRequest Load (0.2ms) SELECT `hubstats_pull_requests`.* FROM `hubstats_pull_requests` WHERE `hubstats_pull_requests`.`repo_id` = 101010 AND `hubstats_pull_requests`.`number` = 0 LIMIT 1
16220
+ Hubstats::Comment Load (0.1ms) SELECT `hubstats_comments`.* FROM `hubstats_comments` WHERE `hubstats_comments`.`id` = 439741 LIMIT 1
16221
+  (0.0ms) SAVEPOINT active_record_1
16222
+ SQL (0.1ms) INSERT INTO `hubstats_comments` (`body`, `commit_id`, `created_at`, `diff_hunk`, `html_url`, `id`, `kind`, `line`, `original_commit_id`, `original_position`, `path`, `position`, `pull_request_id`, `pull_request_url`, `repo_id`, `updated_at`, `url`, `user_id`) VALUES ('Ab et ducimus impedit cum in harum.', NULL, '2014-07-23 15:17:25', NULL, NULL, 439741, 'PullRequest', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 101010, '2014-07-23 15:17:25', NULL, 0)
16223
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16224
+  (0.0ms) SAVEPOINT active_record_1
16225
+  (0.0ms) RELEASE SAVEPOINT active_record_1
16226
+  (0.7ms) ROLLBACK
16227
+  (0.1ms) BEGIN
16228
+  (0.1ms) ROLLBACK
16229
+  (0.0ms) BEGIN
16230
+  (0.1ms) ROLLBACK
16231
+  (0.1ms) BEGIN
16232
+ Hubstats::User Load (0.2ms) SELECT `hubstats_users`.* FROM `hubstats_users` WHERE `hubstats_users`.`id` = 0 LIMIT 1
16233
+  (0.1ms) SAVEPOINT active_record_1
16234
+ Hubstats::User Exists (0.1ms) SELECT 1 AS one FROM `hubstats_users` WHERE `hubstats_users`.`id` = BINARY 0 LIMIT 1
16235
+ SQL (0.2ms) INSERT INTO `hubstats_users` (`avatar_url`, `created_at`, `events_url`, `followers_url`, `following_url`, `gists_url`, `gravatar_id`, `html_url`, `id`, `login`, `organizations_url`, `received_events_url`, `repos_url`, `role`, `site_admin`, `starred_url`, `subscriptions_url`, `updated_at`, `url`) VALUES (NULL, '2014-07-23 15:17:25', NULL, NULL, NULL, NULL, NULL, NULL, 0, 'christina', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2014-07-23 15:17:25', NULL)
16236
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16237
+  (0.1ms) SAVEPOINT active_record_1
16238
+ Hubstats::User Exists (0.2ms) SELECT 1 AS one FROM `hubstats_users` WHERE (`hubstats_users`.`id` = BINARY 0 AND `hubstats_users`.`id` != 0) LIMIT 1
16239
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16240
+ Hubstats::Repo Load (0.1ms) SELECT `hubstats_repos`.* FROM `hubstats_repos` WHERE `hubstats_repos`.`id` = 101010 LIMIT 1
16241
+  (0.1ms) SAVEPOINT active_record_1
16242
+ SQL (0.2ms) INSERT INTO `hubstats_repos` (`clone_url`, `contributors_url`, `created_at`, `default_branch`, `description`, `events_url`, `fork`, `forks_count`, `full_name`, `git_commits_url`, `git_url`, `has_downloads`, `has_issues`, `has_wiki`, `homepage`, `hooks_url`, `html_url`, `id`, `issue_comment_url`, `issue_events_url`, `issues_url`, `labels_url`, `language`, `merges_url`, `mirror_url`, `name`, `open_issues_count`, `owner_id`, `private`, `pulls_url`, `pushed_at`, `size`, `ssh_url`, `stargazers_count`, `svn_url`, `updated_at`, `url`, `watches_count`) VALUES (NULL, NULL, '2014-07-23 15:17:25', NULL, NULL, NULL, NULL, NULL, 'hub/hubstats', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 101010, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Hubstats', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2014-07-23 15:17:25', NULL, NULL)
16243
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16244
+  (0.0ms) SAVEPOINT active_record_1
16245
+  (0.2ms) UPDATE `hubstats_repos` SET `updated_at` = NULL WHERE `hubstats_repos`.`id` = 101010
16246
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16247
+ Hubstats::PullRequest Load (0.1ms) SELECT `hubstats_pull_requests`.* FROM `hubstats_pull_requests` WHERE `hubstats_pull_requests`.`id` = 239812 LIMIT 1
16248
+  (0.0ms) SAVEPOINT active_record_1
16249
+ SQL (0.1ms) INSERT INTO `hubstats_pull_requests` (`additions`, `body`, `changed_files`, `closed_at`, `comments`, `comments_url`, `commits`, `commits_url`, `created_at`, `deletions`, `diff_url`, `html_url`, `id`, `issue_url`, `merge_commit_sha`, `mergeable`, `merged`, `merged_at`, `number`, `patch_url`, `repo_id`, `review_comment_url`, `review_comments_url`, `state`, `statuses_url`, `title`, `updated_at`, `url`, `user_id`) VALUES (NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2014-07-23 15:17:25', NULL, NULL, NULL, 239812, NULL, NULL, NULL, NULL, NULL, 0, NULL, 101010, NULL, NULL, NULL, NULL, NULL, '2014-07-23 15:17:25', NULL, 0)
16250
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16251
+  (0.0ms) SAVEPOINT active_record_1
16252
+  (0.0ms) RELEASE SAVEPOINT active_record_1
16253
+  (0.5ms) ROLLBACK
16254
+  (0.1ms) BEGIN
16255
+  (0.1ms) ROLLBACK
16256
+  (0.1ms) BEGIN
16257
+  (0.1ms) ROLLBACK
16258
+  (0.1ms) BEGIN
16259
+  (0.1ms) ROLLBACK
16260
+  (0.1ms) BEGIN
16261
+  (0.1ms) ROLLBACK
16262
+  (0.0ms) BEGIN
16263
+  (0.1ms) ROLLBACK
16264
+ Connecting to database specified by database.yml
16265
+  (0.1ms) BEGIN
16266
+ Mysql2::Error: Table 'hubstats_test.hubstats_users' doesn't exist: SHOW FULL FIELDS FROM `hubstats_users`
16267
+  (0.1ms) ROLLBACK
16268
+  (0.1ms) BEGIN
16269
+ Mysql2::Error: Table 'hubstats_test.hubstats_repos' doesn't exist: SHOW FULL FIELDS FROM `hubstats_repos`
16270
+  (0.1ms) ROLLBACK
16271
+  (0.1ms) BEGIN
16272
+  (0.1ms) ROLLBACK
16273
+  (0.0ms) BEGIN
16274
+  (0.1ms) ROLLBACK
16275
+  (0.0ms) BEGIN
16276
+  (0.1ms) ROLLBACK
16277
+  (0.1ms) BEGIN
16278
+  (0.1ms) ROLLBACK
16279
+  (0.1ms) BEGIN
16280
+ Mysql2::Error: Table 'hubstats_test.hubstats_users' doesn't exist: SHOW FULL FIELDS FROM `hubstats_users`
16281
+  (0.1ms) ROLLBACK
16282
+  (0.1ms) BEGIN
16283
+ Mysql2::Error: Table 'hubstats_test.hubstats_users' doesn't exist: SHOW FULL FIELDS FROM `hubstats_users`
16284
+  (0.1ms) ROLLBACK
16285
+  (0.1ms) BEGIN
16286
+ Mysql2::Error: Table 'hubstats_test.hubstats_users' doesn't exist: SHOW FULL FIELDS FROM `hubstats_users`
16287
+  (0.1ms) ROLLBACK
16288
+  (0.1ms) BEGIN
16289
+  (0.1ms) ROLLBACK
16290
+  (0.1ms) BEGIN
16291
+  (0.1ms) ROLLBACK
16292
+  (0.1ms) BEGIN
16293
+ Mysql2::Error: Table 'hubstats_test.hubstats_users' doesn't exist: SHOW FULL FIELDS FROM `hubstats_users`
16294
+  (0.1ms) ROLLBACK
16295
+  (0.1ms) BEGIN
16296
+  (0.1ms) ROLLBACK
16297
+  (0.1ms) BEGIN
16298
+  (0.1ms) ROLLBACK
16299
+ Connecting to database specified by database.yml
16300
+  (0.1ms) BEGIN
16301
+ Hubstats::User Load (0.3ms) SELECT `hubstats_users`.* FROM `hubstats_users`
16302
+ Hubstats::User Load (0.3ms) SELECT `hubstats_users`.* FROM `hubstats_users` WHERE `hubstats_users`.`id` = 10 LIMIT 1
16303
+  (0.1ms) SAVEPOINT active_record_1
16304
+ Hubstats::User Exists (0.3ms) SELECT 1 AS one FROM `hubstats_users` WHERE `hubstats_users`.`id` = BINARY 10 LIMIT 1
16305
+ SQL (0.3ms) INSERT INTO `hubstats_users` (`avatar_url`, `created_at`, `events_url`, `followers_url`, `following_url`, `gists_url`, `gravatar_id`, `html_url`, `id`, `login`, `organizations_url`, `received_events_url`, `repos_url`, `role`, `site_admin`, `starred_url`, `subscriptions_url`, `updated_at`, `url`) VALUES (NULL, '2014-07-23 17:33:32', NULL, NULL, NULL, NULL, NULL, NULL, 10, 'johnappleseed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2014-07-23 17:33:32', NULL)
16306
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16307
+  (0.1ms) SAVEPOINT active_record_1
16308
+ Hubstats::User Exists (0.2ms) SELECT 1 AS one FROM `hubstats_users` WHERE (`hubstats_users`.`id` = BINARY 10 AND `hubstats_users`.`id` != 10) LIMIT 1
16309
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16310
+ Hubstats::User Load (0.2ms) SELECT `hubstats_users`.* FROM `hubstats_users` WHERE `hubstats_users`.`id` = 10 LIMIT 1
16311
+  (0.1ms) SAVEPOINT active_record_1
16312
+ Hubstats::User Exists (0.2ms) SELECT 1 AS one FROM `hubstats_users` WHERE (`hubstats_users`.`id` = BINARY 10 AND `hubstats_users`.`id` != 10) LIMIT 1
16313
+  (0.2ms) UPDATE `hubstats_users` SET `login` = 'elliothursh', `updated_at` = '2014-07-23 17:33:32' WHERE `hubstats_users`.`id` = 10
16314
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16315
+  (5.7ms) ROLLBACK
16316
+  (0.1ms) BEGIN
16317
+ Hubstats::User Load (0.2ms) SELECT `hubstats_users`.* FROM `hubstats_users`
16318
+ Hubstats::User Load (0.3ms) SELECT `hubstats_users`.* FROM `hubstats_users` WHERE `hubstats_users`.`id` = 10 LIMIT 1
16319
+  (0.1ms) SAVEPOINT active_record_1
16320
+ Hubstats::User Exists (0.2ms) SELECT 1 AS one FROM `hubstats_users` WHERE `hubstats_users`.`id` = BINARY 10 LIMIT 1
16321
+ SQL (0.2ms) INSERT INTO `hubstats_users` (`avatar_url`, `created_at`, `events_url`, `followers_url`, `following_url`, `gists_url`, `gravatar_id`, `html_url`, `id`, `login`, `organizations_url`, `received_events_url`, `repos_url`, `role`, `site_admin`, `starred_url`, `subscriptions_url`, `updated_at`, `url`) VALUES (NULL, '2014-07-23 17:33:33', NULL, NULL, NULL, NULL, NULL, NULL, 10, 'nathanael', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2014-07-23 17:33:33', NULL)
16322
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16323
+  (0.1ms) SAVEPOINT active_record_1
16324
+ Hubstats::User Exists (0.2ms) SELECT 1 AS one FROM `hubstats_users` WHERE (`hubstats_users`.`id` = BINARY 10 AND `hubstats_users`.`id` != 10) LIMIT 1
16325
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16326
+  (0.6ms) ROLLBACK
16327
+  (0.1ms) BEGIN
16328
+  (0.1ms) ROLLBACK
16329
+  (0.0ms) BEGIN
16330
+  (0.1ms) ROLLBACK
16331
+  (0.0ms) BEGIN
16332
+  (0.1ms) ROLLBACK
16333
+  (0.1ms) BEGIN
16334
+  (0.1ms) ROLLBACK
16335
+  (0.1ms) BEGIN
16336
+ Hubstats::User Load (0.3ms) SELECT `hubstats_users`.* FROM `hubstats_users` WHERE `hubstats_users`.`id` = 0 LIMIT 1
16337
+  (0.1ms) SAVEPOINT active_record_1
16338
+ Hubstats::User Exists (0.2ms) SELECT 1 AS one FROM `hubstats_users` WHERE `hubstats_users`.`id` = BINARY 0 LIMIT 1
16339
+ SQL (0.2ms) INSERT INTO `hubstats_users` (`avatar_url`, `created_at`, `events_url`, `followers_url`, `following_url`, `gists_url`, `gravatar_id`, `html_url`, `id`, `login`, `organizations_url`, `received_events_url`, `repos_url`, `role`, `site_admin`, `starred_url`, `subscriptions_url`, `updated_at`, `url`) VALUES (NULL, '2014-07-23 17:33:34', NULL, NULL, NULL, NULL, NULL, NULL, 0, 'anais', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2014-07-23 17:33:34', NULL)
16340
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16341
+  (0.1ms) SAVEPOINT active_record_1
16342
+ Hubstats::User Exists (0.2ms) SELECT 1 AS one FROM `hubstats_users` WHERE (`hubstats_users`.`id` = BINARY 0 AND `hubstats_users`.`id` != 0) LIMIT 1
16343
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16344
+ Hubstats::Repo Load (0.2ms) SELECT `hubstats_repos`.* FROM `hubstats_repos` WHERE `hubstats_repos`.`id` = 101010 LIMIT 1
16345
+  (0.1ms) SAVEPOINT active_record_1
16346
+ SQL (0.3ms) INSERT INTO `hubstats_repos` (`clone_url`, `contributors_url`, `created_at`, `default_branch`, `description`, `events_url`, `fork`, `forks_count`, `full_name`, `git_commits_url`, `git_url`, `has_downloads`, `has_issues`, `has_wiki`, `homepage`, `hooks_url`, `html_url`, `id`, `issue_comment_url`, `issue_events_url`, `issues_url`, `labels_url`, `language`, `merges_url`, `mirror_url`, `name`, `open_issues_count`, `owner_id`, `private`, `pulls_url`, `pushed_at`, `size`, `ssh_url`, `stargazers_count`, `svn_url`, `updated_at`, `url`, `watches_count`) VALUES (NULL, NULL, '2014-07-23 17:33:34', NULL, NULL, NULL, NULL, NULL, 'hub/hubstats', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 101010, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Hubstats', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2014-07-23 17:33:34', NULL, NULL)
16347
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16348
+  (0.1ms) SAVEPOINT active_record_1
16349
+  (0.2ms) UPDATE `hubstats_repos` SET `updated_at` = NULL WHERE `hubstats_repos`.`id` = 101010
16350
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16351
+ Hubstats::PullRequest Load (0.3ms) SELECT `hubstats_pull_requests`.* FROM `hubstats_pull_requests` WHERE `hubstats_pull_requests`.`id` = 525404 LIMIT 1
16352
+  (0.1ms) SAVEPOINT active_record_1
16353
+ SQL (0.2ms) INSERT INTO `hubstats_pull_requests` (`additions`, `body`, `changed_files`, `closed_at`, `comments`, `comments_url`, `commits`, `commits_url`, `created_at`, `deletions`, `diff_url`, `html_url`, `id`, `issue_url`, `merge_commit_sha`, `mergeable`, `merged`, `merged_at`, `number`, `patch_url`, `repo_id`, `review_comment_url`, `review_comments_url`, `state`, `statuses_url`, `title`, `updated_at`, `url`, `user_id`) VALUES (NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2014-07-23 17:33:34', NULL, NULL, NULL, 525404, NULL, NULL, NULL, NULL, NULL, 0, NULL, 101010, NULL, NULL, NULL, NULL, NULL, '2014-07-23 17:33:34', NULL, 0)
16354
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16355
+  (0.0ms) SAVEPOINT active_record_1
16356
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16357
+  (0.6ms) ROLLBACK
16358
+  (0.1ms) BEGIN
16359
+  (0.1ms) ROLLBACK
16360
+  (0.1ms) BEGIN
16361
+  (0.1ms) ROLLBACK
16362
+  (0.1ms) BEGIN
16363
+ Hubstats::User Load (0.2ms) SELECT `hubstats_users`.* FROM `hubstats_users` WHERE `hubstats_users`.`id` = 0 LIMIT 1
16364
+  (0.1ms) SAVEPOINT active_record_1
16365
+ Hubstats::User Exists (0.1ms) SELECT 1 AS one FROM `hubstats_users` WHERE `hubstats_users`.`id` = BINARY 0 LIMIT 1
16366
+ SQL (0.2ms) INSERT INTO `hubstats_users` (`avatar_url`, `created_at`, `events_url`, `followers_url`, `following_url`, `gists_url`, `gravatar_id`, `html_url`, `id`, `login`, `organizations_url`, `received_events_url`, `repos_url`, `role`, `site_admin`, `starred_url`, `subscriptions_url`, `updated_at`, `url`) VALUES (NULL, '2014-07-23 17:33:34', NULL, NULL, NULL, NULL, NULL, NULL, 0, 'aylin', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2014-07-23 17:33:34', NULL)
16367
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16368
+  (0.1ms) SAVEPOINT active_record_1
16369
+ Hubstats::User Exists (0.2ms) SELECT 1 AS one FROM `hubstats_users` WHERE (`hubstats_users`.`id` = BINARY 0 AND `hubstats_users`.`id` != 0) LIMIT 1
16370
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16371
+ Hubstats::PullRequest Load (0.2ms) SELECT `hubstats_pull_requests`.* FROM `hubstats_pull_requests` WHERE `hubstats_pull_requests`.`repo_id` = 101010 AND `hubstats_pull_requests`.`number` = 0 LIMIT 1
16372
+ Hubstats::Comment Load (0.2ms) SELECT `hubstats_comments`.* FROM `hubstats_comments` WHERE `hubstats_comments`.`id` = 752572 LIMIT 1
16373
+  (0.1ms) SAVEPOINT active_record_1
16374
+ SQL (0.2ms) INSERT INTO `hubstats_comments` (`body`, `commit_id`, `created_at`, `diff_hunk`, `html_url`, `id`, `kind`, `line`, `original_commit_id`, `original_position`, `path`, `position`, `pull_request_id`, `pull_request_url`, `repo_id`, `updated_at`, `url`, `user_id`) VALUES ('At veritatis culpa recusandae qui eos iure laboriosam.', NULL, '2014-07-23 17:33:34', NULL, NULL, 752572, 'Commit', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 101010, '2014-07-23 17:33:34', NULL, 0)
16375
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16376
+  (0.1ms) SAVEPOINT active_record_1
16377
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16378
+  (0.4ms) ROLLBACK
16379
+  (0.0ms) BEGIN
16380
+  (0.1ms) ROLLBACK
16381
+  (0.1ms) BEGIN
16382
+  (0.1ms) ROLLBACK
16383
+  (0.1ms) BEGIN
16384
+ Hubstats::User Load (0.2ms) SELECT `hubstats_users`.* FROM `hubstats_users` WHERE `hubstats_users`.`id` = 0 LIMIT 1
16385
+  (0.1ms) SAVEPOINT active_record_1
16386
+ Hubstats::User Exists (0.2ms) SELECT 1 AS one FROM `hubstats_users` WHERE `hubstats_users`.`id` = BINARY 0 LIMIT 1
16387
+ SQL (0.2ms) INSERT INTO `hubstats_users` (`avatar_url`, `created_at`, `events_url`, `followers_url`, `following_url`, `gists_url`, `gravatar_id`, `html_url`, `id`, `login`, `organizations_url`, `received_events_url`, `repos_url`, `role`, `site_admin`, `starred_url`, `subscriptions_url`, `updated_at`, `url`) VALUES (NULL, '2014-07-23 17:33:34', NULL, NULL, NULL, NULL, NULL, NULL, 0, 'lolita_will', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2014-07-23 17:33:34', NULL)
16388
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16389
+  (0.1ms) SAVEPOINT active_record_1
16390
+ Hubstats::User Exists (0.3ms) SELECT 1 AS one FROM `hubstats_users` WHERE (`hubstats_users`.`id` = BINARY 0 AND `hubstats_users`.`id` != 0) LIMIT 1
16391
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16392
+ Hubstats::Repo Load (0.2ms) SELECT `hubstats_repos`.* FROM `hubstats_repos` WHERE `hubstats_repos`.`id` = 101010 LIMIT 1
16393
+  (0.1ms) SAVEPOINT active_record_1
16394
+ SQL (0.3ms) INSERT INTO `hubstats_repos` (`clone_url`, `contributors_url`, `created_at`, `default_branch`, `description`, `events_url`, `fork`, `forks_count`, `full_name`, `git_commits_url`, `git_url`, `has_downloads`, `has_issues`, `has_wiki`, `homepage`, `hooks_url`, `html_url`, `id`, `issue_comment_url`, `issue_events_url`, `issues_url`, `labels_url`, `language`, `merges_url`, `mirror_url`, `name`, `open_issues_count`, `owner_id`, `private`, `pulls_url`, `pushed_at`, `size`, `ssh_url`, `stargazers_count`, `svn_url`, `updated_at`, `url`, `watches_count`) VALUES (NULL, NULL, '2014-07-23 17:33:34', NULL, NULL, NULL, NULL, NULL, 'hub/hubstats', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 101010, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Hubstats', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2014-07-23 17:33:34', NULL, NULL)
16395
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16396
+  (0.1ms) SAVEPOINT active_record_1
16397
+  (0.2ms) UPDATE `hubstats_repos` SET `updated_at` = NULL WHERE `hubstats_repos`.`id` = 101010
16398
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16399
+ Hubstats::PullRequest Load (0.2ms) SELECT `hubstats_pull_requests`.* FROM `hubstats_pull_requests` WHERE `hubstats_pull_requests`.`id` = 51238 LIMIT 1
16400
+  (0.1ms) SAVEPOINT active_record_1
16401
+ SQL (0.2ms) INSERT INTO `hubstats_pull_requests` (`additions`, `body`, `changed_files`, `closed_at`, `comments`, `comments_url`, `commits`, `commits_url`, `created_at`, `deletions`, `diff_url`, `html_url`, `id`, `issue_url`, `merge_commit_sha`, `mergeable`, `merged`, `merged_at`, `number`, `patch_url`, `repo_id`, `review_comment_url`, `review_comments_url`, `state`, `statuses_url`, `title`, `updated_at`, `url`, `user_id`) VALUES (NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2014-07-23 17:33:34', NULL, NULL, NULL, 51238, NULL, NULL, NULL, NULL, NULL, 0, NULL, 101010, NULL, NULL, NULL, NULL, NULL, '2014-07-23 17:33:34', NULL, 0)
16402
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16403
+  (0.1ms) SAVEPOINT active_record_1
16404
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16405
+  (0.7ms) ROLLBACK
16406
+  (0.1ms) BEGIN
16407
+ Hubstats::Repo Load (0.2ms) SELECT `hubstats_repos`.* FROM `hubstats_repos` WHERE `hubstats_repos`.`id` = 151 LIMIT 1
16408
+  (0.1ms) SAVEPOINT active_record_1
16409
+ SQL (0.2ms) INSERT INTO `hubstats_repos` (`clone_url`, `contributors_url`, `created_at`, `default_branch`, `description`, `events_url`, `fork`, `forks_count`, `full_name`, `git_commits_url`, `git_url`, `has_downloads`, `has_issues`, `has_wiki`, `homepage`, `hooks_url`, `html_url`, `id`, `issue_comment_url`, `issue_events_url`, `issues_url`, `labels_url`, `language`, `merges_url`, `mirror_url`, `name`, `open_issues_count`, `owner_id`, `private`, `pulls_url`, `pushed_at`, `size`, `ssh_url`, `stargazers_count`, `svn_url`, `updated_at`, `url`, `watches_count`) VALUES (NULL, NULL, '2014-07-23 17:33:34', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 151, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'HellWorld', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2014-07-23 17:33:34', NULL, NULL)
16410
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16411
+  (0.1ms) SAVEPOINT active_record_1
16412
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16413
+ Hubstats::User Load (0.2ms) SELECT `hubstats_users`.* FROM `hubstats_users` WHERE `hubstats_users`.`id` = 10 LIMIT 1
16414
+  (0.1ms) SAVEPOINT active_record_1
16415
+ Hubstats::User Exists (0.1ms) SELECT 1 AS one FROM `hubstats_users` WHERE `hubstats_users`.`id` = BINARY 10 LIMIT 1
16416
+ SQL (0.2ms) INSERT INTO `hubstats_users` (`avatar_url`, `created_at`, `events_url`, `followers_url`, `following_url`, `gists_url`, `gravatar_id`, `html_url`, `id`, `login`, `organizations_url`, `received_events_url`, `repos_url`, `role`, `site_admin`, `starred_url`, `subscriptions_url`, `updated_at`, `url`) VALUES (NULL, '2014-07-23 17:33:34', NULL, NULL, NULL, NULL, NULL, NULL, 10, 'elliothursh', NULL, NULL, NULL, 'User', NULL, NULL, NULL, '2014-07-23 17:33:34', NULL)
16417
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16418
+  (0.1ms) SAVEPOINT active_record_1
16419
+ Hubstats::User Exists (0.2ms) SELECT 1 AS one FROM `hubstats_users` WHERE (`hubstats_users`.`id` = BINARY 10 AND `hubstats_users`.`id` != 10) LIMIT 1
16420
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16421
+ Hubstats::Repo Load (0.2ms) SELECT `hubstats_repos`.* FROM `hubstats_repos` WHERE `hubstats_repos`.`id` = 151 LIMIT 1
16422
+  (0.1ms) SAVEPOINT active_record_1
16423
+  (0.2ms) UPDATE `hubstats_repos` SET `updated_at` = NULL WHERE `hubstats_repos`.`id` = 151
16424
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16425
+ Hubstats::PullRequest Load (0.1ms) SELECT `hubstats_pull_requests`.* FROM `hubstats_pull_requests` WHERE `hubstats_pull_requests`.`id` = 1000 LIMIT 1
16426
+  (0.0ms) SAVEPOINT active_record_1
16427
+ SQL (0.2ms) INSERT INTO `hubstats_pull_requests` (`additions`, `body`, `changed_files`, `closed_at`, `comments`, `comments_url`, `commits`, `commits_url`, `created_at`, `deletions`, `diff_url`, `html_url`, `id`, `issue_url`, `merge_commit_sha`, `mergeable`, `merged`, `merged_at`, `number`, `patch_url`, `repo_id`, `review_comment_url`, `review_comments_url`, `state`, `statuses_url`, `title`, `updated_at`, `url`, `user_id`) VALUES (NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2014-07-23 17:33:34', NULL, NULL, NULL, 1000, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 151, NULL, NULL, NULL, NULL, NULL, '2014-07-23 17:33:34', 'www.pull.com', 10)
16428
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16429
+  (0.1ms) SAVEPOINT active_record_1
16430
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16431
+ Hubstats::User Load (0.2ms) SELECT `hubstats_users`.* FROM `hubstats_users` WHERE `hubstats_users`.`id` = 10 LIMIT 1
16432
+  (0.1ms) SAVEPOINT active_record_1
16433
+ Hubstats::User Exists (0.1ms) SELECT 1 AS one FROM `hubstats_users` WHERE (`hubstats_users`.`id` = BINARY 10 AND `hubstats_users`.`id` != 10) LIMIT 1
16434
+  (0.1ms) UPDATE `hubstats_users` SET `role` = NULL, `updated_at` = '2014-07-23 17:33:34' WHERE `hubstats_users`.`id` = 10
16435
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16436
+ Hubstats::Comment Load (0.1ms) SELECT `hubstats_comments`.* FROM `hubstats_comments` WHERE `hubstats_comments`.`id` = 100 LIMIT 1
16437
+  (0.1ms) SAVEPOINT active_record_1
16438
+ SQL (0.1ms) INSERT INTO `hubstats_comments` (`body`, `commit_id`, `created_at`, `diff_hunk`, `html_url`, `id`, `kind`, `line`, `original_commit_id`, `original_position`, `path`, `position`, `pull_request_id`, `pull_request_url`, `repo_id`, `updated_at`, `url`, `user_id`) VALUES (NULL, NULL, '2014-07-23 17:33:34', NULL, NULL, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'www.pull.com', NULL, '2014-07-23 17:33:34', NULL, 10)
16439
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16440
+  (0.1ms) SAVEPOINT active_record_1
16441
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16442
+  (0.5ms) ROLLBACK
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.18
4
+ version: 0.0.19
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-07-14 00:00:00.000000000 Z
11
+ date: 2014-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -193,9 +193,9 @@ files:
193
193
  - db/migrate/20140703200752_create_hubstats_labels_pull_requests.rb
194
194
  - lib/generators/hubstats/install_generator.rb
195
195
  - lib/generators/hubstats/octokit.example.yml
196
- - lib/generators/hubstats/octokit.rb
197
196
  - lib/hub_helper.rb
198
197
  - lib/hubstats.rb
198
+ - lib/hubstats/config.rb
199
199
  - lib/hubstats/engine.rb
200
200
  - lib/hubstats/events_handler.rb
201
201
  - lib/hubstats/github_api.rb
@@ -220,7 +220,6 @@ files:
220
220
  - test/dummy/config/initializers/backtrace_silencers.rb
221
221
  - test/dummy/config/initializers/inflections.rb
222
222
  - test/dummy/config/initializers/mime_types.rb
223
- - test/dummy/config/initializers/octokit.rb
224
223
  - test/dummy/config/initializers/secret_token.rb
225
224
  - test/dummy/config/initializers/session_store.rb
226
225
  - test/dummy/config/initializers/wrap_parameters.rb
@@ -358,7 +357,6 @@ test_files:
358
357
  - test/dummy/config/initializers/backtrace_silencers.rb
359
358
  - test/dummy/config/initializers/inflections.rb
360
359
  - test/dummy/config/initializers/mime_types.rb
361
- - test/dummy/config/initializers/octokit.rb
362
360
  - test/dummy/config/initializers/secret_token.rb
363
361
  - test/dummy/config/initializers/session_store.rb
364
362
  - test/dummy/config/initializers/wrap_parameters.rb
@@ -1,10 +0,0 @@
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
@@ -1,10 +0,0 @@
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