verbs 2.1.3 → 2.1.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.
- checksums.yaml +7 -0
- data/lib/verbs.rb +1 -1
- data/lib/verbs/conjugations.rb +4 -1
- data/lib/verbs/conjugator.rb +2 -0
- data/lib/verbs/verblike.rb +32 -32
- data/lib/verbs/version.rb +3 -3
- data/test/test_verbs.rb +3 -0
- data/verbs.gemspec +24 -24
- metadata +18 -30
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: f0be8c541f264896e8f106be8bd64f97504c6261
|
4
|
+
data.tar.gz: 654aee13d012ace83b367b599edaf43b35a03fb8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4b248c62b8c8b6ce14f144bf1bd719471d09ee0303ca68872e9635ee3e914b624cdb15a4baac647415e5080cc6b015d9174a31b7a2332ebdb1d933ee63711d85
|
7
|
+
data.tar.gz: fdbb938f6809c81ef825d16b9f3ff62bec2740efe75e6629833a58c7fd766df90259c243c37ab9e0a72f0d4d0311a3b50fb6927c5c5c73a27808a13752d1bded
|
data/lib/verbs.rb
CHANGED
@@ -10,7 +10,7 @@ require 'verbs/improper_construction'
|
|
10
10
|
module Verbs
|
11
11
|
CONSONANTS = %w(b c d f g h j k l m n p q r s t v w x z)
|
12
12
|
CONSONANT_PATTERN = "[#{CONSONANTS.join}]"
|
13
|
-
DOUBLED_CONSONANTS = %w(b c d f g h j k l m n p q r s t
|
13
|
+
DOUBLED_CONSONANTS = %w(b c d f g h j k l m n p q r s t z)
|
14
14
|
DOUBLED_CONSONANT_PATTERN = "[#{DOUBLED_CONSONANTS.join}]"
|
15
15
|
VOWELS = %w(a e i o u y)
|
16
16
|
VOWEL_PATTERN = "[#{VOWELS.join}]"
|
data/lib/verbs/conjugations.rb
CHANGED
@@ -128,6 +128,7 @@ Verbs::Conjugator.conjugations do |conjugate|
|
|
128
128
|
conjugate.irregular :put, :put, :put
|
129
129
|
conjugate.irregular :quit, :quit, :quit
|
130
130
|
conjugate.irregular :read, :read, :read
|
131
|
+
conjugate.irregular :reset, :reset, :reset
|
131
132
|
conjugate.irregular :rid, :rid, :rid
|
132
133
|
conjugate.irregular :ride, :rode, :ridden
|
133
134
|
conjugate.irregular :ring, :rang, :rung
|
@@ -198,7 +199,7 @@ Verbs::Conjugator.conjugations do |conjugate|
|
|
198
199
|
conjugate.irregular :upset, :upset, :upset
|
199
200
|
conjugate.irregular :wake, :woke, :woken
|
200
201
|
conjugate.irregular :wear, :wore, :worn
|
201
|
-
conjugate.irregular :weave, :
|
202
|
+
conjugate.irregular :weave, :wove, :woven
|
202
203
|
conjugate.irregular :wed, :wed, :wed
|
203
204
|
conjugate.irregular :weep, :wept, :wept
|
204
205
|
conjugate.irregular :wind, :wound, :wound
|
@@ -250,6 +251,7 @@ Verbs::Conjugator.conjugations do |conjugate|
|
|
250
251
|
conjugate.single_terminal_consonant :cocker
|
251
252
|
conjugate.single_terminal_consonant :coedit
|
252
253
|
conjugate.single_terminal_consonant :cohabit
|
254
|
+
conjugate.single_terminal_consonant :color
|
253
255
|
conjugate.single_terminal_consonant :concenter
|
254
256
|
conjugate.single_terminal_consonant :corner
|
255
257
|
conjugate.single_terminal_consonant :cover
|
@@ -427,6 +429,7 @@ Verbs::Conjugator.conjugations do |conjugate|
|
|
427
429
|
conjugate.single_terminal_consonant :toughen
|
428
430
|
conjugate.single_terminal_consonant :tower
|
429
431
|
conjugate.single_terminal_consonant :transit
|
432
|
+
conjugate.single_terminal_consonant :trigger
|
430
433
|
conjugate.single_terminal_consonant :tucker
|
431
434
|
conjugate.single_terminal_consonant :unburden
|
432
435
|
conjugate.single_terminal_consonant :uncover
|
data/lib/verbs/conjugator.rb
CHANGED
data/lib/verbs/verblike.rb
CHANGED
@@ -1,32 +1,32 @@
|
|
1
|
-
module Verbs
|
2
|
-
module Verblike
|
3
|
-
class Wrapper
|
4
|
-
def initialize(base)
|
5
|
-
@base = base
|
6
|
-
end
|
7
|
-
|
8
|
-
def conjugate(options)
|
9
|
-
words = @base.to_s.split(' ')
|
10
|
-
words.shift if words.first.downcase == 'to'
|
11
|
-
infinitive = words.shift.to_sym
|
12
|
-
conjugation = ::Verbs::Conjugator.conjugate infinitive, options
|
13
|
-
conjugated = words.unshift(conjugation.to_s).join(' ')
|
14
|
-
@base.is_a?(Symbol) ? conjugated.to_sym : conjugated
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
module Access
|
19
|
-
def verb
|
20
|
-
::Verbs::Verblike::Wrapper.new self
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
class String
|
27
|
-
include ::Verbs::Verblike::Access
|
28
|
-
end
|
29
|
-
|
30
|
-
class Symbol
|
31
|
-
include ::Verbs::Verblike::Access
|
32
|
-
end
|
1
|
+
module Verbs
|
2
|
+
module Verblike
|
3
|
+
class Wrapper
|
4
|
+
def initialize(base)
|
5
|
+
@base = base
|
6
|
+
end
|
7
|
+
|
8
|
+
def conjugate(options)
|
9
|
+
words = @base.to_s.split(' ')
|
10
|
+
words.shift if words.first.downcase == 'to'
|
11
|
+
infinitive = words.shift.to_sym
|
12
|
+
conjugation = ::Verbs::Conjugator.conjugate infinitive, options
|
13
|
+
conjugated = words.unshift(conjugation.to_s).join(' ')
|
14
|
+
@base.is_a?(Symbol) ? conjugated.to_sym : conjugated
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
module Access
|
19
|
+
def verb
|
20
|
+
::Verbs::Verblike::Wrapper.new self
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
class String
|
27
|
+
include ::Verbs::Verblike::Access
|
28
|
+
end
|
29
|
+
|
30
|
+
class Symbol
|
31
|
+
include ::Verbs::Verblike::Access
|
32
|
+
end
|
data/lib/verbs/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
module Verbs
|
2
|
-
VERSION = "2.1.
|
3
|
-
end
|
1
|
+
module Verbs
|
2
|
+
VERSION = "2.1.4"
|
3
|
+
end
|
data/test/test_verbs.rb
CHANGED
@@ -53,6 +53,8 @@ class TestVerbs < Test::Unit::TestCase
|
|
53
53
|
end
|
54
54
|
def test_regular_conjugation_with_irregular_terminal_consonant
|
55
55
|
assert_equal 'abandoned', Verbs::Conjugator.conjugate(:abandon, :tense => :past, :person => :first, :plurality => :singular, :aspect => :perfective)
|
56
|
+
assert_equal 'triggered', Verbs::Conjugator.conjugate(:trigger, :tense => :past, :person => :first, :plurality => :singular, :aspect => :perfective)
|
57
|
+
assert_equal 'colored', Verbs::Conjugator.conjugate(:color, :tense => :past, :person => :first, :plurality => :singular, :aspect => :perfective)
|
56
58
|
end
|
57
59
|
def test_regular_conjugation_with_ean_suffix
|
58
60
|
assert_equal 'cleaned', Verbs::Conjugator.conjugate(:clean, :tense => :past, :person => :first, :plurality => :singular, :aspect => :perfective)
|
@@ -76,6 +78,7 @@ class TestVerbs < Test::Unit::TestCase
|
|
76
78
|
end
|
77
79
|
def test_conjugation_with_terminal_sibilance
|
78
80
|
assert_equal 'passes', Verbs::Conjugator.conjugate(:pass, :tense => :present, :person => :third, :plurality => :singular, :aspect => :habitual)
|
81
|
+
assert_equal 'focusses', Verbs::Conjugator.conjugate(:focus, :tense => :present, :person => :third, :plurality => :singular, :aspect => :habitual)
|
79
82
|
assert_equal 'buzzes', Verbs::Conjugator.conjugate(:buzz, :tense => :present, :person => :third, :plurality => :singular, :aspect => :habitual)
|
80
83
|
assert_equal 'coaxes', Verbs::Conjugator.conjugate(:coax, :tense => :present, :person => :third, :plurality => :singular, :aspect => :habitual)
|
81
84
|
assert_equal 'washes', Verbs::Conjugator.conjugate(:wash, :tense => :present, :person => :third, :plurality => :singular, :aspect => :habitual)
|
data/verbs.gemspec
CHANGED
@@ -1,24 +1,24 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
$:.push File.expand_path("../lib", __FILE__)
|
3
|
-
require "verbs/version"
|
4
|
-
|
5
|
-
Gem::Specification.new do |s|
|
6
|
-
s.name = 'verbs'
|
7
|
-
s.version = Verbs::VERSION
|
8
|
-
s.platform = Gem::Platform::RUBY
|
9
|
-
s.authors = ["Andy Rossmeissl"]
|
10
|
-
s.description = %q{Conjugates most common english verbs for all persons, tenses, standard aspects, and modern moods (with active diathesis). Standard and exceptional spelling rules are obeyed.}
|
11
|
-
s.summary = %q{English verb conjugation in Ruby}
|
12
|
-
s.email = %q{andy@rossmeissl.net}
|
13
|
-
s.homepage = %q{http://github.com/rossmeissl/verbs}
|
14
|
-
|
15
|
-
s.files = `git ls-files`.split("\n")
|
16
|
-
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
17
|
-
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
18
|
-
s.require_paths = ["lib"]
|
19
|
-
|
20
|
-
s.add_development_dependency 'bueller'
|
21
|
-
s.add_dependency 'activesupport', '>= 2.3.4'
|
22
|
-
s.add_dependency 'i18n'
|
23
|
-
end
|
24
|
-
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "verbs/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = 'verbs'
|
7
|
+
s.version = Verbs::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["Andy Rossmeissl"]
|
10
|
+
s.description = %q{Conjugates most common english verbs for all persons, tenses, standard aspects, and modern moods (with active diathesis). Standard and exceptional spelling rules are obeyed.}
|
11
|
+
s.summary = %q{English verb conjugation in Ruby}
|
12
|
+
s.email = %q{andy@rossmeissl.net}
|
13
|
+
s.homepage = %q{http://github.com/rossmeissl/verbs}
|
14
|
+
|
15
|
+
s.files = `git ls-files`.split("\n")
|
16
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
17
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
18
|
+
s.require_paths = ["lib"]
|
19
|
+
|
20
|
+
s.add_development_dependency 'bueller'
|
21
|
+
s.add_dependency 'activesupport', '>= 2.3.4'
|
22
|
+
s.add_dependency 'i18n'
|
23
|
+
end
|
24
|
+
|
metadata
CHANGED
@@ -1,62 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: verbs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
5
|
-
prerelease:
|
4
|
+
version: 2.1.4
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Andy Rossmeissl
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-01-15 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: bueller
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: activesupport
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - ">="
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: 2.3.4
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - ">="
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: 2.3.4
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: i18n
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - ">="
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - ">="
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
62
55
|
description: Conjugates most common english verbs for all persons, tenses, standard
|
@@ -67,8 +60,8 @@ executables: []
|
|
67
60
|
extensions: []
|
68
61
|
extra_rdoc_files: []
|
69
62
|
files:
|
70
|
-
- .document
|
71
|
-
- .gitignore
|
63
|
+
- ".document"
|
64
|
+
- ".gitignore"
|
72
65
|
- Gemfile
|
73
66
|
- LICENSE
|
74
67
|
- README.rdoc
|
@@ -86,32 +79,27 @@ files:
|
|
86
79
|
- verbs.gemspec
|
87
80
|
homepage: http://github.com/rossmeissl/verbs
|
88
81
|
licenses: []
|
82
|
+
metadata: {}
|
89
83
|
post_install_message:
|
90
84
|
rdoc_options: []
|
91
85
|
require_paths:
|
92
86
|
- lib
|
93
87
|
required_ruby_version: !ruby/object:Gem::Requirement
|
94
|
-
none: false
|
95
88
|
requirements:
|
96
|
-
- -
|
89
|
+
- - ">="
|
97
90
|
- !ruby/object:Gem::Version
|
98
91
|
version: '0'
|
99
|
-
segments:
|
100
|
-
- 0
|
101
|
-
hash: -427894591
|
102
92
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
|
-
none: false
|
104
93
|
requirements:
|
105
|
-
- -
|
94
|
+
- - ">="
|
106
95
|
- !ruby/object:Gem::Version
|
107
96
|
version: '0'
|
108
|
-
segments:
|
109
|
-
- 0
|
110
|
-
hash: -427894591
|
111
97
|
requirements: []
|
112
98
|
rubyforge_project:
|
113
|
-
rubygems_version:
|
99
|
+
rubygems_version: 2.2.0
|
114
100
|
signing_key:
|
115
|
-
specification_version:
|
101
|
+
specification_version: 4
|
116
102
|
summary: English verb conjugation in Ruby
|
117
|
-
test_files:
|
103
|
+
test_files:
|
104
|
+
- test/helper.rb
|
105
|
+
- test/test_verbs.rb
|