ruby_http_client 1.0.0 → 1.1.0

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
  SHA1:
3
- metadata.gz: 962d8241ec81889b1f89348c24fd6cc490a9aa98
4
- data.tar.gz: 4cceab98eddf6359e7e8173e511b1018b803f882
3
+ metadata.gz: 61e23372762503aa10623d3b332239101397c26e
4
+ data.tar.gz: 8a743e96398d6a3c0f8d0d34c1122420f160fdb5
5
5
  SHA512:
6
- metadata.gz: 9c75159dfae79c5f06a7b1590aaa0d985e389099c87e258c381371993d524e2114eaabe9f7055eda1caa12c5a7cbace192fd22960cdbb93b168b96ffb7d02681
7
- data.tar.gz: b13713f036cdd34a1054b6aa0cb046261c4787a9252575d0cbf335003d002477c77e49391458c75fec8b795d31ba931c1d4e2b2c3da9a133f2c79f57a8019d3a
6
+ metadata.gz: e474ca0aa13fa68adbe4834ae043d47108b9d2fce24e5f96d45ff272dae7009c06fb346d9e9e3483c1eaadd16b885d51faddd17ae9897e558ae2d1b67b6bb5c3
7
+ data.tar.gz: ea567875dc2dde36ad546ecd6b4e034f45f4fad5a0f7290120adfcdb3d6aced2482b2f4be775f0f1ad1846bd683f511fc4db4e0e7773eb7ee13d32549af9a952
data/CONTRIBUTING.md CHANGED
@@ -104,10 +104,6 @@ This allows for the following mapping from a URL to a method chain:
104
104
 
105
105
  `/api_client/{api_key_id}/version` maps to `client.api_client._(api_key_id).version.<method>()` where <method> is a [HTTP verb](https://github.com/sendgrid/ruby-http-client/blob/master/lib/ruby_http_client.rb#L38).
106
106
 
107
- **congfig.rb**
108
-
109
- Loads the environment variables.
110
-
111
107
  <a name="testing"></a>
112
108
  ## Testing
113
109
 
data/README.md CHANGED
@@ -48,7 +48,7 @@ Following is an abridged example, here is the [full working code](https://github
48
48
  ```ruby
49
49
  require ruby_http_client
50
50
 
51
- Config.new
51
+ SendGrid::Config.new
52
52
  headers = JSON.parse('
53
53
  {
54
54
  "Authorization": "Bearer ' + ENV['SENDGRID_API_KEY'] + '",
data/examples/example.rb CHANGED
@@ -1,7 +1,6 @@
1
- require_relative '../lib/config'
2
1
  require_relative '../lib/ruby_http_client'
3
2
 
4
- Config.new
3
+ SendGrid::Config.new
5
4
  headers = JSON.parse('
6
5
  {
7
6
  "Authorization": "Bearer ' + ENV['SENDGRID_API_KEY'] + '",
@@ -4,6 +4,17 @@ module SendGrid
4
4
  require 'net/http'
5
5
  require 'net/https'
6
6
 
7
+ # Loads environment variables from a .env file.
8
+ class Config
9
+ def initialize
10
+ File.open('./.env').readlines.each do |line|
11
+ key, value = line.split '='
12
+ ENV[key] = value.chomp
13
+ end
14
+ ENV
15
+ end
16
+ end
17
+
7
18
  # Holds the response from an API call.
8
19
  class Response
9
20
  # * *Args* :
@@ -4,19 +4,18 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'ruby_http_client'
7
- spec.version = '1.0.0'
7
+ spec.version = '1.1.0'
8
8
  spec.authors = ['Elmer Thomas']
9
9
  spec.email = 'dx@sendgrid.com'
10
10
  spec.summary = 'A simple REST client'
11
11
  spec.description = 'Quickly and easily access any REST or REST-like API.'
12
12
  spec.homepage = 'http://github.com/sendgrid/ruby-http-client'
13
13
  spec.license = 'MIT'
14
-
14
+ spec.required_ruby_version = '>= 2.2'
15
15
  spec.files = `git ls-files -z`.split("\x0")
16
16
  spec.executables = spec.files.grep(/^bin/) { |f| File.basename(f) }
17
17
  spec.test_files = spec.files.grep(/^(test|spec|features)/)
18
18
  spec.require_paths = ['lib']
19
19
 
20
20
  spec.add_development_dependency 'rake', '~> 0'
21
- spec.add_development_dependency 'bundler', '~> 1.6'
22
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_http_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elmer Thomas
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '1.6'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '1.6'
41
27
  description: Quickly and easily access any REST or REST-like API.
42
28
  email: dx@sendgrid.com
43
29
  executables: []
@@ -54,7 +40,6 @@ files:
54
40
  - README.md
55
41
  - Rakefile
56
42
  - examples/example.rb
57
- - lib/config.rb
58
43
  - lib/ruby_http_client.rb
59
44
  - ruby_http_client.gemspec
60
45
  - test/test_ruby_http_client.rb
@@ -70,7 +55,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
70
55
  requirements:
71
56
  - - ">="
72
57
  - !ruby/object:Gem::Version
73
- version: '0'
58
+ version: '2.2'
74
59
  required_rubygems_version: !ruby/object:Gem::Requirement
75
60
  requirements:
76
61
  - - ">="
data/lib/config.rb DELETED
@@ -1,10 +0,0 @@
1
- # Loads environment variables from a .env file.
2
- class Config
3
- def initialize
4
- File.open('./.env').readlines.each do |line|
5
- key, value = line.split '='
6
- ENV[key] = value.chomp
7
- end
8
- ENV
9
- end
10
- end