csv_piper 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ea1cbd12bae76e95d785d1c5b0f1e5b5226d6e15
4
- data.tar.gz: f93996e0438a347161ced80ad8eee12875099029
3
+ metadata.gz: f2cc21c40bd5c39c089c5044849ff3736dde8f71
4
+ data.tar.gz: cd5be979020360ee93d4e647806217258974eaa7
5
5
  SHA512:
6
- metadata.gz: b1812adb041655a4952e44ddba1b0cd8d90c97aeb1bc83dc09547a0805930da9dcaf2b02cab390e2adac9e0f823043ff5cf138972b2973cf6362a8560bf1f2fc
7
- data.tar.gz: 220b7d3a231c03ba2c5196eaf590d9ea11f18b62ff3b2d1b6f1bfd192cd1c05f106db2d56b6614a0d074740ce49da2ebb7327507f42b532fa825aa492b2c601b
6
+ metadata.gz: fa38bd6d4777bcc3486493b92f7faa31c38b1a2db3bac615f12fd15441cb24714b28375e437c223ec23cb842e458a20a5d42ad53ff0216af289d6257352c1d3b
7
+ data.tar.gz: 03faf48f923766ff8fccd761b97b965c824cdf485fbbb45eedcc6ddad954a963bbd9f969e1f97bf17fb9ec86bdbcc945619a12a9caaf83abffdffe31b769bd2f
data/README.md CHANGED
@@ -39,8 +39,8 @@ end
39
39
  _Extracted from `spec/end_to_end_spec.rb`_
40
40
  ```ruby
41
41
  # Build some processors beforehand so we can access them later
42
- output_collector = ProcessedEquationCollector.new
43
- error_collector = CsvPiper::Processors::ErrorCollector.new
42
+ output_collector = CollectProcessedEquations.new
43
+ error_collector = CsvPiper::Processors::CollectErrors.new
44
44
 
45
45
  # Open the csv file to get our io source
46
46
  File.open(File.join(File.dirname(__FILE__),"/data/csv_1.csv")) do |file|
@@ -80,7 +80,7 @@ class EvaluateEquation
80
80
  end
81
81
  end
82
82
 
83
- class ProcessedEquationCollector
83
+ class CollectProcessedEquations
84
84
  attr_reader :output
85
85
  def initialize
86
86
  @output = []
@@ -150,14 +150,14 @@ Eg. `CsvPiper::Builder.new.from(io).with_processors(processors).build.process`
150
150
  ## Pre-made Processors
151
151
  Over time we will collect a bunch of general purpose processors that anyone can use. They can be found in the `lib/processors` folder but here are a couple:
152
152
 
153
- * `OutputCollector`: Collects the transformed object of every row that is passed through it
154
- * `ErrorCollector`: Collects the `RowError` object of every row that is passed through it
153
+ * `CollectOutput`: Collects the transformed object of every row that is passed through it
154
+ * `CollectErrors`: Collects the `RowError` object of every row that is passed through it
155
155
 
156
- By using `OutputCollector` and to a lesser extent `ErrorCollector` you will start to build up objects in memory. For very large csv files you might not want to use these convenience processors and rather create a new processor that does whatever you need with the row (Ie. log, write to db) which will then be discarded rather than collected.
156
+ By using `CollectOutput` and to a lesser extent `CollectErrors` you will start to build up objects in memory. For very large csv files you might not want to use these convenience processors and rather create a new processor that does whatever you need with the row (Ie. log, write to db) which will then be discarded rather than collected.
157
157
 
158
158
  Require them explicitly if you want to use them.
159
159
 
160
- Eg. `require 'csv_piper/processors/output_collector'`
160
+ Eg. `require 'csv_piper/processors/collect_output'`
161
161
 
162
162
 
163
163
  ## Development
@@ -166,7 +166,7 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
166
166
 
167
167
  ## Contributing
168
168
 
169
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/csv_piper.
169
+ Bug reports and pull requests are welcome on GitHub at https://github.com/jazzarati/csv_piper.
170
170
 
171
171
  ## License
172
172
 
data/csv_piper.gemspec CHANGED
@@ -14,6 +14,7 @@ Gem::Specification.new do |spec|
14
14
  spec.homepage = "https://github.com/jazzarati/csv_piper"
15
15
  spec.license = "MIT"
16
16
 
17
+ spec.required_ruby_version = '>= 2'
17
18
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
19
  spec.bindir = "exe"
19
20
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
@@ -1,6 +1,6 @@
1
1
  module CsvPiper
2
2
  module Processors
3
- class ErrorCollector
3
+ class CollectErrors
4
4
  attr_reader :errors
5
5
  def initialize
6
6
  @errors = {}
@@ -1,6 +1,6 @@
1
1
  module CsvPiper
2
2
  module Processors
3
- class OutputCollector
3
+ class CollectOutput
4
4
  attr_reader :output
5
5
  def initialize(collect_when_invalid: true)
6
6
  @output = []
@@ -1,3 +1,3 @@
1
1
  module CsvPiper
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csv_piper
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
  - Jarrod Sibbison
@@ -73,8 +73,8 @@ files:
73
73
  - lib/csv_piper/errors/row.rb
74
74
  - lib/csv_piper/piper.rb
75
75
  - lib/csv_piper/pre_processors/remove_extra_columns.rb
76
- - lib/csv_piper/processors/error_collector.rb
77
- - lib/csv_piper/processors/output_collector.rb
76
+ - lib/csv_piper/processors/collect_errors.rb
77
+ - lib/csv_piper/processors/collect_output.rb
78
78
  - lib/csv_piper/version.rb
79
79
  homepage: https://github.com/jazzarati/csv_piper
80
80
  licenses:
@@ -88,7 +88,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
88
88
  requirements:
89
89
  - - ">="
90
90
  - !ruby/object:Gem::Version
91
- version: '0'
91
+ version: '2'
92
92
  required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - ">="