simplify_api 0.1.2 → 0.1.3
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 +4 -4
- data/.gitignore +2 -0
- data/.rspec +3 -0
- data/.rubocop.yml +14 -0
- data/Gemfile +2 -0
- data/lib/simplify_api/simplify_api.rb +85 -38
- data/lib/simplify_api/support.rb +15 -0
- data/lib/simplify_api/version.rb +3 -1
- data/lib/simplify_api.rb +5 -3
- data/simplify_api.gemspec +20 -14
- data/spec/simplify_api_spec.rb +105 -0
- data/spec/spec_helper.rb +100 -0
- metadata +67 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10ee721abac5c00b5a8a832164ea083368e7092535b7238f2d22f37e05fdd109
|
4
|
+
data.tar.gz: 186733c3df4495ac3c3e3abb7eab1af2e5aaf01c0f0be5e455de49086f4ae00c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 052a2bbf129a7d62c65c3bea2dc9c1bf081208ca62111be3e6cb7674a231b99105ac65d23b51369765f9f2fd7fd53c838acd78bf5ba3b86ca0d59e287cf25e4a
|
7
|
+
data.tar.gz: aa6195bbc6e131f1408024c9fd247f62cca8e8aff327006fd7de30b24f26abc0eae048cc8f6e40deec921daaa300d0a03b9e17731fd1c97d1591b5a294cd8dc8
|
data/.gitignore
CHANGED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# The behavior of RuboCop can be controlled via the .rubocop.yml
|
2
|
+
# configuration file. It makes it possible to enable/disable
|
3
|
+
# certain cops (checks) and to alter their behavior if they accept
|
4
|
+
# any parameters. The file can be placed either in your home
|
5
|
+
# directory or in some project directory.
|
6
|
+
#
|
7
|
+
# RuboCop will start looking for the configuration file in the directory
|
8
|
+
# where the inspected file is and continue its way up to the root directory.
|
9
|
+
#
|
10
|
+
# See https://github.com/rubocop-hq/rubocop/blob/master/manual/configuration.md
|
11
|
+
|
12
|
+
AllCops:
|
13
|
+
Exclude:
|
14
|
+
- 'spec/spec_helper.rb'
|
data/Gemfile
CHANGED
@@ -1,50 +1,55 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# SimplifyApi
|
1
4
|
module SimplifyApi
|
2
5
|
def self.included(base)
|
3
6
|
base.singleton_class.send(:attr_accessor, :attributes)
|
4
7
|
base.attributes = {}
|
5
|
-
base.singleton_class.send(:attr_accessor, :mandatory)
|
6
|
-
base.mandatory = []
|
7
|
-
base.singleton_class.send(:attr_accessor, :default)
|
8
|
-
base.default = {}
|
9
8
|
base.extend(ClassMethods)
|
10
9
|
end
|
11
10
|
|
11
|
+
# ClassMethods
|
12
12
|
module ClassMethods
|
13
13
|
def attribute(attr, type = Object, **args)
|
14
|
-
raise ArgumentError, "Duplicate attribute #{attr}." if
|
15
|
-
|
14
|
+
raise ArgumentError, "Duplicate attribute #{attr}." if attributes[attr]
|
15
|
+
|
16
|
+
if type.class == Array
|
16
17
|
args[:default] = [] unless args[:default]
|
17
18
|
args[:array_type] = type[0]
|
18
19
|
end
|
19
|
-
|
20
|
+
|
21
|
+
args[:mandatory] ||= false
|
22
|
+
args[:default] ||= nil unless args[:default].class == FalseClass
|
23
|
+
|
24
|
+
attributes[attr] = {
|
20
25
|
name: attr.to_s,
|
21
|
-
type: type.class == Class ? type : type.class == Array ? Array : Object,
|
26
|
+
type: type.class == Class ? type : (type.class == Array ? Array : Object),
|
22
27
|
params: args
|
23
28
|
}
|
24
|
-
|
25
|
-
self.default["#{attr}".to_sym] = args[:default] if args[:default]
|
26
|
-
self.attributes[attr]
|
29
|
+
attributes[attr]
|
27
30
|
end
|
28
31
|
end
|
29
32
|
|
30
|
-
def initialize(opts)
|
31
|
-
opts
|
32
|
-
opts.
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
33
|
+
def initialize(opts = {})
|
34
|
+
opts.symbolize_keys!
|
35
|
+
# opts = { klass_attr.first[0] => opts } if opts.class == Array
|
36
|
+
klass_attr.each_pair do |name, spec|
|
37
|
+
params = spec[:params]
|
38
|
+
if opts.key?(name)
|
39
|
+
value = process_value(name, opts[name])
|
40
|
+
opts.delete(name)
|
41
|
+
else
|
42
|
+
value = params[:default]
|
40
43
|
end
|
41
|
-
|
44
|
+
raise ArgumentError, "Missing mandatory attribute => #{name}" if params[:mandatory] & value.nil?
|
45
|
+
|
46
|
+
create_and_set_instance_variable(name.to_s, value)
|
42
47
|
end
|
43
|
-
|
44
|
-
|
45
|
-
|
48
|
+
|
49
|
+
opts.each_pair do |key, value|
|
50
|
+
expanded_value = process_value(key, value)
|
51
|
+
create_and_set_instance_variable(key.to_s, expanded_value)
|
46
52
|
end
|
47
|
-
self
|
48
53
|
end
|
49
54
|
|
50
55
|
def to_h
|
@@ -54,8 +59,8 @@ module SimplifyApi
|
|
54
59
|
v = instance_variable_get(i)
|
55
60
|
if v.class == Array then
|
56
61
|
r = []
|
57
|
-
v.each {|a| r << (a.respond_to?(:to_h) ? a.to_h : a) }
|
58
|
-
if
|
62
|
+
v.each { |a| r << (a.respond_to?(:to_h) ? a.to_h : a) }
|
63
|
+
if klass_attr[k][:params][:invisible] then
|
59
64
|
h = r
|
60
65
|
else
|
61
66
|
h[k] = r
|
@@ -70,16 +75,28 @@ module SimplifyApi
|
|
70
75
|
def to_json
|
71
76
|
self.to_h.to_json
|
72
77
|
end
|
73
|
-
|
78
|
+
|
79
|
+
# method_missing
|
80
|
+
# Called in case an unexisting method is called.
|
81
|
+
#
|
82
|
+
# To an assignment call it will create the instance variable.
|
83
|
+
# Every other call will be passed to super.
|
84
|
+
#
|
74
85
|
def method_missing(method_name, *args, &block)
|
75
86
|
case method_name
|
76
87
|
when /(.*)\=$/
|
77
|
-
create_and_set_instance_variable(
|
88
|
+
create_and_set_instance_variable($1.to_s, args[0])
|
78
89
|
else
|
79
90
|
super(method_name, args, block)
|
80
91
|
end
|
81
92
|
end
|
82
93
|
|
94
|
+
# respond_to_mssing?
|
95
|
+
# Called to check if an instance respond to a message.
|
96
|
+
#
|
97
|
+
# It should respond to any assignment call.
|
98
|
+
# Every other type should be passed to super.
|
99
|
+
#
|
83
100
|
def respond_to_missing?(method_name, *args)
|
84
101
|
case method_name
|
85
102
|
when /(.*)\=$/
|
@@ -90,19 +107,49 @@ module SimplifyApi
|
|
90
107
|
end
|
91
108
|
|
92
109
|
private
|
110
|
+
|
93
111
|
def create_and_set_instance_variable(name, value)
|
94
|
-
|
95
|
-
|
96
|
-
|
112
|
+
klass_attr[name.to_sym] = { name: name, type: value.class, params: { default: nil, mandatory: false }} unless klass_attr[name.to_sym]
|
113
|
+
|
114
|
+
define_singleton_method("#{name}=") do |arg|
|
115
|
+
raise ArgumentError, "Invalid value for #{name} => #{arg}" unless valid_value?(name, arg)
|
116
|
+
|
97
117
|
instance_variable_set("@#{name}", arg)
|
98
118
|
end
|
99
|
-
|
119
|
+
|
120
|
+
define_singleton_method(name.to_s) do
|
100
121
|
instance_variable_get("@#{name}")
|
101
122
|
end
|
102
|
-
|
123
|
+
|
124
|
+
send("#{name}=", value)
|
125
|
+
end
|
126
|
+
|
127
|
+
def valid_value?(name, value)
|
128
|
+
return true unless klass_attr[name.to_sym][:params].key?(:values)
|
129
|
+
|
130
|
+
valid_values = klass_attr[name.to_sym][:params][:values]
|
131
|
+
return true if valid_values.include?(value)
|
132
|
+
|
133
|
+
false
|
134
|
+
end
|
135
|
+
|
136
|
+
def process_value(key, value)
|
137
|
+
case value
|
138
|
+
when Hash
|
139
|
+
value = klass_attr[key][:type].new(value)
|
140
|
+
when Array
|
141
|
+
value.collect! do |item|
|
142
|
+
if klass_attr[key][:params].key?(:array_type)
|
143
|
+
klass_attr[key][:params][:array_type].new(item)
|
144
|
+
else
|
145
|
+
item
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|
149
|
+
value
|
103
150
|
end
|
104
151
|
|
105
|
-
def
|
106
|
-
self.class.
|
152
|
+
def klass_attr
|
153
|
+
self.class.attributes
|
107
154
|
end
|
108
|
-
end
|
155
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_strin_literal: true
|
2
|
+
|
3
|
+
class Hash
|
4
|
+
def transform_keys!
|
5
|
+
return enum_for(:transform_keys!) { size } unless block_given?
|
6
|
+
keys.each do |key|
|
7
|
+
self[yield(key)] = delete(key)
|
8
|
+
end
|
9
|
+
self
|
10
|
+
end
|
11
|
+
|
12
|
+
def symbolize_keys!
|
13
|
+
transform_keys! { |key| key.to_sym rescue key }
|
14
|
+
end
|
15
|
+
end
|
data/lib/simplify_api/version.rb
CHANGED
data/lib/simplify_api.rb
CHANGED
data/simplify_api.gemspec
CHANGED
@@ -1,20 +1,26 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
5
|
require 'simplify_api/version'
|
5
6
|
|
6
7
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name
|
8
|
-
spec.version
|
9
|
-
spec.date
|
10
|
-
spec.authors
|
11
|
-
spec.email
|
12
|
-
spec.summary
|
13
|
-
spec.description
|
14
|
-
|
15
|
-
spec.
|
16
|
-
spec.
|
17
|
-
spec.
|
8
|
+
spec.name = 'simplify_api'
|
9
|
+
spec.version = SimplifyApi::VERSION
|
10
|
+
spec.date = '2019-05-07'
|
11
|
+
spec.authors = ['Rodrigo Garcia Couto']
|
12
|
+
spec.email = ['r@rodg.co']
|
13
|
+
spec.summary = 'A simple set of tools to help the use of APIs'
|
14
|
+
spec.description = 'Fairly usable. A simple set of tools to simplify '\
|
15
|
+
'the use of APIs in Ruby'
|
16
|
+
spec.homepage = 'https://github.com/rodgco/simplify_api'
|
17
|
+
spec.license = 'MIT'
|
18
|
+
spec.files = `git ls-files -z`.split("\x0")
|
19
|
+
spec.require_paths = ['lib']
|
18
20
|
|
19
|
-
spec.add_development_dependency
|
21
|
+
spec.add_development_dependency 'bundler'
|
22
|
+
spec.add_development_dependency 'rspec'
|
23
|
+
spec.add_development_dependency 'rspec-collection_matchers'
|
24
|
+
spec.add_development_dependency 'rubocop'
|
25
|
+
spec.add_development_dependency 'rubocop-performance'
|
20
26
|
end
|
@@ -0,0 +1,105 @@
|
|
1
|
+
# frozen_string_literal: false
|
2
|
+
|
3
|
+
require 'simplify_api'
|
4
|
+
|
5
|
+
describe SimplifyApi do
|
6
|
+
describe "without attributes" do
|
7
|
+
before(:all) do
|
8
|
+
class Test
|
9
|
+
include SimplifyApi
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
subject { Test.new }
|
14
|
+
|
15
|
+
it "should work with no attributes" do
|
16
|
+
expect(subject.class).to eq Test
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should accept adhoc parameters" do
|
20
|
+
subject.name = "João da Silva"
|
21
|
+
|
22
|
+
expect(subject.name).to eq "João da Silva"
|
23
|
+
expect(subject).to respond_to :name
|
24
|
+
expect(Test.attributes).to include(:name)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe "with attributes" do
|
29
|
+
before(:all) do
|
30
|
+
class Test
|
31
|
+
include SimplifyApi
|
32
|
+
attribute :name, String, mandatory: true
|
33
|
+
attribute :surname, String
|
34
|
+
attribute :country, String, default: "Brazil"
|
35
|
+
attribute :is_admin, values: [true, false], default: false
|
36
|
+
attribute :groups, [String]
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
it "should fullfil class description" do
|
41
|
+
subject = Test.new(name: "João da Silva")
|
42
|
+
|
43
|
+
expect{ Test.new }.to raise_error ArgumentError
|
44
|
+
expect(subject).to respond_to :name
|
45
|
+
expect(subject).to respond_to :surname
|
46
|
+
expect(subject).to respond_to :country
|
47
|
+
expect(subject.name).to eq "João da Silva"
|
48
|
+
expect(subject.surname).to eq nil
|
49
|
+
expect(subject.country).to eq "Brazil"
|
50
|
+
end
|
51
|
+
|
52
|
+
it "should not accept value out of list" do
|
53
|
+
subject = Test.new(name: "João da Silva")
|
54
|
+
|
55
|
+
expect{ Test.new(name: "João da Silva", is_admin: 1) }.to raise_error ArgumentError
|
56
|
+
expect{ subject.is_admin = 1 }.to raise_error ArgumentError
|
57
|
+
end
|
58
|
+
|
59
|
+
it "should accept adhoc parameters" do
|
60
|
+
subject = Test.new(name: "João da Silva")
|
61
|
+
subject.email = "joao@mailinator.com"
|
62
|
+
|
63
|
+
expect(subject).to respond_to :email
|
64
|
+
expect(subject.email).to eq "joao@mailinator.com"
|
65
|
+
expect(Test.attributes).to include(:email)
|
66
|
+
end
|
67
|
+
|
68
|
+
|
69
|
+
it "should accept array of parameters" do
|
70
|
+
subject = Test.new(name: "João da Silva", groups: ["Leadership", "Apprentice"])
|
71
|
+
subject.languages = ["Portuguese", "English", "Spanish"]
|
72
|
+
|
73
|
+
expect(subject.groups).to have(2).groups
|
74
|
+
expect(subject.languages).to have(3).languages
|
75
|
+
end
|
76
|
+
|
77
|
+
it "should be instatiated with json" do
|
78
|
+
json_value = JSON.parse(%q({ "name": "John Doe", "country": "USA", "email": "joedoe@mailinator.com" }))
|
79
|
+
subject = Test.new(json_value)
|
80
|
+
|
81
|
+
expect(subject.name).to eq "John Doe"
|
82
|
+
expect(subject.country).to eq "USA"
|
83
|
+
expect(subject.email).to eq "joedoe@mailinator.com"
|
84
|
+
end
|
85
|
+
|
86
|
+
it "should be instatiated with json (even complex ones)" do
|
87
|
+
json_value = JSON.parse(%q({
|
88
|
+
"name": "John Doe",
|
89
|
+
"country": "USA",
|
90
|
+
"email": "joedoe@mailinator.com",
|
91
|
+
"languages": [
|
92
|
+
"English",
|
93
|
+
"German" ]
|
94
|
+
}))
|
95
|
+
|
96
|
+
puts "JSON: #{json_value}"
|
97
|
+
subject = Test.new(json_value)
|
98
|
+
|
99
|
+
expect(subject.name).to eq "John Doe"
|
100
|
+
expect(subject.country).to eq "USA"
|
101
|
+
expect(subject.email).to eq "joedoe@mailinator.com"
|
102
|
+
expect(subject.languages).to have(2).languages
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,100 @@
|
|
1
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
2
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
3
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
4
|
+
# this file to always be loaded, without a need to explicitly require it in any
|
5
|
+
# files.
|
6
|
+
#
|
7
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
8
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
9
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
10
|
+
# individual file that may not need all of that loaded. Instead, consider making
|
11
|
+
# a separate helper file that requires the additional dependencies and performs
|
12
|
+
# the additional setup, and require it from the spec files that actually need
|
13
|
+
# it.
|
14
|
+
#
|
15
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
16
|
+
RSpec.configure do |config|
|
17
|
+
# rspec-expectations config goes here. You can use an alternate
|
18
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
19
|
+
# assertions if you prefer.
|
20
|
+
config.expect_with :rspec do |expectations|
|
21
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
22
|
+
# and `failure_message` of custom matchers include text for helper methods
|
23
|
+
# defined using `chain`, e.g.:
|
24
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
25
|
+
# # => "be bigger than 2 and smaller than 4"
|
26
|
+
# ...rather than:
|
27
|
+
# # => "be bigger than 2"
|
28
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
29
|
+
end
|
30
|
+
|
31
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
32
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
33
|
+
config.mock_with :rspec do |mocks|
|
34
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
35
|
+
# a real object. This is generally recommended, and will default to
|
36
|
+
# `true` in RSpec 4.
|
37
|
+
mocks.verify_partial_doubles = true
|
38
|
+
end
|
39
|
+
|
40
|
+
# This option will default to `:apply_to_host_groups` in RSpec 4 (and will
|
41
|
+
# have no way to turn it off -- the option exists only for backwards
|
42
|
+
# compatibility in RSpec 3). It causes shared context metadata to be
|
43
|
+
# inherited by the metadata hash of host groups and examples, rather than
|
44
|
+
# triggering implicit auto-inclusion in groups with matching metadata.
|
45
|
+
config.shared_context_metadata_behavior = :apply_to_host_groups
|
46
|
+
|
47
|
+
# The settings below are suggested to provide a good initial experience
|
48
|
+
# with RSpec, but feel free to customize to your heart's content.
|
49
|
+
=begin
|
50
|
+
# This allows you to limit a spec run to individual examples or groups
|
51
|
+
# you care about by tagging them with `:focus` metadata. When nothing
|
52
|
+
# is tagged with `:focus`, all examples get run. RSpec also provides
|
53
|
+
# aliases for `it`, `describe`, and `context` that include `:focus`
|
54
|
+
# metadata: `fit`, `fdescribe` and `fcontext`, respectively.
|
55
|
+
config.filter_run_when_matching :focus
|
56
|
+
|
57
|
+
# Allows RSpec to persist some state between runs in order to support
|
58
|
+
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
59
|
+
# you configure your source control system to ignore this file.
|
60
|
+
config.example_status_persistence_file_path = "spec/examples.txt"
|
61
|
+
|
62
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
63
|
+
# recommended. For more details, see:
|
64
|
+
# - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
|
65
|
+
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
66
|
+
# - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
|
67
|
+
config.disable_monkey_patching!
|
68
|
+
|
69
|
+
# This setting enables warnings. It's recommended, but in some cases may
|
70
|
+
# be too noisy due to issues in dependencies.
|
71
|
+
config.warnings = true
|
72
|
+
|
73
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
74
|
+
# file, and it's useful to allow more verbose output when running an
|
75
|
+
# individual spec file.
|
76
|
+
if config.files_to_run.one?
|
77
|
+
# Use the documentation formatter for detailed output,
|
78
|
+
# unless a formatter has already been configured
|
79
|
+
# (e.g. via a command-line flag).
|
80
|
+
config.default_formatter = "doc"
|
81
|
+
end
|
82
|
+
|
83
|
+
# Print the 10 slowest examples and example groups at the
|
84
|
+
# end of the spec run, to help surface which specs are running
|
85
|
+
# particularly slow.
|
86
|
+
config.profile_examples = 10
|
87
|
+
|
88
|
+
# Run specs in random order to surface order dependencies. If you find an
|
89
|
+
# order dependency and want to debug it, you can fix the order by providing
|
90
|
+
# the seed, which is printed after each run.
|
91
|
+
# --seed 1234
|
92
|
+
config.order = :random
|
93
|
+
|
94
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
95
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
96
|
+
# test failures related to randomization by passing the same `--seed` value
|
97
|
+
# as the one that triggered the failure.
|
98
|
+
Kernel.srand config.seed
|
99
|
+
=end
|
100
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simplify_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rodrigo Garcia Couto
|
@@ -14,16 +14,72 @@ dependencies:
|
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec-collection_matchers
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubocop
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubocop-performance
|
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'
|
27
83
|
description: Fairly usable. A simple set of tools to simplify the use of APIs in Ruby
|
28
84
|
email:
|
29
85
|
- r@rodg.co
|
@@ -32,12 +88,17 @@ extensions: []
|
|
32
88
|
extra_rdoc_files: []
|
33
89
|
files:
|
34
90
|
- ".gitignore"
|
91
|
+
- ".rspec"
|
92
|
+
- ".rubocop.yml"
|
35
93
|
- Gemfile
|
36
94
|
- README.md
|
37
95
|
- lib/simplify_api.rb
|
38
96
|
- lib/simplify_api/simplify_api.rb
|
97
|
+
- lib/simplify_api/support.rb
|
39
98
|
- lib/simplify_api/version.rb
|
40
99
|
- simplify_api.gemspec
|
100
|
+
- spec/simplify_api_spec.rb
|
101
|
+
- spec/spec_helper.rb
|
41
102
|
homepage: https://github.com/rodgco/simplify_api
|
42
103
|
licenses:
|
43
104
|
- MIT
|
@@ -57,8 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
57
118
|
- !ruby/object:Gem::Version
|
58
119
|
version: '0'
|
59
120
|
requirements: []
|
60
|
-
|
61
|
-
rubygems_version: 2.7.3
|
121
|
+
rubygems_version: 3.0.3
|
62
122
|
signing_key:
|
63
123
|
specification_version: 4
|
64
124
|
summary: A simple set of tools to help the use of APIs
|