usda_fdc 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3259d937f8cab77f84475be7d9cc4871efed34326604ceeb0aa2fb6f3e217546
4
- data.tar.gz: 88c52fdab8c2bd8fc4d6492fdc81d594dd477d63c49cac8c77b216a35bd21926
3
+ metadata.gz: 8f0136a088aacc1d2e4b5f1b8049f7fcb313d9299a203748d5a1b3faf993141b
4
+ data.tar.gz: 631c944a879ee521109440a2f8eefbc2e57cb3ce7618b8928fdf4c0a8d5b3328
5
5
  SHA512:
6
- metadata.gz: b9804c6de9e90e962dafb4cc9184165c85f6f1b9bbf20a8e6551ab45b817319c87266b82b85cc12988bd2d714ba9db192127739d559ab6eb49d968e4cbcb61d6
7
- data.tar.gz: 97dcb6d90428858f511c413e59faab3faa14e056377cab0da0ebb96427371d93132507b24b6220c17aba592ac82059ace8d053a648dc7a177cf770b49786c4e3
6
+ metadata.gz: ef5b61d55f0c84240c8c6bf112da41cacf3dad2afa18887b4ed9b05cd6e66cd7c94ae99850a160f7663852ec6d7b0cf120d981bbf40e3b51d9e743ce788a6133
7
+ data.tar.gz: 81252531dbe674e9b23d54fd7d4df145792ca5ea7ca3195eeddea2b81f9b84b20718a43e1e7a6c9bef7689bc530ba5eb04f714284bd6bfb4dc21b809adbb7d31
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.2.2] - 2023-11-18
4
+
5
+ - Reduce build size
6
+
7
+ ## [0.2.1] - 2022-07-15
8
+
9
+ - Some internal cleanup
10
+
3
11
  ## [0.2.0] - 2022-07-15
4
12
 
5
13
  - 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.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
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.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zoran Pesic
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-15 00:00:00.000000000 Z
11
+ date: 2023-11-19 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -16,20 +16,15 @@ executables: []
16
16
  extensions: []
17
17
  extra_rdoc_files: []
18
18
  files:
19
- - ".rubocop.yml"
20
19
  - CHANGELOG.md
21
- - Gemfile
22
20
  - LICENSE.txt
23
21
  - README.md
24
- - Rakefile
25
22
  - lib/usda_fdc.rb
26
23
  - lib/usda_fdc/client.rb
27
24
  - lib/usda_fdc/configuration.rb
28
25
  - lib/usda_fdc/helpers/configurable.rb
29
26
  - lib/usda_fdc/helpers/errors.rb
30
27
  - lib/usda_fdc/version.rb
31
- - sig/usda_fdc.rbs
32
- - usda_fdc.gemspec
33
28
  homepage: https://github.com/zokioki/usda_fdc
34
29
  licenses:
35
30
  - MIT
@@ -51,7 +46,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
51
46
  - !ruby/object:Gem::Version
52
47
  version: '0'
53
48
  requirements: []
54
- rubygems_version: 3.2.32
49
+ rubygems_version: 3.4.3
55
50
  signing_key:
56
51
  specification_version: 4
57
52
  summary: A Ruby interface to the USDA FoodData Central API.
data/.rubocop.yml DELETED
@@ -1,11 +0,0 @@
1
- AllCops:
2
- TargetRubyVersion: 2.6
3
-
4
- Layout/LineLength:
5
- Max: 120
6
-
7
- Style/Documentation:
8
- Enabled: false
9
-
10
- Bundler/OrderedGems:
11
- Enabled: false
data/Gemfile DELETED
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source 'https://rubygems.org'
4
-
5
- gemspec
6
-
7
- gem 'rake', '~> 13.0'
8
- gem 'minitest', '~> 5.0'
9
- gem 'rubocop', '~> 1.21'
data/Rakefile DELETED
@@ -1,16 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'bundler/gem_tasks'
4
- require 'rake/testtask'
5
-
6
- Rake::TestTask.new(:test) do |t|
7
- t.libs << 'test'
8
- t.libs << 'lib'
9
- t.test_files = FileList['test/**/test_*.rb']
10
- end
11
-
12
- require 'rubocop/rake_task'
13
-
14
- RuboCop::RakeTask.new
15
-
16
- task default: %i[test rubocop]
data/sig/usda_fdc.rbs DELETED
@@ -1,4 +0,0 @@
1
- module UsdaFdc
2
- VERSION: String
3
- # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
- end
data/usda_fdc.gemspec DELETED
@@ -1,27 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'lib/usda_fdc/version'
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = 'usda_fdc'
7
- spec.version = UsdaFdc::VERSION
8
- spec.authors = ['Zoran Pesic']
9
-
10
- spec.summary = 'A Ruby interface to the USDA FoodData Central API.'
11
- spec.homepage = 'https://github.com/zokioki/usda_fdc'
12
- spec.license = 'MIT'
13
- spec.required_ruby_version = '>= 2.6.0'
14
-
15
- spec.metadata['homepage_uri'] = spec.homepage
16
- spec.metadata['source_code_uri'] = spec.homepage
17
-
18
- spec.files = Dir.chdir(File.expand_path(__dir__)) do
19
- `git ls-files -z`.split("\x0").reject do |f|
20
- (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
21
- end
22
- end
23
-
24
- spec.bindir = 'exe'
25
- spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
26
- spec.require_paths = ['lib']
27
- end