omie-client 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitlab-ci.yml +11 -0
- data/.rubocop.yml +16 -0
- data/Gemfile +4 -2
- data/Gemfile.lock +19 -1
- data/README.md +30 -0
- data/Rakefile +5 -3
- data/bin/console +4 -3
- data/lib/omie/base_resource.rb +9 -0
- data/lib/omie/company.rb +40 -14
- data/lib/omie/product.rb +162 -0
- data/lib/omie/version.rb +1 -1
- data/lib/omie.rb +2 -0
- data/omie-client.gemspec +25 -20
- metadata +40 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72a1de613fdbc2ba050cfaa890e82d04b57ce34d9715dd2b00a81dfb6816129a
|
4
|
+
data.tar.gz: cb79914f46a01909b57f794c09ac1b529ba6c03a4a4daa29ef67c972b5452c09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f08dd02f8e999d00b363d0075eca5482ee467d738ee18824883b6c2021ab103aa3bf5663e4d6adb00a7ed3e1b363df83c5265c6ea664d525ccf20780c5d5030a
|
7
|
+
data.tar.gz: d552b52fca09746097ee3558fa4db1aeb7f8ac74682405a858012572e2daedbe68249322011ed27a316ee4338496a8ebff94048cd1efa4a970d30b4f40dbaaa0
|
data/.gitlab-ci.yml
ADDED
data/.rubocop.yml
ADDED
data/Gemfile
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
4
6
|
|
5
7
|
# Specify your gem's dependencies in omie-client.gemspec
|
6
8
|
gemspec
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
omie-client (0.1.
|
4
|
+
omie-client (0.1.4)
|
5
5
|
activesupport (>= 5.0)
|
6
6
|
rest-client (>= 2.0)
|
7
7
|
|
@@ -13,6 +13,7 @@ GEM
|
|
13
13
|
i18n (>= 0.7, < 2)
|
14
14
|
minitest (~> 5.1)
|
15
15
|
tzinfo (~> 1.1)
|
16
|
+
ast (2.4.0)
|
16
17
|
concurrent-ruby (1.1.5)
|
17
18
|
cpf_cnpj (0.5.0)
|
18
19
|
diff-lcs (1.3)
|
@@ -25,17 +26,23 @@ GEM
|
|
25
26
|
domain_name (~> 0.5)
|
26
27
|
i18n (1.8.2)
|
27
28
|
concurrent-ruby (~> 1.0)
|
29
|
+
jaro_winkler (1.5.4)
|
28
30
|
mime-types (3.3.1)
|
29
31
|
mime-types-data (~> 3.2015)
|
30
32
|
mime-types-data (3.2019.1009)
|
31
33
|
minitest (5.14.0)
|
32
34
|
netrc (0.11.0)
|
35
|
+
parallel (1.19.1)
|
36
|
+
parser (2.7.0.4)
|
37
|
+
ast (~> 2.4.0)
|
38
|
+
rainbow (3.0.0)
|
33
39
|
rake (10.5.0)
|
34
40
|
rest-client (2.1.0)
|
35
41
|
http-accept (>= 1.7.0, < 2.0)
|
36
42
|
http-cookie (>= 1.0.2, < 2.0)
|
37
43
|
mime-types (>= 1.16, < 4.0)
|
38
44
|
netrc (~> 0.8)
|
45
|
+
rexml (3.2.4)
|
39
46
|
rspec (3.9.0)
|
40
47
|
rspec-core (~> 3.9.0)
|
41
48
|
rspec-expectations (~> 3.9.0)
|
@@ -49,12 +56,22 @@ GEM
|
|
49
56
|
diff-lcs (>= 1.2.0, < 2.0)
|
50
57
|
rspec-support (~> 3.9.0)
|
51
58
|
rspec-support (3.9.2)
|
59
|
+
rubocop (0.80.1)
|
60
|
+
jaro_winkler (~> 1.5.1)
|
61
|
+
parallel (~> 1.10)
|
62
|
+
parser (>= 2.7.0.1)
|
63
|
+
rainbow (>= 2.2.2, < 4.0)
|
64
|
+
rexml
|
65
|
+
ruby-progressbar (~> 1.7)
|
66
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
67
|
+
ruby-progressbar (1.10.1)
|
52
68
|
thread_safe (0.3.6)
|
53
69
|
tzinfo (1.2.6)
|
54
70
|
thread_safe (~> 0.1)
|
55
71
|
unf (0.1.4)
|
56
72
|
unf_ext
|
57
73
|
unf_ext (0.0.7.6)
|
74
|
+
unicode-display_width (1.6.1)
|
58
75
|
|
59
76
|
PLATFORMS
|
60
77
|
ruby
|
@@ -66,6 +83,7 @@ DEPENDENCIES
|
|
66
83
|
omie-client!
|
67
84
|
rake (~> 10.0)
|
68
85
|
rspec (~> 3.0)
|
86
|
+
rubocop (~> 0.80.1)
|
69
87
|
|
70
88
|
BUNDLED WITH
|
71
89
|
1.16.6
|
data/README.md
CHANGED
@@ -99,6 +99,36 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
99
99
|
Bug reports and pull requests are welcome. If you want to add a new resource
|
100
100
|
from the API, please open an issue first to avoid duplicated work.
|
101
101
|
|
102
|
+
### Building and Testing Locally
|
103
|
+
|
104
|
+
To properly test if the gem is working properly, you can install it locally:
|
105
|
+
```sh
|
106
|
+
gem build omie-client.gemspec
|
107
|
+
gem install ./omie-client.gemspec-x.y.z.gem
|
108
|
+
```
|
109
|
+
The `x.y.z` represents the version described in [lib/omie/version.rb](lib/omie/version.rb)
|
110
|
+
|
111
|
+
You can make some smoke test to check if everything is ok, especially because
|
112
|
+
this gem interacts with Omie API, requiring some integration tests that
|
113
|
+
is not covered by the existing unit tests.
|
114
|
+
* Open irb:
|
115
|
+
```sh
|
116
|
+
irb
|
117
|
+
```
|
118
|
+
|
119
|
+
```ruby
|
120
|
+
require 'omie-client'
|
121
|
+
=> true
|
122
|
+
Omie.version
|
123
|
+
=> x.y.z
|
124
|
+
# Default credentials provided by Omie API for tests
|
125
|
+
Omie.app_key = '1560731700'
|
126
|
+
Omie.app_secret = '226dcf372489bb45ceede61bfd98f0f1'
|
127
|
+
|
128
|
+
Omie::Company.list
|
129
|
+
Omie::Product.list
|
130
|
+
```
|
131
|
+
|
102
132
|
## License
|
103
133
|
|
104
134
|
See the [LICENSE](LICENSE) file.
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
|
-
require
|
4
|
-
require
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'omie/client'
|
5
6
|
|
6
7
|
# You can add fixtures and/or initialization code here to make experimenting
|
7
8
|
# with your gem easier. You can also use a different console, if you like.
|
@@ -10,5 +11,5 @@ require "omie/client"
|
|
10
11
|
# require "pry"
|
11
12
|
# Pry.start
|
12
13
|
|
13
|
-
require
|
14
|
+
require 'irb'
|
14
15
|
IRB.start(__FILE__)
|
data/lib/omie/base_resource.rb
CHANGED
@@ -21,5 +21,14 @@ module Omie
|
|
21
21
|
send("#{key}=", value) if respond_to?(key)
|
22
22
|
end
|
23
23
|
end
|
24
|
+
|
25
|
+
def self.request(uri, call, params)
|
26
|
+
Omie::Connection.request(uri, call, params)
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.request_and_initialize(uri, call, params)
|
30
|
+
response = request(uri, call, params)
|
31
|
+
new(response)
|
32
|
+
end
|
24
33
|
end
|
25
34
|
end
|
data/lib/omie/company.rb
CHANGED
@@ -13,13 +13,14 @@ module Omie
|
|
13
13
|
# Attributes' names are equal to the Portuguese names described in the API
|
14
14
|
# documentation.
|
15
15
|
class Company < Omie::BaseResource
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
16
|
+
CALLS = {
|
17
|
+
list: 'ListarClientes',
|
18
|
+
create: 'IncluirCliente',
|
19
|
+
update: 'AlterarCliente',
|
20
|
+
find: 'ConsultarCliente',
|
21
|
+
delete: 'ExcluirCliente',
|
22
|
+
upsert: 'UpsertCliente',
|
23
|
+
associate: 'AssociarCodIntCliente'
|
23
24
|
}.freeze
|
24
25
|
|
25
26
|
URI = '/v1/geral/clientes/'
|
@@ -43,8 +44,7 @@ module Omie
|
|
43
44
|
# @raise [Omie::RequestError]
|
44
45
|
# in case of failed requests due to failed validations
|
45
46
|
def self.create(params = {})
|
46
|
-
|
47
|
-
Omie::Company.new(response)
|
47
|
+
request_and_initialize(URI, CALLS[:create], params)
|
48
48
|
end
|
49
49
|
|
50
50
|
# Updates an existing company using the
|
@@ -64,8 +64,7 @@ module Omie
|
|
64
64
|
# in case of failed requests due to failed validations or when the
|
65
65
|
# company was not found.
|
66
66
|
def self.update(params = {})
|
67
|
-
|
68
|
-
Omie::Company.new(response)
|
67
|
+
request_and_initialize(URI, CALLS[:update], params)
|
69
68
|
end
|
70
69
|
|
71
70
|
# Search for a company using the
|
@@ -83,8 +82,7 @@ module Omie
|
|
83
82
|
# @return [nil]
|
84
83
|
# in case of no company found
|
85
84
|
def self.find(params)
|
86
|
-
|
87
|
-
Omie::Company.new(response)
|
85
|
+
request_and_initialize(URI, CALLS[:find], params)
|
88
86
|
rescue Omie::RequestError
|
89
87
|
nil
|
90
88
|
end
|
@@ -104,12 +102,32 @@ module Omie
|
|
104
102
|
def self.list(page = 1, per_page = 50)
|
105
103
|
params = { pagina: page, registros_por_pagina: per_page }
|
106
104
|
|
107
|
-
response =
|
105
|
+
response = request(URI, CALLS[:list], params)
|
108
106
|
response['clientes_cadastro'].map { |client| Omie::Company.new(client) }
|
109
107
|
rescue Omie::RequestError
|
110
108
|
[]
|
111
109
|
end
|
112
110
|
|
111
|
+
# Associate the local entry with an existing entry at Omie
|
112
|
+
# {https://app.omie.com.br/api/v1/geral/clientes/#AssociarCodIntCliente
|
113
|
+
# AssociarCodIntCliente}. Omie will find the existing entry through the
|
114
|
+
# {#codigo_cliente_omie} and updates its {#codigo_cliente_integracao}
|
115
|
+
#
|
116
|
+
# @!scope class
|
117
|
+
# @param codigo_cliente_omie [String]
|
118
|
+
# The id of the existing entry at Omie
|
119
|
+
# @param codigo_cliente_integracao [String]
|
120
|
+
# The integration id to be used by the existing entry - usually a local
|
121
|
+
# id.
|
122
|
+
def self.associate(codigo_cliente_omie, codigo_cliente_integracao)
|
123
|
+
params = {
|
124
|
+
codigo_cliente_integracao: codigo_cliente_integracao,
|
125
|
+
codigo_cliente_omie: codigo_cliente_omie
|
126
|
+
}
|
127
|
+
|
128
|
+
request(URI, CALLS[:associate], params)
|
129
|
+
end
|
130
|
+
|
113
131
|
# Get method for tags attribute.
|
114
132
|
#
|
115
133
|
# @return [Array<Hash>]
|
@@ -176,5 +194,13 @@ module Omie
|
|
176
194
|
def saved?
|
177
195
|
!codigo_cliente_omie.blank?
|
178
196
|
end
|
197
|
+
|
198
|
+
# Updates the omie entry with the local id for integration purposes.
|
199
|
+
#
|
200
|
+
# @return [Boolean]
|
201
|
+
def associate_entry
|
202
|
+
Omie::Company.associate(codigo_cliente_omie, codigo_cliente_integracao)
|
203
|
+
true
|
204
|
+
end
|
179
205
|
end
|
180
206
|
end
|
data/lib/omie/product.rb
ADDED
@@ -0,0 +1,162 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Omie
|
4
|
+
# This class abstracts the product resource from Omie (Ref: Produto)
|
5
|
+
# It aims at providing abstractions to the endpoints described in
|
6
|
+
# {https://app.omie.com.br/api/v1/geral/produtos/}.
|
7
|
+
#
|
8
|
+
# The class methods of Omie::Product usually performs requests to Omie API and
|
9
|
+
# manipulate product objects that contain the returned values.
|
10
|
+
# Attributes' names are equal to the Portuguese names described in the API
|
11
|
+
# documentation.
|
12
|
+
class Product < Omie::BaseResource
|
13
|
+
CALLS = {
|
14
|
+
list: 'ListarProdutos',
|
15
|
+
create: 'IncluirProduto',
|
16
|
+
update: 'AlterarProduto',
|
17
|
+
find: 'ConsultarProduto',
|
18
|
+
delete: 'ExcluirProduto',
|
19
|
+
simple: 'UpsertProduto',
|
20
|
+
associate: 'AssociarCodIntProduto'
|
21
|
+
}.freeze
|
22
|
+
|
23
|
+
URI = '/v1/geral/produtos/'
|
24
|
+
|
25
|
+
attr_accessor :ncm, :valor_unitario, :unidade, :descricao_status
|
26
|
+
attr_accessor :codigo_produto_integracao, :codigo_produto, :descricao
|
27
|
+
|
28
|
+
# Record a new product using the
|
29
|
+
# {https://app.omie.com.br/api/v1/geral/produtos/#IncluirProduto
|
30
|
+
# IncluirProduto} call and returns an instance of Omie::Product
|
31
|
+
# with the data from the created product.
|
32
|
+
#
|
33
|
+
# @!scope class
|
34
|
+
# @param params [Hash]
|
35
|
+
# a hash containing the data to be recorded in the product based on
|
36
|
+
# the available attributes of this class
|
37
|
+
# @return [Omie::Product]
|
38
|
+
# the created product
|
39
|
+
# @raise [Omie::RequestError]
|
40
|
+
# in case of failed requests due to failed validations
|
41
|
+
def self.create(params = {})
|
42
|
+
request_and_initialize(URI, CALLS[:create], params)
|
43
|
+
end
|
44
|
+
|
45
|
+
# Update an existing product using the
|
46
|
+
# {https://app.omie.com.br/api/v1/geral/produtos/#AlterarProduto
|
47
|
+
# AlterarProduto} call and returns an instance of the updated product.
|
48
|
+
# Omie will use either the {#codigo_produto_integracao} or the
|
49
|
+
# {#codigo_produto} to identify the entry to be changed. It will
|
50
|
+
# change only the informed attributes in params.
|
51
|
+
#
|
52
|
+
# @!scope class
|
53
|
+
# @param params [Hash]
|
54
|
+
# a hash containing the search attribute to locate the product and
|
55
|
+
# the attributes/values to be updated.
|
56
|
+
# @return [Omie::Product]
|
57
|
+
# the updated product
|
58
|
+
# @raise [Omie::RequestError]
|
59
|
+
# in case of failed requests due to failed validations or when the
|
60
|
+
# product was not found.
|
61
|
+
def self.update(params = {})
|
62
|
+
request_and_initialize(URI, CALLS[:update], params)
|
63
|
+
end
|
64
|
+
|
65
|
+
# Search for a product using the
|
66
|
+
# {https://app.omie.com.br/api/v1/geral/produtos/#ConsultarProduto
|
67
|
+
# ConsultarProduto} call and returns an instance of the found product
|
68
|
+
# or nil otherwise.
|
69
|
+
# One may use either the {#codigo_cliente_omie} or
|
70
|
+
# {#codigo_cliente_integracao} to search for product
|
71
|
+
#
|
72
|
+
# @!scope class
|
73
|
+
# @param params [Hash]
|
74
|
+
# a hash containing the search attribute to locate the product
|
75
|
+
# @return [Omie::Product]
|
76
|
+
# the found product
|
77
|
+
# @return [nil]
|
78
|
+
# in case of no product found
|
79
|
+
def self.find(params)
|
80
|
+
request_and_initialize(URI, CALLS[:find], params)
|
81
|
+
rescue Omie::RequestError
|
82
|
+
nil
|
83
|
+
end
|
84
|
+
|
85
|
+
# Get a paginated list of companies recorded in Omie by using the
|
86
|
+
# {https://app.omie.com.br/api/v1/geral/produtos/#ListarProdutos
|
87
|
+
# Listarprodutos}. You may change the params to get other pages of
|
88
|
+
# records.
|
89
|
+
#
|
90
|
+
# @!scope class
|
91
|
+
# @param page [Integer]
|
92
|
+
# the page to be returned.
|
93
|
+
# @param per_page [Integer]
|
94
|
+
# the number of items per page (max: 50).
|
95
|
+
# @return [Array<Omie::Product>]
|
96
|
+
# the list of found companies
|
97
|
+
def self.list(page = 1, per_page = 50)
|
98
|
+
params = { pagina: page, registros_por_pagina: per_page }
|
99
|
+
|
100
|
+
response = request(URI, CALLS[:list], params)
|
101
|
+
response['produto_servico_cadastro'].map do |product|
|
102
|
+
Omie::Product.new(product)
|
103
|
+
end
|
104
|
+
rescue Omie::RequestError
|
105
|
+
[]
|
106
|
+
end
|
107
|
+
|
108
|
+
# Associate the local entry with an existing entry at Omie
|
109
|
+
# {https://app.omie.com.br/api/v1/geral/clientes/#AssociarCodIntProduto
|
110
|
+
# AssociarCodIntProduto}. Omie will find the existing entry through the
|
111
|
+
# {#codigo_produto} and updates its {#codigo_produto_integracao}
|
112
|
+
#
|
113
|
+
# @!scope class
|
114
|
+
# @param codigo_produto [String]
|
115
|
+
# The id of the existing entry at Omie
|
116
|
+
# @param codigo_produto_integracao [String]
|
117
|
+
# The integration id to be used by the existing entry - usually a local
|
118
|
+
# id.
|
119
|
+
def self.associate(codigo_produto, codigo_produto_integracao)
|
120
|
+
params = {
|
121
|
+
codigo_produto: codigo_produto,
|
122
|
+
codigo_produto_integracao: codigo_produto_integracao
|
123
|
+
}
|
124
|
+
|
125
|
+
request(URI, CALLS[:associate], params)
|
126
|
+
end
|
127
|
+
|
128
|
+
# Save the product.
|
129
|
+
#
|
130
|
+
# If the product is new a record is created on Omie, otherwise
|
131
|
+
# the existing record gets updated.
|
132
|
+
#
|
133
|
+
# @return [Omie::Product]
|
134
|
+
# the product itself updated
|
135
|
+
def save
|
136
|
+
product = if saved?
|
137
|
+
Omie::Product.update(as_json)
|
138
|
+
else
|
139
|
+
Omie::Product.create(as_json)
|
140
|
+
end
|
141
|
+
|
142
|
+
self.codigo_produto = product.codigo_produto if product
|
143
|
+
product
|
144
|
+
end
|
145
|
+
|
146
|
+
# Check whether the object has a related record on Omie based on the
|
147
|
+
# {#codigo_produto} attribute
|
148
|
+
#
|
149
|
+
# @return [Boolean]
|
150
|
+
def saved?
|
151
|
+
!codigo_produto.blank?
|
152
|
+
end
|
153
|
+
|
154
|
+
# Updates the omie entry with the local id for integration purposes.
|
155
|
+
#
|
156
|
+
# @return [Boolean]
|
157
|
+
def associate_entry
|
158
|
+
Omie::Product.associate(codigo_produto, codigo_produto_integracao)
|
159
|
+
true
|
160
|
+
end
|
161
|
+
end
|
162
|
+
end
|
data/lib/omie/version.rb
CHANGED
data/lib/omie.rb
CHANGED
@@ -2,11 +2,13 @@
|
|
2
2
|
|
3
3
|
require_relative 'omie/base_resource'
|
4
4
|
require_relative 'omie/company'
|
5
|
+
require_relative 'omie/product'
|
5
6
|
require_relative 'omie/connection'
|
6
7
|
require_relative 'omie/error'
|
7
8
|
require_relative 'omie/info'
|
8
9
|
require_relative 'omie/version'
|
9
10
|
|
11
|
+
# High level namespace for Omie Client lib
|
10
12
|
module Omie
|
11
13
|
cattr_accessor :app_key, :app_secret
|
12
14
|
end
|
data/omie-client.gemspec
CHANGED
@@ -1,37 +1,42 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
|
2
|
-
lib = File.expand_path(
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require
|
5
|
+
require 'omie/version'
|
5
6
|
|
6
7
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
8
|
+
spec.name = 'omie-client'
|
8
9
|
spec.version = Omie::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
10
|
+
spec.authors = ['Peerdustry']
|
11
|
+
spec.email = ['contato@peerdustry.com']
|
11
12
|
|
12
|
-
spec.summary =
|
13
|
-
spec.description =
|
14
|
-
spec.homepage =
|
15
|
-
spec.license =
|
13
|
+
spec.summary = 'A Ruby client for Omie ERP API'
|
14
|
+
spec.description = 'A Ruby client for Omie ERP API'
|
15
|
+
spec.homepage = 'https://gitlab.com/peerdustry/floss/omie-client'
|
16
|
+
spec.license = 'MIT'
|
16
17
|
|
17
18
|
# Specify which files should be added to the gem when it is released.
|
18
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added
|
19
|
-
|
20
|
-
|
19
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added
|
20
|
+
# into git.
|
21
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
22
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
23
|
+
f.match(%r{^(test|spec|features)/})
|
24
|
+
end
|
21
25
|
end
|
22
|
-
spec.bindir =
|
26
|
+
spec.bindir = 'exe'
|
23
27
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
|
-
spec.require_paths = [
|
25
|
-
spec.required_ruby_version =
|
28
|
+
spec.require_paths = ['lib']
|
29
|
+
spec.required_ruby_version = '>= 2.3'
|
26
30
|
|
27
31
|
# development dependencies
|
28
|
-
spec.add_development_dependency
|
29
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
30
|
-
spec.add_development_dependency "rspec", "~> 3.0"
|
31
|
-
spec.add_development_dependency 'factory_bot', '>= 5.0'
|
32
|
+
spec.add_development_dependency 'bundler', '~> 1.16'
|
32
33
|
spec.add_development_dependency 'cpf_cnpj', '~> 0.5'
|
34
|
+
spec.add_development_dependency 'factory_bot', '>= 5.0'
|
35
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
36
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
37
|
+
spec.add_development_dependency 'rubocop', '~> 0.80.1'
|
33
38
|
|
34
39
|
# development dependencies
|
35
|
-
spec.add_dependency 'rest-client', '>= 2.0'
|
36
40
|
spec.add_dependency 'activesupport', '>= 5.0'
|
41
|
+
spec.add_dependency 'rest-client', '>= 2.0'
|
37
42
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omie-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peerdustry
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -25,89 +25,103 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.16'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: cpf_cnpj
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0.5'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0.5'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: factory_bot
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '5.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '5.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
59
|
- - "~>"
|
46
60
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
61
|
+
version: '10.0'
|
48
62
|
type: :development
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
66
|
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
68
|
+
version: '10.0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
70
|
+
name: rspec
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
|
-
- - "
|
73
|
+
- - "~>"
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
75
|
+
version: '3.0'
|
62
76
|
type: :development
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
|
-
- - "
|
80
|
+
- - "~>"
|
67
81
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
82
|
+
version: '3.0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
84
|
+
name: rubocop
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
87
|
- - "~>"
|
74
88
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
89
|
+
version: 0.80.1
|
76
90
|
type: :development
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
94
|
- - "~>"
|
81
95
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
96
|
+
version: 0.80.1
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
98
|
+
name: activesupport
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
101
|
- - ">="
|
88
102
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
103
|
+
version: '5.0'
|
90
104
|
type: :runtime
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
108
|
- - ">="
|
95
109
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
110
|
+
version: '5.0'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
112
|
+
name: rest-client
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
115
|
- - ">="
|
102
116
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
117
|
+
version: '2.0'
|
104
118
|
type: :runtime
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
108
122
|
- - ">="
|
109
123
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
124
|
+
version: '2.0'
|
111
125
|
description: A Ruby client for Omie ERP API
|
112
126
|
email:
|
113
127
|
- contato@peerdustry.com
|
@@ -116,7 +130,9 @@ extensions: []
|
|
116
130
|
extra_rdoc_files: []
|
117
131
|
files:
|
118
132
|
- ".gitignore"
|
133
|
+
- ".gitlab-ci.yml"
|
119
134
|
- ".rspec"
|
135
|
+
- ".rubocop.yml"
|
120
136
|
- Gemfile
|
121
137
|
- Gemfile.lock
|
122
138
|
- LICENSE
|
@@ -130,6 +146,7 @@ files:
|
|
130
146
|
- lib/omie/connection.rb
|
131
147
|
- lib/omie/error.rb
|
132
148
|
- lib/omie/info.rb
|
149
|
+
- lib/omie/product.rb
|
133
150
|
- lib/omie/version.rb
|
134
151
|
- omie-client.gemspec
|
135
152
|
homepage: https://gitlab.com/peerdustry/floss/omie-client
|
@@ -144,7 +161,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
144
161
|
requirements:
|
145
162
|
- - ">="
|
146
163
|
- !ruby/object:Gem::Version
|
147
|
-
version: 2.
|
164
|
+
version: '2.3'
|
148
165
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
149
166
|
requirements:
|
150
167
|
- - ">="
|