absa-h2h 0.1.1 → 0.1.2

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.
@@ -16,6 +16,7 @@ Gem::Specification.new do |s|
16
16
  s.files = `git ls-files`.split("\n")
17
17
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
18
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.executables << 'absa-h2h'
19
20
  s.require_paths = ["lib"]
20
21
 
21
22
  s.add_dependency "activesupport"
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env ruby
2
+ require 'optparse'
3
+ require 'absa-h2h'
4
+ require 'absa-h2h/version'
5
+
6
+ options = {}
7
+
8
+ opt_parser = OptionParser.new do |opt|
9
+ opt.banner = "Usage: opt_parser COMMAND [OPTIONS]"
10
+ opt.separator ""
11
+ opt.separator "Commands"
12
+ opt.separator " absa-h2h input <FILENAME>"
13
+ opt.separator " absa-h2h output <FILENAME>"
14
+ opt.separator ""
15
+ opt.separator "Options"
16
+
17
+ opt.on("-h","--help","help") do
18
+ puts opt_parser
19
+ end
20
+
21
+ opt.on("-v","--version","version") do
22
+ puts Absa::H2h::VERSION
23
+ end
24
+ end
25
+
26
+ opt_parser.parse!
27
+
28
+ case ARGV[0]
29
+ when "input"
30
+ file = Dir.pwd + "/" + ARGV[1]
31
+ file_contents = File.open(file, "rb").read
32
+ options = Absa::H2h::Transmission::Document.hash_from_s(file_contents, 'input')
33
+ puts options.to_yaml
34
+ when "output"
35
+ file = Dir.pwd + "/" + ARGV[1]
36
+ file_contents = File.open(file, "rb").read
37
+ options = Absa::H2h::Transmission::Document.hash_from_s(file_contents, 'input')
38
+ puts options.to_yaml
39
+ else
40
+ puts "You need to specify input or output type"
41
+ end
@@ -1,5 +1,5 @@
1
1
  module Absa
2
2
  module H2h
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: absa-h2h
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-10 00:00:00.000000000Z
12
+ date: 2012-06-12 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
- requirement: &70169985534680 !ruby/object:Gem::Requirement
16
+ requirement: &70180810949160 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70169985534680
24
+ version_requirements: *70180810949160
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: i18n
27
- requirement: &70169985534260 !ruby/object:Gem::Requirement
27
+ requirement: &70180810948740 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70169985534260
35
+ version_requirements: *70180810948740
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: strata
38
- requirement: &70169985533760 !ruby/object:Gem::Requirement
38
+ requirement: &70180810948240 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,12 +43,13 @@ dependencies:
43
43
  version: 0.0.1
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70169985533760
46
+ version_requirements: *70180810948240
47
47
  description: The interface supports Account holder verifications, EFT payments, Debit
48
48
  orders, collecting statements.
49
49
  email:
50
50
  - jeffmess@gmail.com, i.am.douglas.anderson@gmail.com
51
- executables: []
51
+ executables:
52
+ - absa-h2h
52
53
  extensions: []
53
54
  extra_rdoc_files: []
54
55
  files:
@@ -100,6 +101,7 @@ files:
100
101
  - spec/lib/transmission/record_spec.rb
101
102
  - spec/lib/transmission/trailer_spec.rb
102
103
  - spec/spec_helper.rb
104
+ - bin/absa-h2h
103
105
  homepage: ''
104
106
  licenses: []
105
107
  post_install_message: