catalogos_sat 0.0.91 → 0.0.92
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 +4 -4
- data/lib/catalogos_sat.rb +19 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c83c1267e5be95fcf193c99ef4a7c783e529d37
|
4
|
+
data.tar.gz: ee3a719022beda64b93d44c6eb7903e4371e550f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5084e6325e90fed75c2a16d6cdd704efcdec3307c13500ec12e2843959d4a449fb727004faff5a13ec45bddfe9375fc23447a36b39a72484f07428f0958b9c3
|
7
|
+
data.tar.gz: 4f7fc4c2c59d96e9e167698d42092a5f288e92d089e7f3d9da6d4bdb5550acff4a87aab283ef1ed17303dc582579df52f9beddc442fb3a6e7336aa4c1f8479f3
|
data/lib/catalogos_sat.rb
CHANGED
@@ -292,6 +292,20 @@ class Catalogos
|
|
292
292
|
|
293
293
|
end
|
294
294
|
|
295
|
+
|
296
|
+
|
297
|
+
=begin
|
298
|
+
def nueva(url_excel = "http://www.sat.gob.mx/informacion_fiscal/factura_electronica/Documents/catCFDI.xls")
|
299
|
+
url_excel = URI.parse(url_excel)
|
300
|
+
last_modified = nil
|
301
|
+
httpWork = Net::HTTP.start(url_excel.host) do
|
302
|
+
|http|
|
303
|
+
response = http.request_head(url_excel.path)
|
304
|
+
last_modified = response['Last-Modified']
|
305
|
+
end
|
306
|
+
return last_modified
|
307
|
+
end
|
308
|
+
|
295
309
|
def nueva_eTag(url_excel = "http://www.sat.gob.mx/informacion_fiscal/factura_electronica/Documents/catCFDI.xls")
|
296
310
|
url_excel = URI.parse(url_excel)
|
297
311
|
new_eTag = nil
|
@@ -315,21 +329,19 @@ class Catalogos
|
|
315
329
|
return new_eTag != local_eTag
|
316
330
|
|
317
331
|
end
|
332
|
+
=end
|
318
333
|
|
319
334
|
# Encapsula los demas metodos en una sola rutina
|
320
335
|
# @param local_eTag [String] siempre intentara utilizar el @last_eTag a menos que se mande explicitamente un eTag, este se puede
|
321
336
|
# obtener de @last_eTag en una iteracion previa del programa.
|
322
337
|
# @param url_excel [String] el url donde el SAT tiene los catalogos, valor default "http://www.sat.gob.mx/informacion_fiscal/factura_electronica/Documents/catCFDI.xls"
|
323
338
|
# @return [Bool] verdadero si no hubo ningun error.
|
324
|
-
def main(
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
procesar()
|
329
|
-
end
|
339
|
+
def main(url_excel = "http://www.sat.gob.mx/informacion_fiscal/factura_electronica/Documents/catCFDI.xls")
|
340
|
+
|
341
|
+
descargar(url_excel)
|
342
|
+
procesar()
|
330
343
|
|
331
344
|
return true
|
332
|
-
|
333
345
|
|
334
346
|
end
|
335
347
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: catalogos_sat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.92
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BambuCode
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-11-
|
12
|
+
date: 2017-11-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ruby-progressbar
|