robot-controller 2.0.beta1 → 2.0.beta2

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: f2f8958d56c26a4a2139a77a4c17a496ea96fe47
4
- data.tar.gz: 03a8f5d1f0390f46772fc9e18d80fa8223e964b7
3
+ metadata.gz: 3446fffd9b5e4fc0d97072f0e9f491ec1252ca52
4
+ data.tar.gz: 5e85c22b3c75a99a3b1fc3b68e712310fbb85655
5
5
  SHA512:
6
- metadata.gz: bd0432d25bf71cab0e6bfa18a5dd3e67210d9d27772b0f86e4f334c34d114d2aff590184192293d93656ae130db9a2b8b7b2e6d1b8f6ffdba97bb84f049d9284
7
- data.tar.gz: 5da783211f9b8c77138d1cdb0d0bfbac1c29818d4f2caeda54981032f4701baca9197286d91eec276e7a7395ee94095b442b29cbfcc1d931d2721a72c21a4fda
6
+ metadata.gz: 911a499b4add966727b3e97e918793f1009b236d2b79b2a2452612257088eee37eabba456a63726c41f16b5d450cb8ce1a95caba6d3d89a2aa3a0818def672c9
7
+ data.tar.gz: 178a30e94966732b047c89f6cc3cc60961cdc856c094ff45e4567f50f98dd0cbb4490b975929f23023c76a89113710562e1f406f0fac0d99bfe16099bdd23ae9
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.beta1
1
+ 2.0.beta2
@@ -4,7 +4,8 @@ require 'robot-controller'
4
4
  WORKDIR = Dir.pwd
5
5
 
6
6
  # setup robots configuration
7
- ROBOTS = RobotController::Parser.new.load("robots_#{ENV['ROBOT_ENVIRONMENT'] || 'development'}.yml")
7
+ robot_environment = ENV['ROBOT_ENVIRONMENT'] || 'development'
8
+ ROBOTS = RobotController::Parser.load("robots_#{robot_environment}.yml")
8
9
  #
9
10
  # Expect ROBOTS = [
10
11
  # {:robot => 'x', :queues => ['a', 'b'], :n => 1}
@@ -116,7 +116,7 @@ module RobotController
116
116
  @status = {}
117
117
  robots.each do |robot|
118
118
  matches = states.select { |state| state[:robot] == robot }
119
- @status[robot] = self.class.consolidate_states_into_status(matches)
119
+ @status[robot] = self.class.consolidate_states_into_status(matches) if matches.size > 0
120
120
  end
121
121
 
122
122
  # cross-check against all robots
@@ -137,7 +137,7 @@ module RobotController
137
137
  # Runs 'bundle exec controller status' and returns/yields output
138
138
  # @yield [Array[String]] output
139
139
  def controller_status
140
- IO.popen('bundle exec controller status 2>&1').readlines.map(&:strip)
140
+ IO.popen('bundle exec controller status 2>&1', 'r').readlines.map(&:strip)
141
141
  end
142
142
 
143
143
  # -- Class methods --
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: robot-controller
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.beta1
4
+ version: 2.0.beta2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darren Hardy