usda_fdc 0.2.0 → 0.2.1

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
  SHA256:
3
- metadata.gz: 3259d937f8cab77f84475be7d9cc4871efed34326604ceeb0aa2fb6f3e217546
4
- data.tar.gz: 88c52fdab8c2bd8fc4d6492fdc81d594dd477d63c49cac8c77b216a35bd21926
3
+ metadata.gz: b834a400890953356c7e7a6265bd5f5126724d2a5009295160fc0a9fcabfecf1
4
+ data.tar.gz: 7d41308bc4ca5d3f1ffaf3be668b9f910f1cde9422727bc5592224776b30ae36
5
5
  SHA512:
6
- metadata.gz: b9804c6de9e90e962dafb4cc9184165c85f6f1b9bbf20a8e6551ab45b817319c87266b82b85cc12988bd2d714ba9db192127739d559ab6eb49d968e4cbcb61d6
7
- data.tar.gz: 97dcb6d90428858f511c413e59faab3faa14e056377cab0da0ebb96427371d93132507b24b6220c17aba592ac82059ace8d053a648dc7a177cf770b49786c4e3
6
+ metadata.gz: b52fc6edacaada7389148783465473e4d73b86089f289ed9208ba99ac8fd3457e7acdb8a42184aa789f9c509d37785c0250c2a0705484814cf20c12835376413
7
+ data.tar.gz: b59138eb82af2fd0611d8869a63cff8e2f04bb922228ba549b9bb749c5152fa41302fe1fda7b7b9cb8ff1b16b0a3258ee328bd4580efde9306e7f446af406803
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.2.1] - 2022-07-15
4
+
5
+ - Some internal cleanup
6
+
3
7
  ## [0.2.0] - 2022-07-15
4
8
 
5
9
  - Allow request methods to accept block to manage request
@@ -34,7 +34,7 @@ module UsdaFdc
34
34
  uri.query = URI.encode_www_form(params) if params.any?
35
35
 
36
36
  request = Net::HTTP::Get.new(uri)
37
- set_default_headers_for(request)
37
+ assign_default_headers(request)
38
38
 
39
39
  yield(request) if block_given?
40
40
 
@@ -49,7 +49,7 @@ module UsdaFdc
49
49
  uri = URI("#{API_URL}#{path}")
50
50
 
51
51
  request = Net::HTTP::Post.new(uri)
52
- set_default_headers_for(request)
52
+ assign_default_headers(request)
53
53
  request.body = body.to_json
54
54
 
55
55
  yield(request) if block_given?
@@ -63,7 +63,7 @@ module UsdaFdc
63
63
 
64
64
  private
65
65
 
66
- def set_default_headers_for(request)
66
+ def assign_default_headers(request)
67
67
  request['X-Api-Key'] = @api_key
68
68
  request['Content-Type'] = 'application/json'
69
69
  request['User-Agent'] = "usda_fdc gem (v#{UsdaFdc::VERSION})"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UsdaFdc
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: usda_fdc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zoran Pesic