nuvemshop 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +18 -0
- data/.rspec +1 -1
- data/.rubocop.yml +9 -0
- data/Gemfile +0 -3
- data/Gemfile.lock +11 -1
- data/README.md +17 -10
- data/lib/nuvemshop.rb +17 -6
- data/lib/nuvemshop/base_model.rb +46 -0
- data/lib/nuvemshop/customer.rb +19 -0
- data/lib/nuvemshop/extensions/mass_assignment.rb +3 -2
- data/lib/nuvemshop/extras/timestampz.rb +7 -0
- data/lib/nuvemshop/inflections/infer_key_class_name.rb +9 -0
- data/lib/nuvemshop/inflections/pascal_case.rb +7 -0
- data/lib/nuvemshop/order.rb +30 -0
- data/lib/nuvemshop/order/address.rb +24 -0
- data/lib/nuvemshop/order/client_details.rb +9 -0
- data/lib/nuvemshop/order/payment_details.rb +7 -0
- data/lib/nuvemshop/order/promotional_discount.rb +8 -0
- data/lib/nuvemshop/order/timestampz.rb +6 -0
- data/lib/nuvemshop/orders.rb +20 -1
- data/lib/nuvemshop/product.rb +17 -0
- data/lib/nuvemshop/product/image.rb +14 -0
- data/lib/nuvemshop/request.rb +9 -3
- data/lib/nuvemshop/response.rb +15 -2
- data/lib/nuvemshop/version.rb +1 -1
- data/nuvemshop.gemspec +6 -2
- metadata +75 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55d13102f48056bc0c30a4a698aff0807daedcd59e524a74998081dc3fad2eab
|
4
|
+
data.tar.gz: 594917b2e9d9d17c8871ed38f22aa3d97aff5dbbd9c649bdedff8df0a7b7e4fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fe42bc6093fc00bb2fa585a265b240af6fc228682370934d0fd6401aeddfa50a1b7192fabf310f19e0e6d4cb4b1674b79b204f7fb1fab2b5b633d5af4fc44ee
|
7
|
+
data.tar.gz: ad6e3ee539c30cfb28063fe66c54162b11cc50bb0b0826717ad8f4974f89bad30e3b4ca8144f2a437ca18862c50d8827dd226c569d4b93afc8aaaefee26d4d60
|
@@ -0,0 +1,18 @@
|
|
1
|
+
name: CI
|
2
|
+
on: [pull_request]
|
3
|
+
jobs:
|
4
|
+
test:
|
5
|
+
runs-on: ubuntu-latest
|
6
|
+
steps:
|
7
|
+
- uses: actions/checkout@v2
|
8
|
+
- name: Setup Ruby
|
9
|
+
uses: ruby/setup-ruby@v1
|
10
|
+
with:
|
11
|
+
ruby-version: 2.7.2
|
12
|
+
|
13
|
+
- name: Build and run tests
|
14
|
+
run: |
|
15
|
+
gem install bundler
|
16
|
+
bundle install --jobs 4 --retry 3
|
17
|
+
bundle exec rubocop -l
|
18
|
+
bundle exec rspec
|
data/.rspec
CHANGED
data/.rubocop.yml
CHANGED
@@ -11,6 +11,7 @@ AllCops:
|
|
11
11
|
Layout/LineLength:
|
12
12
|
AutoCorrect: true
|
13
13
|
Max: 120
|
14
|
+
IgnoredPatterns: ['^ *# ']
|
14
15
|
Layout/SpaceAroundMethodCallOperator:
|
15
16
|
Enabled: false
|
16
17
|
Layout/IndentationConsistency:
|
@@ -82,3 +83,11 @@ Style/SingleArgumentDig:
|
|
82
83
|
Style/MutableConstant:
|
83
84
|
Enabled: true
|
84
85
|
AutoCorrect: true
|
86
|
+
RSpec/FilePath:
|
87
|
+
Enabled: false
|
88
|
+
RSpec/ExampleLength:
|
89
|
+
Enabled: true
|
90
|
+
CountAsOne: ['array', 'heredoc', 'hash']
|
91
|
+
Max: 15
|
92
|
+
RSpec/MultipleExpectations:
|
93
|
+
Enabled: false
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
nuvemshop (0.1.
|
4
|
+
nuvemshop (0.1.1)
|
5
5
|
httparty (~> 0.18)
|
6
6
|
|
7
7
|
GEM
|
@@ -10,6 +10,7 @@ GEM
|
|
10
10
|
ast (2.4.2)
|
11
11
|
coderay (1.1.3)
|
12
12
|
diff-lcs (1.4.4)
|
13
|
+
docile (1.3.5)
|
13
14
|
httparty (0.18.1)
|
14
15
|
mime-types (~> 3.0)
|
15
16
|
multi_xml (>= 0.5.2)
|
@@ -59,7 +60,14 @@ GEM
|
|
59
60
|
rubocop (~> 1.0)
|
60
61
|
rubocop-ast (>= 1.1.0)
|
61
62
|
ruby-progressbar (1.11.0)
|
63
|
+
simplecov (0.21.2)
|
64
|
+
docile (~> 1.1)
|
65
|
+
simplecov-html (~> 0.11)
|
66
|
+
simplecov_json_formatter (~> 0.1)
|
67
|
+
simplecov-html (0.12.3)
|
68
|
+
simplecov_json_formatter (0.1.2)
|
62
69
|
unicode-display_width (2.0.0)
|
70
|
+
yard (0.9.26)
|
63
71
|
|
64
72
|
PLATFORMS
|
65
73
|
ruby
|
@@ -72,6 +80,8 @@ DEPENDENCIES
|
|
72
80
|
rubocop (~> 1.12)
|
73
81
|
rubocop-performance (~> 1.11)
|
74
82
|
rubocop-rspec (~> 2.2)
|
83
|
+
simplecov
|
84
|
+
yard
|
75
85
|
|
76
86
|
BUNDLED WITH
|
77
87
|
2.1.4
|
data/README.md
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
# NuvemshopRuby
|
2
2
|
|
3
|
-
|
3
|
+
This is a Wrapper for Nuvemshop/Tiendanube API. his gem is a work in progress. If you like to contribute, please get in touch!
|
4
4
|
|
5
|
-
|
5
|
+
## Working Features
|
6
|
+
|
7
|
+
- `Nuvemshop::Orders.all`
|
8
|
+
- `Nuvemshop::Orders.show`
|
6
9
|
|
7
10
|
## Installation
|
8
11
|
|
@@ -22,19 +25,23 @@ Or install it yourself as:
|
|
22
25
|
|
23
26
|
## Usage
|
24
27
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
28
|
+
If you use rails you can add this code below in `config/initializers/nuvemshop.rb`
|
29
|
+
```
|
30
|
+
require 'nuvemshop'
|
31
|
+
|
32
|
+
Nuvemshop.configure do |config|
|
33
|
+
config.client_id = 'your_client_id'
|
34
|
+
config.client_secret = 'your_client_secret'
|
35
|
+
config.user_agent = 'Your Company/Name (your_email@domain.com)'
|
36
|
+
config.store_access_token = 'your_store_access_token'
|
37
|
+
config.store_user_id = 'your_user_id'
|
38
|
+
end
|
39
|
+
```
|
32
40
|
|
33
41
|
## Contributing
|
34
42
|
|
35
43
|
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/nuvemshop-ruby. 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/[USERNAME]/nuvemshop_ruby/blob/master/CODE_OF_CONDUCT.md).
|
36
44
|
|
37
|
-
|
38
45
|
## License
|
39
46
|
|
40
47
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/lib/nuvemshop.rb
CHANGED
@@ -1,29 +1,40 @@
|
|
1
1
|
require 'pp'
|
2
2
|
require 'httparty'
|
3
3
|
|
4
|
+
require 'nuvemshop/inflections/infer_key_class_name'
|
5
|
+
require 'nuvemshop/inflections/pascal_case'
|
6
|
+
|
4
7
|
require 'nuvemshop/extensions/credentiable'
|
5
8
|
require 'nuvemshop/extensions/mass_assignment'
|
6
9
|
|
7
10
|
require 'nuvemshop/version'
|
8
11
|
require 'nuvemshop/response'
|
9
12
|
require 'nuvemshop/request'
|
13
|
+
require 'nuvemshop/base_model'
|
14
|
+
require 'nuvemshop/extras/timestampz'
|
15
|
+
|
16
|
+
require 'nuvemshop/order'
|
17
|
+
require 'nuvemshop/order/promotional_discount'
|
18
|
+
require 'nuvemshop/order/payment_details'
|
19
|
+
require 'nuvemshop/order/timestampz'
|
20
|
+
require 'nuvemshop/order/address'
|
21
|
+
require 'nuvemshop/order/client_details'
|
22
|
+
require 'nuvemshop/product/image'
|
23
|
+
require 'nuvemshop/product'
|
10
24
|
require 'nuvemshop/orders'
|
25
|
+
require 'nuvemshop/customer'
|
11
26
|
|
12
27
|
module Nuvemshop
|
13
28
|
class Error < StandardError; end
|
14
29
|
|
15
30
|
class << self
|
16
31
|
attr_accessor :client_id, :client_secret
|
17
|
-
attr_writer :
|
32
|
+
attr_writer :user_agent, :store_access_token, :store_user_id
|
18
33
|
|
19
|
-
def
|
34
|
+
def configure
|
20
35
|
yield self
|
21
36
|
end
|
22
37
|
|
23
|
-
def api_version
|
24
|
-
@api_version ||= 'v1'
|
25
|
-
end
|
26
|
-
|
27
38
|
def user_agent
|
28
39
|
@user_agent ||= 'Nuvemshop Gem(https://github.com/alexandreh92/nuvemshop-ruby)'
|
29
40
|
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module Nuvemshop
|
2
|
+
class BaseModel < Object
|
3
|
+
include Extensions::MassAssignment
|
4
|
+
|
5
|
+
##
|
6
|
+
# Intercepts attr_acessor call, and assign it value to a variable named @attributes
|
7
|
+
def self.attr_accessor(*vars)
|
8
|
+
@attributes ||= []
|
9
|
+
@attributes.concat vars
|
10
|
+
super(*vars)
|
11
|
+
end
|
12
|
+
|
13
|
+
##
|
14
|
+
# Getter to expose @attributes to class object
|
15
|
+
def self.attributes
|
16
|
+
@attributes
|
17
|
+
end
|
18
|
+
|
19
|
+
##
|
20
|
+
# Getter to expose @attributes to class instance
|
21
|
+
def attributes
|
22
|
+
self.class.attributes
|
23
|
+
end
|
24
|
+
|
25
|
+
##
|
26
|
+
# Overwrite default Ruby pretty_print(q) method to act as ActiveRecord's output
|
27
|
+
def pretty_print(pp)
|
28
|
+
pp.object_address_group(self) do
|
29
|
+
variables = self.class.attributes.map do |attribute|
|
30
|
+
attribute.to_s.delete(':')
|
31
|
+
end
|
32
|
+
|
33
|
+
pp.seplist(variables, proc { pp.text ',' }) do |attr_name|
|
34
|
+
pp.breakable ' '
|
35
|
+
pp.group(1) do
|
36
|
+
pp.text attr_name
|
37
|
+
pp.text ':'
|
38
|
+
pp.breakable
|
39
|
+
value = send(attr_name.to_sym) || nil
|
40
|
+
pp.pp value
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Nuvemshop
|
2
|
+
class Customer < BaseModel
|
3
|
+
attr_accessor :id, :name, :email, :identification, :phone, :note, :default_address, :addresses, :billing_name,
|
4
|
+
:billing_phone, :billing_address, :billing_number, :billing_floor, :billing_locality,
|
5
|
+
:billing_zipcode, :billing_city, :billing_province, :billing_country, :extra, :total_spent,
|
6
|
+
:total_spent_currency, :last_order_id, :active, :created_at, :updated_at
|
7
|
+
|
8
|
+
private
|
9
|
+
|
10
|
+
def after_initialize
|
11
|
+
set_attributes
|
12
|
+
end
|
13
|
+
|
14
|
+
def set_attributes
|
15
|
+
@default_address = Nuvemshop::Order::Address.new(default_address)
|
16
|
+
@addresses = addresses&.map { |addr| Order::Address.new(addr) } || []
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -1,9 +1,10 @@
|
|
1
1
|
module Nuvemshop
|
2
2
|
module Extensions
|
3
3
|
module MassAssignment
|
4
|
-
|
4
|
+
# Assigns getter and setter for each pair key/value
|
5
|
+
def initialize(opts = {})
|
5
6
|
before_initialize if respond_to?(:before_initialize, true)
|
6
|
-
|
7
|
+
opts&.each { |key, value| public_send("#{key.to_sym}=", value) }
|
7
8
|
after_initialize if respond_to?(:after_initialize, true)
|
8
9
|
end
|
9
10
|
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Nuvemshop
|
2
|
+
class Order < BaseModel
|
3
|
+
attr_accessor :id, :token, :store_id, :shipping_min_days, :shipping_max_days, :billing_name, :billing_phone,
|
4
|
+
:billing_address, :billing_number, :billing_floor, :billing_locality, :billing_zipcode, :billing_city,
|
5
|
+
:billing_province, :billing_country, :shipping_cost_owner, :shipping_cost_customer, :coupon,
|
6
|
+
:promotional_discount, :subtotal, :discount, :discount_coupon, :discount_gateway, :total,
|
7
|
+
:total_usd, :checkout_enabled, :weight, :currency, :language, :gateway, :gateway_id, :shipping,
|
8
|
+
:shipping_option, :shipping_option_code, :shipping_option_reference, :shipping_pickup_details,
|
9
|
+
:shipping_tracking_number, :shipping_tracking_url, :shipping_store_branch_name, :shipping_pickup_type,
|
10
|
+
:shipping_suboption, :extra, :storefront, :note, :created_at, :updated_at, :completed_at,
|
11
|
+
:next_action, :payment_details, :attributes, :customer, :products, :number, :cancel_reason,
|
12
|
+
:owner_note, :cancelled_at, :closed_at, :read_at, :status, :payment_status, :shipping_address,
|
13
|
+
:shipping_status, :shipped_at, :paid_at, :landing_url, :client_details, :app_id
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
def after_initialize
|
18
|
+
assing_variables
|
19
|
+
end
|
20
|
+
|
21
|
+
def assing_variables
|
22
|
+
@promotional_discount = Order::PromotionalDiscount.new(promotional_discount)
|
23
|
+
@completed_at = Extras::Timestampz.new(completed_at)
|
24
|
+
@payment_details = Order::PaymentDetails.new(payment_details)
|
25
|
+
@customer = Customer.new(customer)
|
26
|
+
@products = products&.map { |prod| Product.new(prod) } || []
|
27
|
+
@client_details = Order::ClientDetails.new(client_details)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Nuvemshop
|
2
|
+
class Order < BaseModel
|
3
|
+
# @attr [String] address The address of this object.
|
4
|
+
# @attr [String] city The city of this object.
|
5
|
+
# @attr [String] country The country of this object.
|
6
|
+
# @attr [String] position The position of this object.
|
7
|
+
# @attr [String] created_at The created_at of this object.
|
8
|
+
# @attr [String] default The default of this object.
|
9
|
+
# @attr [String] floor The floor of this object.
|
10
|
+
# @attr [String] id The id of this object.
|
11
|
+
# @attr [String] locality The locality of this object.
|
12
|
+
# @attr [String] name The name of this object.
|
13
|
+
# @attr [String] number The number of this object.
|
14
|
+
# @attr [String] phone The phone of this object.
|
15
|
+
# @attr [String] updated_at The updated_at of this object.
|
16
|
+
# @attr [String] zipcode The zipcode of this object.
|
17
|
+
# @attr [String] province The province of this object.
|
18
|
+
# Related to {TiendaNube-Docs Order/Address}[https://github.com/tiendanube/api-docs/blob/master/resources/order.md#address]
|
19
|
+
class Address < BaseModel
|
20
|
+
attr_accessor :address, :city, :country, :created_at, :default, :floor, :id, :locality,
|
21
|
+
:name, :number, :phone, :province, :updated_at, :zipcode
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/nuvemshop/orders.rb
CHANGED
@@ -5,7 +5,10 @@ module Nuvemshop
|
|
5
5
|
PATH = 'orders'.freeze
|
6
6
|
|
7
7
|
def self.all(opts = {})
|
8
|
-
|
8
|
+
response = new(
|
9
|
+
access_token: opts[:access_token],
|
10
|
+
user_id: opts[:user_id]
|
11
|
+
).get(
|
9
12
|
action: PATH,
|
10
13
|
query: {
|
11
14
|
since_id: opts[:since_id],
|
@@ -27,6 +30,22 @@ module Nuvemshop
|
|
27
30
|
app_id: opts[:app_id]
|
28
31
|
}
|
29
32
|
)
|
33
|
+
|
34
|
+
respond_with(response, Nuvemshop::Order)
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.show(opts = {})
|
38
|
+
response = new(
|
39
|
+
access_token: opts[:access_token],
|
40
|
+
user_id: opts[:user_id]
|
41
|
+
).get(
|
42
|
+
action: "#{PATH}/#{opts[:order_id]}",
|
43
|
+
query: {
|
44
|
+
fields: opts[:fields]
|
45
|
+
}
|
46
|
+
)
|
47
|
+
|
48
|
+
respond_with(response, Nuvemshop::Order)
|
30
49
|
end
|
31
50
|
end
|
32
51
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Nuvemshop
|
2
|
+
class Product < BaseModel
|
3
|
+
attr_accessor :id, :depth, :height, :name, :price, :product_id, :image,
|
4
|
+
:quantity, :free_shipping, :weight, :width, :variant_id, :variant_values,
|
5
|
+
:properties, :sku, :barcode
|
6
|
+
|
7
|
+
private
|
8
|
+
|
9
|
+
def after_initialize
|
10
|
+
assing_variables
|
11
|
+
end
|
12
|
+
|
13
|
+
def assing_variables
|
14
|
+
@image = Product::Image.new(image)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Nuvemshop
|
2
|
+
class Product < BaseModel
|
3
|
+
# @attr [String] id The id of this object.
|
4
|
+
# @attr [String] product_id The product_id of this object.
|
5
|
+
# @attr [String] src The src of this object.
|
6
|
+
# @attr [String] position The position of this object.
|
7
|
+
# @attr [String] alt The alt of this object.
|
8
|
+
# @attr [String] created_at The created_at of this object.
|
9
|
+
# @attr [String] updated_at The updated_at of this object.
|
10
|
+
class Image < BaseModel
|
11
|
+
attr_accessor :id, :product_id, :src, :position, :alt, :created_at, :updated_at
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/lib/nuvemshop/request.rb
CHANGED
@@ -32,12 +32,18 @@ module Nuvemshop
|
|
32
32
|
perform_request(__method__, opts)
|
33
33
|
end
|
34
34
|
|
35
|
-
|
35
|
+
def self.respond_with(response, formatter)
|
36
|
+
Response.new(response, formatter)
|
37
|
+
end
|
36
38
|
|
37
|
-
|
39
|
+
private
|
38
40
|
|
39
41
|
def perform_request(method, opts = {})
|
40
|
-
self.class.send(method.to_sym, path(opts[:action]), merge_options(opts))
|
42
|
+
response = self.class.send(method.to_sym, path(opts[:action]), merge_options(opts))
|
43
|
+
|
44
|
+
raise Error, response unless response.success?
|
45
|
+
|
46
|
+
response
|
41
47
|
end
|
42
48
|
|
43
49
|
def merge_options(opts = {})
|
data/lib/nuvemshop/response.rb
CHANGED
@@ -1,13 +1,24 @@
|
|
1
1
|
module Nuvemshop
|
2
2
|
class Response < Object
|
3
|
-
attr_reader :response, :body, :code, :headers, :parsed_response
|
3
|
+
attr_reader :response, :body, :code, :headers, :parsed_response, :formatter
|
4
4
|
|
5
|
-
def initialize(response)
|
5
|
+
def initialize(response, formatter = nil)
|
6
6
|
@response = response
|
7
7
|
@code = response.code
|
8
8
|
@body = response.body
|
9
9
|
@headers = response.headers
|
10
10
|
@parsed_response = response.parsed_response
|
11
|
+
@formatter = formatter
|
12
|
+
end
|
13
|
+
|
14
|
+
def format
|
15
|
+
return unless formatter
|
16
|
+
|
17
|
+
@parsed_response = if parsed_response.is_a?(Array)
|
18
|
+
parsed_response.map { |pr| formatter.new(pr) }
|
19
|
+
else
|
20
|
+
formatter.new(parsed_response)
|
21
|
+
end
|
11
22
|
end
|
12
23
|
|
13
24
|
def to_s
|
@@ -24,6 +35,8 @@ module Nuvemshop
|
|
24
35
|
end
|
25
36
|
|
26
37
|
def pretty_print(pp)
|
38
|
+
format
|
39
|
+
|
27
40
|
if !parsed_response.nil? && parsed_response.respond_to?(:pretty_print)
|
28
41
|
parsed_response.pretty_print(pp)
|
29
42
|
else
|
data/lib/nuvemshop/version.rb
CHANGED
data/nuvemshop.gemspec
CHANGED
@@ -6,8 +6,8 @@ Gem::Specification.new do |spec|
|
|
6
6
|
spec.authors = ['Alexandre Stapenhorst']
|
7
7
|
spec.email = ['eng.alexandreh@gmail.com']
|
8
8
|
|
9
|
-
spec.summary = '
|
10
|
-
spec.description = '
|
9
|
+
spec.summary = 'A wrapper for Nuvemshop/TiendaNube API'
|
10
|
+
spec.description = 'This gem is a work in progress. If you like to contribute, please get in touch!'
|
11
11
|
spec.homepage = 'https://github.com/alexandreh92/nuvemshop-ruby'
|
12
12
|
spec.license = 'MIT'
|
13
13
|
spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
|
@@ -36,4 +36,8 @@ Gem::Specification.new do |spec|
|
|
36
36
|
spec.add_development_dependency 'rubocop-performance', '~> 1.11'
|
37
37
|
spec.add_development_dependency 'rubocop-rspec', '~> 2.2'
|
38
38
|
spec.add_development_dependency 'pry'
|
39
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
40
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
41
|
+
spec.add_development_dependency 'simplecov'
|
42
|
+
spec.add_development_dependency 'yard'
|
39
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nuvemshop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexandre Stapenhorst
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -80,7 +80,64 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
-
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rake
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '13.0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '13.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: '3.0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '3.0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: simplecov
|
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: yard
|
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
|
+
description: This gem is a work in progress. If you like to contribute, please get
|
140
|
+
in touch!
|
84
141
|
email:
|
85
142
|
- eng.alexandreh@gmail.com
|
86
143
|
executables: []
|
@@ -88,6 +145,7 @@ extensions: []
|
|
88
145
|
extra_rdoc_files: []
|
89
146
|
files:
|
90
147
|
- ".editorconfig"
|
148
|
+
- ".github/workflows/ci.yml"
|
91
149
|
- ".gitignore"
|
92
150
|
- ".rspec"
|
93
151
|
- ".rubocop.yml"
|
@@ -101,9 +159,22 @@ files:
|
|
101
159
|
- bin/console
|
102
160
|
- bin/setup
|
103
161
|
- lib/nuvemshop.rb
|
162
|
+
- lib/nuvemshop/base_model.rb
|
163
|
+
- lib/nuvemshop/customer.rb
|
104
164
|
- lib/nuvemshop/extensions/credentiable.rb
|
105
165
|
- lib/nuvemshop/extensions/mass_assignment.rb
|
166
|
+
- lib/nuvemshop/extras/timestampz.rb
|
167
|
+
- lib/nuvemshop/inflections/infer_key_class_name.rb
|
168
|
+
- lib/nuvemshop/inflections/pascal_case.rb
|
169
|
+
- lib/nuvemshop/order.rb
|
170
|
+
- lib/nuvemshop/order/address.rb
|
171
|
+
- lib/nuvemshop/order/client_details.rb
|
172
|
+
- lib/nuvemshop/order/payment_details.rb
|
173
|
+
- lib/nuvemshop/order/promotional_discount.rb
|
174
|
+
- lib/nuvemshop/order/timestampz.rb
|
106
175
|
- lib/nuvemshop/orders.rb
|
176
|
+
- lib/nuvemshop/product.rb
|
177
|
+
- lib/nuvemshop/product/image.rb
|
107
178
|
- lib/nuvemshop/request.rb
|
108
179
|
- lib/nuvemshop/response.rb
|
109
180
|
- lib/nuvemshop/version.rb
|
@@ -134,5 +205,5 @@ requirements: []
|
|
134
205
|
rubygems_version: 3.0.8
|
135
206
|
signing_key:
|
136
207
|
specification_version: 4
|
137
|
-
summary:
|
208
|
+
summary: A wrapper for Nuvemshop/TiendaNube API
|
138
209
|
test_files: []
|