solunar 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/solunar.rb +13 -13
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bf9e7382b69630cd0f411ad52ee590df35700eaf
4
- data.tar.gz: d565938278d428b815201f3fb1f55d748309c69a
3
+ metadata.gz: f4f7aabbf074828fd6b175922d5cd346169d4d99
4
+ data.tar.gz: 018fc0626c3a0e525045cb03bd6cbbbf8a63d5fd
5
5
  SHA512:
6
- metadata.gz: 89bca209abcfc123ea2528f844e526c971e6c342afe3ea90e0d922f43aeb88c134802f315cf4cc87e8aae03cdb5b26754b9fc2f88d69268a8c53466ab4305422
7
- data.tar.gz: 34138467bdbbae64d165e26ba68085534691d4cda1c925eba621206a16f65fcb194225f76f7c5e5d37bc79e1f70e4c5aff4ea3df4251a0a1e363285092394859
6
+ metadata.gz: 6fcf4d8896fe261f51742885798e8ccd60b5aa670d5155825f2df05d4bcd76d2d12461fd004a0f63ae4592ca911349a1be3263bd9ee71e2ccd43e9ff154d7b8c
7
+ data.tar.gz: 99a85d93b44a1f8f7d9791cd5b63747e098c38bc1ae5c79f22ef97310ed146dee83c57d3ca900e3d725d2da965552fbb68bb7844e46ef1084e76aa14c4aa2fe3
@@ -1,9 +1,9 @@
1
1
  class Solunar
2
2
 
3
3
  NAME = "solunar"
4
- VERSION = '0.0.4'
4
+ VERSION = '0.0.5'
5
5
  def version
6
- "0.0.4"
6
+ "0.0.5"
7
7
  end
8
8
 
9
9
  def test
@@ -26,13 +26,13 @@ class Solunar
26
26
  moon = Hash.new
27
27
  major_feed_times = Array.new
28
28
  minor_feed_times = Array.new
29
- sun[:rise] = segments[1].strip unless segments[1].strip == "NONE"
30
- sun[:set] = segments[3].strip unless segments[3].strip == "NONE"
31
- sun[:transit] = segments[2].strip unless segments[2].strip == "NONE"
32
- moon[:rise] = segments[5].strip unless segments[5].strip == "NONE"
33
- moon[:set] = segments[7].strip unless segments[7].strip == "NONE"
34
- moon[:transit] = segments[6].strip unless segments[6].strip == "NONE"
35
- day[:under_foot] = segments[4].strip unless segments[4].strip == "NONE"
29
+ sun[:rise] = segments[1].strip[0..-4] unless segments[1].strip == "NONE"
30
+ sun[:set] = segments[3].strip[0..-4] unless segments[3].strip == "NONE"
31
+ sun[:transit] = segments[2].strip[0..-4] unless segments[2].strip == "NONE"
32
+ moon[:rise] = segments[5].strip[0..-4] unless segments[5].strip == "NONE"
33
+ moon[:set] = segments[7].strip[0..-4] unless segments[7].strip == "NONE"
34
+ moon[:transit] = segments[6].strip[0..-4] unless segments[6].strip == "NONE"
35
+ day[:under_foot] = segments[4].strip[0..-4] unless segments[4].strip == "NONE"
36
36
  unless moon[:rise].nil?
37
37
  minor_feed_times << { start: moon[:rise], stop: add_hours(moon[:rise],1) }
38
38
  end
@@ -52,8 +52,8 @@ class Solunar
52
52
  major_feed_times.rotate!
53
53
  end
54
54
  day[:date] = segments[0].strip
55
- day[:days_since_new] = "Unknown"
56
- day[:dayscale] = "Unknown"
55
+ #day[:days_since_new] = "Unknown"
56
+ #day[:dayscale] = "Unknown"
57
57
  day[:moon_illumination] = segments[12].strip
58
58
  day[:moon_phase] = segments[10].strip
59
59
  day[:moon] = moon
@@ -72,9 +72,9 @@ class Solunar
72
72
  hour += 24 if hour < 0
73
73
  hour -= 24 if hour > 23
74
74
  if hour > 9
75
- return "#{hour.to_s}:#{segs[1]}:#{segs[2]}"
75
+ return "#{hour.to_s}:#{segs[1]}"
76
76
  else
77
- return "0#{hour.to_s}:#{segs[1]}:#{segs[2]}"
77
+ return "0#{hour.to_s}:#{segs[1]}"
78
78
  end
79
79
  end
80
80
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solunar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - "\"Sullivan"
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
82
  version: '0'
83
83
  requirements: []
84
84
  rubyforge_project:
85
- rubygems_version: 2.5.1
85
+ rubygems_version: 2.4.3
86
86
  signing_key:
87
87
  specification_version: 4
88
88
  summary: Solunar Forecasting Gem