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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: fd666b46f2d458278fa5cc61a27098d80c4598ec
4
- data.tar.gz: 65282209af3a86141553ad69ea734f6a71e19b83
2
+ SHA256:
3
+ metadata.gz: 5bae86d84185da437949075808498e10411e593feef84554670f6910b1136dd9
4
+ data.tar.gz: 0e8bdf41526686570b06714902f18ab63ab8f809a5d41c081f8e5299b1f380d5
5
5
  SHA512:
6
- metadata.gz: 4763db564c14712d118676a008aea7a0e5d7d2c35b4ce4b04266766924df7e6d3bfc3c22ba896e169872ae249d08fd499edbae1a3457fb123cae923fd14d8a9e
7
- data.tar.gz: 4fa1bd913875d28af09952b240aa9251c91bf6189bb672e426e80aa7c1dbc09e8cdc64480c5c3a54cd959793900adefc73c9fee1f49453c936fbd32fe2c61dde
6
+ metadata.gz: 4a479f681ca96f0c22c5627f8c19d65ea285aa0ff6407af03a1e03cad6407e6ec3a00e5487b9068b41b065f4157fe49f86776cb2b26aa2eb55afc9db90091baa
7
+ data.tar.gz: 809acd85b1f998651ee3f669130a88d7e4b09c4245aa7bdf88006a6dc5e2f257c6791c0a1dc9935fc50ce7e65e9f0645323945da1dd73f588b8d8da4e2e44d4b
data/.gitignore CHANGED
@@ -4,3 +4,4 @@
4
4
  /pkg/
5
5
  /spec/reports/
6
6
  /tmp/
7
+ /vendor/bundle
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ # 0.5.0 (2020-09-20)
4
+
5
+ * Add more detail to error messages (@jwillemsen)
6
+ * Support debugging (@johnf)
7
+
3
8
  # 0.4.0 (20160911)
4
9
 
5
10
  * Add retries to batch_output (@jwillemsen)
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.
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'bundler/setup'
4
- require 'jfy'
4
+ require 'pvoutput/client'
5
5
 
6
6
  require 'pry'
7
7
  Pry.start
@@ -4,7 +4,7 @@ module PVOutput
4
4
  class Client
5
5
  include HTTParty
6
6
  base_uri 'pvoutput.org'
7
- # debug_output $stdout
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 pvout that retries at the moment we get
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('Bad Post')
33
+ raise("Bad Post: #{response.body}")
34
34
  end
35
35
  end
36
36
  end
@@ -1,3 +1,3 @@
1
1
  module PVOutput
2
- VERSION = '0.4.0'.freeze
2
+ VERSION = '0.5.0'.freeze
3
3
  end
@@ -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', '~> 1.10'
24
- spec.add_development_dependency 'rake', '~> 10.0'
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.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: 2016-09-11 00:00:00.000000000 Z
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.10'
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.10'
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: '10.0'
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: '10.0'
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
- rubyforge_project:
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