acts_as_flux_capacitor 0.6.5 → 0.6.6

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.6.6 2008-07-17
2
+
3
+ * Fixed a horrible bug discovered by tobin juday
4
+
1
5
  == 0.6.5 2008-07-11
2
6
 
3
7
  * added AR as a gem dependency
data/Manifest.txt CHANGED
@@ -1,4 +1,3 @@
1
- .gitignore
2
1
  History.txt
3
2
  License.txt
4
3
  Manifest.txt
data/config/hoe.rb CHANGED
@@ -1,4 +1,4 @@
1
- require 'acts_as_flux_capacitor/version'
1
+ require 'acts_as_flux_capacitor'
2
2
 
3
3
  AUTHOR = 'Jim Cropcho' # can also be an array of Authors
4
4
  EMAIL = "jim.cropcho@gmail.com"
@@ -1,5 +1,16 @@
1
1
  LIB_DIRECTORY = *['lib','acts_as_flux_capacitor']
2
2
 
3
+ require 'activerecord'
4
+
5
+ module HolmesLabs
6
+ module Acts
7
+ module FluxCapacitor
8
+ module VERSION
9
+ end
10
+ end
11
+ end
12
+ end
13
+
3
14
  require File.join(LIB_DIRECTORY, 'version')
4
15
  require File.join(LIB_DIRECTORY, 'temporal')
5
16
  require File.join(LIB_DIRECTORY, 'core_class_extensions')
@@ -1,15 +1,9 @@
1
- module HolmesLabs #:nodoc:
2
- module Acts #:nodoc:
3
- module FluxCapacitor
4
- module VERSION #:nodoc:
1
+ module HolmesLabs::Acts::FluxCapacitor::VERSION #:nodoc:
5
2
 
6
3
  MAJOR = 0
7
4
  MINOR = 6
8
- TINY = 5
5
+ TINY = 6
9
6
 
10
7
  STRING = [MAJOR, MINOR, TINY].join('.')
11
8
 
12
- end # VERSION
13
- end # FluxCapacitor
14
- end # Acts
15
9
  end # HolmesLabs
@@ -2,6 +2,20 @@ require File.dirname(__FILE__) + '/spec_helper.rb'
2
2
 
3
3
  # ...and no, it won't work to put everything in a giant Time.freeze block.
4
4
 
5
+ describe "The gem itself" do
6
+ it "should have a major version" do
7
+ HolmesLabs::Acts::FluxCapacitor::VERSION::MAJOR.should be_an_instance_of(Fixnum)
8
+ end
9
+
10
+ it "should have a minor version" do
11
+ HolmesLabs::Acts::FluxCapacitor::VERSION::MINOR.should be_an_instance_of(Fixnum)
12
+ end
13
+
14
+ it "should have a tiny version" do
15
+ HolmesLabs::Acts::FluxCapacitor::VERSION::TINY.should be_an_instance_of(Fixnum)
16
+ end
17
+ end
18
+
5
19
  describe "The Temporal mixin" do
6
20
 
7
21
  before(:all) do
data/spec/report.html CHANGED
@@ -178,131 +178,142 @@ a {
178
178
  <div class="results">
179
179
  <div class="example_group">
180
180
  <dl>
181
- <dt id="example_group_1">The Temporal mixin</dt>
182
- <script type="text/javascript">moveProgressBar('2.5');</script>
181
+ <dt id="example_group_1">The gem itself</dt>
182
+ <script type="text/javascript">moveProgressBar('2.3');</script>
183
+ <dd class="spec passed"><span class="passed_spec_name">should have a major version</span></dd>
184
+ <script type="text/javascript">moveProgressBar('4.6');</script>
185
+ <dd class="spec passed"><span class="passed_spec_name">should have a minor version</span></dd>
186
+ <script type="text/javascript">moveProgressBar('6.9');</script>
187
+ <dd class="spec passed"><span class="passed_spec_name">should have a tiny version</span></dd>
188
+ </dl>
189
+ </div>
190
+ <div class="example_group">
191
+ <dl>
192
+ <dt id="example_group_2">The Temporal mixin</dt>
193
+ <script type="text/javascript">moveProgressBar('9.3');</script>
183
194
  <dd class="spec passed"><span class="passed_spec_name">should make Time, Date and DateTime into Temporal objects</span></dd>
184
- <script type="text/javascript">moveProgressBar('5.0');</script>
195
+ <script type="text/javascript">moveProgressBar('11.6');</script>
185
196
  <dd class="spec passed"><span class="passed_spec_name">should determine the length of time between two Temporal objects</span></dd>
186
- <script type="text/javascript">moveProgressBar('7.5');</script>
197
+ <script type="text/javascript">moveProgressBar('13.9');</script>
187
198
  <dd class="spec passed"><span class="passed_spec_name">should determine the length of time until a Temporal object</span></dd>
188
- <script type="text/javascript">moveProgressBar('10.0');</script>
199
+ <script type="text/javascript">moveProgressBar('16.2');</script>
189
200
  <dd class="spec passed"><span class="passed_spec_name">should determine if a temporal object is in the future</span></dd>
190
- <script type="text/javascript">moveProgressBar('12.5');</script>
201
+ <script type="text/javascript">moveProgressBar('18.6');</script>
191
202
  <dd class="spec passed"><span class="passed_spec_name">should determine the length of time since a Temporal object</span></dd>
192
- <script type="text/javascript">moveProgressBar('15.0');</script>
203
+ <script type="text/javascript">moveProgressBar('20.9');</script>
193
204
  <dd class="spec passed"><span class="passed_spec_name">should determine if a temporal object is in the past</span></dd>
194
- <script type="text/javascript">moveProgressBar('17.5');</script>
205
+ <script type="text/javascript">moveProgressBar('23.2');</script>
195
206
  <dd class="spec passed"><span class="passed_spec_name">should determine if one Temporal object is before another</span></dd>
196
- <script type="text/javascript">moveProgressBar('20.0');</script>
207
+ <script type="text/javascript">moveProgressBar('25.5');</script>
197
208
  <dd class="spec passed"><span class="passed_spec_name">should determine if one Temporal object is after another</span></dd>
198
209
  </dl>
199
210
  </div>
200
211
  <div class="example_group">
201
212
  <dl>
202
- <dt id="example_group_2">The class TimePeriod &lt; ActiveRecord::Base</dt>
203
- <script type="text/javascript">moveProgressBar('22.5');</script>
213
+ <dt id="example_group_3">The class TimePeriod &lt; ActiveRecord::Base</dt>
214
+ <script type="text/javascript">moveProgressBar('27.9');</script>
204
215
  <dd class="spec passed"><span class="passed_spec_name">should be a flux capacitor</span></dd>
205
- <script type="text/javascript">moveProgressBar('25.0');</script>
216
+ <script type="text/javascript">moveProgressBar('30.2');</script>
206
217
  <dd class="spec passed"><span class="passed_spec_name">should be a Temporal object</span></dd>
207
- <script type="text/javascript">moveProgressBar('27.5');</script>
218
+ <script type="text/javascript">moveProgressBar('32.5');</script>
208
219
  <dd class="spec passed"><span class="passed_spec_name">should possess all four bitemporal database attributes</span></dd>
209
- <script type="text/javascript">moveProgressBar('30.0');</script>
220
+ <script type="text/javascript">moveProgressBar('34.8');</script>
210
221
  <dd class="spec passed"><span class="passed_spec_name">should not be valid if either of the two time spans are 0 or less</span></dd>
211
222
  </dl>
212
223
  </div>
213
224
  <div class="example_group">
214
225
  <dl>
215
- <dt id="example_group_3">The TimePeriod.find extensions</dt>
216
- <script type="text/javascript">moveProgressBar('32.5');</script>
226
+ <dt id="example_group_4">The TimePeriod.find extensions</dt>
227
+ <script type="text/javascript">moveProgressBar('37.2');</script>
217
228
  <dd class="spec passed"><span class="passed_spec_name">should find time_periods in the present</span></dd>
218
- <script type="text/javascript">moveProgressBar('35.0');</script>
229
+ <script type="text/javascript">moveProgressBar('39.5');</script>
219
230
  <dd class="spec passed"><span class="passed_spec_name">should find time_periods in the past</span></dd>
220
- <script type="text/javascript">moveProgressBar('37.5');</script>
231
+ <script type="text/javascript">moveProgressBar('41.8');</script>
221
232
  <dd class="spec passed"><span class="passed_spec_name">should find time_periods in the future</span></dd>
222
- <script type="text/javascript">moveProgressBar('40.0');</script>
233
+ <script type="text/javascript">moveProgressBar('44.1');</script>
223
234
  <dd class="spec passed"><span class="passed_spec_name">should find time_periods occuring at a specific time</span></dd>
224
- <script type="text/javascript">moveProgressBar('42.5');</script>
235
+ <script type="text/javascript">moveProgressBar('46.5');</script>
225
236
  <dd class="spec passed"><span class="passed_spec_name">should find time_periods occuring within a specific range of time</span></dd>
226
237
  </dl>
227
238
  </div>
228
239
  <div class="example_group">
229
240
  <dl>
230
- <dt id="example_group_4">The TimePeriod comparison helpers</dt>
231
- <script type="text/javascript">moveProgressBar('45.0');</script>
241
+ <dt id="example_group_5">The TimePeriod comparison helpers</dt>
242
+ <script type="text/javascript">moveProgressBar('48.8');</script>
232
243
  <dd class="spec passed"><span class="passed_spec_name">should determine if one time period is before another</span></dd>
233
- <script type="text/javascript">moveProgressBar('47.5');</script>
244
+ <script type="text/javascript">moveProgressBar('51.1');</script>
234
245
  <dd class="spec passed"><span class="passed_spec_name">should determine if one time period is after another</span></dd>
235
- <script type="text/javascript">moveProgressBar('50.0');</script>
246
+ <script type="text/javascript">moveProgressBar('53.4');</script>
236
247
  <dd class="spec passed"><span class="passed_spec_name">should calculate the time between time_periods</span></dd>
237
- <script type="text/javascript">moveProgressBar('52.5');</script>
248
+ <script type="text/javascript">moveProgressBar('55.8');</script>
238
249
  <dd class="spec passed"><span class="passed_spec_name">should determine whether two time_periods overlap</span></dd>
239
- <script type="text/javascript">moveProgressBar('55.0');</script>
250
+ <script type="text/javascript">moveProgressBar('58.1');</script>
240
251
  <dd class="spec passed"><span class="passed_spec_name">should determine the length of time by which two time_periods overlap</span></dd>
241
- <script type="text/javascript">moveProgressBar('57.5');</script>
252
+ <script type="text/javascript">moveProgressBar('60.4');</script>
242
253
  <dd class="spec passed"><span class="passed_spec_name">should determine if two time_periods are back-to-back</span></dd>
243
- <script type="text/javascript">moveProgressBar('60.0');</script>
254
+ <script type="text/javascript">moveProgressBar('62.7');</script>
244
255
  <dd class="spec passed"><span class="passed_spec_name">should determine if a time_period is between two other time_periods</span></dd>
245
256
  </dl>
246
257
  </div>
247
258
  <div class="example_group">
248
259
  <dl>
249
- <dt id="example_group_5">The TimePeriod status helpers</dt>
250
- <script type="text/javascript">moveProgressBar('62.5');</script>
260
+ <dt id="example_group_6">The TimePeriod status helpers</dt>
261
+ <script type="text/javascript">moveProgressBar('65.1');</script>
251
262
  <dd class="spec passed"><span class="passed_spec_name">should determine the length of time until a time_period</span></dd>
252
- <script type="text/javascript">moveProgressBar('65.0');</script>
263
+ <script type="text/javascript">moveProgressBar('67.4');</script>
253
264
  <dd class="spec passed"><span class="passed_spec_name">should determine if a time_period is in the future</span></dd>
254
- <script type="text/javascript">moveProgressBar('67.5');</script>
265
+ <script type="text/javascript">moveProgressBar('69.7');</script>
255
266
  <dd class="spec passed"><span class="passed_spec_name">should determine the length of time since a time_period ended</span></dd>
256
- <script type="text/javascript">moveProgressBar('70.0');</script>
267
+ <script type="text/javascript">moveProgressBar('72.0');</script>
257
268
  <dd class="spec passed"><span class="passed_spec_name">should determine if a time_period is in the past</span></dd>
258
- <script type="text/javascript">moveProgressBar('72.5');</script>
269
+ <script type="text/javascript">moveProgressBar('74.4');</script>
259
270
  <dd class="spec passed"><span class="passed_spec_name">should determine if a time_period has started</span></dd>
260
- <script type="text/javascript">moveProgressBar('75.0');</script>
271
+ <script type="text/javascript">moveProgressBar('76.7');</script>
261
272
  <dd class="spec passed"><span class="passed_spec_name">should determine how much time has elapsed since an event started</span></dd>
262
- <script type="text/javascript">moveProgressBar('77.5');</script>
273
+ <script type="text/javascript">moveProgressBar('79.0');</script>
263
274
  <dd class="spec passed"><span class="passed_spec_name">should determine what percentage of time has elapsed since an event started</span></dd>
264
- <script type="text/javascript">moveProgressBar('80.0');</script>
275
+ <script type="text/javascript">moveProgressBar('81.3');</script>
265
276
  <dd class="spec passed"><span class="passed_spec_name">should determine how much time is remaining until an event ends</span></dd>
266
- <script type="text/javascript">moveProgressBar('82.5');</script>
277
+ <script type="text/javascript">moveProgressBar('83.7');</script>
267
278
  <dd class="spec passed"><span class="passed_spec_name">should determine what percentage of time is remaining until an event ends</span></dd>
268
- <script type="text/javascript">moveProgressBar('85.0');</script>
279
+ <script type="text/javascript">moveProgressBar('86.0');</script>
269
280
  <dd class="spec passed"><span class="passed_spec_name">should determine if a time_period has ended</span></dd>
270
- <script type="text/javascript">moveProgressBar('87.5');</script>
281
+ <script type="text/javascript">moveProgressBar('88.3');</script>
271
282
  <dd class="spec passed"><span class="passed_spec_name">should determine the duration of a time_period</span></dd>
272
283
  </dl>
273
284
  </div>
274
285
  <div class="example_group">
275
286
  <dl>
276
- <dt id="example_group_6">The TimePeriod modification helpers</dt>
277
- <script type="text/javascript">moveProgressBar('90.0');</script>
287
+ <dt id="example_group_7">The TimePeriod modification helpers</dt>
288
+ <script type="text/javascript">moveProgressBar('90.6');</script>
278
289
  <dd class="spec passed"><span class="passed_spec_name">should shift a time_period into the past or future</span></dd>
279
290
  </dl>
280
291
  </div>
281
292
  <div class="example_group">
282
293
  <dl>
283
- <dt id="example_group_7">The Range overlap helpers</dt>
284
- <script type="text/javascript">moveProgressBar('92.5');</script>
294
+ <dt id="example_group_8">The Range overlap helpers</dt>
295
+ <script type="text/javascript">moveProgressBar('93.0');</script>
285
296
  <dd class="spec passed"><span class="passed_spec_name">should determine if two ranges do not overlap</span></dd>
286
- <script type="text/javascript">moveProgressBar('95.0');</script>
297
+ <script type="text/javascript">moveProgressBar('95.3');</script>
287
298
  <dd class="spec passed"><span class="passed_spec_name">should determine if two ranges do overlap</span></dd>
288
299
  </dl>
289
300
  </div>
290
301
  <div class="example_group">
291
302
  <dl>
292
- <dt id="example_group_8">The extensions to</dt>
303
+ <dt id="example_group_9">The extensions to</dt>
293
304
  </dl>
294
305
  </div>
295
306
  <div class="example_group">
296
307
  <dl>
297
- <dt id="example_group_9">The extensions to the Time class</dt>
298
- <script type="text/javascript">moveProgressBar('97.5');</script>
308
+ <dt id="example_group_10">The extensions to the Time class</dt>
309
+ <script type="text/javascript">moveProgressBar('97.6');</script>
299
310
  <dd class="spec passed"><span class="passed_spec_name">should determine if two times are approximately equal (tolerance @ 1 second)</span></dd>
300
311
  <script type="text/javascript">moveProgressBar('100.0');</script>
301
312
  <dd class="spec passed"><span class="passed_spec_name">should determine if two times are approximately equal (tolerance @ 0.1 seconds)</span></dd>
302
313
  </dl>
303
314
  </div>
304
- <script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>0.424051 seconds</strong>";</script>
305
- <script type="text/javascript">document.getElementById('totals').innerHTML = "40 examples, 0 failures";</script>
315
+ <script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>0.391008 seconds</strong>";</script>
316
+ <script type="text/javascript">document.getElementById('totals').innerHTML = "43 examples, 0 failures";</script>
306
317
  </div>
307
318
  </div>
308
319
  </body>
data/spec/spec_helper.rb CHANGED
@@ -21,8 +21,8 @@ ActiveRecord::Base.establish_connection(config['mysql'])
21
21
 
22
22
  load(File.dirname(__FILE__) + "/schema.rb")
23
23
 
24
- $:.unshift(File.dirname(__FILE__) + '/../lib')
25
- require 'acts_as_flux_capacitor'
24
+ #$:.unshift(File.dirname(__FILE__) + '/../lib')
25
+ require 'lib/acts_as_flux_capacitor'
26
26
 
27
27
  class Hash
28
28
 
data/spec/time_helper.rb CHANGED
@@ -52,3 +52,4 @@ class Time
52
52
  end
53
53
  end
54
54
 
55
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_flux_capacitor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.5
4
+ version: 0.6.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Cropcho
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-07-11 00:00:00 -04:00
12
+ date: 2008-07-18 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency