tableware 0.2.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop-https---raw-githubusercontent-com-dvmtn-house-style-master-rubocop-yml +49 -10
- data/.semver +2 -2
- data/.tool-versions +1 -0
- data/.tool-versions-e +1 -0
- data/.travis.yml +2 -0
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +60 -65
- data/Rakefile +7 -8
- data/lib/tableware/parser.rb +1 -1
- data/lib/tableware/version.rb +1 -1
- data/tableware.gemspec +4 -3
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05d33aef29e0c7dd53807571dae061e8be8d7b2b
|
4
|
+
data.tar.gz: db75f9e13a18f73a6481f118e7655b67bf33e86b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82b2e2f98c7ed173a18ddd30461ee60921dc7d77914c3f81f05f4173952a85496dee75336c4ff7bd988dc47657ecbaf458bba0deeb19bfafad07a9b876a18506
|
7
|
+
data.tar.gz: bba246e407070574077c3dc83bc8a1d15b0e27ae944542ba3903e3a14c0286be812e58f16dc6076c43e53d3a17f265b153dac38969a8ce1ffaa124408e437b77
|
@@ -3,6 +3,7 @@ AllCops:
|
|
3
3
|
- '**/Rakefile'
|
4
4
|
- '**/config.ru'
|
5
5
|
Exclude:
|
6
|
+
- 'ansible/**/*'
|
6
7
|
- 'db/**/*'
|
7
8
|
- 'config/**/*'
|
8
9
|
- 'script/**/*'
|
@@ -12,15 +13,27 @@ AllCops:
|
|
12
13
|
- 'log/**/*'
|
13
14
|
- 'node_modules/**/*'
|
14
15
|
|
15
|
-
Rails:
|
16
|
-
Enabled: true
|
17
16
|
|
18
|
-
|
17
|
+
#############################################
|
18
|
+
# Layout
|
19
|
+
#
|
20
|
+
|
21
|
+
Layout/AlignHash:
|
19
22
|
EnforcedHashRocketStyle: table
|
20
23
|
EnforcedColonStyle: table
|
21
24
|
EnforcedLastArgumentHashStyle: ignore_implicit
|
22
25
|
SupportedLastArgumentHashStyles: ignore_implicit
|
23
26
|
|
27
|
+
Layout/EmptyLinesAroundClassBody:
|
28
|
+
EnforcedStyle: empty_lines
|
29
|
+
|
30
|
+
Layout/SpaceBeforeBlockBraces:
|
31
|
+
Enabled: false
|
32
|
+
|
33
|
+
#############################################
|
34
|
+
# Style
|
35
|
+
#
|
36
|
+
|
24
37
|
Style/DefWithParentheses:
|
25
38
|
Enabled: false
|
26
39
|
|
@@ -43,13 +56,13 @@ Style/PercentLiteralDelimiters:
|
|
43
56
|
PreferredDelimiters:
|
44
57
|
'%': '""'
|
45
58
|
'%i': '[]'
|
46
|
-
'%q': '
|
47
|
-
'%Q': '
|
48
|
-
'%r': '
|
59
|
+
'%q': "''"
|
60
|
+
'%Q': '""'
|
61
|
+
'%r': '()'
|
49
62
|
'%s': '[]'
|
50
63
|
'%w': '[]'
|
51
64
|
'%W': '[]'
|
52
|
-
'%x': '
|
65
|
+
'%x': '()'
|
53
66
|
|
54
67
|
Style/PredicateName:
|
55
68
|
NamePrefixBlacklist:
|
@@ -63,14 +76,40 @@ Style/PredicateName:
|
|
63
76
|
Style/SignalException:
|
64
77
|
EnforcedStyle: only_raise
|
65
78
|
|
66
|
-
Style/EmptyLinesAroundClassBody:
|
67
|
-
EnforcedStyle: empty_lines
|
68
|
-
|
69
79
|
Style/TrailingCommaInLiteral:
|
70
80
|
EnforcedStyleForMultiline: comma
|
71
81
|
|
82
|
+
Style/VariableNumber:
|
83
|
+
EnforcedStyle: snake_case
|
84
|
+
|
85
|
+
Style/VariableName:
|
86
|
+
Enabled: true
|
87
|
+
|
88
|
+
Style/FileName:
|
89
|
+
Exclude:
|
90
|
+
- 'Gemfile'
|
91
|
+
- 'Guardfile'
|
92
|
+
|
93
|
+
#############################################
|
94
|
+
# Metrics
|
95
|
+
#
|
96
|
+
|
72
97
|
Metrics/LineLength:
|
73
98
|
Exclude:
|
74
99
|
- 'spec/**/*'
|
75
100
|
Max: 140
|
76
101
|
AllowURI: true
|
102
|
+
|
103
|
+
Metrics/BlockLength:
|
104
|
+
Exclude:
|
105
|
+
- 'spec/**/*_spec.rb'
|
106
|
+
|
107
|
+
#############################################
|
108
|
+
# Security
|
109
|
+
#
|
110
|
+
|
111
|
+
Security/Eval:
|
112
|
+
Enabled: true
|
113
|
+
|
114
|
+
Security/MarshalLoad:
|
115
|
+
Enabled: true
|
data/.semver
CHANGED
data/.tool-versions
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby 2.3.3
|
data/.tool-versions-e
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby 2.3.0
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,110 +1,105 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
tableware (0.
|
4
|
+
tableware (0.3.1)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
|
10
|
-
|
11
|
-
ice_nine (~> 0.11.0)
|
12
|
-
memoizable (~> 0.4.0)
|
9
|
+
addressable (2.5.1)
|
10
|
+
public_suffix (~> 2.0, >= 2.0.2)
|
13
11
|
ast (2.3.0)
|
14
12
|
axiom-types (0.1.1)
|
15
13
|
descendants_tracker (~> 0.0.4)
|
16
14
|
ice_nine (~> 0.11.0)
|
17
15
|
thread_safe (~> 0.3, >= 0.3.1)
|
18
|
-
codeclimate-engine-rb (0.
|
16
|
+
codeclimate-engine-rb (0.4.0)
|
19
17
|
virtus (~> 1.0)
|
20
18
|
coercible (1.0.0)
|
21
19
|
descendants_tracker (~> 0.0.1)
|
22
|
-
colorize (0.
|
23
|
-
concord (0.1.5)
|
24
|
-
adamantium (~> 0.2.0)
|
25
|
-
equalizer (~> 0.0.9)
|
20
|
+
colorize (0.8.1)
|
26
21
|
descendants_tracker (0.0.4)
|
27
22
|
thread_safe (~> 0.3, >= 0.3.1)
|
28
|
-
diff-lcs (1.
|
23
|
+
diff-lcs (1.3)
|
29
24
|
docile (1.1.5)
|
30
25
|
equalizer (0.0.11)
|
31
|
-
|
26
|
+
erubis (2.7.0)
|
27
|
+
fasterer (0.3.2)
|
32
28
|
colorize (~> 0.7)
|
33
|
-
ruby_parser (~> 3.
|
34
|
-
flay (2.
|
29
|
+
ruby_parser (~> 3.7)
|
30
|
+
flay (2.9.0)
|
31
|
+
erubis (~> 2.7.0)
|
32
|
+
path_expander (~> 1.0)
|
35
33
|
ruby_parser (~> 3.0)
|
36
34
|
sexp_processor (~> 4.0)
|
37
|
-
flog (4.
|
35
|
+
flog (4.6.1)
|
36
|
+
path_expander (~> 1.0)
|
38
37
|
ruby_parser (~> 3.1, > 3.1.0)
|
39
|
-
sexp_processor (~> 4.
|
38
|
+
sexp_processor (~> 4.8)
|
40
39
|
ice_nine (0.11.2)
|
41
|
-
json (1.
|
42
|
-
|
43
|
-
|
44
|
-
|
40
|
+
json (2.1.0)
|
41
|
+
launchy (2.4.3)
|
42
|
+
addressable (~> 2.3)
|
43
|
+
parallel (1.11.2)
|
44
|
+
parser (2.4.0.0)
|
45
45
|
ast (~> 2.2)
|
46
|
+
path_expander (1.0.2)
|
46
47
|
powerpack (0.1.1)
|
47
|
-
|
48
|
-
|
49
|
-
|
48
|
+
public_suffix (2.0.5)
|
49
|
+
rainbow (2.2.2)
|
50
|
+
rake
|
50
51
|
rake (10.5.0)
|
51
|
-
rake-n-bake (1.
|
52
|
+
rake-n-bake (2.1.0)
|
52
53
|
rake (>= 10)
|
53
54
|
term-ansicolor (~> 1.3)
|
54
|
-
reek (
|
55
|
-
codeclimate-engine-rb (~> 0.
|
56
|
-
parser (
|
57
|
-
private_attr (~> 1.1)
|
55
|
+
reek (4.7.1)
|
56
|
+
codeclimate-engine-rb (~> 0.4.0)
|
57
|
+
parser (>= 2.4.0.0, < 2.5)
|
58
58
|
rainbow (~> 2.0)
|
59
|
-
|
60
|
-
|
61
|
-
rspec-
|
62
|
-
rspec-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
rspec-expectations (3.4.0)
|
59
|
+
rspec (3.6.0)
|
60
|
+
rspec-core (~> 3.6.0)
|
61
|
+
rspec-expectations (~> 3.6.0)
|
62
|
+
rspec-mocks (~> 3.6.0)
|
63
|
+
rspec-core (3.6.0)
|
64
|
+
rspec-support (~> 3.6.0)
|
65
|
+
rspec-expectations (3.6.0)
|
67
66
|
diff-lcs (>= 1.2.0, < 2.0)
|
68
|
-
rspec-support (~> 3.
|
69
|
-
rspec-mocks (3.
|
67
|
+
rspec-support (~> 3.6.0)
|
68
|
+
rspec-mocks (3.6.0)
|
70
69
|
diff-lcs (>= 1.2.0, < 2.0)
|
71
|
-
rspec-support (~> 3.
|
72
|
-
rspec-support (3.
|
73
|
-
rubocop (0.
|
74
|
-
|
70
|
+
rspec-support (~> 3.6.0)
|
71
|
+
rspec-support (3.6.0)
|
72
|
+
rubocop (0.49.1)
|
73
|
+
parallel (~> 1.10)
|
74
|
+
parser (>= 2.3.3.1, < 3.0)
|
75
75
|
powerpack (~> 0.1)
|
76
76
|
rainbow (>= 1.99.1, < 3.0)
|
77
77
|
ruby-progressbar (~> 1.7)
|
78
78
|
unicode-display_width (~> 1.0, >= 1.0.1)
|
79
79
|
ruby-progressbar (1.8.1)
|
80
|
-
ruby_parser (3.
|
80
|
+
ruby_parser (3.9.0)
|
81
81
|
sexp_processor (~> 4.1)
|
82
|
-
rubycritic (2.
|
83
|
-
flay (
|
84
|
-
flog (
|
85
|
-
|
86
|
-
|
82
|
+
rubycritic (3.2.3)
|
83
|
+
flay (~> 2.8)
|
84
|
+
flog (~> 4.4)
|
85
|
+
launchy (= 2.4.3)
|
86
|
+
parser (~> 2.4.0)
|
87
|
+
rainbow (~> 2.1)
|
88
|
+
reek (~> 4.4)
|
89
|
+
ruby_parser (~> 3.8)
|
87
90
|
virtus (~> 1.0)
|
88
91
|
semver2 (3.4.2)
|
89
|
-
sexp_processor (4.
|
90
|
-
simplecov (0.
|
92
|
+
sexp_processor (4.9.0)
|
93
|
+
simplecov (0.14.1)
|
91
94
|
docile (~> 1.1.0)
|
92
|
-
json (
|
95
|
+
json (>= 1.8, < 3)
|
93
96
|
simplecov-html (~> 0.10.0)
|
94
|
-
simplecov-html (0.10.
|
95
|
-
term-ansicolor (1.
|
97
|
+
simplecov-html (0.10.1)
|
98
|
+
term-ansicolor (1.6.0)
|
96
99
|
tins (~> 1.0)
|
97
|
-
thread_safe (0.3.
|
98
|
-
tins (1.
|
99
|
-
unicode-display_width (1.
|
100
|
-
unparser (0.2.5)
|
101
|
-
abstract_type (~> 0.0.7)
|
102
|
-
adamantium (~> 0.2.0)
|
103
|
-
concord (~> 0.1.5)
|
104
|
-
diff-lcs (~> 1.2.5)
|
105
|
-
equalizer (~> 0.0.9)
|
106
|
-
parser (~> 2.3.0)
|
107
|
-
procto (~> 0.0.2)
|
100
|
+
thread_safe (0.3.6)
|
101
|
+
tins (1.15.0)
|
102
|
+
unicode-display_width (1.3.0)
|
108
103
|
virtus (1.0.5)
|
109
104
|
axiom-types (~> 0.1)
|
110
105
|
coercible (~> 1.0)
|
@@ -127,4 +122,4 @@ DEPENDENCIES
|
|
127
122
|
tableware!
|
128
123
|
|
129
124
|
BUNDLED WITH
|
130
|
-
1.
|
125
|
+
1.15.1
|
data/Rakefile
CHANGED
@@ -4,12 +4,11 @@ require 'rake-n-bake'
|
|
4
4
|
|
5
5
|
RSpec::Core::RakeTask.new(:spec)
|
6
6
|
|
7
|
-
task default: [
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
:"bake:ok_rainbow",
|
7
|
+
task default: %i[
|
8
|
+
bake:rspec
|
9
|
+
bake:coverage:check_specs
|
10
|
+
bake:rubocop
|
11
|
+
bake:rubycritic
|
12
|
+
bake:fasterer
|
13
|
+
bake:ok_rainbow
|
15
14
|
]
|
data/lib/tableware/parser.rb
CHANGED
@@ -29,7 +29,7 @@ class Tableware
|
|
29
29
|
private def prepare_lines(input)
|
30
30
|
lines = input.strip.lines
|
31
31
|
|
32
|
-
@data_start = lines[1] =~ /^\s*[
|
32
|
+
@data_start = lines[1] =~ /^\s*[-=+\| ]+\s*$/ ? 2 : 0
|
33
33
|
if @data_start.nonzero?
|
34
34
|
@headers = parse_line(lines[0])
|
35
35
|
.map!(&:downcase)
|
data/lib/tableware/version.rb
CHANGED
data/tableware.gemspec
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# coding: utf-8
|
2
|
+
|
2
3
|
lib = File.expand_path('../lib', __FILE__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
5
|
require 'tableware/version'
|
@@ -10,13 +11,13 @@ Gem::Specification.new do |spec|
|
|
10
11
|
spec.email = ['adam@devmountain.co.uk']
|
11
12
|
|
12
13
|
spec.summary = 'A nice way of parsing text tables into Arrays or Hashes '
|
13
|
-
spec.description = 'A nice way of parsing text tables into Ararys or Hashes
|
14
|
-
spec.homepage =
|
14
|
+
spec.description = 'A nice way of parsing text tables into Ararys or Hashes for clearer code. Great for tests & permissions matrixes!'
|
15
|
+
spec.homepage = 'https://github.com/AdamWhittingham/tableware'
|
15
16
|
spec.license = 'MIT'
|
16
17
|
|
17
18
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
19
|
spec.bindir = 'exe'
|
19
|
-
spec.executables = spec.files.grep(%r
|
20
|
+
spec.executables = spec.files.grep(%r(^exe/)) { |f| File.basename(f) }
|
20
21
|
spec.require_paths = ['lib']
|
21
22
|
|
22
23
|
spec.add_development_dependency 'bundler', '~> 1.12'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tableware
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Whittingham
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -136,8 +136,8 @@ dependencies:
|
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
|
-
description: A nice way of parsing text tables into Ararys or Hashes
|
140
|
-
|
139
|
+
description: A nice way of parsing text tables into Ararys or Hashes for clearer code.
|
140
|
+
Great for tests & permissions matrixes!
|
141
141
|
email:
|
142
142
|
- adam@devmountain.co.uk
|
143
143
|
executables: []
|
@@ -150,6 +150,8 @@ files:
|
|
150
150
|
- ".rubocop.yml"
|
151
151
|
- ".ruby-version"
|
152
152
|
- ".semver"
|
153
|
+
- ".tool-versions"
|
154
|
+
- ".tool-versions-e"
|
153
155
|
- ".travis.yml"
|
154
156
|
- CHANGELOG.md
|
155
157
|
- CODE_OF_CONDUCT.md
|
@@ -185,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
185
187
|
version: '0'
|
186
188
|
requirements: []
|
187
189
|
rubyforge_project:
|
188
|
-
rubygems_version: 2.
|
190
|
+
rubygems_version: 2.5.2
|
189
191
|
signing_key:
|
190
192
|
specification_version: 4
|
191
193
|
summary: A nice way of parsing text tables into Arrays or Hashes
|