webmaniabr_nfe_ruby 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +49 -0
- data/Gemfile +4 -0
- data/LICENSE +21 -0
- data/LICENSE.txt +23 -0
- data/README.md +41 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/contributors.txt +1 -0
- data/lib/models/client.rb +38 -0
- data/lib/models/order.rb +28 -0
- data/lib/models/product.rb +41 -0
- data/lib/models/request.rb +55 -0
- data/lib/models/transport.rb +29 -0
- data/lib/webmaniabr_nfe_ruby.rb +34 -0
- data/lib/webmaniabr_nfe_ruby/api_interface.rb +45 -0
- data/lib/webmaniabr_nfe_ruby/authenticate.rb +13 -0
- data/lib/webmaniabr_nfe_ruby/configuration.rb +14 -0
- data/lib/webmaniabr_nfe_ruby/sefaz_status.rb +11 -0
- data/lib/webmaniabr_nfe_ruby/submit_nfe.rb +13 -0
- data/lib/webmaniabr_nfe_ruby/validate_a1_cert.rb +11 -0
- data/lib/webmaniabr_nfe_ruby/version.rb +3 -0
- data/webmaniabr_nfe_ruby.gemspec +33 -0
- metadata +112 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 38a18785cd3af5d4d14ee6ba399bc4d8bae0ad23
|
4
|
+
data.tar.gz: 20299f7a5185c317da75a7417bb8931f744e5100
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0b1ed5cafc7490a115e4daa27ab7cb87cc574e3a55436f1206bd0f888e653e7797f4d2010cb80ad2df9157db9df6b71e58ac083f3ee24e07a07c785ac0aa030a
|
7
|
+
data.tar.gz: e72284a1f75da8198c8773e44e991796b1d1238e6d45cca887810a6756668ecf1e590b6de6414d7d955ae6478502d309354be358f8b2a1ac2e8afe7638bb4e7d
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, and in the interest of
|
4
|
+
fostering an open and welcoming community, we pledge to respect all people who
|
5
|
+
contribute through reporting issues, posting feature requests, updating
|
6
|
+
documentation, submitting pull requests or patches, and other activities.
|
7
|
+
|
8
|
+
We are committed to making participation in this project a harassment-free
|
9
|
+
experience for everyone, regardless of level of experience, gender, gender
|
10
|
+
identity and expression, sexual orientation, disability, personal appearance,
|
11
|
+
body size, race, ethnicity, age, religion, or nationality.
|
12
|
+
|
13
|
+
Examples of unacceptable behavior by participants include:
|
14
|
+
|
15
|
+
* The use of sexualized language or imagery
|
16
|
+
* Personal attacks
|
17
|
+
* Trolling or insulting/derogatory comments
|
18
|
+
* Public or private harassment
|
19
|
+
* Publishing other's private information, such as physical or electronic
|
20
|
+
addresses, without explicit permission
|
21
|
+
* Other unethical or unprofessional conduct
|
22
|
+
|
23
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
24
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
25
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
26
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
27
|
+
threatening, offensive, or harmful.
|
28
|
+
|
29
|
+
By adopting this Code of Conduct, project maintainers commit themselves to
|
30
|
+
fairly and consistently applying these principles to every aspect of managing
|
31
|
+
this project. Project maintainers who do not follow or enforce the Code of
|
32
|
+
Conduct may be permanently removed from the project team.
|
33
|
+
|
34
|
+
This code of conduct applies both within project spaces and in public spaces
|
35
|
+
when an individual is representing the project or its community.
|
36
|
+
|
37
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
38
|
+
reported by contacting a project maintainer at marcelo.perini.veloso@gmail.com. All
|
39
|
+
complaints will be reviewed and investigated and will result in a response that
|
40
|
+
is deemed necessary and appropriate to the circumstances. Maintainers are
|
41
|
+
obligated to maintain confidentiality with regard to the reporter of an
|
42
|
+
incident.
|
43
|
+
|
44
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
45
|
+
version 1.3.0, available at
|
46
|
+
[http://contributor-covenant.org/version/1/3/0/][version]
|
47
|
+
|
48
|
+
[homepage]: http://contributor-covenant.org
|
49
|
+
[version]: http://contributor-covenant.org/version/1/3/0/
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Marcelo Perini Veloso
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
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.
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Marcelo Perini Veloso
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
of this software and associated documentation files (the "Software"), to deal
|
9
|
+
in the Software without restriction, including without limitation the rights
|
10
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
copies of the Software, and to permit persons to whom the Software is
|
12
|
+
furnished to do so, subject to the following conditions:
|
13
|
+
|
14
|
+
The above copyright notice and this permission notice shall be included in
|
15
|
+
all copies or substantial portions of the Software.
|
16
|
+
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
23
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# WebmaniabrRuby
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/webmaniabr_ruby`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'webmaniabr_ruby'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install webmaniabr_ruby
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
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.
|
30
|
+
|
31
|
+
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 tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/webmaniabr_ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
|
+
|
37
|
+
|
38
|
+
## License
|
39
|
+
|
40
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
41
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "webmaniabr_ruby"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/contributors.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Marcelo Perini
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module WebmaniabrNfeRuby
|
2
|
+
module Models
|
3
|
+
class Client
|
4
|
+
attr_accessor :cpf, :name, :address, :complement, :number, :neighborhood,
|
5
|
+
:city, :uf, :cep, :phone, :mail
|
6
|
+
|
7
|
+
def initialize(options = {})
|
8
|
+
@cpf = options[:cpf]
|
9
|
+
@name = options[:name]
|
10
|
+
@address = options[:address]
|
11
|
+
@complement = options[:complement]
|
12
|
+
@number = options[:number]
|
13
|
+
@neighborhood = options[:neighborhood]
|
14
|
+
@city = options[:city]
|
15
|
+
@uf = options[:uf]
|
16
|
+
@cep = options[:cep]
|
17
|
+
@phone = options[:phone]
|
18
|
+
@mail = options[:mail]
|
19
|
+
end
|
20
|
+
|
21
|
+
def to_hash
|
22
|
+
{
|
23
|
+
cpf: @cpf,
|
24
|
+
nome_completo: @name,
|
25
|
+
endereco: @address,
|
26
|
+
complemento: @complement,
|
27
|
+
numero: @number,
|
28
|
+
bairro: @neighborhood,
|
29
|
+
cidade: @city,
|
30
|
+
uf: @uf,
|
31
|
+
cep: @cep,
|
32
|
+
phone: @phone,
|
33
|
+
email: @mail
|
34
|
+
}
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
data/lib/models/order.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
module WebmaniabrNfeRuby
|
2
|
+
module Models
|
3
|
+
class Order
|
4
|
+
attr_accessor :payment, :presence, :ship_tax, :ship_value, :discount,
|
5
|
+
:total
|
6
|
+
|
7
|
+
def initialize(options = {})
|
8
|
+
@payment = options[:payment]
|
9
|
+
@presence = options[:presence]
|
10
|
+
@ship_type = options[:ship_type]
|
11
|
+
@ship_value = options[:ship_value]
|
12
|
+
@discount = options[:discount]
|
13
|
+
@total = options[:total]
|
14
|
+
end
|
15
|
+
|
16
|
+
def to_hash
|
17
|
+
{
|
18
|
+
pagamento: @payment,
|
19
|
+
presenca: @presence,
|
20
|
+
modalidade_frete: @ship_type,
|
21
|
+
frete: @ship_value,
|
22
|
+
discount: @discount,
|
23
|
+
total: @total
|
24
|
+
}
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module WebmaniabrNfeRuby
|
2
|
+
module Models
|
3
|
+
class Product
|
4
|
+
attr_accessor :name, :sku, :ean, :ncm, :cest, :cnpj_product, :quantity,
|
5
|
+
:unit, :weight, :origin, :subtotal, :total, :tax_class
|
6
|
+
|
7
|
+
def initialize(options = {})
|
8
|
+
@name = options[:name]
|
9
|
+
@sku = options[:sku]
|
10
|
+
@ean = options[:ean]
|
11
|
+
@ncm = options[:ncm]
|
12
|
+
@cest = options[:cest]
|
13
|
+
@cnpj_maker = options[:cnpj_maker]
|
14
|
+
@quantity = options[:quantity]
|
15
|
+
@unit = options[:unit]
|
16
|
+
@weight = options[:weight]
|
17
|
+
@origin = options[:origin]
|
18
|
+
@subtotal = options[:subtotal]
|
19
|
+
@total = options[:total]
|
20
|
+
@tax_class = options[:tax_class]
|
21
|
+
end
|
22
|
+
|
23
|
+
def to_hash
|
24
|
+
{
|
25
|
+
nome: @name,
|
26
|
+
sku: @sku,
|
27
|
+
ncm: @ncm,
|
28
|
+
cest: @cest,
|
29
|
+
cnpj_produtor: @cnpj_produtor,
|
30
|
+
quantidade: @quantity,
|
31
|
+
unidade: @unit,
|
32
|
+
peso: @weight,
|
33
|
+
origem: @origin,
|
34
|
+
subtotal: @subtotal,
|
35
|
+
total: @total,
|
36
|
+
classe_imposto: @tax_class
|
37
|
+
}
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
module WebmaniabrNfeRuby
|
2
|
+
module Models
|
3
|
+
class Request
|
4
|
+
attr_accessor :id, :url_notification, :operation, :operation_nature,
|
5
|
+
:model, :emission, :goal, :environment, :client, :products, :order,
|
6
|
+
:transport
|
7
|
+
|
8
|
+
def initialize(options = {})
|
9
|
+
@id = options[:id]
|
10
|
+
@url_notification = options[:url_notification]
|
11
|
+
@operation = options[:operation]
|
12
|
+
@operation_nature = options[:operation_nature]
|
13
|
+
@model = options[:model]
|
14
|
+
@emission = options[:emission]
|
15
|
+
@goal = options[:goal]
|
16
|
+
@environment = options[:environment]
|
17
|
+
@client = options[:client]
|
18
|
+
@products = options[:products]
|
19
|
+
@order = options[:order]
|
20
|
+
@transport = options[:transport]
|
21
|
+
end
|
22
|
+
|
23
|
+
def to_hash
|
24
|
+
products = []
|
25
|
+
|
26
|
+
if @products.class == Array
|
27
|
+
@products.each do |product|
|
28
|
+
products.push product.to_hash
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
if @transport
|
33
|
+
transport = @transport.to_hash
|
34
|
+
else
|
35
|
+
transport = ''
|
36
|
+
end
|
37
|
+
|
38
|
+
{
|
39
|
+
ID: @id,
|
40
|
+
url_notificacao: @url_notification,
|
41
|
+
operacao: @operation,
|
42
|
+
natureza_operacao: @operation_nature,
|
43
|
+
modelo: @model,
|
44
|
+
emissao: @emission,
|
45
|
+
finalidade: @goal,
|
46
|
+
ambiente: @environment,
|
47
|
+
cliente: @client.to_hash,
|
48
|
+
produtos: products,
|
49
|
+
pedido: @order.to_hash,
|
50
|
+
transporte: transport
|
51
|
+
}
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module WebmaniabrNfeRuby
|
2
|
+
module Models
|
3
|
+
class Transport
|
4
|
+
attr_accessor :cnpj, :company_name, :ie, :address, :uf, :city, :cep
|
5
|
+
|
6
|
+
def initialize(options = {})
|
7
|
+
@cnpj = options[:cnpj]
|
8
|
+
@company_name = options[:company_name]
|
9
|
+
@ie = options[:ie]
|
10
|
+
@address = options[:address]
|
11
|
+
@uf = options[:uf]
|
12
|
+
@city = options[:city]
|
13
|
+
@cep = options[:cep]
|
14
|
+
end
|
15
|
+
|
16
|
+
def to_hash
|
17
|
+
{
|
18
|
+
cnpj: @cnpj,
|
19
|
+
razao_social: @company_name,
|
20
|
+
ie: @ie,
|
21
|
+
endereco: @address,
|
22
|
+
uf: @uf,
|
23
|
+
cidade: @city,
|
24
|
+
cep: @cep
|
25
|
+
}
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'webmaniabr_nfe_ruby/version'
|
2
|
+
require 'webmaniabr_nfe_ruby/configuration'
|
3
|
+
require 'webmaniabr_nfe_ruby/api_interface'
|
4
|
+
require 'webmaniabr_nfe_ruby/authenticate'
|
5
|
+
require 'webmaniabr_nfe_ruby/sefaz_status'
|
6
|
+
require 'webmaniabr_nfe_ruby/validate_a1_cert'
|
7
|
+
require 'models/request'
|
8
|
+
require 'models/client'
|
9
|
+
require 'models/product'
|
10
|
+
require 'models/order'
|
11
|
+
require 'models/transport'
|
12
|
+
require 'webmaniabr_nfe_ruby/submit_nfe'
|
13
|
+
|
14
|
+
module WebmaniabrNfeRuby
|
15
|
+
def self.configure
|
16
|
+
yield(configuration)
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.configuration
|
20
|
+
@configuration ||= Configuration.new
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.sefaz_status
|
24
|
+
SefazStatus.new.request
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.validate_a1_cert
|
28
|
+
ValidateA1Cert.new.request
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.submit_nfe(options = {})
|
32
|
+
SubmitNfe.new(options).request
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'net/http'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
module WebmaniabrNfeRuby
|
5
|
+
class ApiInterface
|
6
|
+
def initialize(action)
|
7
|
+
@uri = URI(base_uri + action)
|
8
|
+
end
|
9
|
+
|
10
|
+
def process(options = {})
|
11
|
+
authenticate = WebmaniabrNfeRuby.configuration.authenticate
|
12
|
+
|
13
|
+
res = Net::HTTP.start(@uri.hostname, @uri.port, use_ssl: true) do |http|
|
14
|
+
case options[:method]
|
15
|
+
when 'GET'
|
16
|
+
req = Net::HTTP::Get.new(@uri)
|
17
|
+
when 'POST'
|
18
|
+
req = Net::HTTP::Post.new(@uri)
|
19
|
+
when 'PUT'
|
20
|
+
req = Net::HTTP::Put.new(@uri)
|
21
|
+
end
|
22
|
+
|
23
|
+
req['X-Consumer-Key'] = authenticate.consumer_key
|
24
|
+
req['X-Consumer-Secret'] = authenticate.consumer_secret
|
25
|
+
req['X-Access-Token'] = authenticate.access_token
|
26
|
+
req['X-Access-Token-Secret'] = authenticate.access_token_secret
|
27
|
+
req['Content-Type'] = 'application/json'
|
28
|
+
|
29
|
+
if options[:params]
|
30
|
+
req.body = options[:params].to_json
|
31
|
+
end
|
32
|
+
|
33
|
+
http.request(req)
|
34
|
+
end
|
35
|
+
|
36
|
+
# converte o json para hash e converte as string keys para sym
|
37
|
+
return JSON.parse(res.body).inject({}) { |memo, (k,v)| memo[k.to_sym] = v; memo }
|
38
|
+
end
|
39
|
+
|
40
|
+
private
|
41
|
+
def base_uri
|
42
|
+
'https://webmaniabr.com/api/1/'
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module WebmaniabrNfeRuby
|
2
|
+
class Authenticate
|
3
|
+
attr_accessor :consumer_key, :consumer_secret, :access_token,
|
4
|
+
:access_token_secret
|
5
|
+
|
6
|
+
def initialize(options = {})
|
7
|
+
self.consumer_key = options[:consumer_key]
|
8
|
+
self.consumer_secret = options[:consumer_secret]
|
9
|
+
self.access_token = options[:access_token]
|
10
|
+
self.access_token_secret = options[:access_token_secret]
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module WebmaniabrNfeRuby
|
2
|
+
class Configuration
|
3
|
+
attr_accessor :consumer_key, :consumer_secret, :access_token,
|
4
|
+
:access_token_secret
|
5
|
+
|
6
|
+
def authenticate
|
7
|
+
@authenticate ||=
|
8
|
+
Authenticate.new(consumer_key: consumer_key,
|
9
|
+
consumer_secret: consumer_secret,
|
10
|
+
access_token: access_token,
|
11
|
+
access_token_secret: access_token_secret)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'webmaniabr_nfe_ruby/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "webmaniabr_nfe_ruby"
|
8
|
+
spec.version = WebmaniabrNfeRuby::VERSION
|
9
|
+
spec.authors = ["Marcelo Perini Veloso\n\n"]
|
10
|
+
spec.email = ["marcelo.perini.veloso@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{A gem to integrate WebmaniaBr Nfe API}
|
13
|
+
spec.description = %q{This gem provide an easy way to integrate WebmaniaBr Nfe API }
|
14
|
+
spec.homepage = "https://github.com/Sidoniuns/webmaniabr_nfe_ruby"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
|
+
#if spec.respond_to?(:metadata)
|
20
|
+
# spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
|
21
|
+
#else
|
22
|
+
# raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
|
23
|
+
#end
|
24
|
+
|
25
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
26
|
+
spec.bindir = "exe"
|
27
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
|
+
spec.require_paths = ["lib"]
|
29
|
+
|
30
|
+
spec.add_development_dependency "bundler", "~> 1.12"
|
31
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
32
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
33
|
+
end
|
metadata
ADDED
@@ -0,0 +1,112 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: webmaniabr_nfe_ruby
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- "Marcelo Perini Veloso\n\n"
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-07-25 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.12'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.12'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
description: 'This gem provide an easy way to integrate WebmaniaBr Nfe API '
|
56
|
+
email:
|
57
|
+
- marcelo.perini.veloso@gmail.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".gitignore"
|
63
|
+
- ".rspec"
|
64
|
+
- ".travis.yml"
|
65
|
+
- CODE_OF_CONDUCT.md
|
66
|
+
- Gemfile
|
67
|
+
- LICENSE
|
68
|
+
- LICENSE.txt
|
69
|
+
- README.md
|
70
|
+
- Rakefile
|
71
|
+
- bin/console
|
72
|
+
- bin/setup
|
73
|
+
- contributors.txt
|
74
|
+
- lib/models/client.rb
|
75
|
+
- lib/models/order.rb
|
76
|
+
- lib/models/product.rb
|
77
|
+
- lib/models/request.rb
|
78
|
+
- lib/models/transport.rb
|
79
|
+
- lib/webmaniabr_nfe_ruby.rb
|
80
|
+
- lib/webmaniabr_nfe_ruby/api_interface.rb
|
81
|
+
- lib/webmaniabr_nfe_ruby/authenticate.rb
|
82
|
+
- lib/webmaniabr_nfe_ruby/configuration.rb
|
83
|
+
- lib/webmaniabr_nfe_ruby/sefaz_status.rb
|
84
|
+
- lib/webmaniabr_nfe_ruby/submit_nfe.rb
|
85
|
+
- lib/webmaniabr_nfe_ruby/validate_a1_cert.rb
|
86
|
+
- lib/webmaniabr_nfe_ruby/version.rb
|
87
|
+
- webmaniabr_nfe_ruby.gemspec
|
88
|
+
homepage: https://github.com/Sidoniuns/webmaniabr_nfe_ruby
|
89
|
+
licenses:
|
90
|
+
- MIT
|
91
|
+
metadata: {}
|
92
|
+
post_install_message:
|
93
|
+
rdoc_options: []
|
94
|
+
require_paths:
|
95
|
+
- lib
|
96
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
97
|
+
requirements:
|
98
|
+
- - ">="
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: '0'
|
101
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - ">="
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: '0'
|
106
|
+
requirements: []
|
107
|
+
rubyforge_project:
|
108
|
+
rubygems_version: 2.5.1
|
109
|
+
signing_key:
|
110
|
+
specification_version: 4
|
111
|
+
summary: A gem to integrate WebmaniaBr Nfe API
|
112
|
+
test_files: []
|