eventual 0.4.9 → 0.5.0

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.
data/spec/spec.opts ADDED
@@ -0,0 +1 @@
1
+ --color
data/spec/spec_helper.rb CHANGED
@@ -1,26 +1,29 @@
1
+ $LOAD_PATH.unshift File.dirname(__FILE__)
2
+ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
3
+
1
4
  require 'rubygems'
2
5
  require 'spec'
3
-
4
- require File.dirname(__FILE__) + '/../lib/eventual'
5
-
6
+ require 'spec/autorun'
7
+ require 'date/performance'
6
8
 
7
9
  class MapDates
10
+ def description
11
+ "map times"
12
+ end
13
+
8
14
  def initialize expected, klass
9
- @expected = expected.collect do |d|
10
- d = d.is_a?(String) ? klass.parse(d) : d
11
- d.to_s
12
- end.sort
15
+ @klass = klass
16
+ @expected = expected.map(&:to_s).sort
13
17
  end
14
18
 
15
19
  def matches? actual
16
- @actual = actual.collect{ |d| d.to_s }
20
+ @actual = actual.map{ |d| d.to_s }
17
21
  @actual == @expected
18
22
  end
19
23
 
20
24
  def failure_message
21
25
  "expected #{ @expected.inspect }, got #{ @actual.inspect }"
22
26
  end
23
-
24
27
  end
25
28
 
26
29
  def map_times *times
@@ -29,5 +32,4 @@ end
29
32
 
30
33
  def map_dates *times
31
34
  MapDates.new times, Date
32
- end
33
-
35
+ end
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eventual
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.9
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 5
8
+ - 0
9
+ version: 0.5.0
5
10
  platform: ruby
6
11
  authors:
7
12
  - Macario Ortega
@@ -9,70 +14,79 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2009-11-10 00:00:00 -06:00
17
+ date: 2010-07-15 00:00:00 -05:00
13
18
  default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
- name: hoe
17
- type: :development
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
21
+ name: rspec
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
20
24
  requirements:
21
25
  - - ">="
22
26
  - !ruby/object:Gem::Version
23
- version: 1.8.0
24
- version:
25
- description: ""
26
- email:
27
- - macarui@gmail.com
27
+ segments:
28
+ - 1
29
+ - 2
30
+ - 9
31
+ version: 1.2.9
32
+ type: :development
33
+ version_requirements: *id001
34
+ description: " Reconocimiento de eventos y periodos de tiempo en lengua natural. Natural date event parsing in spanish so far. "
35
+ email: macarui@gmail.com
28
36
  executables: []
29
37
 
30
38
  extensions: []
31
39
 
32
40
  extra_rdoc_files:
33
- - History.txt
34
- - Manifest.txt
41
+ - LICENSE
35
42
  - README.rdoc
36
43
  files:
37
- - History.txt
38
- - Manifest.txt
44
+ - .document
45
+ - .gitignore
46
+ - LICENSE
39
47
  - README.rdoc
40
48
  - Rakefile
49
+ - VERSION
41
50
  - lib/eventual.rb
42
- - lib/eventual/date.rb
43
- - lib/eventual/date_time.rb
44
- - spec/date_time_spec.rb
51
+ - lib/eventual/es.rb
52
+ - lib/eventual/es/event_parser.treetop
53
+ - lib/eventual/syntax_nodes.rb
45
54
  - spec/es_eventual_spec.rb
55
+ - spec/spec.opts
46
56
  - spec/spec_helper.rb
47
- - eventual.gemspec
48
57
  has_rdoc: true
49
58
  homepage: http://github.com/maca/eventual
50
59
  licenses: []
51
60
 
52
- post_install_message:
61
+ post_install_message: " \n\n\
62
+ ***********************************\n\
63
+ Por favor tenga en cuenta que el API ha cambiado, consulte la p\xC3\xA1gina del proyecto: http://github.com/maca/eventual. English implementation is due.\n\
64
+ ***********************************\n\n "
53
65
  rdoc_options:
54
- - --main
55
- - README.rdoc
66
+ - --charset=UTF-8
56
67
  require_paths:
57
68
  - lib
58
69
  required_ruby_version: !ruby/object:Gem::Requirement
59
70
  requirements:
60
71
  - - ">="
61
72
  - !ruby/object:Gem::Version
73
+ segments:
74
+ - 0
62
75
  version: "0"
63
- version:
64
76
  required_rubygems_version: !ruby/object:Gem::Requirement
65
77
  requirements:
66
78
  - - ">="
67
79
  - !ruby/object:Gem::Version
80
+ segments:
81
+ - 0
68
82
  version: "0"
69
- version:
70
83
  requirements: []
71
84
 
72
- rubyforge_project: eventual
73
- rubygems_version: 1.3.5
85
+ rubyforge_project:
86
+ rubygems_version: 1.3.6
74
87
  signing_key:
75
88
  specification_version: 3
76
- summary: ""
77
- test_files: []
78
-
89
+ summary: Reconocimiento de eventos y periodos de tiempo en lengua natural. Natural date event parsing in spanish so far.
90
+ test_files:
91
+ - spec/es_eventual_spec.rb
92
+ - spec/spec_helper.rb
data/History.txt DELETED
@@ -1,6 +0,0 @@
1
- == 0.4.9 2009-11-10
2
-
3
- * Nuevos formatos reconocidos:
4
-
5
-
6
-
data/Manifest.txt DELETED
@@ -1,11 +0,0 @@
1
- History.txt
2
- Manifest.txt
3
- README.rdoc
4
- Rakefile
5
- lib/eventual.rb
6
- lib/eventual/date.rb
7
- lib/eventual/date_time.rb
8
- spec/date_time_spec.rb
9
- spec/es_eventual_spec.rb
10
- spec/spec_helper.rb
11
- eventual.gemspec
data/eventual.gemspec DELETED
@@ -1,33 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
-
3
- Gem::Specification.new do |s|
4
- s.name = %q{eventual}
5
- s.version = "0.4.9"
6
-
7
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
- s.authors = ["Macario Ortega"]
9
- s.date = %q{2009-11-10}
10
- s.description = %q{}
11
- s.email = ["macarui@gmail.com"]
12
- s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.rdoc"]
13
- s.files = ["History.txt", "Manifest.txt", "README.rdoc", "Rakefile", "lib/eventual.rb", "lib/eventual/date.rb", "lib/eventual/date_time.rb", "spec/date_time_spec.rb", "spec/es_eventual_spec.rb", "spec/spec_helper.rb", "eventual.gemspec"]
14
- s.homepage = %q{http://github.com/maca/eventual}
15
- s.rdoc_options = ["--main", "README.rdoc"]
16
- s.require_paths = ["lib"]
17
- s.rubyforge_project = %q{eventual}
18
- s.rubygems_version = %q{1.3.5}
19
- s.summary = %q{}
20
-
21
- if s.respond_to? :specification_version then
22
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
23
- s.specification_version = 3
24
-
25
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
26
- s.add_development_dependency(%q<hoe>, [">= 1.8.0"])
27
- else
28
- s.add_dependency(%q<hoe>, [">= 1.8.0"])
29
- end
30
- else
31
- s.add_dependency(%q<hoe>, [">= 1.8.0"])
32
- end
33
- end
data/lib/eventual/date.rb DELETED
@@ -1 +0,0 @@
1
- Date.send :extend, Eventual
@@ -1 +0,0 @@
1
- DateTime.send :extend, Eventual
@@ -1,15 +0,0 @@
1
- require File.expand_path( File.dirname(__FILE__) + '/spec_helper' )
2
- require File.dirname(__FILE__) + '/../lib/eventual/date_time'
3
- require File.dirname(__FILE__) + '/../lib/eventual/date'
4
-
5
-
6
- describe 'Monkeypatches' do
7
- it 'should monkey patch DateTime' do
8
- DateTime.event_parse( '1 de enero del 2009 a las 16:00' ).should map_times( '2009-1-1T16:00:00+00:00' )
9
- end
10
-
11
- it 'should monkey patch Date' do
12
- Date.event_parse( '1 de enero del 2009 a las 16:00 horas' ).should map_dates( '2009-1-1' )
13
- end
14
- end
15
-