rgviz 0.42 → 0.43

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/rgviz/parser.rb +12 -3
  2. metadata +19 -37
data/lib/rgviz/parser.rb CHANGED
@@ -363,15 +363,15 @@ module Rgviz
363
363
  when Token::Date
364
364
  next_token
365
365
  check Token::STRING
366
- return value_column(DateColumn.new(Date.parse(@token.string)))
366
+ return value_column(DateColumn.new(parse_date(@token.string)))
367
367
  when Token::DateTime
368
368
  next_token
369
369
  check Token::STRING
370
- return value_column(DateTimeColumn.new(Time.parse(@token.string)))
370
+ return value_column(DateTimeColumn.new(parse_time(@token.string)))
371
371
  when Token::TimeOfDay
372
372
  next_token
373
373
  check Token::STRING
374
- return value_column(TimeOfDayColumn.new(Time.parse(@token.string)))
374
+ return value_column(TimeOfDayColumn.new(parse_time(@token.string)))
375
375
  when Token::Avg, Token::Count, Token::Min, Token::Max, Token::Sum
376
376
  function = @token.value
377
377
  string = @token.string
@@ -428,5 +428,14 @@ module Rgviz
428
428
  check *token_values
429
429
  next_token
430
430
  end
431
+
432
+ protected
433
+ def parse_date(date_string)
434
+ Date.parse(date_string)
435
+ end
436
+
437
+ def parse_time(time_string)
438
+ Time.parse(time_string)
439
+ end
431
440
  end
432
441
  end
metadata CHANGED
@@ -1,31 +1,22 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rgviz
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 42
8
- version: "0.42"
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.43'
5
+ prerelease:
9
6
  platform: ruby
10
- authors:
7
+ authors:
11
8
  - Ary Borenszweig
12
9
  autorequire:
13
10
  bindir: bin
14
11
  cert_chain: []
15
-
16
- date: 2010-06-08 00:00:00 -03:00
17
- default_executable:
12
+ date: 2010-06-08 00:00:00.000000000Z
18
13
  dependencies: []
19
-
20
14
  description: Google Visualization API Query Language written in Ruby.
21
15
  email: aborenszweig@manas.com.ar
22
16
  executables: []
23
-
24
17
  extensions: []
25
-
26
18
  extra_rdoc_files: []
27
-
28
- files:
19
+ files:
29
20
  - lib/rgviz.rb
30
21
  - lib/rgviz/csv_renderer.rb
31
22
  - lib/rgviz/html_renderer.rb
@@ -38,37 +29,28 @@ files:
38
29
  - lib/rgviz/table.rb
39
30
  - spec/rgviz/lexer_spec.rb
40
31
  - spec/rgviz/parser_spec.rb
41
- has_rdoc: true
42
32
  homepage: http://code.google.com/p/rgviz
43
33
  licenses: []
44
-
45
34
  post_install_message:
46
35
  rdoc_options: []
47
-
48
- require_paths:
36
+ require_paths:
49
37
  - lib
50
- required_ruby_version: !ruby/object:Gem::Requirement
38
+ required_ruby_version: !ruby/object:Gem::Requirement
51
39
  none: false
52
- requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- segments:
56
- - 0
57
- version: "0"
58
- required_rubygems_version: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
45
  none: false
60
- requirements:
61
- - - ">="
62
- - !ruby/object:Gem::Version
63
- segments:
64
- - 0
65
- version: "0"
46
+ requirements:
47
+ - - ! '>='
48
+ - !ruby/object:Gem::Version
49
+ version: '0'
66
50
  requirements: []
67
-
68
51
  rubyforge_project:
69
- rubygems_version: 1.3.7
52
+ rubygems_version: 1.8.10
70
53
  signing_key:
71
54
  specification_version: 3
72
55
  summary: Google Visualization API Query Language written in Ruby.
73
56
  test_files: []
74
-