Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use time zone buenos aires.

  • Loading branch information...
commit dac6e44bf1dc5507f025106896300250bf75ced0 1 parent 071cd8a
@miloops authored
View
6 Gemfile
@@ -4,6 +4,8 @@ platforms :ruby_19 do
gem "httpi", "0.7.9"
end
gem "savon"
+gem "active_support", ">= 3.0.0"
+gem "tzinfo"
group :development do
platforms :ruby_18 do
@@ -14,8 +16,8 @@ group :development do
gem 'ruby-debug19', "0.11.6"
end
gem "rspec", "~> 2.4.0"
- gem "bundler", "~> 1.0.0"
- gem "jeweler", "~> 1.5.1"
+ gem "bundler", ">= 1.0.0"
+ gem "jeweler", "~> 1.6.3"
gem "rcov", ">= 0"
end
View
16 Gemfile.lock
@@ -1,6 +1,9 @@
GEM
remote: http://rubygems.org/
specs:
+ active_support (3.0.0)
+ activesupport (= 3.0.0)
+ activesupport (3.0.0)
archive-tar-minitar (0.5.2)
builder (3.0.0)
columnize (0.3.2)
@@ -11,15 +14,15 @@ GEM
builder (>= 2.1.2)
httpi (0.7.9)
rack
- jeweler (1.5.2)
- bundler (~> 1.0.0)
+ jeweler (1.6.3)
+ bundler (~> 1.0)
git (>= 1.2.5)
rake
linecache (0.43)
linecache19 (0.5.11)
ruby_core_source (>= 0.1.4)
rack (1.2.2)
- rake (0.8.7)
+ rake (0.9.2)
rcov (0.9.9)
rspec (2.4.0)
rspec-core (~> 2.4.0)
@@ -49,17 +52,20 @@ GEM
crack (~> 0.1.8)
gyoku (>= 0.3.0)
httpi (>= 0.7.8)
+ tzinfo (0.3.28)
PLATFORMS
ruby
DEPENDENCIES
- bundler (~> 1.0.0)
+ active_support (>= 3.0.0)
+ bundler (>= 1.0.0)
httpi (= 0.7.9)
- jeweler (~> 1.5.1)
+ jeweler (~> 1.6.3)
rcov
rspec (~> 2.4.0)
ruby-debug
ruby-debug-base19 (= 0.11.24)
ruby-debug19 (= 0.11.6)
savon
+ tzinfo
View
6 bravo.gemspec
@@ -63,7 +63,7 @@ Gem::Specification.new do |s|
s.add_development_dependency(%q<ruby-debug-base19>, ["= 0.11.24"])
s.add_development_dependency(%q<ruby-debug19>, ["= 0.11.6"])
s.add_development_dependency(%q<rspec>, ["~> 2.4.0"])
- s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
+ s.add_development_dependency(%q<bundler>, [">= 1.0.0"])
s.add_development_dependency(%q<jeweler>, ["~> 1.5.1"])
s.add_development_dependency(%q<rcov>, [">= 0"])
else
@@ -72,7 +72,7 @@ Gem::Specification.new do |s|
s.add_dependency(%q<ruby-debug-base19>, ["= 0.11.24"])
s.add_dependency(%q<ruby-debug19>, ["= 0.11.6"])
s.add_dependency(%q<rspec>, ["~> 2.4.0"])
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
+ s.add_dependency(%q<bundler>, [">= 1.0.0"])
s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
s.add_dependency(%q<rcov>, [">= 0"])
end
@@ -82,7 +82,7 @@ Gem::Specification.new do |s|
s.add_dependency(%q<ruby-debug-base19>, ["= 0.11.24"])
s.add_dependency(%q<ruby-debug19>, ["= 0.11.6"])
s.add_dependency(%q<rspec>, ["~> 2.4.0"])
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
+ s.add_dependency(%q<bundler>, [">= 1.0.0"])
s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
s.add_dependency(%q<rcov>, [">= 0"])
end
View
6 lib/bravo/auth_data.rb
@@ -1,3 +1,7 @@
+require 'active_support'
+require 'active_support/core_ext/date_time/zones'
+require 'active_support/values/time_zone'
+
module Bravo
class AuthData
@@ -11,7 +15,7 @@ def fetch
raise "Archivo certificado no encontrado en #{Bravo.cert}"
end
- todays_datafile = "/tmp/bravo_#{Time.new.strftime('%d_%m_%Y')}.yml"
+ todays_datafile = "/tmp/bravo_#{Time.new.in_time_zone('Buenos Aires').strftime('%d_%m_%Y')}.yml"
opts = "-u #{Bravo.auth_url}"
opts += " -k #{Bravo.pkey}"
opts += " -c #{Bravo.cert}"
View
2  lib/bravo/bill.rb
@@ -60,7 +60,7 @@ def authorize
end
def setup_bill
- today = Time.new.strftime('%Y%m%d')
+ today = Time.new.in_time_zone('Buenos Aires').strftime('%Y%m%d')
fecaereq = {"FeCAEReq" => {
"FeCabReq" => Bravo::Bill.header(cbte_type),
Please sign in to comment.
Something went wrong with that request. Please try again.