astro_calc 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -0
- data/.rspec +0 -0
- data/.travis.yml +0 -0
- data/CODE_OF_CONDUCT.md +0 -0
- data/Gemfile +0 -0
- data/LICENSE.txt +0 -0
- data/README.md +0 -0
- data/Rakefile +0 -0
- data/astro_calc-0.2.1.gem +0 -0
- data/astro_calc.gemspec +0 -0
- data/lib/astro_calc/moon_phases.rb +9 -0
- data/lib/astro_calc/telescopes.rb +0 -0
- data/lib/astro_calc/version.rb +1 -1
- data/lib/astro_calc.rb +0 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 721affb63018df5d5ef7bf5bb6e051310cafd9e6
|
4
|
+
data.tar.gz: 6b48985b7283b3e6648ae76fd32375a0dff680d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b1048452732b8f3f2a2e86fdc15ee0fa43d4b80bacfee6c9abd6ef51ff0823a4768479ee2dd309d5530c0a5ae21c1581157c14ed66b567b7ad65eb2c999f733
|
7
|
+
data.tar.gz: 40f38b0b03b94ab573c6f3be00b63e5507a34a7a7aa13ee34d77f771b856845926ccefbb52199f5a8492f87cdd651bbdca45c53dd6e9b21f84ef9b57df591efb
|
data/.gitignore
CHANGED
File without changes
|
data/.rspec
CHANGED
File without changes
|
data/.travis.yml
CHANGED
File without changes
|
data/CODE_OF_CONDUCT.md
CHANGED
File without changes
|
data/Gemfile
CHANGED
File without changes
|
data/LICENSE.txt
CHANGED
File without changes
|
data/README.md
CHANGED
File without changes
|
data/Rakefile
CHANGED
File without changes
|
Binary file
|
data/astro_calc.gemspec
CHANGED
File without changes
|
@@ -9,6 +9,9 @@ class MoonPhases
|
|
9
9
|
|
10
10
|
attr_reader :phase, :age, :distance, :latitude, :longitude, :constellation
|
11
11
|
attr_reader :sweep, :magnitude # for svg
|
12
|
+
|
13
|
+
attr_reader :detailed_position, :detailed_age, :detailed_distance, :detailed_constellation
|
14
|
+
|
12
15
|
|
13
16
|
def initialize(date = Date.today)
|
14
17
|
year = date.year
|
@@ -88,6 +91,11 @@ class MoonPhases
|
|
88
91
|
@sweep = [1, 0];
|
89
92
|
@magnitude = 20 - 20 * i_phase * 4
|
90
93
|
end
|
94
|
+
|
95
|
+
@detailed_position = "Ecliptic position : λ #{@longitude} - β #{@latitude}"
|
96
|
+
@detailed_age = "Current cycle age #{(@age).round(2)} days"
|
97
|
+
@detailed_distance = "Distance is #{(@distance).round(2)} earth radii"
|
98
|
+
@detailed_constellation = "The #{@phase} moon is in #{@constellation}"
|
91
99
|
end
|
92
100
|
|
93
101
|
# Normalizes the value to be in the range 0..1
|
@@ -149,5 +157,6 @@ class MoonPhases
|
|
149
157
|
output << "</svg>"
|
150
158
|
output.html_safe
|
151
159
|
end
|
160
|
+
|
152
161
|
end
|
153
162
|
|
File without changes
|
data/lib/astro_calc/version.rb
CHANGED
data/lib/astro_calc.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: astro_calc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Reuben Mallaby
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -67,6 +67,7 @@ files:
|
|
67
67
|
- LICENSE.txt
|
68
68
|
- README.md
|
69
69
|
- Rakefile
|
70
|
+
- astro_calc-0.2.1.gem
|
70
71
|
- astro_calc.gemspec
|
71
72
|
- bin/console
|
72
73
|
- bin/setup
|
@@ -94,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
95
|
version: '0'
|
95
96
|
requirements: []
|
96
97
|
rubyforge_project:
|
97
|
-
rubygems_version: 2.2
|
98
|
+
rubygems_version: 2.5.2
|
98
99
|
signing_key:
|
99
100
|
specification_version: 4
|
100
101
|
summary: Astronomical gem to provide various calulations.
|