geoptima 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
data/lib/geoptima/data.rb CHANGED
@@ -226,10 +226,12 @@ module Geoptima
226
226
  @first = nil
227
227
  @last = nil
228
228
  events_data.each do |event_type,data|
229
- @first ||= data[0]
230
- @last ||= data[-1]
231
- @first = data[0] if(@first && @first.time > data[0].time)
232
- @last = data[-1] if(@last && @last.time < data[-1].time)
229
+ if data.length > 1
230
+ @first ||= data[0]
231
+ @last ||= data[-1]
232
+ @first = data[0] if(@first && @first.time > data[0].time)
233
+ @last = data[-1] if(@last && @last.time < data[-1].time)
234
+ end
233
235
  end
234
236
  if $debug
235
237
  puts "For data: #{self}"
@@ -1,6 +1,6 @@
1
1
  module Geoptima
2
2
 
3
- VERSION = "0.1.7"
3
+ VERSION = "0.1.8"
4
4
 
5
5
  class Version
6
6
  attr_reader :comparator, :version, :major, :minor, :patch
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geoptima
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 7
10
- version: 0.1.7
9
+ - 8
10
+ version: 0.1.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Craig Taverner