Skip to content

Commit

Permalink
BUGS-8356, Include gateway component while initialising envelope (#31)
Browse files Browse the repository at this point in the history
* BUGS-8356, Include gateway component while initializing envelope

* code refactored and resolved comments

* Changed the version number of gem
  • Loading branch information
harshaljaitpal authored Oct 20, 2020
1 parent 039b808 commit 1a726c5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
PATH
remote: .
specs:
baldr (0.10.8)
baldr (0.10.11)
activesupport

GEM
remote: https://rubygems.org/
specs:
activesupport (4.2.10)
activesupport (4.2.11.3)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
coderay (1.1.0)
concurrent-ruby (1.0.5)
concurrent-ruby (1.1.7)
diff-lcs (1.1.3)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
method_source (0.8.2)
minitest (5.11.3)
minitest (5.12.0)
pry (0.10.3)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
Expand All @@ -34,7 +34,7 @@ GEM
rspec-mocks (2.12.2)
slop (3.6.0)
thread_safe (0.3.6)
tzinfo (1.2.5)
tzinfo (1.2.7)
thread_safe (~> 0.1)

PLATFORMS
Expand All @@ -47,4 +47,4 @@ DEPENDENCIES
rspec

BUNDLED WITH
1.16.0
1.17.3
2 changes: 1 addition & 1 deletion lib/baldr/builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class Baldr::Builder
attr_accessor :envelope

def initialize(params = {})
@envelope = Baldr::Envelope.new
@envelope = Baldr::Envelope.new(params[:options])
@transactions = []

Baldr::Envelope.helpers.each do |f|
Expand Down
4 changes: 2 additions & 2 deletions lib/baldr/envelope.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def self.helpers
@helpers + [:receiver_id, :sender_id, :security_info, :authorization_info, :date_time]
end

def initialize(id = 'ISA')
def initialize(id = 'ISA', options: {})
super(id)

self.authorization_info_qualifier = '00'
Expand All @@ -39,7 +39,7 @@ def initialize(id = 'ISA')
self.standard_version_number = '00401'
self.acknowledgment_requested = '0'
self.usage_indicator = 'P'
self.component_separator = '>'
self.component_separator = options[:component] || '>'
end

def prepare!
Expand Down
2 changes: 1 addition & 1 deletion lib/baldr/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Baldr
VERSION = '0.10.8'
VERSION = '0.10.11'
end

0 comments on commit 1a726c5

Please sign in to comment.