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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +6 -0
- data/features/step_definitions/remi_step.rb +1 -1
- data/lib/remi/source_to_target_map/row.rb +13 -3
- data/lib/remi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82c48124423f425da0bfe81f015fbfb82ff1ec31
|
4
|
+
data.tar.gz: c8d1bc70bba91dff8d2999ff46e8fc8c912d735c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 062436c1a6e4d7566eae6e0547821763bc3a12756473134b6f487db92025010e44d7ab460a8760c550651274e312f94573936b8cc13a54753b46d1c035d58864
|
7
|
+
data.tar.gz: b85a11927349e0b9f19421e5db3c24214f9b3b3205501e0866dfaa0cfc65e8ebb81b58ccef8abc6914b340b2e9731635d59c0983638481fd1052ad0bc1548b19
|
data/Gemfile.lock
CHANGED
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 =
|
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,
|
62
|
+
# Public: Makes Row enumerable, acts like a hash
|
63
63
|
def each &block
|
64
|
-
|
65
|
-
|
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
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.
|
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-
|
11
|
+
date: 2016-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bond
|