traffic_light_controller 0.0.1 → 0.0.3

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.
data/.gitignore CHANGED
@@ -1,2 +1,3 @@
1
1
  coverage/
2
2
  pkg/
3
+ spec/reports
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- traffic_light_controller (0.0.1)
4
+ traffic_light_controller (0.0.3)
5
5
  arduino
6
6
  hashie
7
7
  json
@@ -4,13 +4,13 @@ module TrafficLightController
4
4
  @config = Hashie::Mash.new(YAML.load_file('./config/config.yml'))
5
5
  end
6
6
 
7
- def method_missing(meth, *args, &block)
8
- return config[meth.to_s] if config.has_key?(meth.to_s)
7
+ def method_missing(method_name, *args, &block)
8
+ return config[method_name.to_s] if config.has_key?(method_name.to_s)
9
9
  super
10
10
  end
11
11
 
12
- def respond_to?(meth)
13
- config.has_key?(meth.to_s) || super
12
+ def respond_to?(method_name)
13
+ config.has_key?(method_name.to_s) || super
14
14
  end
15
15
 
16
16
  private
@@ -2,15 +2,13 @@ module TrafficLightController
2
2
  class Server
3
3
 
4
4
  def initialize
5
- begin
6
- Thread.abort_on_exception = true
7
- @config = Config.new
8
- @server = TCPServer.new(config.server.address, config.server.port)
9
- rescue Errno::EADDRINUSE
10
- puts "Address in use"
11
- rescue Errno::EADDRNOTAVAIL, SocketError
12
- puts "Address not available"
13
- end
5
+ Thread.abort_on_exception = true
6
+ @config = Config.new
7
+ @server = TCPServer.new(config.server.address, config.server.port)
8
+ rescue Errno::EADDRINUSE
9
+ puts "Address in use"
10
+ rescue Errno::EADDRNOTAVAIL, SocketError
11
+ puts "Address not available"
14
12
  end
15
13
 
16
14
  def work(run_forever = true)
@@ -1,3 +1,3 @@
1
1
  module TrafficLightController
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: traffic_light_controller
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-08 00:00:00.000000000 Z
12
+ date: 2012-10-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake