-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolved issue #3. Error handling for some exception cases
- Loading branch information
Oscar Rodriguez
authored and
Oscar Rodriguez
committed
Feb 15, 2019
1 parent
50b8431
commit 4c9df79
Showing
6 changed files
with
89 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,14 +10,14 @@ Gem::Specification.new do |s| | |
s.authors = ["Oscar Rodriguez"] | ||
s.email = ["[email protected]"] | ||
s.homepage = "https://github.com/mldoscar/bcn_ni" | ||
s.summary = "This gem provides NIO (Córdoba oro Nicaragüense) versus USD (United States dollar) money exchange rates consuming the official Central Bank of Nicaragüa (BCN) SOAP Service" | ||
s.description = "This tool pretends to be helpful for developers who can request exchange rates in a easier way" | ||
s.summary = "This tool pretends to be helpful for developers who can request exchange rates from Nicaragua in a easier way" | ||
s.description = "This gem provides NIO (Córdoba Oro Nicaragüense) against USD (United States Dollar) money exchange rates consuming the official Central Bank of Nicaragüa (BCN) SOAP Service or HTML page" | ||
s.license = "MIT" | ||
|
||
s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.md", "CODE_OF_CONDUCT.md"] | ||
|
||
s.add_dependency "activesupport", "~> 5.1", ">= 5.1.3" | ||
s.add_dependency "nokogiri", "~> 1.10" | ||
s.add_dependency "activesupport", ">= 5.2" | ||
s.add_dependency "nokogiri", ">= 1.6" | ||
|
||
s.add_development_dependency "rake", "~> 12.3" | ||
s.add_development_dependency "rspec", "~> 3.8" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,27 @@ | ||
module BcnNi | ||
require File.expand_path(File.dirname(__FILE__)) + '/helpers/request' | ||
|
||
@@exceptions = [] | ||
|
||
def self.exchange_month(year, month, args = {}) | ||
request = BcnNi::Request.new(args) | ||
engine = BcnNi::Request.new(args) | ||
|
||
result = engine.exchange_month(year, month) | ||
@@exceptions = engine.exceptions | ||
|
||
return request.exchange_month(year, month) | ||
return result | ||
end | ||
|
||
def self.exchange_day(year, month, day, args = {}) | ||
request = BcnNi::Request.new(args) | ||
engine = BcnNi::Request.new(args) | ||
|
||
result = engine.exchange_day(year, month, day) | ||
@@exceptions = engine.exceptions | ||
|
||
return result | ||
end | ||
|
||
return request.exchange_day(year, month, day) | ||
def self.exceptions | ||
return @@exceptions | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module BcnNi | ||
VERSION = '0.1.3' | ||
VERSION = '0.1.4' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters