jejefy 0.0.1 → 1.0.0

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: 2a66c372f3ecefa0152be2551e22ddaf6501ade9
4
- data.tar.gz: 2d671a03e4f2a1a82f61b098bd805a16c23b019b
3
+ metadata.gz: 7c4d74d5122307584bca58ef66f147057a0f6850
4
+ data.tar.gz: fa342b5ef25ac8d4f4f752eb3f9b0530f073c704
5
5
  SHA512:
6
- metadata.gz: bfc4faca3fce840146833d39381281299d2adb6bf772049accd6d35e31a02eb0f1d1ba768c46a8b2a42b5d623394c9e2933b374945df6d47d1f6022a7dcc18e9
7
- data.tar.gz: f19a2811307077351aca64ed76a341b6c0619da13005c4f5e859f2f0612c9730f204ae83d587796a885abf6ae0fd5717740de1635cb51e008d28fd76965d7a50
6
+ metadata.gz: 7ebe0056cae76efb180719e07b825a2ecbf7025b9308017c31e40d0fb852353845367bb664225d31f5f4c468d5f9c30244b4b44898288d5f5d376e87bbcb82bd
7
+ data.tar.gz: 4991a6c8011ba2c177c6a4f7afb3fcddce1daa929eafe321b31b2d575613297ca5a7928c938eb48ef3848866fb5ff0c2bce2a34510b4802e4cb96d0a506469c5
@@ -0,0 +1,5 @@
1
+ module Jejefy
2
+ class Configuration
3
+ attr_accessor :username, :password
4
+ end
5
+ end
@@ -1,12 +1,22 @@
1
1
  class String
2
2
  def jejefy
3
- size = self.size
4
- rslt = []
3
+ str = self.gsub /a/, "4"
4
+ str = str.gsub /e/, "3"
5
+ str = str.gsub /o/, "0"
5
6
 
6
- size.times do
7
- rslt << Jejefy::JEJEMON_ALPHABET.sample
7
+ str
8
+ end
9
+
10
+ def vowel?
11
+ self.split("").map do |c|
12
+ c.send(:chck_vwl)
8
13
  end
14
+ end
15
+
16
+ private
9
17
 
10
- rslt.join("")
18
+ def chck_vwl
19
+ vowels = %w{a e i o u A E I O U}
20
+ vowels.include? self
11
21
  end
12
22
  end
@@ -1,3 +1,3 @@
1
1
  module Jejefy
2
- VERSION = "0.0.1"
2
+ VERSION = "1.0.0"
3
3
  end
data/lib/jejefy.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require "jejefy/version"
2
2
  require "jejefy/core_ext"
3
+ require "jejefy/configuration"
3
4
 
4
5
  module Jejefy
5
6
  # Your code goes here...
data/spec/jejefy_spec.rb CHANGED
@@ -1,7 +1,18 @@
1
1
  require "spec_helper"
2
2
 
3
3
  describe Jejefy do
4
- it "can transform a string" do
5
- expect("mark".jejefy).to eq "mharksxx"
4
+ it "transforms a to 4" do
5
+ str = "mark"
6
+ expect(str.jejefy).to eq "m4rk"
7
+ end
8
+
9
+ it "transforms e to 3" do
10
+ str = "joel"
11
+ expect(str.jejefy).to eq "j03l"
12
+ end
13
+
14
+ it "checks if a letter is vowel" do
15
+ letter = "joel"
16
+ expect(letter.vowel?).to eq [false, true, true, false]
6
17
  end
7
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jejefy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Chavez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-06 00:00:00.000000000 Z
11
+ date: 2015-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -69,6 +69,7 @@ files:
69
69
  - bin/jejefy
70
70
  - jejefy.gemspec
71
71
  - lib/jejefy.rb
72
+ - lib/jejefy/configuration.rb
72
73
  - lib/jejefy/core_ext.rb
73
74
  - lib/jejefy/core_ext/string.rb
74
75
  - lib/jejefy/version.rb