lokap-verbs 3.1.1
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/.document +5 -0
- data/.github/workflows/ruby.yml +33 -0
- data/.gitignore +28 -0
- data/.rubocop.yml +21 -0
- data/.rubocop_todo.yml +55 -0
- data/CHANGELOG.md +161 -0
- data/Gemfile +5 -0
- data/LICENSE +20 -0
- data/README.md +87 -0
- data/Rakefile +27 -0
- data/bin/console +15 -0
- data/lib/verbs/conjugations.rb +625 -0
- data/lib/verbs/conjugator.rb +360 -0
- data/lib/verbs/improper_construction.rb +6 -0
- data/lib/verbs/verb.rb +51 -0
- data/lib/verbs/verblike.rb +34 -0
- data/lib/verbs/version.rb +5 -0
- data/lib/verbs.rb +24 -0
- data/tasks/release.rake +8 -0
- data/test/helper.rb +8 -0
- data/test/test_verbs.rb +420 -0
- data/verbs.gemspec +27 -0
- metadata +137 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 79d484a707e3bbe62448ad517df4659e4ed4099b3c2720c885889263bc5824c6
|
|
4
|
+
data.tar.gz: 4397c780fa873ee4afe93e222d28e12962c22edbd6ea308dce4114efdee2be70
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 23cab2ab7b2e80c2b8c99c24f680e6237d07616e6afa5d90f7bc3746079d57f51968a0b627751793cd9f3992d3690b412525c26e347a7e32f69f215148f2e7c1
|
|
7
|
+
data.tar.gz: f12684660ec7e0dd4ed303aa0816ccf658602995612b0d2f595875de1da7d8aa0d0c2b11f9213a850939d4a9d36f35b6412f57c5fb3b728fe4fe476a4d1d8408
|
data/.document
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
|
2
|
+
# They are provided by a third-party and are governed by
|
|
3
|
+
# separate terms of service, privacy policy, and support
|
|
4
|
+
# documentation.
|
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
|
7
|
+
|
|
8
|
+
name: Ruby
|
|
9
|
+
|
|
10
|
+
on:
|
|
11
|
+
push:
|
|
12
|
+
branches: [ master ]
|
|
13
|
+
pull_request:
|
|
14
|
+
branches: [ master ]
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
test:
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
strategy:
|
|
20
|
+
matrix:
|
|
21
|
+
ruby: ['2.4', '2.5', '2.6', '2.7']
|
|
22
|
+
name: Run tests on Ruby ${{ matrix.ruby }}
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v2
|
|
25
|
+
- uses: ruby/setup-ruby@v1
|
|
26
|
+
with:
|
|
27
|
+
ruby-version: ${{ matrix.ruby }}
|
|
28
|
+
- name: Install dependencies
|
|
29
|
+
run: gem install bundler && bundle install
|
|
30
|
+
- name: Run rubocop
|
|
31
|
+
run: bundle exec rubocop
|
|
32
|
+
- name: Run tests
|
|
33
|
+
run: bundle exec rake
|
data/.gitignore
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
## MAC OS
|
|
2
|
+
.DS_Store
|
|
3
|
+
|
|
4
|
+
## TEXTMATE
|
|
5
|
+
*.tmproj
|
|
6
|
+
tmtags
|
|
7
|
+
|
|
8
|
+
## EMACS
|
|
9
|
+
*~
|
|
10
|
+
\#*
|
|
11
|
+
.\#*
|
|
12
|
+
|
|
13
|
+
## VIM
|
|
14
|
+
*.swp
|
|
15
|
+
|
|
16
|
+
## TAGS
|
|
17
|
+
tags
|
|
18
|
+
|
|
19
|
+
## PROJECT::GENERAL
|
|
20
|
+
coverage
|
|
21
|
+
rdoc
|
|
22
|
+
pkg
|
|
23
|
+
vendor
|
|
24
|
+
.bundle
|
|
25
|
+
|
|
26
|
+
## PROJECT::SPECIFIC
|
|
27
|
+
Gemfile.lock
|
|
28
|
+
*.gem
|
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
|
2
|
+
|
|
3
|
+
AllCops:
|
|
4
|
+
NewCops: enable
|
|
5
|
+
|
|
6
|
+
Metrics/BlockLength:
|
|
7
|
+
Exclude:
|
|
8
|
+
- 'test/**/*'
|
|
9
|
+
- 'lib/verbs/conjugations.rb'
|
|
10
|
+
|
|
11
|
+
Metrics/ClassLength:
|
|
12
|
+
Exclude:
|
|
13
|
+
- 'test/**/*'
|
|
14
|
+
|
|
15
|
+
Metrics/ModuleLength:
|
|
16
|
+
Exclude:
|
|
17
|
+
- 'lib/verbs/conjugator.rb'
|
|
18
|
+
|
|
19
|
+
Metrics/ParameterLists:
|
|
20
|
+
Exclude:
|
|
21
|
+
- 'lib/verbs/conjugator.rb'
|
data/.rubocop_todo.yml
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# This configuration was generated by
|
|
2
|
+
# `rubocop --auto-gen-config`
|
|
3
|
+
# on 2020-12-16 16:06:51 UTC using RuboCop version 1.6.1.
|
|
4
|
+
# The point is for the user to remove these configuration records
|
|
5
|
+
# one by one as the offenses are removed from the code base.
|
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
|
8
|
+
|
|
9
|
+
# Offense count: 11
|
|
10
|
+
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
|
|
11
|
+
Metrics/AbcSize:
|
|
12
|
+
Max: 58
|
|
13
|
+
|
|
14
|
+
# Offense count: 6
|
|
15
|
+
# Configuration parameters: IgnoredMethods.
|
|
16
|
+
Metrics/CyclomaticComplexity:
|
|
17
|
+
Max: 27
|
|
18
|
+
|
|
19
|
+
# Offense count: 16
|
|
20
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
|
21
|
+
Metrics/MethodLength:
|
|
22
|
+
Max: 58
|
|
23
|
+
|
|
24
|
+
# Offense count: 6
|
|
25
|
+
# Configuration parameters: IgnoredMethods.
|
|
26
|
+
Metrics/PerceivedComplexity:
|
|
27
|
+
Max: 28
|
|
28
|
+
|
|
29
|
+
# Offense count: 4
|
|
30
|
+
Style/Documentation:
|
|
31
|
+
Exclude:
|
|
32
|
+
- 'spec/**/*'
|
|
33
|
+
- 'test/**/*'
|
|
34
|
+
- 'lib/verbs/conjugator.rb'
|
|
35
|
+
- 'lib/verbs/verb.rb'
|
|
36
|
+
- 'lib/verbs/verblike.rb'
|
|
37
|
+
|
|
38
|
+
# Offense count: 1
|
|
39
|
+
# Configuration parameters: MinBodyLength.
|
|
40
|
+
Style/GuardClause:
|
|
41
|
+
Exclude:
|
|
42
|
+
- 'lib/verbs/conjugator.rb'
|
|
43
|
+
|
|
44
|
+
# Offense count: 2
|
|
45
|
+
# Cop supports --auto-correct.
|
|
46
|
+
Style/IfUnlessModifier:
|
|
47
|
+
Exclude:
|
|
48
|
+
- 'lib/verbs/conjugator.rb'
|
|
49
|
+
|
|
50
|
+
# Offense count: 10
|
|
51
|
+
# Cop supports --auto-correct.
|
|
52
|
+
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
|
53
|
+
# URISchemes: http, https
|
|
54
|
+
Layout/LineLength:
|
|
55
|
+
Max: 193
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [Unreleased](https://github.com/rossmeissl/verbs/tree/HEAD)
|
|
4
|
+
|
|
5
|
+
[Full Changelog](https://github.com/rossmeissl/verbs/compare/v2.1.4...HEAD)
|
|
6
|
+
|
|
7
|
+
**Closed issues:**
|
|
8
|
+
|
|
9
|
+
- Add matrix testing for supported Rubies [\#46](https://github.com/rossmeissl/verbs/issues/46)
|
|
10
|
+
- Add missing irregular verbs [\#39](https://github.com/rossmeissl/verbs/issues/39)
|
|
11
|
+
- Apply rubocop and maybe use markdown in readme? [\#37](https://github.com/rossmeissl/verbs/issues/37)
|
|
12
|
+
- Invalid conjugation of the word "deliver" [\#33](https://github.com/rossmeissl/verbs/issues/33)
|
|
13
|
+
- rubygems not up to date with github version [\#32](https://github.com/rossmeissl/verbs/issues/32)
|
|
14
|
+
- Issue with the word follow [\#30](https://github.com/rossmeissl/verbs/issues/30)
|
|
15
|
+
- have/be missing in second person plural [\#28](https://github.com/rossmeissl/verbs/issues/28)
|
|
16
|
+
- bing -\> being [\#24](https://github.com/rossmeissl/verbs/issues/24)
|
|
17
|
+
- Past habitual for "to be" [\#22](https://github.com/rossmeissl/verbs/issues/22)
|
|
18
|
+
- No options for passive voice [\#21](https://github.com/rossmeissl/verbs/issues/21)
|
|
19
|
+
- Input is mutated [\#17](https://github.com/rossmeissl/verbs/issues/17)
|
|
20
|
+
- `"Be Near".verb.conjugate(subject: "Girl")` results in "Girl Bes Near" [\#16](https://github.com/rossmeissl/verbs/issues/16)
|
|
21
|
+
- Make the default aspect "Perfective" [\#15](https://github.com/rossmeissl/verbs/issues/15)
|
|
22
|
+
- Past progressive of "be" incorrect [\#14](https://github.com/rossmeissl/verbs/issues/14)
|
|
23
|
+
|
|
24
|
+
**Merged pull requests:**
|
|
25
|
+
|
|
26
|
+
- Setup ruby matrix testing [\#51](https://github.com/rossmeissl/verbs/pull/51) ([nerixim](https://github.com/nerixim))
|
|
27
|
+
- Add more irregular verbs [\#47](https://github.com/rossmeissl/verbs/pull/47) ([nerixim](https://github.com/nerixim))
|
|
28
|
+
- Use case statement to match regex patterns concisely [\#45](https://github.com/rossmeissl/verbs/pull/45) ([nerixim](https://github.com/nerixim))
|
|
29
|
+
- Use md and rubocop [\#41](https://github.com/rossmeissl/verbs/pull/41) ([nerixim](https://github.com/nerixim))
|
|
30
|
+
- Change default aspect for past tense [\#38](https://github.com/rossmeissl/verbs/pull/38) ([nerixim](https://github.com/nerixim))
|
|
31
|
+
- Downcase infinitive before conjugation [\#36](https://github.com/rossmeissl/verbs/pull/36) ([nerixim](https://github.com/nerixim))
|
|
32
|
+
- Add passive voice \(rebase\) [\#35](https://github.com/rossmeissl/verbs/pull/35) ([nerixim](https://github.com/nerixim))
|
|
33
|
+
- Fix conjugation of the word "deliver" [\#34](https://github.com/rossmeissl/verbs/pull/34) ([pienkowb](https://github.com/pienkowb))
|
|
34
|
+
- Prevent double terminal consonant on follow [\#31](https://github.com/rossmeissl/verbs/pull/31) ([michaeldever](https://github.com/michaeldever))
|
|
35
|
+
- Fix second person plural [\#29](https://github.com/rossmeissl/verbs/pull/29) ([jeidsath](https://github.com/jeidsath))
|
|
36
|
+
- Fix past habitual. Change usually -\> used to + infinitive [\#26](https://github.com/rossmeissl/verbs/pull/26) ([jeidsath](https://github.com/jeidsath))
|
|
37
|
+
- Fix present\_participle for "be" [\#25](https://github.com/rossmeissl/verbs/pull/25) ([jeidsath](https://github.com/jeidsath))
|
|
38
|
+
- RDoc Standard Applied [\#19](https://github.com/rossmeissl/verbs/pull/19) ([kippmr](https://github.com/kippmr))
|
|
39
|
+
- Input immutability [\#18](https://github.com/rossmeissl/verbs/pull/18) ([dwbutler](https://github.com/dwbutler))
|
|
40
|
+
|
|
41
|
+
## [v2.1.4](https://github.com/rossmeissl/verbs/tree/v2.1.4) (2014-01-15)
|
|
42
|
+
|
|
43
|
+
[Full Changelog](https://github.com/rossmeissl/verbs/compare/v2.1.3...v2.1.4)
|
|
44
|
+
|
|
45
|
+
**Closed issues:**
|
|
46
|
+
|
|
47
|
+
- 'color' is not conjugated correctly [\#11](https://github.com/rossmeissl/verbs/issues/11)
|
|
48
|
+
- Wrong conjugation for verb which ends with vowel [\#5](https://github.com/rossmeissl/verbs/issues/5)
|
|
49
|
+
|
|
50
|
+
**Merged pull requests:**
|
|
51
|
+
|
|
52
|
+
- fix [\#11](https://github.com/rossmeissl/verbs/issues/11) (with bonus fix) [\#12](https://github.com/rossmeissl/verbs/pull/12) ([danryan](https://github.com/danryan))
|
|
53
|
+
- Fix the third personal singular s form. [\#10](https://github.com/rossmeissl/verbs/pull/10) ([xuhdev](https://github.com/xuhdev))
|
|
54
|
+
- Add "reset" to the irregular conjugation list. [\#9](https://github.com/rossmeissl/verbs/pull/9) ([xuhdev](https://github.com/xuhdev))
|
|
55
|
+
- Use the more common form of the tense of "weave" [\#8](https://github.com/rossmeissl/verbs/pull/8) ([xuhdev](https://github.com/xuhdev))
|
|
56
|
+
- w in double\_consonants causing trouble removed [\#7](https://github.com/rossmeissl/verbs/pull/7) ([hugolepetit](https://github.com/hugolepetit))
|
|
57
|
+
|
|
58
|
+
## [v2.1.3](https://github.com/rossmeissl/verbs/tree/v2.1.3) (2013-01-07)
|
|
59
|
+
|
|
60
|
+
[Full Changelog](https://github.com/rossmeissl/verbs/compare/v2.1.2...v2.1.3)
|
|
61
|
+
|
|
62
|
+
**Merged pull requests:**
|
|
63
|
+
|
|
64
|
+
- FIX conjugation of s\_form \(do =\> does\) [\#6](https://github.com/rossmeissl/verbs/pull/6) ([makaroni4](https://github.com/makaroni4))
|
|
65
|
+
|
|
66
|
+
## [v2.1.2](https://github.com/rossmeissl/verbs/tree/v2.1.2) (2012-10-18)
|
|
67
|
+
|
|
68
|
+
[Full Changelog](https://github.com/rossmeissl/verbs/compare/v2.1.1...v2.1.2)
|
|
69
|
+
|
|
70
|
+
**Closed issues:**
|
|
71
|
+
|
|
72
|
+
- Irregular verbs \(know\) [\#4](https://github.com/rossmeissl/verbs/issues/4)
|
|
73
|
+
- Progressive form of verb ending in the letter "e" [\#3](https://github.com/rossmeissl/verbs/issues/3)
|
|
74
|
+
|
|
75
|
+
## [v2.1.1](https://github.com/rossmeissl/verbs/tree/v2.1.1) (2012-10-18)
|
|
76
|
+
|
|
77
|
+
[Full Changelog](https://github.com/rossmeissl/verbs/compare/v2.1.0...v2.1.1)
|
|
78
|
+
|
|
79
|
+
## [v2.1.0](https://github.com/rossmeissl/verbs/tree/v2.1.0) (2011-08-09)
|
|
80
|
+
|
|
81
|
+
[Full Changelog](https://github.com/rossmeissl/verbs/compare/v2.0.10...v2.1.0)
|
|
82
|
+
|
|
83
|
+
**Closed issues:**
|
|
84
|
+
|
|
85
|
+
- Moods [\#1](https://github.com/rossmeissl/verbs/issues/1)
|
|
86
|
+
|
|
87
|
+
## [v2.0.10](https://github.com/rossmeissl/verbs/tree/v2.0.10) (2011-06-09)
|
|
88
|
+
|
|
89
|
+
[Full Changelog](https://github.com/rossmeissl/verbs/compare/v2.0.9...v2.0.10)
|
|
90
|
+
|
|
91
|
+
## [v2.0.9](https://github.com/rossmeissl/verbs/tree/v2.0.9) (2010-08-10)
|
|
92
|
+
|
|
93
|
+
[Full Changelog](https://github.com/rossmeissl/verbs/compare/v2.0.7...v2.0.9)
|
|
94
|
+
|
|
95
|
+
## [v2.0.7](https://github.com/rossmeissl/verbs/tree/v2.0.7) (2010-03-30)
|
|
96
|
+
|
|
97
|
+
[Full Changelog](https://github.com/rossmeissl/verbs/compare/v2.0.6...v2.0.7)
|
|
98
|
+
|
|
99
|
+
## [v2.0.6](https://github.com/rossmeissl/verbs/tree/v2.0.6) (2010-03-30)
|
|
100
|
+
|
|
101
|
+
[Full Changelog](https://github.com/rossmeissl/verbs/compare/v2.0.8...v2.0.6)
|
|
102
|
+
|
|
103
|
+
## [v2.0.8](https://github.com/rossmeissl/verbs/tree/v2.0.8) (2010-03-29)
|
|
104
|
+
|
|
105
|
+
[Full Changelog](https://github.com/rossmeissl/verbs/compare/v2.0.5...v2.0.8)
|
|
106
|
+
|
|
107
|
+
## [v2.0.5](https://github.com/rossmeissl/verbs/tree/v2.0.5) (2009-12-10)
|
|
108
|
+
|
|
109
|
+
[Full Changelog](https://github.com/rossmeissl/verbs/compare/v2.0.4...v2.0.5)
|
|
110
|
+
|
|
111
|
+
## [v2.0.4](https://github.com/rossmeissl/verbs/tree/v2.0.4) (2009-12-10)
|
|
112
|
+
|
|
113
|
+
[Full Changelog](https://github.com/rossmeissl/verbs/compare/v2.0.3...v2.0.4)
|
|
114
|
+
|
|
115
|
+
## [v2.0.3](https://github.com/rossmeissl/verbs/tree/v2.0.3) (2009-12-10)
|
|
116
|
+
|
|
117
|
+
[Full Changelog](https://github.com/rossmeissl/verbs/compare/v2.0.1...v2.0.3)
|
|
118
|
+
|
|
119
|
+
## [v2.0.1](https://github.com/rossmeissl/verbs/tree/v2.0.1) (2009-12-09)
|
|
120
|
+
|
|
121
|
+
[Full Changelog](https://github.com/rossmeissl/verbs/compare/v2.0.0...v2.0.1)
|
|
122
|
+
|
|
123
|
+
## [v2.0.0](https://github.com/rossmeissl/verbs/tree/v2.0.0) (2009-12-09)
|
|
124
|
+
|
|
125
|
+
[Full Changelog](https://github.com/rossmeissl/verbs/compare/v1.1.2...v2.0.0)
|
|
126
|
+
|
|
127
|
+
## [v1.1.2](https://github.com/rossmeissl/verbs/tree/v1.1.2) (2009-12-07)
|
|
128
|
+
|
|
129
|
+
[Full Changelog](https://github.com/rossmeissl/verbs/compare/v1.1.0...v1.1.2)
|
|
130
|
+
|
|
131
|
+
## [v1.1.0](https://github.com/rossmeissl/verbs/tree/v1.1.0) (2009-12-03)
|
|
132
|
+
|
|
133
|
+
[Full Changelog](https://github.com/rossmeissl/verbs/compare/v1.0.5...v1.1.0)
|
|
134
|
+
|
|
135
|
+
## [v1.0.5](https://github.com/rossmeissl/verbs/tree/v1.0.5) (2009-12-03)
|
|
136
|
+
|
|
137
|
+
[Full Changelog](https://github.com/rossmeissl/verbs/compare/v1.0.4...v1.0.5)
|
|
138
|
+
|
|
139
|
+
## [v1.0.4](https://github.com/rossmeissl/verbs/tree/v1.0.4) (2009-12-03)
|
|
140
|
+
|
|
141
|
+
[Full Changelog](https://github.com/rossmeissl/verbs/compare/v1.0.3...v1.0.4)
|
|
142
|
+
|
|
143
|
+
## [v1.0.3](https://github.com/rossmeissl/verbs/tree/v1.0.3) (2009-11-25)
|
|
144
|
+
|
|
145
|
+
[Full Changelog](https://github.com/rossmeissl/verbs/compare/v1.0.2...v1.0.3)
|
|
146
|
+
|
|
147
|
+
## [v1.0.2](https://github.com/rossmeissl/verbs/tree/v1.0.2) (2009-11-25)
|
|
148
|
+
|
|
149
|
+
[Full Changelog](https://github.com/rossmeissl/verbs/compare/v1.0.1...v1.0.2)
|
|
150
|
+
|
|
151
|
+
## [v1.0.1](https://github.com/rossmeissl/verbs/tree/v1.0.1) (2009-11-25)
|
|
152
|
+
|
|
153
|
+
[Full Changelog](https://github.com/rossmeissl/verbs/compare/v1.0.0...v1.0.1)
|
|
154
|
+
|
|
155
|
+
## [v1.0.0](https://github.com/rossmeissl/verbs/tree/v1.0.0) (2009-11-25)
|
|
156
|
+
|
|
157
|
+
[Full Changelog](https://github.com/rossmeissl/verbs/compare/c4753082d359d2c5dbc734faea34aace2eb3f176...v1.0.0)
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
|
data/Gemfile
ADDED
data/LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Copyright (c) 2009 Andy Rossmeissl
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
+
a copy of this software and associated documentation files (the
|
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
+
the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be
|
|
12
|
+
included in all copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
This patched version removes `.verb` monkey-patches on `String` and `Symbol`; I am not the maintainer, use at your own risk.
|
|
2
|
+
|
|
3
|
+
# Verbs
|
|
4
|
+
|
|
5
|
+
Conjugates most common english verbs for all persons, tenses, standard aspects, and modern moods (with active diathesis). Standard and exceptional spelling rules are obeyed.
|
|
6
|
+
|
|
7
|
+
```ruby
|
|
8
|
+
Verbs::Conjugator.conjugate :be, :tense => :past, :person => :second, :plurality => :singular, :aspect => :perfective
|
|
9
|
+
# => :were
|
|
10
|
+
'be nice'.verb.conjugate :subject => 'Matz'
|
|
11
|
+
# => "Matz is nice"
|
|
12
|
+
:sleep.verb.conjugate :tense => :future, :person => :first, :plurality => :singular, :aspect => :progressive, :subject => true
|
|
13
|
+
# => :"I will be sleeping"
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
gem install verbs
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Options
|
|
23
|
+
|
|
24
|
+
This library takes a rather strict view of English verb conjugation.
|
|
25
|
+
|
|
26
|
+
### `:tense`
|
|
27
|
+
|
|
28
|
+
One of `:past`, `:present`, or `:future`. Defaults to `:present`.
|
|
29
|
+
|
|
30
|
+
### `:person`
|
|
31
|
+
|
|
32
|
+
One of `:first`, `:second`, or `:third`. Defaults to `:third`.
|
|
33
|
+
|
|
34
|
+
### `:plurality`
|
|
35
|
+
|
|
36
|
+
Either `:singular` or `:plural`. Defaults to `:singular`.
|
|
37
|
+
|
|
38
|
+
### `:aspect`
|
|
39
|
+
|
|
40
|
+
One of `:habitual`, `:perfect`, `:perfective`, `:progressive`, or
|
|
41
|
+
`:prospective`. Defaults to `:habitual` (`:perfective` for past tense).
|
|
42
|
+
|
|
43
|
+
See below for a guide to verb aspect.
|
|
44
|
+
|
|
45
|
+
### `:mood`
|
|
46
|
+
|
|
47
|
+
One of `:indicative`, `:imperative`, or `:subjunctive`. Defaults to
|
|
48
|
+
`:indicative`.
|
|
49
|
+
|
|
50
|
+
### `:subject`
|
|
51
|
+
|
|
52
|
+
Set this to a string to prepend the conjugated verb with it. When set to `true`, a standard personal pronoun will be used.
|
|
53
|
+
|
|
54
|
+
### `:diathesis`
|
|
55
|
+
|
|
56
|
+
One of `:active` or `:passive`. Defaults to `:active`.
|
|
57
|
+
|
|
58
|
+
## Tense/aspect quick reference
|
|
59
|
+
|
|
60
|
+
**EXAMPLE**|**TENSE**|**ASPECT**
|
|
61
|
+
:-----:|:-----:|:-----:
|
|
62
|
+
I used to accept|past|habitual
|
|
63
|
+
I had accepted|past|perfect
|
|
64
|
+
I accepted|past|perfective
|
|
65
|
+
I was accepting|past|progressive
|
|
66
|
+
I was about to accept|past|prospective
|
|
67
|
+
|||
|
|
68
|
+
I accept|present|habitual
|
|
69
|
+
I have accepted|present|perfect
|
|
70
|
+
I am having accepted|present|perfective
|
|
71
|
+
I am accepting|present|progressive
|
|
72
|
+
I am about to accept|present|prospective
|
|
73
|
+
|||
|
|
74
|
+
I will accept|future|habitual
|
|
75
|
+
I will have accepted|future|perfect
|
|
76
|
+
|
|
77
|
+
## Acknowledgements
|
|
78
|
+
|
|
79
|
+
- [Lingua::Conjugate](http://cpansearch.perl.org/src/RWG/Lingua-EN-Conjugate-0.308/lib/Lingua/EN/Conjugate.pm)
|
|
80
|
+
- [Pat Byrd and Tom McKlin](http://www2.gsu.edu/~wwwesl/egw/pluralsv.htm)
|
|
81
|
+
- [Rick Harrison](http://www.rickharrison.com/language/aspect.html)
|
|
82
|
+
- [Anatoli Makarevich](https://github.com/makaroni4) for [#6](https://github.com/rossmeissl/verbs/pull/6)
|
|
83
|
+
- [Nikita Kamaev](https://github.com/nerixim) for [#35](https://github.com/rossmeissl/verbs/pull/35)
|
|
84
|
+
|
|
85
|
+
## Copyright
|
|
86
|
+
|
|
87
|
+
Copyright (c) 2012 Andy Rossmeissl. See [LICENSE](https://github.com/rossmeissl/verbs/blob/master/LICENSE) for details.
|
data/Rakefile
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'rubygems'
|
|
4
|
+
|
|
5
|
+
begin
|
|
6
|
+
require 'bundler'
|
|
7
|
+
rescue LoadError
|
|
8
|
+
warn 'You must install bundler - run `gem install bundler`'
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
begin
|
|
12
|
+
Bundler.setup
|
|
13
|
+
rescue Bundler::BundlerError => e
|
|
14
|
+
warn e.message
|
|
15
|
+
warn 'Run `bundle install` to install missing gems'
|
|
16
|
+
exit e.status_code
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
require 'rake'
|
|
20
|
+
require 'rake/testtask'
|
|
21
|
+
import 'tasks/release.rake'
|
|
22
|
+
Rake::TestTask.new(:test) do |test|
|
|
23
|
+
test.libs << 'lib' << 'test'
|
|
24
|
+
test.pattern = 'test/**/test_*.rb'
|
|
25
|
+
test.verbose = true
|
|
26
|
+
end
|
|
27
|
+
task default: :test
|
data/bin/console
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
require 'bundler/setup'
|
|
5
|
+
require 'verbs'
|
|
6
|
+
|
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
|
9
|
+
|
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
11
|
+
# require "pry"
|
|
12
|
+
# Pry.start
|
|
13
|
+
|
|
14
|
+
require 'irb'
|
|
15
|
+
IRB.start
|