farmstead 0.0.20 → 0.0.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/farmstead/pipeline/extract.rb +2 -2
- data/lib/farmstead/pipeline/load.rb +2 -2
- data/lib/farmstead/pipeline/manager.rb +1 -1
- data/lib/farmstead/pipeline/transform.rb +2 -2
- data/lib/farmstead/scaffold/project.rb.erb +8 -2
- data/lib/farmstead/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2038974af70d4e6e38e138d0a0287ac6d8a5442
|
4
|
+
data.tar.gz: 65f4f52dc2e256ea0f533b63af9b460cf8da19fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7590d7dbee86a50ce9467794a6ab0bda0c39573ee977e4663070289bc4b90e424c963a705817cb2506c01fb264d16ce293c271f3a4a8d5bf632b7f5d1dfc2333
|
7
|
+
data.tar.gz: 48b38aa48c0495c05453f9ec5d0bb4e8f941096cc3400cb78d405837152939cc72c1aad25ebb1b38f7f0b9f276469eb6f779e988d461d7f60575f0068924ab9a
|
data/Gemfile.lock
CHANGED
@@ -11,7 +11,7 @@ module Farmstead
|
|
11
11
|
OPERATION = 1
|
12
12
|
module Extract
|
13
13
|
class Producer < Farmstead::Service
|
14
|
-
def run
|
14
|
+
def run
|
15
15
|
loop do
|
16
16
|
puts "Do something"
|
17
17
|
sleep 300
|
@@ -22,7 +22,7 @@ module Farmstead
|
|
22
22
|
# Subscribed to the Field topic
|
23
23
|
# Works on message
|
24
24
|
class Consumer < Farmstead::Service
|
25
|
-
def run
|
25
|
+
def run
|
26
26
|
@consumer.subscribe('Field')
|
27
27
|
trap('TERM') { @consumer.stop }
|
28
28
|
@consumer.each_message do |message|
|
@@ -11,7 +11,7 @@ module Farmstead
|
|
11
11
|
module Load
|
12
12
|
# Picks up JSON generated by WebDriver and save it to Forest topic
|
13
13
|
class Producer < Farmstead::Service
|
14
|
-
def run
|
14
|
+
def run
|
15
15
|
loop do
|
16
16
|
puts "Do something"
|
17
17
|
sleep 300
|
@@ -22,7 +22,7 @@ module Farmstead
|
|
22
22
|
# Subscribed to the Field topic
|
23
23
|
# Works on message
|
24
24
|
class Consumer < Farmstead::Service
|
25
|
-
def run
|
25
|
+
def run
|
26
26
|
@consumer.subscribe('Field')
|
27
27
|
trap('TERM') { @consumer.stop }
|
28
28
|
@consumer.each_message do |message|
|
@@ -14,7 +14,7 @@ module Farmstead
|
|
14
14
|
module Transform
|
15
15
|
# Does nothing...work is handled by magic_work
|
16
16
|
class Producer < Farmstead::Service
|
17
|
-
def run
|
17
|
+
def run
|
18
18
|
loop do
|
19
19
|
puts "Do nothing"
|
20
20
|
sleep 300
|
@@ -25,7 +25,7 @@ module Farmstead
|
|
25
25
|
# Subscribed to the Field topic
|
26
26
|
# Works on message
|
27
27
|
class Consumer < Farmstead::Service
|
28
|
-
def run
|
28
|
+
def run
|
29
29
|
@consumer.subscribe('Forest')
|
30
30
|
trap('TERM') { @consumer.stop }
|
31
31
|
@consumer.each_message do |message|
|
@@ -21,5 +21,11 @@ module <%= @name.capitalize %>
|
|
21
21
|
end
|
22
22
|
|
23
23
|
klass = Object.const_get "<%= @name.capitalize %>::#{dynamic_module}::#{dynamic_class}"
|
24
|
-
|
25
|
-
|
24
|
+
|
25
|
+
# Sinatra Wrapper uses Class method
|
26
|
+
if dynamic_class == "API"
|
27
|
+
service.run!
|
28
|
+
else
|
29
|
+
service = klass.new
|
30
|
+
service.send("run")
|
31
|
+
end
|
data/lib/farmstead/version.rb
CHANGED