astro_calc 0.2.1 → 0.2.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9c86722be97ceeca6bc85b08889afab760dadbd0
4
- data.tar.gz: 9787dc9743fc1ac572bcd3bdb73c2151c71b18be
3
+ metadata.gz: 721affb63018df5d5ef7bf5bb6e051310cafd9e6
4
+ data.tar.gz: 6b48985b7283b3e6648ae76fd32375a0dff680d6
5
5
  SHA512:
6
- metadata.gz: 8dfba826231be4d85d32b0cb760aa46655577fb968d794b882801f7f5c8e6eac4ece1e0d31092af8d59bb5f57a64c9a35d6721e117cd9db0cf4e08453f17c202
7
- data.tar.gz: 949d082c220b0b282f0ad4e5863db8e59ee555043055df7a45ad016e5578de442fd89699d8a593ba07f11846676b48d48e5c845c8c27d3dc7c24f6e5b2b33794
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
@@ -1,3 +1,3 @@
1
1
  module AstroCalc
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
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.1
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: 2016-04-12 00:00:00.000000000 Z
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.5
98
+ rubygems_version: 2.5.2
98
99
  signing_key:
99
100
  specification_version: 4
100
101
  summary: Astronomical gem to provide various calulations.