VanaTime 1.2.0 → 1.2.1

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.
Files changed (4) hide show
  1. data/CHANGELOG +5 -0
  2. data/VanaTime.gemspec +3 -3
  3. data/lib/Vana/moon.rb +12 -12
  4. metadata +1 -1
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ == 1.2.1 / 2007-09-02
2
+
3
+ * fixed a silly typo describing the waxing gibbous moon phase. This corrects the
4
+ completely inaccurate countdowns that occured during this phase.
5
+
1
6
  == 1.2.0 / 2007-09-02
2
7
 
3
8
  * fleshed out the VanaMoon API to make it more convenient and remove redundant
@@ -1,10 +1,10 @@
1
1
 
2
- # Gem::Specification for Vanatime-1.2.0
2
+ # Gem::Specification for Vanatime-1.2.1
3
3
  # Originally generated by Echoe
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = %q{VanaTime}
7
- s.version = "1.2.0"
7
+ s.version = "1.2.1"
8
8
  s.date = %q{2007-09-02}
9
9
  s.summary = %q{A library for converting realtime to vanadiel time}
10
10
  s.email = %q{ttilley@gmail.com}
@@ -19,7 +19,7 @@ end
19
19
 
20
20
  # # Original Rakefile source (requires the Echoe gem):
21
21
  #
22
- # version = "1.2.0"
22
+ # version = "1.2.1"
23
23
  #
24
24
  # ENV['RUBY_FLAGS'] = ""
25
25
  #
@@ -40,7 +40,7 @@ module FFXI
40
40
  @next_phase_target = 66
41
41
  when (57..89)
42
42
  @moon_phase = 7
43
- @next_phase_target = 60
43
+ @next_phase_target = 80
44
44
  end
45
45
 
46
46
  case @moon_phase
@@ -59,11 +59,11 @@ module FFXI
59
59
  def to_i
60
60
  @moon_percent
61
61
  end
62
-
62
+
63
63
  def percent
64
64
  "#{@moon_percent.abs}%"
65
65
  end
66
-
66
+
67
67
  def phase
68
68
  MOON_PHASES[@moon_phase]
69
69
  end
@@ -71,15 +71,15 @@ module FFXI
71
71
  def to_s
72
72
  "#{percent} #{phase}"
73
73
  end
74
-
74
+
75
75
  def to_next_array
76
76
  countdown_to(@next_phase_target)
77
77
  end
78
-
78
+
79
79
  def to_next
80
80
  format_countdown(to_next_array)
81
81
  end
82
-
82
+
83
83
  def next_phase
84
84
  MOON_PHASES[(@moon_phase + 1) % 8]
85
85
  end
@@ -87,17 +87,17 @@ module FFXI
87
87
  def to_optimal_array
88
88
  countdown_to(@optimal_phase_target)
89
89
  end
90
-
90
+
91
91
  def to_optimal
92
92
  format_countdown(to_optimal_array)
93
93
  end
94
-
94
+
95
95
  def optimal_phase
96
96
  MOON_PHASES[@next_optimal_phase]
97
97
  end
98
-
98
+
99
99
  private
100
-
100
+
101
101
  def countdown(time)
102
102
  day_left = time.to_f / MS_DAY
103
103
  hour_left = (day_left.to_f - day_left.floor) * 24
@@ -110,12 +110,12 @@ module FFXI
110
110
  def countdown_to(target)
111
111
  countdown((target - @moon_days) * MS_GAME_DAY - @elapsed_time)
112
112
  end
113
-
113
+
114
114
  def format_countdown(countdown)
115
115
  formatted = String.new
116
116
  countdown[0..2].each do |part|
117
117
  if (part > 0)
118
- formatted += "%02d" % part
118
+ formatted += "%02d" % part
119
119
  formatted += ":"
120
120
  end
121
121
  end
metadata CHANGED
@@ -3,7 +3,7 @@ homepage: http://vanatime.rubyforge.org/
3
3
  extensions: []
4
4
  executables: []
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.2.0
6
+ version: 1.2.1
7
7
  post_install_message:
8
8
  date: 2007-09-02 04:00:00 +00:00
9
9
  files: