little_table 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a1d49adfa9d961730f7efd1197fa18149c400408
4
- data.tar.gz: 8bae5c0c0df775c2c589ff17554f2c6d9db26501
3
+ metadata.gz: 69aff402a45d794216ce4172772b8e8f21e0526a
4
+ data.tar.gz: 2ab7679c309d3e0287c155b39b5eb6146f82b9c9
5
5
  SHA512:
6
- metadata.gz: bf19b21d431f7add6dcbcd83faef51b7d2fbb3ec3a4f3fc713a54217b199cc85f67da2d363ffe1720eda72d8fefa32e57ad92c70669cb22737c3ad810ba26976
7
- data.tar.gz: a8db495acfcb0348d2dc846fbc8e8092b6710b2244e1fa48cd1061f8f7306330f001f48700b659cdc21bfa92875094cd58e7d42a449acfde9c7ec192738dd120
6
+ metadata.gz: 79a9f68848ba5283f8052636610fd48104daf817234db640413d742f538354fdd422d46e5a6b9b233fd9d37fa7fd0b68263887a517bad921b21922ef13f9d780
7
+ data.tar.gz: 71efe35450e5298f518f2571e85cd2670c22d7c10d678fe446a7bebae5adcb0c32da7a5c634ca41b95f3e347a7b7ce714e8e6cad6ad821a9bbb3eeecb40de151
data/lib/little_table.rb CHANGED
@@ -2,6 +2,8 @@ require 'active_support/all'
2
2
 
3
3
  class LittleTable
4
4
 
5
+ VERSION = "1.0.1"
6
+
5
7
  def initialize input
6
8
  @table_string = input
7
9
  end
@@ -22,7 +24,7 @@ class LittleTable
22
24
  result = []
23
25
  rows.each do |row|
24
26
  row_hash = {}
25
- headers.each_with_index do |header,index|
27
+ headers.each_with_index do |header, index|
26
28
  row_hash[header.parameterize('_').to_sym] = row[index]
27
29
  end
28
30
  result.push row_hash
@@ -39,4 +41,5 @@ class LittleTable
39
41
  def parse_line text
40
42
  text.split('|').reject { |i| !i.present? }.map { |value| value.squish }
41
43
  end
44
+
42
45
  end
data/little_table.gemspec CHANGED
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
  lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'little_table/version'
4
+ require 'little_table'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "little_table"
8
8
  spec.version = LittleTable::VERSION
9
9
  spec.authors = ["Jankees van Woezik"]
10
10
  spec.email = ["jankees@base42.nl"]
11
- spec.description = %q{Little Tabel converts cucumber like tables to usefull objects}
11
+ spec.description = %q{Little Tabel converts cucumber like tables to useful objects}
12
12
  spec.summary = %q{Convert your tables to objects}
13
13
  spec.homepage = "http://rubygems.org/gems/little_table"
14
14
  spec.license = "MIT"
data/spec/app_spec.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe LittleTable do
3
+ describe 'LittleTable' do
4
4
 
5
5
  context 'with a simple table' do
6
6
 
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  if Dir.glob('lib/**/*.rb').map { |f| require "./#{f}" }.include? false
2
2
  raise 'error loading files'
3
- end
3
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: little_table
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jankees van Woezik
@@ -66,7 +66,7 @@ dependencies:
66
66
  - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- description: Little Tabel converts cucumber like tables to usefull objects
69
+ description: Little Tabel converts cucumber like tables to useful objects
70
70
  email:
71
71
  - jankees@base42.nl
72
72
  executables: []
@@ -79,7 +79,6 @@ files:
79
79
  - README.md
80
80
  - Rakefile
81
81
  - lib/little_table.rb
82
- - lib/little_table/version.rb
83
82
  - little_table.gemspec
84
83
  - spec/app_spec.rb
85
84
  - spec/spec_helper.rb
@@ -1,3 +0,0 @@
1
- module LittleTable
2
- VERSION = "1.0.0"
3
- end