bcn_ni 0.1.6 → 0.1.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a678080d77772ee8a800974da131c7e329f74162dd0054fa55e3e741fd5688ae
4
- data.tar.gz: 7ebf4ff1bc693aec7c34e4fc10a6b80b69d4b3aea659fa968684ce8af2056759
3
+ metadata.gz: 2d17fe676aa77facf97c9cf4355d7de85a4ff7f3f0f047324b56201992264092
4
+ data.tar.gz: 65cb53118d9f3086d96d29c41fd5c5745f1ca789f91b8e04b9da2a6545cf25f7
5
5
  SHA512:
6
- metadata.gz: 4ff4b144e27a5fae7b3c3d99e67b58060c7b6cac5ae052269eea7f1f189da59a55b5f6d5122dca4f89bdd182484791f628f432b2ab334db9072780617e0e5668
7
- data.tar.gz: 6c61cafb9d37780f08cc29e5f97cb9c64cc110236665776a1f249a6401ef8140b1798d9064cf6307d65f96864f2b195e478e23a9e15a118255a9c5fe7d9cda24
6
+ metadata.gz: 7312305624a80c519b8956faad2c1faecaa3cc93f2e59dbc194b6b991c9958deb91f27686df5cbbb07648115066833935e37d7aa164f62e2cdbb08ba8c80974a
7
+ data.tar.gz: 99f45ec56e4e64b7382853c8fa0abeff6839f9a65a2bfbb3c626fa262a445f6a795bcf6f00a4424b4b833fc04fcad55f2111e76f662fc94de62c00202e9eba87
data/README.md CHANGED
@@ -70,7 +70,7 @@ Add this line to your application's Gemfile:
70
70
  gem 'bcn_ni', git: 'https://github.com/mldoscar/bcn_ni', branch: 'master'
71
71
 
72
72
  # From ruby gems
73
- gem 'bcn_ni', '>= 0.1.5'
73
+ gem 'bcn_ni', '~> 0.1.7'
74
74
 
75
75
  # Using gem install
76
76
  gem install bcn_ni
@@ -85,6 +85,7 @@ $ bundle
85
85
  ## Changelog
86
86
 
87
87
  ```
88
+ 2022.04.06 - Rails 6.x 7.x compatibility
88
89
  2021.06.28 - Bugfix: Cambio en el URI para el request de scrapping, el BCN cambió de parámetros y ubicación de URL
89
90
  ```
90
91
 
@@ -3,8 +3,13 @@ require 'net/http'
3
3
  require 'net/https'
4
4
  require 'nokogiri'
5
5
  require 'open-uri'
6
- require 'active_support/core_ext/hash'
7
6
  require 'json'
7
+ require 'active_support/core_ext/hash'
8
+ begin
9
+ require 'active_support/time'
10
+ rescue LoadError
11
+ end
12
+
8
13
 
9
14
  module BcnNi
10
15
  class Request
@@ -193,35 +198,35 @@ module BcnNi
193
198
  end
194
199
 
195
200
  def soap__envelope(letter)
196
- envelope = <<EOF
201
+ envelope = <<-XML
197
202
  <?xml version="1.0" encoding="utf-8"?>
198
203
  <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
199
204
  <soap:Body>
200
205
  #{letter}
201
206
  </soap:Body>
202
207
  </soap:Envelope>
203
- EOF
208
+ XML
204
209
  return envelope
205
210
  end
206
211
 
207
212
  def soap__letter_exchange_day(year, month, day)
208
- letter = <<EOF
213
+ letter = <<-XML
209
214
  <RecuperaTC_Dia xmlns="http://servicios.bcn.gob.ni/">
210
215
  <Ano>#{year}</Ano>
211
216
  <Mes>#{month}</Mes>
212
217
  <Dia>#{day}</Dia>
213
218
  </RecuperaTC_Dia>
214
- EOF
219
+ XML
215
220
  return letter
216
221
  end
217
222
 
218
223
  def soap__letter_exchange_month(year, month)
219
- letter = <<EOF
224
+ letter = <<-XML
220
225
  <RecuperaTC_Mes xmlns="http://servicios.bcn.gob.ni/">
221
226
  <Ano>#{year}</Ano>
222
227
  <Mes>#{month}</Mes>
223
228
  </RecuperaTC_Mes>
224
- EOF
229
+ XML
225
230
  return letter
226
231
  end
227
232
 
@@ -1,3 +1,3 @@
1
1
  module BcnNi
2
- VERSION = '0.1.6'
2
+ VERSION = '0.1.7'
3
3
  end
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bcn_ni
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oscar Rodriguez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-28 00:00:00.000000000 Z
11
+ date: 2022-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '5.2'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '8.0'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
25
28
  - !ruby/object:Gem::Version
26
29
  version: '5.2'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '8.0'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: nokogiri
29
35
  requirement: !ruby/object:Gem::Requirement