pvoutput 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/CHANGELOG.md +5 -0
- data/README.md +6 -0
- data/bin/console +1 -1
- data/lib/pvoutput/client.rb +3 -3
- data/lib/pvoutput/version.rb +1 -1
- data/pvoutput.gemspec +2 -2
- metadata +11 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5bae86d84185da437949075808498e10411e593feef84554670f6910b1136dd9
|
4
|
+
data.tar.gz: 0e8bdf41526686570b06714902f18ab63ab8f809a5d41c081f8e5299b1f380d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a479f681ca96f0c22c5627f8c19d65ea285aa0ff6407af03a1e03cad6407e6ec3a00e5487b9068b41b065f4157fe49f86776cb2b26aa2eb55afc9db90091baa
|
7
|
+
data.tar.gz: 809acd85b1f998651ee3f669130a88d7e4b09c4245aa7bdf88006a6dc5e2f257c6791c0a1dc9935fc50ce7e65e9f0645323945da1dd73f588b8d8da4e2e44d4b
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
[![Circle CI](https://circleci.com/gh/johnf/pvoutput.svg?style=svg)](https://circleci.com/gh/johnf/pvoutput)
|
4
4
|
[![Coverage Status](https://coveralls.io/repos/johnf/pvoutput/badge.svg?branch=master&service=github)](https://coveralls.io/github/johnf/pvoutput?branch=master)
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/pvoutput.svg)](http://badge.fury.io/rb/pvoutput)
|
6
|
+
|
5
7
|
|
6
8
|
Ruby library for talking to the PVOutput API.
|
7
9
|
|
@@ -147,6 +149,10 @@ client.add_output(
|
|
147
149
|
)
|
148
150
|
```
|
149
151
|
|
152
|
+
## Debugging
|
153
|
+
|
154
|
+
You can able HTTParty debugging to see the requests by setting `PVOUTPUT_DEBUG=true`
|
155
|
+
|
150
156
|
## Development
|
151
157
|
|
152
158
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/bin/console
CHANGED
data/lib/pvoutput/client.rb
CHANGED
@@ -4,7 +4,7 @@ module PVOutput
|
|
4
4
|
class Client
|
5
5
|
include HTTParty
|
6
6
|
base_uri 'pvoutput.org'
|
7
|
-
|
7
|
+
debug_output $stdout if ENV['PVOUTPUT_DEBUG']
|
8
8
|
|
9
9
|
def initialize(system_id, api_key, donation_mode = false)
|
10
10
|
@system_id = system_id.to_s
|
@@ -17,7 +17,7 @@ module PVOutput
|
|
17
17
|
self.class.headers 'X-Pvoutput-Apikey' => @api_key, 'X-Pvoutput-SystemId' => @system_id
|
18
18
|
end
|
19
19
|
|
20
|
-
# Helper method to post batch request to
|
20
|
+
# Helper method to post batch request to pvoutput that retries at the moment we get
|
21
21
|
# a 400 error back with body containing 'Load in progress'
|
22
22
|
def post_request(path, options = {}, &block)
|
23
23
|
loop do
|
@@ -30,7 +30,7 @@ module PVOutput
|
|
30
30
|
elsif response.code == 200
|
31
31
|
return
|
32
32
|
else
|
33
|
-
raise(
|
33
|
+
raise("Bad Post: #{response.body}")
|
34
34
|
end
|
35
35
|
end
|
36
36
|
end
|
data/lib/pvoutput/version.rb
CHANGED
data/pvoutput.gemspec
CHANGED
@@ -20,8 +20,8 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_dependency 'httparty'
|
22
22
|
|
23
|
-
spec.add_development_dependency 'bundler', '
|
24
|
-
spec.add_development_dependency 'rake', '
|
23
|
+
spec.add_development_dependency 'bundler', '>= 2.1'
|
24
|
+
spec.add_development_dependency 'rake', '>= 12.3.3'
|
25
25
|
spec.add_development_dependency 'pry'
|
26
26
|
spec.add_development_dependency 'rspec'
|
27
27
|
spec.add_development_dependency 'webmock'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pvoutput
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Ferlito
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -28,30 +28,30 @@ dependencies:
|
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1
|
33
|
+
version: '2.1'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '1
|
40
|
+
version: '2.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 12.3.3
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 12.3.3
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: pry
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -206,8 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
206
206
|
- !ruby/object:Gem::Version
|
207
207
|
version: '0'
|
208
208
|
requirements: []
|
209
|
-
|
210
|
-
rubygems_version: 2.5.1
|
209
|
+
rubygems_version: 3.1.2
|
211
210
|
signing_key:
|
212
211
|
specification_version: 4
|
213
212
|
summary: Library to speak to the PVOutput API
|