rodimus 1.3.0 → 1.3.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: 90a48da418f9255e96fa21a4c77c4f08ad4b706e
4
- data.tar.gz: 72e832c9f3dbba8f5cb969883c071153a339666f
3
+ metadata.gz: 13e2bd4b201e5051e07a2100d30ededad2a6fc59
4
+ data.tar.gz: 91fa63047237ddc932694af32106cee575c09354
5
5
  SHA512:
6
- metadata.gz: 95bda7a98743242537fe2a55a7f2ec154c1e285b7069f0cc3618e80a5aac3a4df8dc356f4b968b91c7d69c5d79697c7469920895f8046b0885c65d8bc134316b
7
- data.tar.gz: 0617781ea52018694d4c54c2aacdee034eb07b8cc6df98f232f620bb92f84a597633b8ac7baa0ed5f494ecd95aeb8579f4c6fe2bd99c5166d0b44a0e2691b4fb
6
+ metadata.gz: 96ae46e51e48eadbfa08e2f877d714c16032ccdeb35aea45e783de356165ef8e7d1474f2591b1907a99b3a1a10063d0419fd3038629669b526a44af054bd506f
7
+ data.tar.gz: 9f05fba7a549f261369fc78b0acf72424519f02399ca5663a4f43bdd3094e7ee8f4bcac715d4796bb571bed9814db87b37dff3f6643bc128b6588393b1dbeaa5
@@ -1 +1 @@
1
- ruby-2.2.0
1
+ ruby-2.3
@@ -2,9 +2,9 @@ before_install:
2
2
  - gem install bundler
3
3
  language: ruby
4
4
  rvm:
5
- - 2.2.0
6
- - 2.1.5
7
- - 2.0.0
5
+ - 2.3.0
6
+ - 2.2.5
7
+ - 2.1.10
8
8
  - 1.9.3
9
9
  - jruby-19mode
10
10
  - rbx-2
data/README.md CHANGED
@@ -30,6 +30,42 @@ Or install it yourself as:
30
30
 
31
31
  tl;dr: See the examples directory for the quickest path to success.
32
32
 
33
+ ```ruby
34
+ require 'rodimus'
35
+ require 'csv'
36
+ require 'json'
37
+
38
+ class CsvInput < Rodimus::Step
39
+ def before_run_set_incoming
40
+ @incoming = CSV.open('examples/worldbank-sample.csv')
41
+ @incoming.readline # skip the headers
42
+ end
43
+
44
+ def process_row(row)
45
+ row.to_json
46
+ end
47
+ end
48
+
49
+ class FormattedText < Rodimus::Step
50
+ def before_run_set_stdout
51
+ @outgoing = STDOUT.dup
52
+ end
53
+
54
+ def process_row(row)
55
+ data = JSON.parse(row)
56
+ "In #{data.first} during #{data[1]}, CO2 emissions were #{data[2]} metric tons per capita."
57
+ end
58
+ end
59
+
60
+ t = Rodimus::Transformation.new
61
+ s1 = CsvInput.new
62
+ s2 = FormattedText.new
63
+ t.steps << s1
64
+ t.steps << s2
65
+ t.run
66
+ puts "Transformation complete!"
67
+ ```
68
+
33
69
  A transformation is an operation that consists of many steps. Each step may
34
70
  manipulate the data in some way. Typically, the first step is reserved for
35
71
  reading from your data source, and the last step is used to write to the new
@@ -1,3 +1,3 @@
1
1
  module Rodimus
2
- VERSION = "1.3.0"
2
+ VERSION = "1.3.1"
3
3
  end
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
7
7
  spec.name = "rodimus"
8
8
  spec.version = Rodimus::VERSION
9
9
  spec.authors = ["Brandon Rice"]
10
- spec.email = ["brice84@gmail.com"]
10
+ spec.email = ["brandon@blrice.net"]
11
11
  spec.summary = "An ETL (Extract-Transform-Load) library that uses a forking process model for concurrency."
12
12
  spec.description = "An ETL (Extract-Transform-Load) library that uses a forking process model for concurrency."
13
13
  spec.homepage = "https://github.com/nevern02/rodimus"
@@ -19,8 +19,8 @@ Gem::Specification.new do |spec|
19
19
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_development_dependency "bundler", "~> 1.8"
23
- spec.add_development_dependency "rake", "~> 10.4"
24
- spec.add_development_dependency "faker", "~> 1.4"
25
- spec.add_development_dependency "minitest", "~> 5.4"
22
+ spec.add_development_dependency "bundler", "~> 1.12"
23
+ spec.add_development_dependency "rake", "~> 11.1"
24
+ spec.add_development_dependency "faker", "~> 1.6"
25
+ spec.add_development_dependency "minitest", "~> 5.8"
26
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rodimus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Rice
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-01 00:00:00.000000000 Z
11
+ date: 2016-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,60 +16,60 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.8'
19
+ version: '1.12'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.8'
26
+ version: '1.12'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.4'
33
+ version: '11.1'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '10.4'
40
+ version: '11.1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: faker
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.4'
47
+ version: '1.6'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '1.4'
54
+ version: '1.6'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: minitest
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '5.4'
61
+ version: '5.8'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '5.4'
68
+ version: '5.8'
69
69
  description: An ETL (Extract-Transform-Load) library that uses a forking process model
70
70
  for concurrency.
71
71
  email:
72
- - brice84@gmail.com
72
+ - brandon@blrice.net
73
73
  executables: []
74
74
  extensions: []
75
75
  extra_rdoc_files: []
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
130
  version: '0'
131
131
  requirements: []
132
132
  rubyforge_project:
133
- rubygems_version: 2.4.5
133
+ rubygems_version: 2.5.1
134
134
  signing_key:
135
135
  specification_version: 4
136
136
  summary: An ETL (Extract-Transform-Load) library that uses a forking process model