remi 0.2.40 → 0.2.41

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: d9f919d918cc6c2b83a8f6849a30a111ddf07e87
4
- data.tar.gz: 7eeaee62f683ee9fd0851e8c61cd47fab8a7f1bd
3
+ metadata.gz: 82c48124423f425da0bfe81f015fbfb82ff1ec31
4
+ data.tar.gz: c8d1bc70bba91dff8d2999ff46e8fc8c912d735c
5
5
  SHA512:
6
- metadata.gz: eecc73e562cf266445cf85f7c144424a730f71d95ea588b9ad7c75fc2aba0a09c0aba7440c78639c7433340e3e89888c329aec17660471038996763593e50e45
7
- data.tar.gz: 96852fba98c17a79ef1763ece9f5b5cb9893cca9acf5c21da4ac09e352a1fcc2cb8e8f760836f3111493ef3f4b6258f01688b10b8c14952a7978e51623f70653
6
+ metadata.gz: 062436c1a6e4d7566eae6e0547821763bc3a12756473134b6f487db92025010e44d7ab460a8760c550651274e312f94573936b8cc13a54753b46d1c035d58864
7
+ data.tar.gz: b85a11927349e0b9f19421e5db3c24214f9b3b3205501e0866dfaa0cfc65e8ebb81b58ccef8abc6914b340b2e9731635d59c0983638481fd1052ad0bc1548b19
data/Gemfile.lock CHANGED
@@ -19,7 +19,7 @@ GIT
19
19
  PATH
20
20
  remote: .
21
21
  specs:
22
- remi (0.2.40)
22
+ remi (0.2.41)
23
23
  activesupport (~> 4.2)
24
24
  bond (~> 0.5)
25
25
  cucumber (~> 2.1)
data/README.md CHANGED
@@ -1,4 +1,10 @@
1
1
  # Remi - Ruby Extract Map Integrate
2
+ **Warning:** This project is very much in the development stage
3
+ and all features are subject to change. Documentation is skimpy
4
+ at best. Test coverage is light but improving. To get a taste
5
+ of what Remi has to offer, check out the
6
+ [sample feature](features/sample_job.feature) and [sample job](jobs/sample_job.rb).
7
+
2
8
 
3
9
  **Purpose:** Remi is a Ruby-based ETL package that provides an
4
10
  expressive data transformation language and facilitates the
@@ -26,7 +26,7 @@ Given /^the following example(?: record| records|) called '([[:alnum:]\s\-_]+)':
26
26
  end
27
27
 
28
28
  Given /^the following example(?: record| records|) for '([[:alnum:]\s\-_]+)':$/ do |source_name, example_table|
29
- example_name = source_name
29
+ example_name = SecureRandom.uuid
30
30
  @brt.add_example example_name, example_table
31
31
  @brt.job_sources[source_name].stub_data_with(@brt.examples[example_name])
32
32
  end
@@ -59,12 +59,13 @@ module Remi
59
59
  @values[@index[key]] = value
60
60
  end
61
61
 
62
- # Public: Makes Row enumerable, and acts like a hash.
62
+ # Public: Makes Row enumerable, acts like a hash
63
63
  def each &block
64
- inverted_index = @index.invert
65
- @values.each_with_index { |value, idx| block.call([inverted_index[idx], value]) }
64
+ return enumerate_row_variables unless block_given?
65
+ enumerate_row_variables.each { |k,v| block.call(k,v) }
66
66
  end
67
67
 
68
+
68
69
  # Public: Enumerates over each source value
69
70
  def each_source &block
70
71
  Enumerator.new do |y|
@@ -98,6 +99,15 @@ module Remi
98
99
  def target_keys
99
100
  @target_keys ||= keys - source_keys
100
101
  end
102
+
103
+ private
104
+
105
+ def enumerate_row_variables
106
+ inverted_index = @index.invert
107
+ Enumerator.new do |y|
108
+ @values.each_with_index { |value, idx| y << [inverted_index[idx], value] }
109
+ end
110
+ end
101
111
  end
102
112
  end
103
113
  end
data/lib/remi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Remi
2
- VERSION = '0.2.40'
2
+ VERSION = '0.2.41'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.40
4
+ version: 0.2.41
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sterling Paramore
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-12 00:00:00.000000000 Z
11
+ date: 2016-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bond