ify 0.0.1 → 0.0.2

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
  SHA1:
3
- metadata.gz: 685310cf569aaa7840226615b1dd75d02a09c897
4
- data.tar.gz: d7fcc8846ae518ec90336d8a0a19e21e14f6f8d3
3
+ metadata.gz: 4cb45e7c58ffc61f01c1b3edbc2937b23588086b
4
+ data.tar.gz: 2b2a8f380b2aa219c48d7f7a42ab5086dac72ee6
5
5
  SHA512:
6
- metadata.gz: e853edb082918fd12aeed712e1c3a76cfce4b7909493595292b72b27ea8959e55c7338c76e103d9f4fef8a2a27fa2794ea2e977938034c20e97a532ad39ff0a0
7
- data.tar.gz: 4eac69f57e4370abc42606935f49f9058dcd1904ae33b675b71516f3dac3e3930ffe679ee3d86ebecf7d556fddb968bd8798f6eb063bac0a5d4fcabcb1c43ff1
6
+ metadata.gz: 1845a268413e4bb72f05134081a872b13500ac37fc0b4c88aac0f34ea79d88b46381757f9653315bdcbee19573c5d4f07bf2a47b1c4521cc485d0c25bc1ba27e
7
+ data.tar.gz: 4100a33cc342d274873e5f4153a6344282d7065b9c14a726c9b55f60c503e519929d8378631e0fb3c7e885e01b3dc923170b2bc8c922417be4dfbeb2a7b56973
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ify
2
2
 
3
- A vowel aware ifyfier of dubious quality.
3
+ Ify is a vowel aware ifyfier of dubious quality. Use it whenever you have an urgent need to turn a noun into a verb (before using it as a noun). Or need something pointless to demonstrate how gems are made.
4
4
 
5
5
  ## Installation
6
6
 
@@ -18,9 +18,27 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
+ Ify will ifyify a string
22
+
21
23
  "string".ify
22
24
  # => stingify
23
25
 
26
+ It's aware of trailing vowels and white spaces
27
+
28
+ "awesome".ify
29
+ # => "awesomify"
30
+
31
+ "spot ".ify
32
+ # => "spotify"
33
+
34
+ Yet it still plays well with small animals
35
+
36
+ "bee".ify
37
+ # => beeify
38
+
39
+ "fruit fly".ify
40
+ # => "fruit flyify"
41
+
24
42
  ## Contributing
25
43
 
26
44
  1. Fork it
@@ -28,3 +46,7 @@ Or install it yourself as:
28
46
  3. Commit your changes (`git commit -am 'Add some feature'`)
29
47
  4. Push to the branch (`git push origin my-new-feature`)
30
48
  5. Create new Pull Request
49
+
50
+ ## WTF
51
+
52
+ Ify was inspired by this [equally pointless](https://github.com/KoryNunn/ify) (yet not nearly as well tested) effort.
data/lib/ify.rb CHANGED
@@ -3,7 +3,7 @@ require "ify/version"
3
3
  class String
4
4
  def ify()
5
5
  str = self.rstrip
6
- str.sub! /[aeiouy]$/, ''
6
+ str.sub! /[aeiouy]$/, '' if str.split.last.length > 3
7
7
  "#{str}ify"
8
8
  end
9
9
  end
@@ -1,3 +1,3 @@
1
1
  module Ify
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -9,4 +9,13 @@ describe "Ify" do
9
9
  it "is vowel aware" do
10
10
  "awesome".ify.must_equal "awesomify"
11
11
  end
12
+
13
+ it "ignores trailing whitespace" do
14
+ "spot ".ify.must_equal "spotify"
15
+ end
16
+
17
+ it "plays well with small animals" do
18
+ "bee".ify.must_equal "beeify"
19
+ "fruit fly".ify.must_equal "fruit flyify"
20
+ end
12
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ify
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
  - Dave Kinkead