RubySunrise 0.3 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/solareventcalculator.rb +1 -1
- data/rubysunrise.gemspec +1 -1
- metadata +14 -15
- data/test/test.rb +0 -11
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e36babfce42eb42418ae75fb536897c8e72a5797
|
4
|
+
data.tar.gz: f5f4f3ff61c529a41017d2a64bc0e442364bdb52
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7d44ac4e648cc9537442b7a5af5ec585806e0bf718daeb94838fa0612daa4097fac6d622420a14a6ac809c9d15a431475344b76f18dfea057eb30b1611c38ce0
|
7
|
+
data.tar.gz: 7aabe8fa9fe349867a1909731b04a1c036addcba2fed6b5821ff4265a314fa1b7b68f194f47b205294e61b5bc3c8c248f9fd2b447684187c67b7c506a9f07698
|
data/lib/solareventcalculator.rb
CHANGED
@@ -118,7 +118,7 @@ class SolarEventCalculator
|
|
118
118
|
sunLocalHour = compute_local_hour_angle(cosineSunLocalHour, isSunrise)
|
119
119
|
localMeanTime = compute_local_mean_time(sunTrueLong, longHour, eventLongHour, sunLocalHour)
|
120
120
|
|
121
|
-
timeParts = localMeanTime.to_s
|
121
|
+
timeParts = localMeanTime.to_f.to_s.split('.')
|
122
122
|
mins = BigDecimal.new("." + timeParts[1]) * BigDecimal.new("60")
|
123
123
|
mins = mins.truncate()
|
124
124
|
mins = pad_minutes(mins.to_i)
|
data/rubysunrise.gemspec
CHANGED
metadata
CHANGED
@@ -1,27 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: RubySunrise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
5
|
-
prerelease:
|
4
|
+
version: 0.3.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Mike Reedell / LuckyCatLabs
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2015-01-14 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: tzinfo
|
16
|
-
requirement:
|
17
|
-
none: false
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
|
-
version_requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
25
27
|
description:
|
26
28
|
email: mike@reedell.com
|
27
29
|
executables: []
|
@@ -33,34 +35,31 @@ files:
|
|
33
35
|
- test/bulkdatatest.rb
|
34
36
|
- test/sunrisetest.rb
|
35
37
|
- test/sunsettest.rb
|
36
|
-
- test/test.rb
|
37
38
|
homepage: http://www.mikereedell.com
|
38
39
|
licenses: []
|
40
|
+
metadata: {}
|
39
41
|
post_install_message:
|
40
42
|
rdoc_options: []
|
41
43
|
require_paths:
|
42
44
|
- lib
|
43
45
|
required_ruby_version: !ruby/object:Gem::Requirement
|
44
|
-
none: false
|
45
46
|
requirements:
|
46
|
-
- -
|
47
|
+
- - '>='
|
47
48
|
- !ruby/object:Gem::Version
|
48
49
|
version: '0'
|
49
50
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
requirements: []
|
56
56
|
rubyforge_project:
|
57
|
-
rubygems_version:
|
57
|
+
rubygems_version: 2.0.14
|
58
58
|
signing_key:
|
59
|
-
specification_version:
|
59
|
+
specification_version: 4
|
60
60
|
summary: Calculate the sunrise/sunset given lat/long coordinates and the date. Computes
|
61
61
|
civil, official, nautical, and astronomical sunrise/sunset.
|
62
62
|
test_files:
|
63
63
|
- test/bulkdatatest.rb
|
64
64
|
- test/sunrisetest.rb
|
65
65
|
- test/sunsettest.rb
|
66
|
-
- test/test.rb
|
data/test/test.rb
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
require 'date'
|
2
|
-
require '../lib/solareventcalculator'
|
3
|
-
|
4
|
-
date = Date.parse('2008-11-01')
|
5
|
-
calc = SolarEventCalculator.new(date, BigDecimal.new("39.9537"), BigDecimal.new("-75.7850"))
|
6
|
-
|
7
|
-
utcOfficialSunrise = calc.compute_utc_official_sunrise
|
8
|
-
localOfficialSunrise = calc.compute_official_sunrise('America/New_York')
|
9
|
-
|
10
|
-
puts "utcOfficialSunrise #{utcOfficialSunrise}"
|
11
|
-
puts "localOfficialSunrise #{localOfficialSunrise}"
|