hflr 1.2.6 → 1.2.7

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 96088c4d808e7b80169eb4a35f8f1d2c3dfdeeee
4
+ data.tar.gz: 3448f6407fa4183406a5cac570eb4cf5bb167418
5
+ SHA512:
6
+ metadata.gz: 47bc6a9a0da6c91a25ede03171a575998f06088fd16bffd07385cfc743fec5aa164054cdb1994a65f94a801fd0822cb28b84f4ada3b498e42d7e622910596052
7
+ data.tar.gz: f4f92e60637a3635ce332ef2f41d9461fd4e8adf18597223ef77bb553c4cfdb463e8de2791ec962bd3f37800b92cfe9af4eb77fee751e37979315fac9a833e10
data/hflr.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{hflr}
5
- s.version = "1.2.6"
5
+ s.version = "1.2.7"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Colin Davis"]
@@ -44,7 +44,10 @@ private
44
44
  def self.add_extra_columns(names, extra)
45
45
  new_names = names.dup
46
46
  # names are not case sensitive
47
- extra.each{|n|new_names << n unless names.map{|m| m.to_s.upcase}.include? n.to_s.upcase}
47
+
48
+ extra.each{|n|new_names << n unless names.map{|m| m.to_s.upcase}.include? n.to_s.upcase}
49
+
50
+
48
51
 
49
52
  # No matter what, include 'record_type'
50
53
  unless new_names.map{|n| n.to_s.upcase}.include?("RECORD_TYPE")
@@ -106,6 +109,7 @@ def self.check_record_layouts(layouts)
106
109
  end
107
110
 
108
111
  def self.create_template_class(record_type, record_type_label, layout, first_column_location, extra_columns = nil)
112
+ begin
109
113
  names = layout.map {|l| l.name.to_sym}
110
114
  names = add_extra_columns(names, extra_columns)
111
115
  structure = Struct.new(*names)
@@ -114,6 +118,10 @@ def self.create_template_class(record_type, record_type_label, layout, first_col
114
118
  structure,
115
119
  self.get_pattern(layout, first_column_location),
116
120
  layout.map{|v| v.len})
121
+ rescue Exception=>msg
122
+ raise "Problem creating record of type #{record_type} labeled #{record_type_label} with exception #{msg.to_s} #{msg.backtrace}"
123
+ end
124
+
117
125
  end
118
126
 
119
127
 
metadata CHANGED
@@ -1,83 +1,67 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: hflr
3
- version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 1.2.6
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.2.7
6
5
  platform: ruby
7
- authors:
8
- - Colin Davis
9
- autorequire:
6
+ authors:
7
+ - Colin Davis
8
+ autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
-
13
- date: 2011-02-09 00:00:00 -06:00
14
- default_executable:
11
+ date: 2011-02-09 00:00:00.000000000 Z
15
12
  dependencies: []
16
-
17
- description: |-
18
- HFLR -- Hierarchical Fixed Length Records
19
-
20
- Allows you to read and write files of fixed width records when the file contains one or more
21
- than one type of record.
22
-
23
- Install with 'gem install hflr'
24
-
25
- See the tests and examples bundled with this gem.
13
+ description: "HFLR -- Hierarchical Fixed Length Records\n\nAllows you to read and\
14
+ \ write files of fixed width records when the file contains one or more\nthan one\
15
+ \ type of record. \n\nInstall with 'gem install hflr'\n\nSee the tests and examples\
16
+ \ bundled with this gem."
26
17
  email: colin.c.davis@gmail.com
27
18
  executables: []
28
-
29
19
  extensions: []
30
-
31
- extra_rdoc_files:
32
- - History.txt
33
- - README.txt
34
- files:
35
- - History.txt
36
- - README.txt
37
- - hflr.gemspec
38
- - lib/hflr.rb
39
- - lib/hflr/fl_record_file.rb
40
- - lib/hflr/hflr.rb
41
- - lib/hflr/record_template.rb
42
- - test/customer_orders.dat
43
- - test/customers.dat
44
- - test/examples.rb
45
- - test/flrfile_test.rb
46
- - test/record_template_test.rb
47
- - test/sample.dat
48
- - test/sample2_out.dat
49
- - test/sample_activities.dat
50
- - test/sample_out.dat
51
- - test/test_helper.rb
52
- - test/test_hflr.rb
53
- has_rdoc: true
54
- homepage:
20
+ extra_rdoc_files:
21
+ - History.txt
22
+ - README.txt
23
+ files:
24
+ - History.txt
25
+ - README.txt
26
+ - hflr.gemspec
27
+ - lib/hflr.rb
28
+ - lib/hflr/fl_record_file.rb
29
+ - lib/hflr/hflr.rb
30
+ - lib/hflr/record_template.rb
31
+ - test/customer_orders.dat
32
+ - test/customers.dat
33
+ - test/examples.rb
34
+ - test/flrfile_test.rb
35
+ - test/record_template_test.rb
36
+ - test/sample.dat
37
+ - test/sample2_out.dat
38
+ - test/sample_activities.dat
39
+ - test/sample_out.dat
40
+ - test/test_helper.rb
41
+ - test/test_hflr.rb
42
+ homepage:
55
43
  licenses: []
56
-
57
- post_install_message:
44
+ metadata: {}
45
+ post_install_message:
58
46
  rdoc_options: []
59
-
60
- require_paths:
61
- - lib
62
- required_ruby_version: !ruby/object:Gem::Requirement
63
- none: false
64
- requirements:
65
- - - ">="
66
- - !ruby/object:Gem::Version
67
- version: "0"
68
- required_rubygems_version: !ruby/object:Gem::Requirement
69
- none: false
70
- requirements:
71
- - - ">="
72
- - !ruby/object:Gem::Version
73
- version: "0"
47
+ require_paths:
48
+ - lib
49
+ required_ruby_version: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ required_rubygems_version: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - '>='
57
+ - !ruby/object:Gem::Version
58
+ version: '0'
74
59
  requirements: []
75
-
76
- rubyforge_project:
77
- rubygems_version: 1.5.1
78
- signing_key:
79
- specification_version: 3
60
+ rubyforge_project:
61
+ rubygems_version: 2.1.9
62
+ signing_key:
63
+ specification_version: 4
80
64
  summary: HFLR -- Hierarchical Fixed Length Records Allows you to read and write files of fixed width records when the file contains one or more than one type of record
81
- test_files:
82
- - test/test_hflr.rb
83
- - test/test_helper.rb
65
+ test_files:
66
+ - test/test_hflr.rb
67
+ - test/test_helper.rb