inovadora_xml 0.0.4 → 0.0.9

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: ad13d1d25c4701914abef86f01658c92389afd78bff13f083d05c9837c414014
4
+ data.tar.gz: db01f6d4256b679ba6b0aa196c339a2dd2316de06a648c42f700f36c7358abc9
5
+ SHA512:
6
+ metadata.gz: 3299357a42af7a8ac44bac322e5585ff84655a44313af5e9d43c883889af4b9d3f94c79fda5eedc8f9a0caf6725a8ecade429dfb0ae63f8651fb9c4e087a6ca9
7
+ data.tar.gz: a36581b84ad314bb3b80c6f107628fcf2bf0baaab27f84035a4feda52875225b95bba7b8298f86930123ae6a46e8e56b86c26dee2f81d7a8d6a13c512728cddc
@@ -4,11 +4,11 @@ module InovadoraXml
4
4
  module DadosNfseService
5
5
  def get_numero_lote_rps
6
6
  self.fnnfse.build_fnnfses_sancionada if self.fnnfse.fnnfses_sancionada.blank?
7
- if self.fnnfse.fnnfses_sancionada.numero_rps.to_s == ""
8
- self.fnnfse.fnnfses_sancionada.numero_rps = self.fnnfse.class.connection.select_value("SELECT nextval('gestho.prox_nro_rps_nfse')")
9
- self.fnnfse.fnnfses_sancionada.save
10
- end
11
- return self.fnnfse.fnnfses_sancionada.numero_rps
7
+ (self.fnnfse.fnnfses_sancionada.numero_rps = self.fnnfse.class.connection.select_value("SELECT nextval('gestho.prox_nro_rps_nfse')")) if self.fnnfse.fnnfses_sancionada.numero_rps.to_s == ""
8
+
9
+ self.fnnfse.fnnfses_sancionada.numero_lote_rps = self.fnnfse.class.connection.select_value("SELECT nextval('gestho.prox_nro_lote_rps_nfse')")
10
+ self.fnnfse.fnnfses_sancionada.save
11
+ return self.fnnfse.fnnfses_sancionada.numero_lote_rps
12
12
  end
13
13
 
14
14
  def get_itens_servicos
@@ -97,7 +97,7 @@ module InovadoraXml
97
97
  intern = self.fnnfse.fnnfses_interns.try(:first).try(:intern)
98
98
  unless intern.blank?
99
99
  mensagem += " Intern:#{intern.id}-#{intern.paciente.try(:nome).try(:strip)}"
100
- mensagem += " Conv.:#{intern.convenio.try(:nome).try(:strip)}"
100
+ mensagem += " Conv.:#{self.fnnfse.get_convenio.try(:nome).try(:strip)}"
101
101
  mensagem += " CPF:#{intern.paciente.cpf}" if intern.paciente.cpf.to_s.strip != "" && intern.paciente.cpf.to_s.strip != "0"
102
102
  mensagem += " Nasc:#{intern.paciente.data_nascimento.to_s_br}"
103
103
  end
@@ -132,12 +132,12 @@ module InovadoraXml
132
132
  if xml_tratado.blank?
133
133
  xml_tratado = "xml não recebido da prefeitura"
134
134
  end
135
- # $b = {fnnfse: self.fnnfse, xml_envio: self.xml_gerado().to_s, xml_retorno: xml_tratado, errors: self.errors, tipo_documento: tipo_documento}
135
+ # $b = {fnnfse: self.fnnfse, xml_envio: self.xml_gerado().to_s, xml_retorno: xml_tratado, errors: self.errors, tipo_documento: tipo_documento}
136
136
 
137
137
  retorno_service = InovadoraXml::Modules::XmlRetorno.new(fnnfse: self.fnnfse, xml_envio: self.xml_gerado().to_s, xml_retorno: xml_tratado, errors: self.errors, tipo_documento: tipo_documento)
138
-
138
+
139
139
  retorno_service.save
140
140
  end
141
141
  end
142
142
  end
143
- end
143
+ end
@@ -1,3 +1,3 @@
1
1
  module InovadoraXml
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,52 +1,46 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inovadora_xml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
5
- prerelease:
4
+ version: 0.0.9
6
5
  platform: ruby
7
6
  authors:
8
7
  - Junior Libardoni
9
8
  autorequire:
10
9
  bindir: exe
11
10
  cert_chain: []
12
- date: 2019-06-24 00:00:00.000000000 Z
11
+ date: 2021-06-25 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: bundler
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
19
  version: '1.17'
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
26
  version: '1.17'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rake
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ~>
31
+ - - "~>"
36
32
  - !ruby/object:Gem::Version
37
33
  version: '10.0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ~>
38
+ - - "~>"
44
39
  - !ruby/object:Gem::Version
45
40
  version: '10.0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: signer
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - '='
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - '='
60
53
  - !ruby/object:Gem::Version
@@ -62,51 +55,45 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: nokogiri
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - "~>"
68
60
  - !ruby/object:Gem::Version
69
- version: 1.4.0
61
+ version: '1.10'
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - "~>"
76
67
  - !ruby/object:Gem::Version
77
- version: 1.4.0
68
+ version: '1.10'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: savon
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - '='
73
+ - - "~>"
84
74
  - !ruby/object:Gem::Version
85
- version: 1.2.0
75
+ version: '2.12'
86
76
  type: :runtime
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - '='
80
+ - - "~>"
92
81
  - !ruby/object:Gem::Version
93
- version: 1.2.0
82
+ version: '2.12'
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: wasabi
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - '='
87
+ - - "~>"
100
88
  - !ruby/object:Gem::Version
101
- version: 2.5.0
89
+ version: '3.6'
102
90
  type: :runtime
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - '='
94
+ - - "~>"
108
95
  - !ruby/object:Gem::Version
109
- version: 2.5.0
96
+ version: '3.6'
110
97
  description:
111
98
  email:
112
99
  - evanor.libardoni@gmail.com
@@ -114,16 +101,7 @@ executables: []
114
101
  extensions: []
115
102
  extra_rdoc_files: []
116
103
  files:
117
- - .gitignore
118
- - CODE_OF_CONDUCT.md
119
- - Gemfile
120
- - LICENSE.txt
121
104
  - README.md
122
- - Rakefile
123
- - bin/console
124
- - bin/setup
125
- - inovadora_xml-0.0.2.gem
126
- - inovadora_xml.gemspec
127
105
  - lib/inovadora_xml.rb
128
106
  - lib/inovadora_xml/assinador.rb
129
107
  - lib/inovadora_xml/custom_exceptions.rb
@@ -138,26 +116,24 @@ files:
138
116
  homepage:
139
117
  licenses:
140
118
  - MIT
119
+ metadata: {}
141
120
  post_install_message:
142
121
  rdoc_options: []
143
122
  require_paths:
144
123
  - lib
145
124
  required_ruby_version: !ruby/object:Gem::Requirement
146
- none: false
147
125
  requirements:
148
- - - ! '>='
126
+ - - ">="
149
127
  - !ruby/object:Gem::Version
150
128
  version: '0'
151
129
  required_rubygems_version: !ruby/object:Gem::Requirement
152
- none: false
153
130
  requirements:
154
- - - ! '>='
131
+ - - ">="
155
132
  - !ruby/object:Gem::Version
156
133
  version: '0'
157
134
  requirements: []
158
- rubyforge_project:
159
- rubygems_version: 1.8.23.2
135
+ rubygems_version: 3.1.2
160
136
  signing_key:
161
- specification_version: 3
137
+ specification_version: 4
162
138
  summary: Gem utilizada para geração de XML e envio.
163
139
  test_files: []
data/.gitignore DELETED
@@ -1,8 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
data/CODE_OF_CONDUCT.md DELETED
@@ -1,74 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
10
- orientation.
11
-
12
- ## Our Standards
13
-
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
16
-
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
22
-
23
- Examples of unacceptable behavior by participants include:
24
-
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
28
- * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
30
- address, without explicit permission
31
- * Other conduct which could reasonably be considered inappropriate in a
32
- professional setting
33
-
34
- ## Our Responsibilities
35
-
36
- Project maintainers are responsible for clarifying the standards of acceptable
37
- behavior and are expected to take appropriate and fair corrective action in
38
- response to any instances of unacceptable behavior.
39
-
40
- Project maintainers have the right and responsibility to remove, edit, or
41
- reject comments, commits, code, wiki edits, issues, and other contributions
42
- that are not aligned to this Code of Conduct, or to ban temporarily or
43
- permanently any contributor for other behaviors that they deem inappropriate,
44
- threatening, offensive, or harmful.
45
-
46
- ## Scope
47
-
48
- This Code of Conduct applies both within project spaces and in public spaces
49
- when an individual is representing the project or its community. Examples of
50
- representing a project or community include using an official project e-mail
51
- address, posting via an official social media account, or acting as an appointed
52
- representative at an online or offline event. Representation of a project may be
53
- further defined and clarified by project maintainers.
54
-
55
- ## Enforcement
56
-
57
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at junior@inovadora.com.br. All
59
- complaints will be reviewed and investigated and will result in a response that
60
- is deemed necessary and appropriate to the circumstances. The project team is
61
- obligated to maintain confidentiality with regard to the reporter of an incident.
62
- Further details of specific enforcement policies may be posted separately.
63
-
64
- Project maintainers who do not follow or enforce the Code of Conduct in good
65
- faith may face temporary or permanent repercussions as determined by other
66
- members of the project's leadership.
67
-
68
- ## Attribution
69
-
70
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
- available at [http://contributor-covenant.org/version/1/4][version]
72
-
73
- [homepage]: http://contributor-covenant.org
74
- [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile DELETED
@@ -1,6 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
-
5
- # Specify your gem's dependencies in inovadora_xml.gemspec
6
- gemspec
data/LICENSE.txt DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2019 Junior Libardoni
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
13
- all 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
21
- THE SOFTWARE.
data/Rakefile DELETED
@@ -1,2 +0,0 @@
1
- require "bundler/gem_tasks"
2
- task :default => :spec
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "inovadora_xml"
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(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
Binary file
@@ -1,30 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path("../lib", __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require "inovadora_xml/version"
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "inovadora_xml"
8
- spec.version = InovadoraXml::VERSION
9
- spec.authors = ["Junior Libardoni"]
10
- spec.email = ["evanor.libardoni@gmail.com"]
11
-
12
- spec.summary = %q{Gem utilizada para geração de XML e envio.}
13
- spec.license = "MIT"
14
-
15
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
16
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
-
18
- end
19
- spec.bindir = "exe"
20
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
- spec.require_paths = ["lib"]
22
-
23
-
24
- spec.add_development_dependency "bundler", "~> 1.17"
25
- spec.add_development_dependency "rake", "~> 10.0"
26
- spec.add_development_dependency "signer", "1.4.2"
27
- spec.add_dependency "nokogiri", ">= 1.4.0"
28
- spec.add_dependency "savon", "1.2.0"
29
- spec.add_dependency "wasabi", "2.5.0"
30
- end