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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8492257e8882c0950b3bd4fe923537cbb0b94822
4
- data.tar.gz: d5d2eca503ee999109e44dedb9e0296fcaa9c91d
3
+ metadata.gz: d78da3c0debc0e3962fa02b0344c7df3980d2275
4
+ data.tar.gz: a7373574d333c472c031f040749bf9089f1eeed0
5
5
  SHA512:
6
- metadata.gz: 17a59c273f7487aac65ad7a0e121e50fb9b830fe7653b434d54bf84e4422411b900dc5a3dfc2b90b8dacdd20667a35ee299e0cc2ca80b359b785797548681f3f
7
- data.tar.gz: 3e3dd79a098ece2b2fe80fdd96d399b41551b226923aae8edba873db7c76d91c4b2d08f46b4e17d4c0cb030d3d9bc56c66b375789b0793243d535c04c02d4177
6
+ metadata.gz: 5f6a549d6c8f69a0c086bf3faae9f8943a6046ba85b81eecfb904ea30abdd0819fdddf4b4992ad25d330f287cb4ee25cc71d572cfcc048fdc1fca43598b142f7
7
+ data.tar.gz: d0de9224da6de39c8ce014a558acb281627f3bed7df122e34727f541d8487caf2a09c20411f9869fea3906374e0a94ccd3292c4e8e7781dba605a4a44d419b8a
data/.travis.yml CHANGED
@@ -1,6 +1,7 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
+ - 2.2.8
4
5
  - 2.3.5
5
6
  - 2.4.2
6
7
  before_install: gem install bundler -v 1.14.6
data/CHANGELOG.md CHANGED
@@ -1,2 +1,22 @@
1
- ## 0.1.0
2
- - Initial Release
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
@@ -11,5 +11,5 @@ require "recite_csv"
11
11
  # require "pry"
12
12
  # Pry.start
13
13
 
14
- require "irb"
15
- IRB.start(__FILE__)
14
+ require "pry"
15
+ Pry.start
@@ -27,7 +27,7 @@ module ReciteCSV
27
27
  end
28
28
 
29
29
  class Hash < Base
30
- DEFAULT_CSV_OPIONS = { headers: :first_row }.freeze
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
- DEFAULT_CSV_OPIONS
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(:DEFAULT_CSV_OPIONS, @definition.default_csv_options)
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
@@ -11,7 +11,7 @@ module ReciteCSV
11
11
 
12
12
  def initialize(file, csv_options = {})
13
13
  @file = file
14
- @csv_options = (csv_options || {}).merge(self.class::DEFAULT_CSV_OPIONS)
14
+ @csv_options = (csv_options || {}).merge(self.class::DEFAULT_CSV_OPTIONS)
15
15
  end
16
16
 
17
17
  def each
@@ -3,14 +3,14 @@
3
3
  module ReciteCSV
4
4
  module Row
5
5
  class Base
6
- attr_reader :raw_data
6
+ attr_reader :_raw_data
7
7
 
8
8
  def initialize(raw_data)
9
- @raw_data = raw_data
9
+ @_raw_data = raw_data
10
10
  end
11
11
 
12
12
  def [](key)
13
- self.raw_data[key]
13
+ self._raw_data[key]
14
14
  end
15
15
  end
16
16
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ReciteCSV
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
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.0
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-30 00:00:00.000000000 Z
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: '0'
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: '0'
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: '0'
125
+ version: 2.2.2
112
126
  required_rubygems_version: !ruby/object:Gem::Requirement
113
127
  requirements:
114
128
  - - ">="