conjugate 1.0 → 1.1

Sign up to get free protection for your applications and to get access to all the features.
data/.DS_Store CHANGED
Binary file
data/README.markdown ADDED
@@ -0,0 +1,16 @@
1
+ Conjugate
2
+ =========
3
+
4
+ Conjugates verbs into their proper form given a pronoun. Can conjugate irregular verbs that are in this list https://gist.github.com/1841995
5
+ Currently only has support for Spanish.
6
+
7
+ ```
8
+ Conjugate::Spanish.conjugate(:pronoun => :yo, :verb => 'tener')
9
+ => tengo
10
+ ```
11
+ Can also pass tenses
12
+
13
+ ```
14
+ Conjugate::Spanish.conjugate(:pronoun => :yo, :verb => 'tener', :tense => :past)
15
+ => tuve
16
+ ```
data/conjugate.gemspec CHANGED
@@ -1,14 +1,15 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'conjugate'
3
- s.version = '1.0'
3
+ s.version = '1.1'
4
4
  s.date = '2012-02-15'
5
5
  s.summary = "Conjugate Verbs using a version of the templates defined here http://en.wiktionary.org/wiki/Category:Spanish_conjugation-table_templates"
6
6
  s.description = s.summary
7
7
  s.authors = ["Jeremy Geros"]
8
8
  s.email = 'jeremy@govocab.com'
9
+
9
10
 
10
11
  s.files = `git ls-files`.split("\n")
11
12
  s.require_paths = ["lib"]
12
13
 
13
- s.homepage = ''
14
+ s.homepage = 'https://github.com/JeremyGeros/Conjugate'
14
15
  end
@@ -27,10 +27,13 @@ module Conjugate
27
27
  positions = conjugation_template.scan(/\{{3}(\d+)\}{3}/).flatten
28
28
 
29
29
  positions.each do |p|
30
- conjugation_template.gsub!(/\{{3}#{p}\}{3}/, verb_parts[p.to_i - 1])
30
+ if opts[:highlight]
31
+ conjugation_template.gsub!(/\{{3}#{p}\}{3}/, "<span class='regular'>#{ verb_parts[p.to_i - 1] }</span>")
32
+ else
33
+ conjugation_template.gsub!(/\{{3}#{p}\}{3}/, verb_parts[p.to_i - 1])
34
+ end
31
35
  end
32
36
  conjugation_template
33
-
34
37
  end
35
38
 
36
39
  def find_irregular(verb)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conjugate
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.0'
4
+ version: '1.1'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -18,7 +18,7 @@ extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
20
  - .DS_Store
21
- - conjugate-0.0.1.gem
21
+ - README.markdown
22
22
  - conjugate.gemspec
23
23
  - lib/.DS_Store
24
24
  - lib/conjugate.rb
@@ -26,7 +26,7 @@ files:
26
26
  - lib/conjugate/spanish.rb
27
27
  - lib/conjugate/templates/spanish_irregular_verbs.rb
28
28
  - lib/conjugate/templates/spanish_templates.rb
29
- homepage: ''
29
+ homepage: https://github.com/JeremyGeros/Conjugate
30
30
  licenses: []
31
31
  post_install_message:
32
32
  rdoc_options: []
data/conjugate-0.0.1.gem DELETED
Binary file