send_sonar 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/send_sonar/client.rb +2 -3
- data/lib/send_sonar/exceptions.rb +2 -1
- data/lib/send_sonar/version.rb +1 -1
- metadata +92 -116
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 398e080fc22c92b2aa5e48977757ca889a386ee2
|
4
|
+
data.tar.gz: 6fd669504ba5e503ba95127cbc3c2713e4bdcd71
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7ec6127475760e71584bd50d7fba3ebcbc6305fcef119d9ffd8c50dcfc85d1d2e98f8410e9c84dc9acf91163784ef3dbf70279c714face809ab2c2ba26f124e8
|
7
|
+
data.tar.gz: 39eb0f07570c997b93f7175b072220576af4aaa3e8445770bffa238436979dafc789ecaac5f549f017026ac17eed0ad2807da151bb0e78c270092be78f1980a3
|
data/lib/send_sonar/client.rb
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
module SendSonar
|
2
2
|
module Client
|
3
3
|
def self.post(url, payload, headers={}, &block)
|
4
|
-
RestClient::Request.execute(:method => :post, :url => url, :payload => payload, :headers => headers,
|
5
|
-
:open_timeout => 8, :timeout => 10, &block)
|
4
|
+
RestClient::Request.execute(:method => :post, :url => url, :payload => payload, :headers => headers, &block)
|
6
5
|
|
7
6
|
rescue Errno::ECONNREFUSED => e
|
8
7
|
raise ConnectionRefused.new(e)
|
@@ -16,7 +15,7 @@ module SendSonar
|
|
16
15
|
else
|
17
16
|
response = e.response && JSON.parse(e.response) || {}
|
18
17
|
error = response["error"]
|
19
|
-
exception_class = Exceptions::EXCEPTIONS_MAP[error] ||
|
18
|
+
exception_class = Exceptions::EXCEPTIONS_MAP[error] || UnknownRequestError
|
20
19
|
raise exception_class.new(e)
|
21
20
|
end
|
22
21
|
end
|
@@ -46,7 +46,8 @@ module SendSonar
|
|
46
46
|
EXCEPTIONS_MAP = {
|
47
47
|
"Bad Token" => BadToken,
|
48
48
|
"No Active Subscription" => NoActiveSubscription,
|
49
|
-
"Api Disabled For Company" => ApiDisabledForCompany
|
49
|
+
"Api Disabled For Company" => ApiDisabledForCompany,
|
50
|
+
"Request Timed Out" => RequestTimeout
|
50
51
|
}
|
51
52
|
end
|
52
53
|
end
|
data/lib/send_sonar/version.rb
CHANGED
metadata
CHANGED
@@ -1,122 +1,106 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: send_sonar
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 0
|
9
|
-
- 6
|
10
|
-
version: 1.0.6
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.7
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- John Gesimondo
|
14
8
|
autorequire:
|
15
9
|
bindir: bin
|
16
10
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2014-12-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
21
14
|
name: bundler
|
22
|
-
|
23
|
-
|
24
|
-
none: false
|
25
|
-
requirements:
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
26
17
|
- - ~>
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
segments:
|
30
|
-
- 1
|
31
|
-
- 3
|
32
|
-
version: "1.3"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
33
20
|
type: :development
|
34
|
-
version_requirements: *id001
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
|
-
name: rake
|
37
21
|
prerelease: false
|
38
|
-
|
39
|
-
|
40
|
-
requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
41
24
|
- - ~>
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
48
34
|
type: :development
|
49
|
-
version_requirements: *id002
|
50
|
-
- !ruby/object:Gem::Dependency
|
51
|
-
name: rspec
|
52
35
|
prerelease: false
|
53
|
-
|
54
|
-
|
55
|
-
requirements:
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
56
38
|
- - ~>
|
57
|
-
- !ruby/object:Gem::Version
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
63
48
|
type: :development
|
64
|
-
version_requirements: *id003
|
65
|
-
- !ruby/object:Gem::Dependency
|
66
|
-
name: vcr
|
67
49
|
prerelease: false
|
68
|
-
|
69
|
-
|
70
|
-
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: vcr
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
71
59
|
- - ~>
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
|
74
|
-
segments:
|
75
|
-
- 2
|
76
|
-
- 6
|
77
|
-
version: "2.6"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '2.6'
|
78
62
|
type: :development
|
79
|
-
version_requirements: *id004
|
80
|
-
- !ruby/object:Gem::Dependency
|
81
|
-
name: webmock
|
82
63
|
prerelease: false
|
83
|
-
|
84
|
-
|
85
|
-
requirements:
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
86
66
|
- - ~>
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '2.6'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: webmock
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ~>
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.1'
|
93
76
|
type: :development
|
94
|
-
version_requirements: *id005
|
95
|
-
- !ruby/object:Gem::Dependency
|
96
|
-
name: rest-client
|
97
77
|
prerelease: false
|
98
|
-
|
99
|
-
|
100
|
-
requirements:
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
101
80
|
- - ~>
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.1'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rest-client
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ~>
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.6'
|
108
90
|
type: :runtime
|
109
|
-
|
110
|
-
|
111
|
-
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ~>
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.6'
|
97
|
+
description: ''
|
98
|
+
email:
|
112
99
|
- john@jmondo.com
|
113
100
|
executables: []
|
114
|
-
|
115
101
|
extensions: []
|
116
|
-
|
117
102
|
extra_rdoc_files: []
|
118
|
-
|
119
|
-
files:
|
103
|
+
files:
|
120
104
|
- .gitignore
|
121
105
|
- .travis.yml
|
122
106
|
- Gemfile
|
@@ -145,39 +129,30 @@ files:
|
|
145
129
|
- spec/vcr_cassettes/message_customer_bad_token.yml
|
146
130
|
- spec/vcr_cassettes/message_customer_no_subscription.yml
|
147
131
|
homepage: http://github.com/sendsonar/send_sonar_gem
|
148
|
-
licenses:
|
132
|
+
licenses:
|
149
133
|
- MIT
|
134
|
+
metadata: {}
|
150
135
|
post_install_message:
|
151
136
|
rdoc_options: []
|
152
|
-
|
153
|
-
require_paths:
|
137
|
+
require_paths:
|
154
138
|
- lib
|
155
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
none: false
|
166
|
-
requirements:
|
167
|
-
- - ">="
|
168
|
-
- !ruby/object:Gem::Version
|
169
|
-
hash: 3
|
170
|
-
segments:
|
171
|
-
- 0
|
172
|
-
version: "0"
|
139
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - '>='
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '0'
|
144
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
145
|
+
requirements:
|
146
|
+
- - '>='
|
147
|
+
- !ruby/object:Gem::Version
|
148
|
+
version: '0'
|
173
149
|
requirements: []
|
174
|
-
|
175
150
|
rubyforge_project:
|
176
|
-
rubygems_version:
|
151
|
+
rubygems_version: 2.2.1
|
177
152
|
signing_key:
|
178
|
-
specification_version:
|
153
|
+
specification_version: 4
|
179
154
|
summary: Provides a clean and simple gem to connect to Sonar
|
180
|
-
test_files:
|
155
|
+
test_files:
|
181
156
|
- spec/integrations/simple_desk_spec.rb
|
182
157
|
- spec/spec_helper.rb
|
183
158
|
- spec/vcr_cassettes/add_customer.yml
|
@@ -190,3 +165,4 @@ test_files:
|
|
190
165
|
- spec/vcr_cassettes/message_customer_bad_params.yml
|
191
166
|
- spec/vcr_cassettes/message_customer_bad_token.yml
|
192
167
|
- spec/vcr_cassettes/message_customer_no_subscription.yml
|
168
|
+
has_rdoc:
|