tracinho 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ce9041fcecf00560204a49fec30bfe2c352dc021d1b88cb64bc7651a243cc825
4
- data.tar.gz: e931795a85270e88195339e08eb6fbdd2519316919898b604478861c7c80d2e3
3
+ metadata.gz: 29e143b0912a166305a7d80dfa359a7e45d931e4f1ff3c3d45a449e120007702
4
+ data.tar.gz: 0db5f7e5ab52436f4c9bfbb67ead9edf55a89f134deea8428a3131eef0b36ee6
5
5
  SHA512:
6
- metadata.gz: e90db0495f9169a4df0a3d61b780213f3e85354596e07dc6e45347666254dcf0bd59d8d773939a209b944e9215ffa81c532f8c06406b8d6bdc1bbcf204d82e21
7
- data.tar.gz: 3c5f011a63a59b61ae92df2e09199cb3ae973fd48c1f62454ec1259c214bb6d88371c019d9affc6d0a607d9b705ed11178df40dda5da536bdbc9085b5697159d
6
+ metadata.gz: 1d50a71f519244389ff6702ad82f5771c3f1ea25cf0469b04eb5539f31ca7a2594f62e92ada0b63a08b6285fb7768336043559f2446682781fc1a17b1c3cf173
7
+ data.tar.gz: 311e591b1fa24ae32a09b7921d37a0cc1b3669d9d1e3ed364b97f2a43f2785b94b5fd81b4e99fbf86e4f78bf719d81e6f1275838916166769e140252baebddf2
data/.rubocop.yml CHANGED
@@ -1,4 +1,4 @@
1
- Metrics/LineLength:
1
+ Layout/LineLength:
2
2
  Max: 100
3
3
 
4
4
  # We have a lot of portuguese examples in the comments so...
@@ -16,4 +16,4 @@ Metrics/BlockLength:
16
16
 
17
17
  # We want to support older versions of ruby
18
18
  Style/ExpandPathArguments:
19
- Enabled: false
19
+ Enabled: false
data/.travis.yml CHANGED
@@ -2,5 +2,6 @@ language: ruby
2
2
  rvm:
3
3
  - 2.4.2
4
4
  - 2.5.0
5
+ - 2.6.5
5
6
  script: bundle exec rspec
6
7
  sudo: false
data/Gemfile.lock CHANGED
@@ -1,57 +1,57 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tracinho (0.1.5)
4
+ tracinho (0.1.6)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
9
  ast (2.4.0)
10
- byebug (11.0.1)
10
+ byebug (11.1.1)
11
11
  coderay (1.1.2)
12
12
  diff-lcs (1.3)
13
13
  docile (1.3.2)
14
- jaro_winkler (1.5.3)
15
- json (2.2.0)
16
- method_source (0.9.2)
17
- parallel (1.17.0)
18
- parser (2.6.3.0)
14
+ jaro_winkler (1.5.4)
15
+ method_source (1.0.0)
16
+ parallel (1.19.1)
17
+ parser (2.7.1.0)
19
18
  ast (~> 2.4.0)
20
- pry (0.12.2)
21
- coderay (~> 1.1.0)
22
- method_source (~> 0.9.0)
23
- pry-byebug (3.7.0)
19
+ pry (0.13.0)
20
+ coderay (~> 1.1)
21
+ method_source (~> 1.0)
22
+ pry-byebug (3.9.0)
24
23
  byebug (~> 11.0)
25
- pry (~> 0.10)
24
+ pry (~> 0.13.0)
26
25
  rainbow (3.0.0)
27
- rake (12.3.3)
28
- rspec (3.8.0)
29
- rspec-core (~> 3.8.0)
30
- rspec-expectations (~> 3.8.0)
31
- rspec-mocks (~> 3.8.0)
32
- rspec-core (3.8.2)
33
- rspec-support (~> 3.8.0)
34
- rspec-expectations (3.8.4)
26
+ rake (13.0.1)
27
+ rexml (3.2.4)
28
+ rspec (3.9.0)
29
+ rspec-core (~> 3.9.0)
30
+ rspec-expectations (~> 3.9.0)
31
+ rspec-mocks (~> 3.9.0)
32
+ rspec-core (3.9.1)
33
+ rspec-support (~> 3.9.1)
34
+ rspec-expectations (3.9.1)
35
35
  diff-lcs (>= 1.2.0, < 2.0)
36
- rspec-support (~> 3.8.0)
37
- rspec-mocks (3.8.1)
36
+ rspec-support (~> 3.9.0)
37
+ rspec-mocks (3.9.1)
38
38
  diff-lcs (>= 1.2.0, < 2.0)
39
- rspec-support (~> 3.8.0)
40
- rspec-support (3.8.2)
41
- rubocop (0.74.0)
39
+ rspec-support (~> 3.9.0)
40
+ rspec-support (3.9.2)
41
+ rubocop (0.81.0)
42
42
  jaro_winkler (~> 1.5.1)
43
43
  parallel (~> 1.10)
44
- parser (>= 2.6)
44
+ parser (>= 2.7.0.1)
45
45
  rainbow (>= 2.2.2, < 4.0)
46
+ rexml
46
47
  ruby-progressbar (~> 1.7)
47
- unicode-display_width (>= 1.4.0, < 1.7)
48
+ unicode-display_width (>= 1.4.0, < 2.0)
48
49
  ruby-progressbar (1.10.1)
49
- simplecov (0.17.0)
50
+ simplecov (0.18.5)
50
51
  docile (~> 1.1)
51
- json (>= 1.8, < 3)
52
- simplecov-html (~> 0.10.0)
53
- simplecov-html (0.10.2)
54
- unicode-display_width (1.6.0)
52
+ simplecov-html (~> 0.11)
53
+ simplecov-html (0.12.2)
54
+ unicode-display_width (1.7.0)
55
55
 
56
56
  PLATFORMS
57
57
  ruby
@@ -66,4 +66,4 @@ DEPENDENCIES
66
66
  tracinho!
67
67
 
68
68
  BUNDLED WITH
69
- 2.0.2
69
+ 2.1.4
data/bin/console CHANGED
@@ -1,10 +1,11 @@
1
- # frozen_string_literal: true
2
1
  #!/usr/bin/env ruby
3
2
 
3
+ # frozen_string_literal: true
4
+
4
5
  require 'bundler/setup'
5
6
  require 'tracinho'
6
7
 
7
- include Tracinho
8
+ send(:include, Tracinho)
8
9
 
9
10
  require 'pry'
10
11
  Pry.start
@@ -30,6 +30,8 @@ module Tracinho
30
30
  case text
31
31
  when /os$/
32
32
  text.dup.insert(-4, '-')
33
+ when /sse$/
34
+ text.dup.gsub(/sse/, '-se')
33
35
  else
34
36
  text.dup.insert(-3, '-')
35
37
  end
@@ -3,5 +3,5 @@
3
3
  # This gem converts words with dash in the version without it and vice-versa. It also gets the verb
4
4
  # name from a word and gives the full grammar classification of the verb.
5
5
  module Tracinho
6
- VERSION = '0.1.5'
6
+ VERSION = '0.1.6'
7
7
  end
@@ -18,7 +18,7 @@ module Tracinho
18
18
  # classifier.full_classification
19
19
  # # => "Segunda pessoa do singular do pretérito perfeito do indicativo do verbo comer."
20
20
  class WordClassifier
21
- ENDINGS = /(?:(ste)|(sse)|[^-](mos)|(-(se|mos))|[^s](-te)|(s-te))$/ #:nodoc:
21
+ ENDINGS = /(?:(ste)|(sse)|[^-](mos)|(-(se|mos))|[^s](-te)|(s-te))$/.freeze #:nodoc:
22
22
 
23
23
  def initialize(word)
24
24
  @word = word
@@ -19,10 +19,10 @@ describe Tracinho do
19
19
  end
20
20
 
21
21
  it 'works with strings or Tracinho::Word objects' do
22
- w1 = Tracinho::Word.new('fizeste')
23
- w2 = 'fizes-te'
24
- w3 = 'fizeste'
25
- w4 = Tracinho::Word.new('fizes-te')
22
+ w1 = Tracinho::Word.new('mandasse')
23
+ w2 = 'manda-se'
24
+ w3 = 'arrotas-te'
25
+ w4 = Tracinho::Word.new('arrotaste')
26
26
 
27
27
  expect(described_class.pair?(w1, w2)).to be_truthy
28
28
  expect(described_class.pair?(w4, w3)).to be_truthy
data/spec/word_spec.rb CHANGED
@@ -26,6 +26,14 @@ describe Word do
26
26
 
27
27
  expect(complement.to_s).to eq('matas-te')
28
28
  end
29
+
30
+ it 'works for double S words' do
31
+ word = described_class.new('mandasse')
32
+
33
+ complement = word.complement
34
+
35
+ expect(complement.to_s).to eq('manda-se')
36
+ end
29
37
  end
30
38
 
31
39
  describe '#grammar_class' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tracinho
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Otero
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-23 00:00:00.000000000 Z
11
+ date: 2020-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -145,8 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
145
  - !ruby/object:Gem::Version
146
146
  version: '0'
147
147
  requirements: []
148
- rubyforge_project:
149
- rubygems_version: 2.7.6.2
148
+ rubygems_version: 3.0.3
150
149
  signing_key:
151
150
  specification_version: 4
152
151
  summary: Tracinho.com gem.