easy-rest-client 0.1.1 → 0.1.2

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: '079169b5a1eba4183e9fe4c87a292dffcf225560'
4
- data.tar.gz: a299d4303466328dac670f48ce3d62ff54c608eb
2
+ SHA256:
3
+ metadata.gz: 671397482c0d7ee688dbf4b8e128ff8dd9f6d901cd233e2c823c6d627a98ac3d
4
+ data.tar.gz: d36b30b5c27caa75ca48411b58c85abb129d52724c1d44954374e7595b1e3692
5
5
  SHA512:
6
- metadata.gz: e0eb9d918ad73ae8bda0b4833466a9c344d97e80d95fb838705916d14f0d20bc935f94ee0bdd510d7fc3d3cc0e67f5497f2c7d6630f8a7b25113a489febaabff
7
- data.tar.gz: 440b06c9234e9bb263f61a53839f1aa37369880a2a3598cc73f164f6b21ce6fd53d3f9eca2a581169283f5ee9256294b497880ac97a100868b680b733481005f
6
+ metadata.gz: cbf84d5ae5f562a262b31843564749314b006f6527c1e432390edca49c7dcdd27b0e18e22b50f3231a02ba8fdeb2708482b9e40ccd11d8fa39c5a1f0c7401b62
7
+ data.tar.gz: 96a8f0488d8405d1065c72e3ec624d94d28a9e94d6b00deb7e03b9b18af0d8f94cbaec2be18a55cc19701cced699df123153162ebe72743aa170ac267c887810
data/.irbrc ADDED
@@ -0,0 +1,4 @@
1
+ require 'awesome_print'
2
+ AwesomePrint.irb!
3
+
4
+ IRB.conf[:USE_AUTOCOMPLETE] = false
data/.rspec CHANGED
@@ -1,3 +1,3 @@
1
- --require spec_helper
2
- --color
3
1
  --format Fuubar
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml CHANGED
@@ -1,2 +1,106 @@
1
- inherit_from:
2
- - https://raw.githubusercontent.com/jeromedalbert/linting-rules/master/rules/.rubocop.yml
1
+ require:
2
+ - rubocop-performance
3
+ - rubocop-rake
4
+ - rubocop-rspec
5
+ - rubocop-rubycw
6
+ - standard
7
+ - standard-custom
8
+ - standard-performance
9
+
10
+ inherit_gem:
11
+ standard: config/base.yml
12
+ standard-performance: config/base.yml
13
+ standard-custom: config/base.yml
14
+ syntax_tree: config/rubocop.yml
15
+
16
+ inherit_mode:
17
+ merge:
18
+ - Exclude
19
+
20
+ AllCops:
21
+ NewCops: enable
22
+ Exclude:
23
+ - 'bin/**/*'
24
+ - 'tmp/**/*'
25
+ - 'vendor/**/*'
26
+
27
+ Bundler/OrderedGems:
28
+ Enabled: true
29
+
30
+ Layout/EmptyLineBetweenDefs:
31
+ AllowAdjacentOneLineDefs: true
32
+ Layout/LineLength:
33
+ Max: 100
34
+ Layout/SpaceInsideHashLiteralBraces:
35
+ EnforcedStyle: space
36
+
37
+ Metrics/ClassLength:
38
+ Max: 250
39
+ Metrics/MethodLength:
40
+ Max: 30
41
+ Exclude:
42
+ - 'spec/**/*'
43
+ Metrics/ModuleLength:
44
+ Max: 250
45
+ Exclude:
46
+ - 'spec/**/*'
47
+ Metrics/ParameterLists:
48
+ Max: 3
49
+ CountKeywordArgs: false
50
+ Exclude:
51
+ - 'spec/**/*'
52
+
53
+ RSpec/AnyInstance:
54
+ Enabled: false
55
+ RSpec/BeEq:
56
+ Enabled: false
57
+ RSpec/ContextWording:
58
+ Prefixes:
59
+ - when
60
+ RSpec/DescribedClass:
61
+ EnforcedStyle: explicit
62
+ RSpec/EmptyLineAfterFinalLet:
63
+ Enabled: false
64
+ RSpec/ExampleLength:
65
+ Max: 30
66
+ RSpec/ImplicitExpect:
67
+ EnforcedStyle: should
68
+ RSpec/ImplicitSubject:
69
+ Enabled: false
70
+ RSpec/IndexedLet:
71
+ Max: 2
72
+ RSpec/MatchArray:
73
+ Enabled: false
74
+ RSpec/MessageChain:
75
+ Enabled: false
76
+ RSpec/MissingExampleGroupArgument:
77
+ Enabled: false
78
+ RSpec/MultipleExpectations:
79
+ Enabled: false
80
+ RSpec/NestedGroups:
81
+ Max: 6
82
+ RSpec/VerifiedDoubles:
83
+ Enabled: false
84
+ RSpec/VoidExpect:
85
+ Exclude:
86
+ - 'spec/support/*'
87
+
88
+ Style/ClassMethodsDefinitions:
89
+ Enabled: true
90
+ Style/CollectionMethods:
91
+ Enabled: true
92
+ Style/DisableCopsWithinSourceCodeDirective:
93
+ Enabled: true
94
+ Style/GlobalStdStream:
95
+ Enabled: false
96
+ Style/GlobalVars:
97
+ Enabled: false
98
+ Style/RescueStandardError:
99
+ EnforcedStyle: explicit
100
+ Style/StringLiterals:
101
+ EnforcedStyle: single_quotes
102
+ Style/StringLiteralsInInterpolation:
103
+ EnforcedStyle: single_quotes
104
+ Style/UnlessLogicalOperators:
105
+ Enabled: true
106
+ EnforcedStyle: forbid_logical_operators
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.4.2
1
+ ruby-3.3.2
data/.streerc ADDED
@@ -0,0 +1,9 @@
1
+ --print-width=100
2
+ --plugins=plugin/single_quotes,plugin/disable_auto_ternary
3
+
4
+ --ignore-files='log/**'
5
+ --ignore-files='node_modules/**'
6
+ --ignore-files='package.json'
7
+ --ignore-files='tmp/**'
8
+ --ignore-files='vendor/**'
9
+ --ignore-files='**/*.json*'
data/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.2] - 2024-07-25
4
+
5
+ - Modernize gem structure
6
+
7
+ ## [0.1.0] - 2017-10-05
8
+
9
+ - Initial release
@@ -0,0 +1,132 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, caste, color, religion, or sexual
10
+ identity and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the overall
26
+ community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or advances of
31
+ any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email address,
35
+ without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official email address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ [INSERT CONTACT METHOD].
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series of
86
+ actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or permanent
93
+ ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within the
113
+ community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.1, available at
119
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120
+
121
+ Community Impact Guidelines were inspired by
122
+ [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123
+
124
+ For answers to common questions about this code of conduct, see the FAQ at
125
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
126
+ [https://www.contributor-covenant.org/translations][translations].
127
+
128
+ [homepage]: https://www.contributor-covenant.org
129
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130
+ [Mozilla CoC]: https://github.com/mozilla/diversity
131
+ [FAQ]: https://www.contributor-covenant.org/faq
132
+ [translations]: https://www.contributor-covenant.org/translations
@@ -1,6 +1,6 @@
1
- MIT License
1
+ The MIT License (MIT)
2
2
 
3
- Copyright (c) 2017 Jerome Dalbert
3
+ Copyright (c) 2024 Jerome Dalbert
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
9
  copies of the Software, and to permit persons to whom the Software is
10
10
  furnished to do so, subject to the following conditions:
11
11
 
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
14
 
15
15
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
16
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
17
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -1,24 +1,45 @@
1
- # EasyRestClient
1
+ # Easy Rest Client
2
2
 
3
- Easy Rest Client is a tiny wrapper around the popular
4
- [rest-client](https://github.com/rest-client/rest-client)
5
- gem.
3
+ This gem wraps rest-client JSON responses so you can easily do `response.a.b.c`
4
+ instead of `response['a']['b']['c']`.
6
5
 
7
- It just wraps JSON responses so that you can easily do `response.a.b.c` instead of `response['a']['b']['c']`.
6
+ ## Installation
8
7
 
9
- Useful when you want to quickly consume an API that does not provide a dedicated library, but still want the comfort of the object dot notation.
8
+ Install the gem globally:
10
9
 
11
- ## Installation
10
+ ```
11
+ gem install easy-rest-client
12
+ ```
13
+
14
+ Or add this line to your Gemfile:
15
+
16
+ ```ruby
17
+ gem 'easy-rest-client'
18
+ ```
12
19
 
13
- gem install easy-rest-client
20
+ and run `bundle install`.
14
21
 
15
22
  ## Usage
16
23
 
17
24
  ```ruby
18
- response = EasyRestClient.get 'http://some-api.com/coconuts/1'
19
- response.weight_in_pounds #=> 3.2
25
+ response = EasyRestClient.get 'http://some-api.com/dogs/1'
26
+ response.name #=> "Fido"
20
27
  ```
21
28
 
29
+ ## Development
30
+
31
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
32
+
33
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
34
+
22
35
  ## Contributing
23
36
 
24
- Bug reports and pull requests are welcome.
37
+ Bug reports and pull requests are welcome on GitHub at https://github.com/jeromedalbert/easy-rest-client. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/jeromedalbert/easy-rest-client/blob/main/CODE_OF_CONDUCT.md).
38
+
39
+ ## License
40
+
41
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
42
+
43
+ ## Code of Conduct
44
+
45
+ Everyone interacting in the Easy::Rest::Client project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/jeromedalbert/easy-rest-client/blob/main/CODE_OF_CONDUCT.md).
data/Rakefile CHANGED
@@ -1,8 +1,7 @@
1
1
  require 'bundler/gem_tasks'
2
2
  require 'rspec/core/rake_task'
3
+ require 'rubocop/rake_task'
3
4
 
4
- RSpec::Core::RakeTask.new(:spec) do |t|
5
- t.verbose = false
6
- end
7
-
8
- task default: :spec
5
+ RSpec::Core::RakeTask.new(:spec)
6
+ RuboCop::RakeTask.new
7
+ task default: %i[spec rubocop]
@@ -1 +1 @@
1
- require File.dirname(__FILE__) + '/easy_rest_client'
1
+ require_relative 'easy_rest_client'
@@ -0,0 +1,3 @@
1
+ class EasyRestClient
2
+ VERSION = '0.1.2'
3
+ end
@@ -1,21 +1,23 @@
1
- require 'rest-client'
2
- require 'json'
3
1
  require 'hashie'
2
+ require 'json'
3
+ require 'rest-client'
4
+ require_relative 'easy_rest_client/version'
4
5
 
6
+ # Wrapper to easily consume rest-client responses by using the dot notation.
7
+ #
8
+ # response = EasyRestClient.get 'http://some-api.com/dogs/1'
9
+ # response.name #=> "Fido"
5
10
  class EasyRestClient
11
+ def self.get(...) = new.send_request(:get, ...)
12
+ def self.post(...) = new.send_request(:post, ...)
13
+ def self.put(...) = new.send_request(:put, ...)
14
+ def self.delete(...) = new.send_request(:delete, ...)
15
+ def self.execute(...) = new.send_request(:execute, ...)
6
16
 
7
- class << self
8
- def get(*args); new.send_request(:get, *args); end
9
- def post(*args); new.send_request(:post, *args); end
10
- def put(*args); new.send_request(:put, *args); end
11
- def delete(*args); new.send_request(:delete, *args); end
12
- def execute(*args); new.send_request(:execute, *args); end
13
- end
17
+ def send_request(method_name, ...)
18
+ klass = (method_name == :execute) ? ::RestClient::Request : ::RestClient
14
19
 
15
- def send_request(method_name, *args)
16
- klass = method_name == :execute ? ::RestClient::Request : ::RestClient
17
-
18
- response = klass.send(method_name, *args)
20
+ response = klass.send(method_name, ...)
19
21
 
20
22
  parse(response)
21
23
  end
@@ -23,22 +25,21 @@ class EasyRestClient
23
25
  private
24
26
 
25
27
  def parse(response)
26
- if response.headers[:content_type] !~ %r(application/json)
27
- return response.body
28
- end
28
+ return response.body if !response.headers[:content_type].match?(%r{application/json})
29
29
 
30
30
  parsed_body = JSON.parse(response.body)
31
+
31
32
  convert_to_object(parsed_body)
32
33
  end
33
34
 
34
35
  def convert_to_object(element)
35
- if element.is_a?(Hash)
36
+ case element
37
+ when Hash
36
38
  Hashie::Mash.new(element)
37
- elsif element.is_a?(Array)
39
+ when Array
38
40
  element.map { |sub_element| convert_to_object(sub_element) }
39
41
  else
40
42
  element
41
43
  end
42
44
  end
43
-
44
45
  end
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy-rest-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jerome Dalbert
8
- autorequire:
9
- bindir: bin
8
+ autorequire:
9
+ bindir: exe
10
10
  cert_chain: []
11
- date: 2017-10-06 00:00:00.000000000 Z
11
+ date: 2024-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: rest-client
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '2.0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '2.0'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: hashie
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -39,157 +25,48 @@ dependencies:
39
25
  - !ruby/object:Gem::Version
40
26
  version: '0'
41
27
  - !ruby/object:Gem::Dependency
42
- name: bundler
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '1.15'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '1.15'
55
- - !ruby/object:Gem::Dependency
56
- name: rake
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '10.0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '10.0'
69
- - !ruby/object:Gem::Dependency
70
- name: pry
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: awesome_print
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: rspec
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: rspec-its
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: '0'
125
- - !ruby/object:Gem::Dependency
126
- name: fuubar
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- version: '0'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- version: '0'
139
- - !ruby/object:Gem::Dependency
140
- name: webmock
28
+ name: rest-client
141
29
  requirement: !ruby/object:Gem::Requirement
142
30
  requirements:
143
31
  - - ">="
144
32
  - !ruby/object:Gem::Version
145
33
  version: '0'
146
- type: :development
34
+ type: :runtime
147
35
  prerelease: false
148
36
  version_requirements: !ruby/object:Gem::Requirement
149
37
  requirements:
150
38
  - - ">="
151
39
  - !ruby/object:Gem::Version
152
40
  version: '0'
153
- - !ruby/object:Gem::Dependency
154
- name: rubocop
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - "~>"
158
- - !ruby/object:Gem::Version
159
- version: 0.50.0
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - "~>"
165
- - !ruby/object:Gem::Version
166
- version: 0.50.0
167
- description:
41
+ description: |
42
+ Wraps rest-client JSON responses so you can easily do response.a.b.c
43
+ instead of response['a']['b']['c'].
168
44
  email:
169
45
  - jerome.dalbert@gmail.com
170
46
  executables: []
171
47
  extensions: []
172
48
  extra_rdoc_files: []
173
49
  files:
174
- - ".gitignore"
50
+ - ".irbrc"
175
51
  - ".rspec"
176
52
  - ".rubocop.yml"
177
53
  - ".ruby-version"
178
- - Gemfile
179
- - LICENSE
54
+ - ".streerc"
55
+ - CHANGELOG.md
56
+ - CODE_OF_CONDUCT.md
57
+ - LICENSE.txt
180
58
  - README.md
181
59
  - Rakefile
182
- - bin/console
183
- - bin/rspec
184
- - bin/setup
185
- - easy-rest-client.gemspec
186
60
  - lib/easy-rest-client.rb
187
61
  - lib/easy_rest_client.rb
62
+ - lib/easy_rest_client/version.rb
188
63
  homepage: https://github.com/jeromedalbert/easy-rest-client
189
64
  licenses:
190
65
  - MIT
191
- metadata: {}
192
- post_install_message:
66
+ metadata:
67
+ homepage_uri: https://github.com/jeromedalbert/easy-rest-client
68
+ source_code_uri: https://github.com/jeromedalbert/easy-rest-client
69
+ post_install_message:
193
70
  rdoc_options: []
194
71
  require_paths:
195
72
  - lib
@@ -197,17 +74,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
197
74
  requirements:
198
75
  - - ">="
199
76
  - !ruby/object:Gem::Version
200
- version: '0'
77
+ version: 3.0.0
201
78
  required_rubygems_version: !ruby/object:Gem::Requirement
202
79
  requirements:
203
80
  - - ">="
204
81
  - !ruby/object:Gem::Version
205
82
  version: '0'
206
83
  requirements: []
207
- rubyforge_project:
208
- rubygems_version: 2.6.13
209
- signing_key:
84
+ rubygems_version: 3.5.15
85
+ signing_key:
210
86
  specification_version: 4
211
- summary: It just wraps JSON responses so that you can easily do response.a.b.c instead
212
- of response['a']['b']['c'].
87
+ summary: Easily consume rest-client responses by using the dot notation.
213
88
  test_files: []
data/.gitignore DELETED
@@ -1,11 +0,0 @@
1
- /.bundle
2
- /_yardoc
3
- /coverage
4
- /doc
5
- /pkg
6
- /spec/reports
7
- /tmp
8
-
9
- .yardoc
10
- Gemfile.lock
11
- .rubocop-http*
data/Gemfile DELETED
@@ -1,3 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
data/bin/console DELETED
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'bundler/setup'
4
- require 'easy-rest-client'
5
- require 'pry'
6
-
7
- Pry.start
data/bin/rspec DELETED
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'pathname'
4
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
5
- Pathname.new(__FILE__).realpath)
6
-
7
- require 'rubygems'
8
- require 'bundler/setup'
9
-
10
- load Gem.bin_path('rspec-core', 'rspec')
data/bin/setup DELETED
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
@@ -1,33 +0,0 @@
1
- lib = File.expand_path('../lib', __FILE__)
2
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
-
4
- Gem::Specification.new do |spec|
5
- spec.name = 'easy-rest-client'
6
- spec.version = '0.1.1'
7
- spec.authors = ['Jerome Dalbert']
8
- spec.email = ['jerome.dalbert@gmail.com']
9
-
10
- spec.summary = 'Easily consume rest-client responses by using the dot notation.'
11
- spec.summary = <<~EOS
12
- It just wraps JSON responses so that you can easily do response.a.b.c
13
- instead of response['a']['b']['c'].
14
- EOS
15
- spec.homepage = 'https://github.com/jeromedalbert/easy-rest-client'
16
- spec.license = 'MIT'
17
-
18
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f =~ %r{^spec/} }
19
- spec.require_paths = ['lib']
20
-
21
- spec.add_dependency 'rest-client', '~> 2.0'
22
- spec.add_dependency 'hashie'
23
-
24
- spec.add_development_dependency 'bundler', '~> 1.15'
25
- spec.add_development_dependency 'rake', '~> 10.0'
26
- spec.add_development_dependency 'pry'
27
- spec.add_development_dependency 'awesome_print'
28
- spec.add_development_dependency 'rspec'
29
- spec.add_development_dependency 'rspec-its'
30
- spec.add_development_dependency 'fuubar'
31
- spec.add_development_dependency 'webmock'
32
- spec.add_development_dependency 'rubocop', '~> 0.50.0'
33
- end