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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 398ca9f6709d65a061fb4fcce0cc52377574c007
4
- data.tar.gz: add77a14f97c36e765c7bd203e6c025d9c7df228
3
+ metadata.gz: c2038974af70d4e6e38e138d0a0287ac6d8a5442
4
+ data.tar.gz: 65f4f52dc2e256ea0f533b63af9b460cf8da19fa
5
5
  SHA512:
6
- metadata.gz: 9a35353cfe3bdf3daa7d174ef62bc11ea24d58a23157cae5a6c46060bb4f52dbf76800e5b6a58a40620a613865aded3bd4aac8838544025a1a3c3e70c490cc33
7
- data.tar.gz: 4a2365ce982ff89ac912d17a973453ef48d17fb4d50e169bde12d1896c0821a93b5c7b01ae4915f9d8f997a6a5c8c0dffbb313f3423b0665d817478a5e577514
6
+ metadata.gz: 7590d7dbee86a50ce9467794a6ab0bda0c39573ee977e4663070289bc4b90e424c963a705817cb2506c01fb264d16ce293c271f3a4a8d5bf632b7f5d1dfc2333
7
+ data.tar.gz: 48b38aa48c0495c05453f9ec5d0bb4e8f941096cc3400cb78d405837152939cc72c1aad25ebb1b38f7f0b9f276469eb6f779e988d461d7f60575f0068924ab9a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- farmstead (0.0.20)
4
+ farmstead (0.0.21)
5
5
  httparty (~> 0.15.6)
6
6
  mechanize (~> 2.7)
7
7
  mysql2 (~> 0.4.10)
@@ -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|
@@ -28,7 +28,7 @@
28
28
  module Farmstead
29
29
  module Manager
30
30
  class Producer < Farmstead::Service
31
- def run!
31
+ def run
32
32
  loop do
33
33
  puts 'Checking sites'
34
34
  check_sites
@@ -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
- service = klass.new
25
- service.send("run!")
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
@@ -1,3 +1,3 @@
1
1
  module Farmstead
2
- VERSION = "0.0.20"
2
+ VERSION = "0.0.21"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: farmstead
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.20
4
+ version: 0.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken Jenney