smart_slug 0.0.1 → 0.0.2

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
  SHA1:
3
- metadata.gz: 0475abdf7a2d3214e0dbc41c7fa33485365a32a1
4
- data.tar.gz: 7048c0867c23ea2894fd17485b89c9ecf3f45557
3
+ metadata.gz: 336db30bbd2039b2e2216d751ebe45a6aaecf0d6
4
+ data.tar.gz: 2d42e2cc3a0e8e9e1be5a590a010e9ca149c53f5
5
5
  SHA512:
6
- metadata.gz: 4e760a6cdf1aa0f39b2a316860382c741ed5b031f5b47e14a769615de974fbd2f3bc266d103b54bc1df68f15c598ab118896462f93fb494ae70312e907fd6bf0
7
- data.tar.gz: c156243209bc5b41e19973f34681f43c441d00e166542651309245650535509e49c9377e368b01b1efc709a9e63b9d47f085b19dec5c62573032b9abcb93a594
6
+ metadata.gz: f40f1f9eadb0158e91ceb65fb616b50ef5a0762feb2f9b93d2d8119501fb947acecbb2b7475b699267017919a8896c1d5f5b4b1ead3de5efa740e257f2222539
7
+ data.tar.gz: 0bb9f503d1a73fce4ab12667b39a1b41c08d3cea8cc9f798527e565881c98980c25d7dacbe2e1bb2c8c39286b38c6359b183af2435d7cab2ca96c474ce3c35bf
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- smart_slug (0.0.1)
4
+ smart_slug (0.0.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -16,12 +16,12 @@ And then execute:
16
16
  require 'smart_slug'
17
17
 
18
18
  slug = SmartSlug.new(" Coração ")
19
- => #<SmartSlug:0x007ff0c20907a8 @original=" Coração ", @slug="coracao">
19
+ => #<SmartSlug:0x007ff0c20907a8 @original=" Coração ", @slug="Coracao">
20
20
 
21
21
  slug.to_s
22
- => "coracao"
22
+ => "Coracao"
23
23
 
24
- slug == 'coracao'
24
+ slug == 'Coracao'
25
25
  => true
26
26
  ```
27
27
 
@@ -24,7 +24,6 @@ class SmartSlug
24
24
 
25
25
  def slug
26
26
  string = @original.dup
27
- string.downcase!
28
27
  string.strip!
29
28
  string.gsub!(/[\/\.\:\@º]/, '')
30
29
  string.gsub!(/[àáâãäåāă]/, 'a')
@@ -1,3 +1,3 @@
1
- module SmartSlug
2
- VERSION = "0.0.1"
1
+ class SmartSlug
2
+ VERSION = "0.0.2"
3
3
  end
@@ -4,14 +4,14 @@ require 'spec_helper'
4
4
  describe SmartSlug do
5
5
  let(:smart_slug) { SmartSlug.new(' Coração Valente ')}
6
6
  describe :to_s do
7
- it { expect(smart_slug.to_s).to eq("coracao-valente") }
7
+ it { expect(smart_slug.to_s).to eq("Coracao-Valente") }
8
8
  end
9
9
  describe :== do
10
- it { expect(smart_slug == 'coracao-valente').to be_true }
10
+ it { expect(smart_slug == 'Coracao-Valente').to be_true }
11
11
  end
12
12
  it "does not change variabled passed" do
13
13
  var = "Coração"
14
- expect(SmartSlug.new(var).to_s).to eq("coracao")
14
+ expect(SmartSlug.new(var).to_s).to eq("Coracao")
15
15
  expect(var).to eq("Coração")
16
16
  end
17
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_slug
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafael Lima