verbs 1.0.3 → 1.0.4

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/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.3
1
+ 1.0.4
@@ -15,6 +15,21 @@ Verbs::Conjugator.conjugations do |conjugate|
15
15
  verb.form :been, :tense => :past, :derivative => :participle
16
16
  end
17
17
 
18
+ conjugate.irregular :have do |verb|
19
+ verb.form :have, :tense => :present, :person => :first, :plurality => :singular
20
+ verb.form :has, :tense => :present, :person => :third, :plurality => :singular
21
+ verb.form :have, :tense => :present, :person => :second, :plurality => :singular
22
+ verb.form :have, :tense => :present, :person => :first, :plurality => :plural
23
+ verb.form :have, :tense => :present, :person => :third, :plurality => :plural
24
+ verb.form :had, :tense => :past, :person => :first, :plurality => :singular
25
+ verb.form :had, :tense => :past, :person => :third, :plurality => :singular
26
+ verb.form :had, :tense => :past, :person => :second, :plurality => :singular
27
+ verb.form :had, :tense => :past, :person => :first, :plurality => :plural
28
+ verb.form :had, :tense => :past, :person => :third, :plurality => :plural
29
+ verb.form :having, :tense => :present, :derivative => :participle
30
+ verb.form :had, :tense => :past, :derivative => :participle
31
+ end
32
+
18
33
  # http://cpansearch.perl.org/src/RWG/Lingua-EN-Conjugate-0.308/lib/Lingua/EN/Conjugate.pm
19
34
  conjugate.irregular :awake, :awoke, :awoken
20
35
  conjugate.irregular :bear, :bore, :born
@@ -76,7 +91,6 @@ Verbs::Conjugator.conjugations do |conjugate|
76
91
  conjugate.irregular :grind, :ground, :ground
77
92
  conjugate.irregular :grow, :grew, :grown
78
93
  conjugate.irregular :hang, :hung, :hung
79
- conjugate.irregular :have, :had, :had
80
94
  conjugate.irregular :hear, :heard, :heard
81
95
  conjugate.irregular :hide, :hid, :hidden
82
96
  conjugate.irregular :hit, :hit, :hit
@@ -35,11 +35,12 @@ module Verbs
35
35
  end
36
36
 
37
37
  def conjugate(infinitive, options = {})
38
- tense = options[:tense] || :present
39
- person = options[:person] || :third
40
- plurality = options[:plurality] || :singular
41
- diathesis = options[:diathesis] || :active
42
- mood = options[:mood] || :indicative
38
+ tense = options[:tense] || :present # present, past, future
39
+ person = options[:person] || :third # first, second, third
40
+ plurality = options[:plurality] || :singular # singular, plural
41
+ diathesis = options[:diathesis] || :active # active, passive
42
+ mood = options[:mood] || :indicative # conditional, imperative, indicative, injunctive, optative, potential, subjunctive
43
+ aspect = options[:aspect] || :habitual # perfective, habitual, progressive, perfect, prospective
43
44
 
44
45
  if verb = conjugations.irregulars[infinitive]
45
46
  verb[options] || conjugate_irregular(verb, options)
data/test/test_verbs.rb CHANGED
@@ -24,6 +24,7 @@ class TestVerbs < Test::Unit::TestCase
24
24
  assert_equal :broke, Verbs::Conjugator.conjugate(:break, :tense => :past, :person => :first, :plurality => :singular)
25
25
  assert_equal :broke, Verbs::Conjugator.conjugate(:break, :tense => :past, :person => :first, :plurality => :singular)
26
26
  assert_equal :broke, Verbs::Conjugator.conjugate(:break, :tense => :past, :person => :first, :plurality => :singular)
27
+ assert_equal :has, Verbs::Conjugator.conjugate(:have, :tense => :present, :person => :third, :plurality => :singular)
27
28
  end
28
29
  def test_irregular_conjugation_with_terminal_y
29
30
  assert_equal :flies, Verbs::Conjugator.conjugate(:fly, :tense => :present, :person => :third, :plurality => :singular)
data/verbs.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{verbs}
8
- s.version = "1.0.3"
8
+ s.version = "1.0.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Andy Rossmeissl"]
12
- s.date = %q{2009-11-25}
12
+ s.date = %q{2009-12-03}
13
13
  s.description = %q{Conjugates most common english verbs for all persons in present and past tense (active diathesis, indicative mood). Standard and exceptional spelling rules are obeyed.}
14
14
  s.email = %q{andy@rossmeissl.net}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: verbs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Rossmeissl
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-25 00:00:00 -05:00
12
+ date: 2009-12-03 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies: []
15
15