hubstats 0.12.1 → 0.12.2

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: a0ead1316136280de22c765e00d40f8b0ef89ccd
4
- data.tar.gz: 760e93ad92c0ca58768a9c7d7e6fe64379ee5932
3
+ metadata.gz: 5c64060494a5b0519e55a8baaa92e0275adfec5f
4
+ data.tar.gz: 32d75bfb93d1eaa5b2923832fe5b177d17364ce8
5
5
  SHA512:
6
- metadata.gz: 41727a4a51bc98b10e12971bf9cbc34036d346d8c0abc2a49a58d2590cbb5d9c135bb88e7986b334eacd4329b9a4e44ace76977ec8345e443574776f61322095
7
- data.tar.gz: 6793ad8af6fee4ae2d6ff99e19e00ca7a742a2f7428e967a82aeb288195553161c617fa256f33d7368d0873adcd0f99c9d64fa504a87b9ab9db0365422bee902
6
+ metadata.gz: dedcad39ebd8266563d7ebe10ada5d9a1fbf78fb990abc21d9cfff5d3b7f7aa05af4b0e47544df274b497cf21332e5cf8c940163e5b1fb690a98461759825d99
7
+ data.tar.gz: a5ead0f76dd1b3679795dc1dc7fd250ac864e0245f6c46954eac361e38f5075b88e7a04add615b2e8859eb38d58764536924329997c4013c2cf41037437dfa5b
data/CHANGELOG.markdown CHANGED
@@ -1,3 +1,8 @@
1
+ #### v0.12.2
2
+ * Fix bug that results in comments never being saved
3
+
4
+ > Emma Sax: production-status-check[bot]: https://github.com/sportngin/hubstats/pull/134
5
+
1
6
  #### v0.12.1
2
7
  * Show 50 items in detailed show pages
3
8
 
@@ -32,7 +32,7 @@ module Hubstats
32
32
  def self.create_or_update(github_comment)
33
33
  github_comment = github_comment.to_h.with_indifferent_access if github_comment.respond_to? :to_h
34
34
 
35
- unless github_comment[:user_id]
35
+ unless github_comment[:user]
36
36
  Rails.logger.warn "Found comment with no user, ignoring. GitHub comment ID: #{github_comment[:id]}"
37
37
  return nil
38
38
  end
data/hubstats.gemspec CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
16
16
  s.files = `git ls-files -z`.split("\x0")
17
17
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
18
18
 
19
- s.add_dependency "rails", "~> 4.2"
19
+ s.add_dependency "rails", "~> 4.2.10"
20
20
  s.add_dependency "octokit", "~> 4.2"
21
21
  s.add_dependency "will_paginate-bootstrap", "~> 1.0"
22
22
  s.add_dependency "select2-rails", "~> 3.0"
@@ -1,3 +1,3 @@
1
1
  module Hubstats
2
- VERSION = "0.12.1"
2
+ VERSION = "0.12.2"
3
3
  end
@@ -63,20 +63,34 @@ module Hubstats
63
63
 
64
64
  it 'should successfully creates_or_updates the event' do
65
65
  ehandler = Hubstats::EventsHandler.new()
66
- payload = build(:comment_payload_hash, :user => {:login=>"hermina", :id=>0, :role=>"User"},
67
- :comment => {"id"=>194761, "body"=>"Quidem ea minus ut odio optio.",
68
- "kind"=>"Issue", "user_id"=>0, "repo_id"=>101010,
69
- "created_at" => Date.today, "updated_at" => Date.today})
66
+ payload = build(:comment_payload_hash,
67
+ :user => {:login=>"hermina", :id=>0, :role=>"User"},
68
+ :comment => {
69
+ "id"=>194761,
70
+ "body"=>"Quidem ea minus ut odio optio.",
71
+ "kind"=>"Issue",
72
+ "user"=>{},
73
+ "created_at" => Date.today,
74
+ "updated_at" => Date.today
75
+ }
76
+ )
70
77
  allow(Hubstats::User).to receive_message_chain(:create_or_update).and_return(user)
71
78
  expect(ehandler.route(payload, payload[:type]).class).to eq(Hubstats::Comment)
72
79
  end
73
80
 
74
- it 'should successfully creates_or_updates the event even if the user_id is missing' do
81
+ it 'should successfully creates_or_updates the event even if the user is missing' do
75
82
  ehandler = Hubstats::EventsHandler.new()
76
- payload = build(:comment_payload_hash, :user => {:login=>"hermina", :id=>0, :role=>"User"},
77
- :comment => {"id"=>194761, "body"=>"Quidem ea minus ut odio optio.",
78
- "kind"=>"Issue", "repo_id"=>101010,
79
- "created_at" => Date.today, "updated_at" => Date.today})
83
+ payload = build(:comment_payload_hash,
84
+ :user => {:login=>"hermina", :id=>0, :role=>"User"},
85
+ :comment => {
86
+ "id"=>194761,
87
+ "body"=>"Quidem ea minus ut odio optio.",
88
+ "kind"=>"Issue",
89
+ "user"=>nil,
90
+ "created_at" => Date.today,
91
+ "updated_at" => Date.today
92
+ }
93
+ )
80
94
  allow(Hubstats::User).to receive_message_chain(:create_or_update).and_return(user)
81
95
  expect(ehandler.route(payload, payload[:type])).to be_nil
82
96
  end
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.12.1
4
+ version: 0.12.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elliot Hursh
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-06-08 00:00:00.000000000 Z
12
+ date: 2018-08-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '4.2'
20
+ version: 4.2.10
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: '4.2'
27
+ version: 4.2.10
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: octokit
30
30
  requirement: !ruby/object:Gem::Requirement