recite_csv 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/CHANGELOG.md +22 -2
- data/README.md +1 -0
- data/bin/console +2 -2
- data/lib/recite_csv/header/definition.rb +2 -2
- data/lib/recite_csv/reader/builder.rb +1 -1
- data/lib/recite_csv/reader/core.rb +1 -1
- data/lib/recite_csv/row/base.rb +3 -3
- data/lib/recite_csv/version.rb +1 -1
- data/recite_csv.gemspec +4 -1
- metadata +19 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d78da3c0debc0e3962fa02b0344c7df3980d2275
|
4
|
+
data.tar.gz: a7373574d333c472c031f040749bf9089f1eeed0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f6a549d6c8f69a0c086bf3faae9f8943a6046ba85b81eecfb904ea30abdd0819fdddf4b4992ad25d330f287cb4ee25cc71d572cfcc048fdc1fca43598b142f7
|
7
|
+
data.tar.gz: d0de9224da6de39c8ce014a558acb281627f3bed7df122e34727f541d8487caf2a09c20411f9869fea3906374e0a94ccd3292c4e8e7781dba605a4a44d419b8a
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,2 +1,22 @@
|
|
1
|
-
##
|
2
|
-
|
1
|
+
## Unreleased
|
2
|
+
|
3
|
+
## 0.1.1 (2017-12-03)
|
4
|
+
|
5
|
+
### Changes
|
6
|
+
|
7
|
+
* Rename the accessor for raw data of row from `raw_data` to `_raw_data`
|
8
|
+
* Add support Ruby 2.2
|
9
|
+
|
10
|
+
### Bug fixes
|
11
|
+
|
12
|
+
* Fix typo of constant for default csv options
|
13
|
+
|
14
|
+
### Misc
|
15
|
+
|
16
|
+
* Support Rubocop v0.50.0 or later
|
17
|
+
* Introduce pry
|
18
|
+
|
19
|
+
|
20
|
+
## 0.1.0 (2017-11-30)
|
21
|
+
|
22
|
+
* Initial release
|
data/README.md
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
ReciteCSV helps to build a class for CSV reader.
|
4
4
|
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/recite_csv.svg)](https://badge.fury.io/rb/recite_csv)
|
5
6
|
[![Build Status](https://travis-ci.org/yujideveloper/recite_csv.svg?branch=master)](https://travis-ci.org/yujideveloper/recite_csv)
|
6
7
|
|
7
8
|
## Installation
|
data/bin/console
CHANGED
@@ -27,7 +27,7 @@ module ReciteCSV
|
|
27
27
|
end
|
28
28
|
|
29
29
|
class Hash < Base
|
30
|
-
|
30
|
+
DEFAULT_CSV_OPTIONS = { headers: :first_row }.freeze
|
31
31
|
|
32
32
|
class ColumnMethodsBuilder < ::Module
|
33
33
|
def initialize(raw_definition)
|
@@ -40,7 +40,7 @@ module ReciteCSV
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def default_csv_options
|
43
|
-
|
43
|
+
DEFAULT_CSV_OPTIONS
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
@@ -20,7 +20,7 @@ module ReciteCSV
|
|
20
20
|
def included(class_or_module)
|
21
21
|
class_or_module.include Core
|
22
22
|
class_or_module.const_set(:Row, @row_class)
|
23
|
-
class_or_module.const_set(:
|
23
|
+
class_or_module.const_set(:DEFAULT_CSV_OPTIONS, @definition.default_csv_options)
|
24
24
|
class_or_module.extend DSL
|
25
25
|
end
|
26
26
|
end
|
data/lib/recite_csv/row/base.rb
CHANGED
@@ -3,14 +3,14 @@
|
|
3
3
|
module ReciteCSV
|
4
4
|
module Row
|
5
5
|
class Base
|
6
|
-
attr_reader :
|
6
|
+
attr_reader :_raw_data
|
7
7
|
|
8
8
|
def initialize(raw_data)
|
9
|
-
@
|
9
|
+
@_raw_data = raw_data
|
10
10
|
end
|
11
11
|
|
12
12
|
def [](key)
|
13
|
-
self.
|
13
|
+
self._raw_data[key]
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
data/lib/recite_csv/version.rb
CHANGED
data/recite_csv.gemspec
CHANGED
@@ -22,8 +22,11 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
|
25
|
+
spec.required_ruby_version = ">= 2.2.2"
|
26
|
+
|
25
27
|
spec.add_development_dependency "bundler", "~> 1.14"
|
28
|
+
spec.add_development_dependency "pry", ">= 0.10.0"
|
26
29
|
spec.add_development_dependency "rake", "~> 10.0"
|
27
30
|
spec.add_development_dependency "rspec", "~> 3.0"
|
28
|
-
spec.add_development_dependency "rubocop"
|
31
|
+
spec.add_development_dependency "rubocop", ">= 0.51.0"
|
29
32
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: recite_csv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuji Hanamura
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.14'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: pry
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.10.0
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.10.0
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rake
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +72,14 @@ dependencies:
|
|
58
72
|
requirements:
|
59
73
|
- - ">="
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
75
|
+
version: 0.51.0
|
62
76
|
type: :development
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
80
|
- - ">="
|
67
81
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
82
|
+
version: 0.51.0
|
69
83
|
description: ReciteCSV helps to build a class for CSV reader.
|
70
84
|
email:
|
71
85
|
- yuji.developer@gmail.com
|
@@ -108,7 +122,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
108
122
|
requirements:
|
109
123
|
- - ">="
|
110
124
|
- !ruby/object:Gem::Version
|
111
|
-
version:
|
125
|
+
version: 2.2.2
|
112
126
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
113
127
|
requirements:
|
114
128
|
- - ">="
|