hueshift 0.3.0 → 0.3.1

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: f7b43f61c4e8fa8db9f2649f2b29713393a28392
4
- data.tar.gz: 39809ecb83bcdcfe568add1e6982372ab826a35b
3
+ metadata.gz: 6096b52b63596c72088581e714eab8f7b8b9779f
4
+ data.tar.gz: 86ce9e4f8de24f3634d4b182ac8f6c328539b717
5
5
  SHA512:
6
- metadata.gz: 0fe3d0dd3ee9312320834cdea8f704c3232b046cb45b7dd32502ccaedff472fefa8baa772aa769d7590ea4dac312d13a685c94c41606fcbf940ac624212719d5
7
- data.tar.gz: db1d7153a8a056b1b1e7cd41b3797a62f39630a452bfd1e165cef4b359b5e19f89bd96e8ada50f10d6f31a8fe2457d27a056165f7e00de83ad0740c7781ce8e0
6
+ metadata.gz: f0732f971af7cae0a4f74760350dfa3304430c7013f711bed99cbc5a71cc7770aa3956835b5b8623aded6ed5101a7d6cf53a786d9016effea9da24a9d7392ad1
7
+ data.tar.gz: 7785a54fe3c9a4b2325d90c5933e03c64e567efb1220918efd8077e0d297b5837f718bffc45a3e95eef3c5924315386285a46eca24bb8bbc9bb96ba4934dd28e
@@ -1,3 +1,3 @@
1
1
  module Hueshift
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
data/lib/hueshift.rb CHANGED
@@ -14,10 +14,10 @@ class Numeric
14
14
  end
15
15
 
16
16
  module Hueshift
17
- LAT = ENV.fetch "LAT", 35.779
18
- LON = ENV.fetch "LON", -78.6465
19
- DAY_TEMP = ENV.fetch "DAY_TEMP", 5500
20
- NIGHT_TEMP = ENV.fetch "NIGHT_TEMP", 1900
17
+ LAT = (ENV.fetch "LAT", 35.779).to_f
18
+ LON = (ENV.fetch "LON", -78.6465).to_f
19
+ DAY_TEMP = (ENV.fetch "DAY_TEMP", 5500).to_i
20
+ NIGHT_TEMP = (ENV.fetch "NIGHT_TEMP", 1900).to_i
21
21
 
22
22
  def redshift
23
23
  client = Hue::Client.new
@@ -34,7 +34,13 @@ module Hueshift
34
34
 
35
35
  def redshift_server(sleepytime: 30)
36
36
  loop do
37
- redshift
37
+ begin
38
+ redshift
39
+ rescue Exception => e
40
+ puts "#{Time.now}: Received #{e.class}: #{e.message}"
41
+ e.backtrace.each { |line| puts "\t#{line}" }
42
+ #puts e.backtrace
43
+ end
38
44
  sleep sleepytime
39
45
  end
40
46
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hueshift
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Toniazzo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-22 00:00:00.000000000 Z
11
+ date: 2015-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler