nfe-paulistana 0.5.0 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,9 +5,9 @@ require "nfe-paulistana/version"
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "nfe-paulistana"
7
7
  s.version = NfePaulistana::VERSION
8
- s.authors = ["Marcelo Paez"]
9
- s.email = ["marcelo@iugu.com.br"]
10
- s.homepage = "https://iugu.com.br"
8
+ s.authors = ["iugu", "Patrick Ribeiro Negri", "Marcelo Paez Sequeira"]
9
+ s.email = ["patrick@iugu.com"]
10
+ s.homepage = "https://iugu.com"
11
11
  s.summary = %q{Notafiscal Eletronica}
12
12
  s.description = %q{Gema para utilização do Webservice da Nf Paulistana}
13
13
 
@@ -18,10 +18,11 @@ Gem::Specification.new do |s|
18
18
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
19
  s.require_paths = ["lib"]
20
20
 
21
- # specify any dependencies here; for example:
22
- s.add_dependency "nokogiri"
23
- s.add_dependency "savon", "0.9.9"
21
+ s.add_dependency "nokogiri", ">= 1.9.1"
22
+ s.add_dependency "savon", ">= 2.12"
24
23
  s.add_dependency "signer"
25
- s.add_development_dependency "rspec"
26
- # s.add_runtime_dependency "rest-client"
24
+
25
+ s.add_development_dependency "rake"
26
+ s.add_development_dependency "minitest"
27
+ s.add_development_dependency "pry-nav"
27
28
  end
@@ -0,0 +1,32 @@
1
+ require_relative '../../test_helper'
2
+
3
+ describe "Envio RPS" do
4
+ before do
5
+ @nfe = NfePaulistana::Gateway.new(
6
+ ssl_cert_p12_path: ENV["NFE_CERT_P12_PATH"],
7
+ ssl_cert_path: ENV["NFE_CERT_PATH"],
8
+ ssl_key_path: ENV["NFE_KEY_PATH"],
9
+ ssl_cert_pass: ENV["NFE_CERT_PASS"]
10
+ )
11
+ end
12
+
13
+ it "should create the NFs-e" do
14
+ response = @nfe.envio_rps({
15
+ cnpj_remetente: ENV["NFE_CNPJ"],
16
+ inscricao_prestador: ENV["NFE_IM"],
17
+ aliquota_servicos: ENV["NFE_ALIQUOTA"],
18
+ data_emissao: Time.now.to_date.strftime,
19
+ discriminacao: "Teste NFS-e",
20
+ codigo_servico: ENV["NFE_COD_SERVICO"],
21
+ valor_servicos: "100.00",
22
+ tributacao_rps: "T",
23
+ status_rps: "N",
24
+ tipo_rps: "RPS",
25
+ serie_rps: "AAAAA",
26
+ numero_rps: Time.now.to_i.to_s,
27
+ email_tomador: ENV["NFE_EMAIL"],
28
+ cpf_tomador: ENV["NFE_CPF"]
29
+ })
30
+ assert response.success? == true
31
+ end
32
+ end
@@ -0,0 +1,7 @@
1
+ require_relative '../../test_helper'
2
+
3
+ describe NfePaulistana do
4
+ it "must be defined" do
5
+ NfePaulistana::VERSION.wont_be_nil
6
+ end
7
+ end
@@ -0,0 +1,4 @@
1
+ require 'minitest'
2
+ require 'minitest/autorun'
3
+ require 'minitest/pride'
4
+ require File.expand_path('../../lib/nfe-paulistana.rb', __FILE__)
metadata CHANGED
@@ -1,117 +1,148 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nfe-paulistana
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
5
- prerelease:
4
+ version: 1.0.5
6
5
  platform: ruby
7
6
  authors:
8
- - Marcelo Paez
7
+ - iugu
8
+ - Patrick Ribeiro Negri
9
+ - Marcelo Paez Sequeira
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2013-03-07 00:00:00.000000000 Z
13
+ date: 2020-06-23 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: nokogiri
16
17
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
18
  requirements:
19
- - - ! '>='
19
+ - - ">="
20
20
  - !ruby/object:Gem::Version
21
- version: '0'
21
+ version: 1.9.1
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
25
  requirements:
27
- - - ! '>='
26
+ - - ">="
28
27
  - !ruby/object:Gem::Version
29
- version: '0'
28
+ version: 1.9.1
30
29
  - !ruby/object:Gem::Dependency
31
30
  name: savon
32
31
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
32
  requirements:
35
- - - '='
33
+ - - ">="
36
34
  - !ruby/object:Gem::Version
37
- version: 0.9.9
35
+ version: '2.12'
38
36
  type: :runtime
39
37
  prerelease: false
40
38
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
39
  requirements:
43
- - - '='
40
+ - - ">="
44
41
  - !ruby/object:Gem::Version
45
- version: 0.9.9
42
+ version: '2.12'
46
43
  - !ruby/object:Gem::Dependency
47
44
  name: signer
48
45
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
46
  requirements:
51
- - - ! '>='
47
+ - - ">="
52
48
  - !ruby/object:Gem::Version
53
49
  version: '0'
54
50
  type: :runtime
55
51
  prerelease: false
56
52
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
53
  requirements:
59
- - - ! '>='
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
57
+ - !ruby/object:Gem::Dependency
58
+ name: rake
59
+ requirement: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: '0'
64
+ type: :development
65
+ prerelease: false
66
+ version_requirements: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ - !ruby/object:Gem::Dependency
72
+ name: minitest
73
+ requirement: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ type: :development
79
+ prerelease: false
80
+ version_requirements: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
60
83
  - !ruby/object:Gem::Version
61
84
  version: '0'
62
85
  - !ruby/object:Gem::Dependency
63
- name: rspec
86
+ name: pry-nav
64
87
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
88
  requirements:
67
- - - ! '>='
89
+ - - ">="
68
90
  - !ruby/object:Gem::Version
69
91
  version: '0'
70
92
  type: :development
71
93
  prerelease: false
72
94
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
95
  requirements:
75
- - - ! '>='
96
+ - - ">="
76
97
  - !ruby/object:Gem::Version
77
98
  version: '0'
78
99
  description: Gema para utilização do Webservice da Nf Paulistana
79
100
  email:
80
- - marcelo@iugu.com.br
101
+ - patrick@iugu.com
81
102
  executables: []
82
103
  extensions: []
83
104
  extra_rdoc_files: []
84
105
  files:
85
- - .gitignore
106
+ - ".gitignore"
107
+ - ".ruby-version"
86
108
  - Gemfile
87
109
  - Gemfile.lock
110
+ - LICENSE
111
+ - README.md
88
112
  - Rakefile
89
113
  - lib/nfe-paulistana.rb
114
+ - lib/nfe-paulistana/gateway.rb
115
+ - lib/nfe-paulistana/response.rb
90
116
  - lib/nfe-paulistana/version.rb
117
+ - lib/nfe-paulistana/xml_builder.rb
91
118
  - nfe-paulistana.gemspec
92
- - test.rb
93
- homepage: https://iugu.com.br
119
+ - test/lib/nfe-paulistana/envio_rps_test.rb
120
+ - test/lib/nfe-paulistana/version_test.rb
121
+ - test/test_helper.rb
122
+ homepage: https://iugu.com
94
123
  licenses: []
124
+ metadata: {}
95
125
  post_install_message:
96
126
  rdoc_options: []
97
127
  require_paths:
98
128
  - lib
99
129
  required_ruby_version: !ruby/object:Gem::Requirement
100
- none: false
101
130
  requirements:
102
- - - ! '>='
131
+ - - ">="
103
132
  - !ruby/object:Gem::Version
104
133
  version: '0'
105
134
  required_rubygems_version: !ruby/object:Gem::Requirement
106
- none: false
107
135
  requirements:
108
- - - ! '>='
136
+ - - ">="
109
137
  - !ruby/object:Gem::Version
110
138
  version: '0'
111
139
  requirements: []
112
140
  rubyforge_project: nfe-paulistana
113
- rubygems_version: 1.8.24
141
+ rubygems_version: 2.4.5.2
114
142
  signing_key:
115
- specification_version: 3
143
+ specification_version: 4
116
144
  summary: Notafiscal Eletronica
117
- test_files: []
145
+ test_files:
146
+ - test/lib/nfe-paulistana/envio_rps_test.rb
147
+ - test/lib/nfe-paulistana/version_test.rb
148
+ - test/test_helper.rb
data/test.rb DELETED
@@ -1,21 +0,0 @@
1
- require 'nfe-paulistana.rb'
2
- nfe = NfePaulistana.new({
3
- :cert_path => "",
4
- :cert_pass => "",
5
- :cnpj_remetente => "",
6
- :inscricao_prestador => "",
7
- :aliquota_servicos => "0.03",
8
- :data_emissao => "2013-03-04",
9
- :email_tomador => "",
10
- :discriminacao => "",
11
- :codigo_servico => "",
12
- :valor_servicos => "10.00",
13
- :tributacao_rps => "T",
14
- :status_rps => "N",
15
- :tipo_rps => "RPS",
16
- :serie_rps => "TESTE",
17
- :numero_rps => "1"
18
- #:cpf_tomador => ""
19
- })
20
- ret = nfe.enviar()
21
- puts ret