conjugate_french 0.1.2 → 0.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ad7446170226cd9f6f3b88270a86d1ef5d41776ca3cef6f6a5184d0d87f63bf
4
- data.tar.gz: 6f3f3f3a03fc1531391ded5925780baeee571eedf2c15ef51540808286c45590
3
+ metadata.gz: a599047dc59694461680f571faddb49c673a094167c1eeb7507b0f1e9281783b
4
+ data.tar.gz: b066a1ae51a0bdb666fc54addf6576c7813e89a369d6639de7bac9d2bad58370
5
5
  SHA512:
6
- metadata.gz: 1bbe30bf223d6ba9a5dc8bcc048011b8055cca16f258e268e6bc287765056b377d25b15999505eb532c396da60e548c2cca9e932890b6ad5026a7ab2fce0131d
7
- data.tar.gz: 7d8d6acca83a1ff942059fa766f3d65cd7e2e17181f48a1958adb63e87bcebc69900446e731c489b4981964cd8b3dd3e12381588786fa0bb119d2795cd7abc7e
6
+ metadata.gz: 0db8ab911024d2dd2862c6c431d8403bd1fe845a566bedcdc9c667e07c8e7c967f4c6843d5ae69ace6fddb1e39e50abea78db663410c9401575fc0b9e71bd67f
7
+ data.tar.gz: 482b090ae07641c4267d7da2e6442888cc31ee0a6145c79c0af502c57d0a5cdf5354db7825351d34bef8069446773c70650df12f56c6c2be1c57bd053019dc55
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- conjugate_french (0.1.2)
4
+ conjugate_french (0.1.3)
5
5
  json
6
6
  terminal-table
7
7
  thor
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # ConjugateFrench
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/conjugate_french`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ I always found the french language a difficult one. Specially if it's not your mother tongue.
4
+ I often find myself going on google and find how to conjugate a specific verb.
5
+ With ConjugateFrench you can quickly see the conjugations of a french verbe in your terminal.
6
6
 
7
7
  ## Installation
8
8
 
@@ -22,7 +22,66 @@ Or install it yourself as:
22
22
 
23
23
  ## Usage
24
24
 
25
- TODO: Write usage instructions here
25
+ After installation run:
26
+
27
+ $ conjugate_french verbe [verb you want to conjugate in its infinitive form]
28
+
29
+ output:
30
+ ```
31
+ +------+---------+---------------+-----------+------------------+--------------+-----------------+--------------+-----------------+
32
+ | Verbe Courir Indicatif |
33
+ +------+---------+---------------+-----------+------------------+--------------+-----------------+--------------+-----------------+
34
+ | | présent | passé composé | imparfait | plus-que-parfait | passé simple | passé antérieur | futur simple | futur antérieur |
35
+ +------+---------+---------------+-----------+------------------+--------------+-----------------+--------------+-----------------+
36
+ | Je | cours | couru | courais | couru | courus | couru | courrai | couru |
37
+ | Tu | cours | couru | courais | couru | courus | couru | courras | couru |
38
+ | Il | court | couru | courait | couru | courut | couru | courra | couru |
39
+ | Nous | courons | couru | courions | couru | courûmes | couru | courrons | couru |
40
+ | Vous | courez | couru | couriez | couru | courûtes | couru | courrez | couru |
41
+ | Ils | courent | couru | couraient | couru | coururent | couru | courront | couru |
42
+ +------+---------+---------------+-----------+------------------+--------------+-----------------+--------------+-----------------+
43
+ +------+----------+-------+-------------+------------------+
44
+ | Verbe Courir Subjonctif |
45
+ +------+----------+-------+-------------+------------------+
46
+ | | présent | passé | imparfait | plus-que-parfait |
47
+ +------+----------+-------+-------------+------------------+
48
+ | Je | coure | couru | courusse | couru |
49
+ | Tu | coures | couru | courusses | couru |
50
+ | Il | coure | couru | courût | couru |
51
+ | Nous | courions | couru | courussions | couru |
52
+ | Vous | couriez | couru | courussiez | couru |
53
+ | Ils | courent | couru | courussent | couru |
54
+ +------+----------+-------+-------------+------------------+
55
+ +------+------------+------------------+------------------+
56
+ | Verbe Courir Conditionnel |
57
+ +------+------------+------------------+------------------+
58
+ | | présent | passé 1ère forme | passé 2ème forme |
59
+ +------+------------+------------------+------------------+
60
+ | Je | courrais | couru | couru |
61
+ | Tu | courrais | couru | couru |
62
+ | Il | courrait | couru | couru |
63
+ | Nous | courrions | couru | couru |
64
+ | Vous | courriez | couru | couru |
65
+ | Ils | courraient | couru | couru |
66
+ +------+------------+------------------+------------------+
67
+ +------+---------+-------+
68
+ | Verbe Courir Impératif |
69
+ +------+---------+-------+
70
+ | | présent | passé |
71
+ +------+---------+-------+
72
+ | | cours | couru |
73
+ | | courons | couru |
74
+ | | courez | couru |
75
+ +------+---------+-------+
76
+ +-----+---------+--------+
77
+ | Verbe Courir Participe |
78
+ +-----+---------+--------+
79
+ | | présent | passé |
80
+ +-----+---------+--------+
81
+ | | courant | courue |
82
+ | | | couru |
83
+ +-----+---------+--------+
84
+ ```
26
85
 
27
86
  ## Development
28
87
 
@@ -6,7 +6,7 @@ Gem::Specification.new do |spec|
6
6
  spec.authors = ['Martfed']
7
7
  spec.email = ['federicodm90@gmail.com']
8
8
 
9
- spec.summary = 'ConjugateFrench to quickly conjugate french verbes'
9
+ spec.summary = 'ConjugateFrench to quickly conjugate french verbes and see it in your terminal'
10
10
  spec.homepage = 'https://rubygems.org/gems/conjugate_french'
11
11
  spec.license = 'MIT'
12
12
  spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
@@ -17,6 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
18
  spec.require_paths = ['lib']
19
19
 
20
+ spec.metadata = { 'source_code_uri' => 'https://github.com/Martfed/conjugate_french' }
20
21
  spec.add_dependency 'json'
21
22
  spec.add_dependency 'terminal-table'
22
23
  spec.add_dependency 'thor'
@@ -16,11 +16,9 @@ module ConjugateFrench
16
16
  verb_list['infinitif']['présent'][0] == verb
17
17
  end
18
18
 
19
- if full_verb.empty?
20
- puts 'The verb you entered was not found. There is probably a typo.'
21
- else
22
- TENSES.each { |tense| puts table(tense, full_verb, verb) }
23
- end
19
+ final_output = output(full_verb, verb)
20
+ puts final_output
21
+ final_output
24
22
  end
25
23
 
26
24
  private
@@ -54,5 +52,13 @@ module ConjugateFrench
54
52
  def headings(tense, full_verb)
55
53
  [nil, full_verb[0][tense].keys]
56
54
  end
55
+
56
+ def output(full_verb, verb)
57
+ if full_verb.empty?
58
+ 'The verb you entered was not found. There is probably a typo or the verb is not in the infinitive.'
59
+ else
60
+ TENSES.map { |tense| table(tense, full_verb, verb) }
61
+ end
62
+ end
57
63
  end
58
64
  end
@@ -1,3 +1,3 @@
1
1
  module ConjugateFrench
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conjugate_french
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martfed
@@ -88,6 +88,7 @@ files:
88
88
  - bin/conjugate_french
89
89
  - bin/console
90
90
  - bin/setup
91
+ - conjugate_french-0.1.2.gem
91
92
  - conjugate_french.gemspec
92
93
  - lib/conjugate_french.rb
93
94
  - lib/conjugate_french/version.rb
@@ -95,7 +96,8 @@ files:
95
96
  homepage: https://rubygems.org/gems/conjugate_french
96
97
  licenses:
97
98
  - MIT
98
- metadata: {}
99
+ metadata:
100
+ source_code_uri: https://github.com/Martfed/conjugate_french
99
101
  post_install_message:
100
102
  rdoc_options: []
101
103
  require_paths:
@@ -114,5 +116,5 @@ requirements: []
114
116
  rubygems_version: 3.1.2
115
117
  signing_key:
116
118
  specification_version: 4
117
- summary: ConjugateFrench to quickly conjugate french verbes
119
+ summary: ConjugateFrench to quickly conjugate french verbes and see it in your terminal
118
120
  test_files: []