text-data-tools 1.1.5 → 1.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/VERSION +1 -1
- data/lib/text-data-tools.rb +2 -1
- data/text-data-tools.gemspec +7 -7
- metadata +16 -31
- data/README.rdoc.orig +0 -19
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: f6e11d9310c010dce2e9dfbfee112c5f6abb98f6
|
4
|
+
data.tar.gz: 7c3dd3d10117d06b9ffa64056d08f3109c16b2ab
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a77028e68b81c89f7c97fe6070b3ff9c2a3998d50ec4a8f68fe5b33bf2480a2f0c0ab3eace85d9800845a08928d7aee9115d81900d9a62a7cedbc60891428da0
|
7
|
+
data.tar.gz: 6104b91378c89d49c57795e162ea1272f7dcb40ff5a9c273ae0dac446d0b91b77f7efb2117cff2ccdeb382622efcd36a7144e5ac6ce8b9c383a8089a7c893392
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.6
|
data/lib/text-data-tools.rb
CHANGED
@@ -31,7 +31,7 @@ module Column
|
|
31
31
|
# matches items in the headers.
|
32
32
|
#
|
33
33
|
# All data is returned as strings
|
34
|
-
def self.get_1d_array(filename, has_header_line, column_header, match=/\S+/, header_match=/\S
|
34
|
+
def self.get_1d_array(filename, has_header_line, column_header, match=/\S+/, header_match=/\S+/, skip_blank=true)
|
35
35
|
raise ArgumentError.new("column_header header should be a string, regex or integer") unless [String, Regexp, Integer].find{|cls| column_header.kind_of? cls}
|
36
36
|
array = []
|
37
37
|
File.open(filename) do |file|
|
@@ -41,6 +41,7 @@ module Column
|
|
41
41
|
column_header = column_index_from_headers(headers, column_header, header_match)
|
42
42
|
end
|
43
43
|
while line = file.gets
|
44
|
+
next if line == "\n" and skip_blank
|
44
45
|
values = line.scan(match)
|
45
46
|
array.push values[column_header]
|
46
47
|
#puts line
|
data/text-data-tools.gemspec
CHANGED
@@ -2,20 +2,21 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
+
# stub: text-data-tools 1.1.6 ruby lib
|
5
6
|
|
6
7
|
Gem::Specification.new do |s|
|
7
8
|
s.name = "text-data-tools"
|
8
|
-
s.version = "1.1.
|
9
|
+
s.version = "1.1.6"
|
9
10
|
|
10
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
|
+
s.require_paths = ["lib"]
|
11
13
|
s.authors = ["Edmund Highcock"]
|
12
|
-
s.date = "
|
14
|
+
s.date = "2015-06-13"
|
13
15
|
s.description = "A small set of tools for reading text based data files into arrays. Works ee.g. for simple columnar data with or without headings."
|
14
16
|
s.email = "edmundhighcock@sourceforge.net"
|
15
17
|
s.extra_rdoc_files = [
|
16
18
|
"LICENSE.txt",
|
17
|
-
"README.rdoc"
|
18
|
-
"README.rdoc.orig"
|
19
|
+
"README.rdoc"
|
19
20
|
]
|
20
21
|
s.files = [
|
21
22
|
".document",
|
@@ -34,12 +35,11 @@ Gem::Specification.new do |s|
|
|
34
35
|
]
|
35
36
|
s.homepage = "http://github.com/edmundhighcock/text-data-tools"
|
36
37
|
s.licenses = ["GPLv3"]
|
37
|
-
s.
|
38
|
-
s.rubygems_version = "1.8.23"
|
38
|
+
s.rubygems_version = "2.4.8"
|
39
39
|
s.summary = "A small set of tools for reading text based data files into arrays."
|
40
40
|
|
41
41
|
if s.respond_to? :specification_version then
|
42
|
-
s.specification_version =
|
42
|
+
s.specification_version = 4
|
43
43
|
|
44
44
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
45
45
|
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
metadata
CHANGED
@@ -1,78 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: text-data-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
5
|
-
prerelease:
|
4
|
+
version: 1.1.6
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Edmund Highcock
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2015-06-13 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: shoulda
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: rdoc
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- - ~>
|
31
|
+
- - "~>"
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '3.12'
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- - ~>
|
38
|
+
- - "~>"
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '3.12'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: bundler
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - ">"
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: 1.0.0
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - ">"
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: 1.0.0
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: jeweler
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - ">="
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: 1.8.4
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
66
|
+
- - ">="
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: 1.8.4
|
78
69
|
description: A small set of tools for reading text based data files into arrays. Works
|
@@ -83,9 +74,8 @@ extensions: []
|
|
83
74
|
extra_rdoc_files:
|
84
75
|
- LICENSE.txt
|
85
76
|
- README.rdoc
|
86
|
-
- README.rdoc.orig
|
87
77
|
files:
|
88
|
-
- .document
|
78
|
+
- ".document"
|
89
79
|
- Gemfile
|
90
80
|
- LICENSE.txt
|
91
81
|
- README.rdoc
|
@@ -98,33 +88,28 @@ files:
|
|
98
88
|
- test/test_dat_new_lines.dat
|
99
89
|
- test/test_text-data-tools.rb
|
100
90
|
- text-data-tools.gemspec
|
101
|
-
- README.rdoc.orig
|
102
91
|
homepage: http://github.com/edmundhighcock/text-data-tools
|
103
92
|
licenses:
|
104
93
|
- GPLv3
|
94
|
+
metadata: {}
|
105
95
|
post_install_message:
|
106
96
|
rdoc_options: []
|
107
97
|
require_paths:
|
108
98
|
- lib
|
109
99
|
required_ruby_version: !ruby/object:Gem::Requirement
|
110
|
-
none: false
|
111
100
|
requirements:
|
112
|
-
- -
|
101
|
+
- - ">="
|
113
102
|
- !ruby/object:Gem::Version
|
114
103
|
version: '0'
|
115
|
-
segments:
|
116
|
-
- 0
|
117
|
-
hash: -3678022057814482046
|
118
104
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
|
-
none: false
|
120
105
|
requirements:
|
121
|
-
- -
|
106
|
+
- - ">="
|
122
107
|
- !ruby/object:Gem::Version
|
123
108
|
version: '0'
|
124
109
|
requirements: []
|
125
110
|
rubyforge_project:
|
126
|
-
rubygems_version:
|
111
|
+
rubygems_version: 2.4.8
|
127
112
|
signing_key:
|
128
|
-
specification_version:
|
113
|
+
specification_version: 4
|
129
114
|
summary: A small set of tools for reading text based data files into arrays.
|
130
115
|
test_files: []
|
data/README.rdoc.orig
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
= text-data-tools
|
2
|
-
|
3
|
-
Description goes here.
|
4
|
-
|
5
|
-
== Contributing to text-data-tools
|
6
|
-
|
7
|
-
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
8
|
-
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
9
|
-
* Fork the project.
|
10
|
-
* Start a feature/bugfix branch.
|
11
|
-
* Commit and push until you are happy with your contribution.
|
12
|
-
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
13
|
-
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
14
|
-
|
15
|
-
== Copyright
|
16
|
-
|
17
|
-
Copyright (c) 2013 Edmund Highcock. See LICENSE.txt for
|
18
|
-
further details.
|
19
|
-
|