coolify_gem 0.1.0 → 0.2.1

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: 8d223b1eb84eb8a10438c3094359d8b8f65bcc03
4
- data.tar.gz: 8c76d053cc34a4d8c020bf18c339e4bcb7fc4c26
3
+ metadata.gz: 2fecb94854227e9cca1960ac92877235865d7361
4
+ data.tar.gz: de4784a065952bc1c20d3519bbfee1bd535f94a9
5
5
  SHA512:
6
- metadata.gz: e91283a770753cc847a844fee7e675c5afff37add36319a5ff9f2fa1646f8fe0de371eb7f0688ab88caaeecbe6e719065577658a016a5b6a30a8a22a67f05e98
7
- data.tar.gz: d531690feb195379ca4971839a04bdf015e18da95f3e7e4300f126c2ad2e61bb7e7a0ba3be296352808216916f7f9aecd8d0db10c295c9cbe12f1ae10dfe30ae
6
+ metadata.gz: 3e163a3c8cfe839345d1bf5f6a4b527126cef16d36cbb47df4c2b7edfd4a91881dbd64fe14279acdf4e4ddadc6e60cd5da93cca98e1bcb2d0cbbbd71d5affba6
7
+ data.tar.gz: ee8074527e1a1b8587e55100dc465e0f65df8bb044ea8ca7e8010ff100e79e85f5c5645b81a1282df97d96626025173a90bfe16eb828989ca086668cd67871eb
data/README.md CHANGED
@@ -18,9 +18,14 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- CoolifyGem will only work with strings. To use the gem, call the coolify method on a string in the following way:
21
+ puts Coolify_Gem.coolify("Awesome gem!")
22
22
 
23
- "Thiz iz my firzt gem called Coolify!" , "This is my first gem called Coolify!".coolify
23
+ #outputs: "Awezome gem!"
24
+
25
+ puts Coolify_Gem.coolify("Awezome gem!")
26
+
27
+ #outputs: "Awesome gem!""
28
+
24
29
 
25
30
  ## Contributing
26
31
 
data/bin/cool CHANGED
@@ -1,4 +1,15 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require 'coolify_gem'
4
- puts Cool.coolify(ARGV[0])
3
+ begin
4
+ require 'coolify_gem'
5
+
6
+ # if you can’t find your gem,
7
+ # then giving it a second shot
8
+ # with Rubygems is better than
9
+ # crashing.
10
+ rescue LoadError
11
+ require 'rubygems'
12
+ require 'coolify_gem'
13
+ end
14
+
15
+ #more code goes here
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["Carlos.Marx421@gmail.com"]
11
11
  spec.summary = %q{My very first gem!}
12
12
  spec.description = %q{This gem was created thanks to a YouTube tutorial by user Lasse Bunk.}
13
- spec.homepage = ""
13
+ spec.homepage = "https://github.com/carlitosz/coolify_gem"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
@@ -19,5 +19,5 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.6"
22
- spec.add_development_dependency "rake"
22
+ spec.add_development_dependency "rake", "~> 0"
23
23
  end
@@ -1,10 +1,16 @@
1
1
  require "coolify_gem/version"
2
2
 
3
- class Cool
3
+ class Coolify_Gem
4
4
  def self.coolify(text)
5
5
  cooltext = Coolify.new(text)
6
- cooltext.coolify
6
+ cooltext.doCool
7
+ end
8
+
9
+ def self.undoCoolify(text)
10
+ cooltext = Undo.new(text)
11
+ cooltext.undoCool
7
12
  end
8
13
  end
9
14
 
10
15
  require "coolify_gem/coolify"
16
+ require "coolify_gem/undo"
@@ -1,11 +1,9 @@
1
- class Cool::Coolify
2
-
3
- def initialize(text = "Tezt")
4
- @text = text
1
+ class Coolify_Gem::Coolify
2
+ def initialize(text)
3
+ @testText = text
5
4
  end
6
5
 
7
- def coolify
8
- @text.gsub("s", "z")
6
+ def doCool
7
+ @testText.gsub("s", "z")
9
8
  end
10
-
11
9
  end
@@ -0,0 +1,9 @@
1
+ class Coolify_Gem::Undo
2
+ def initialize(text)
3
+ @cooltext = text
4
+ end
5
+
6
+ def undoCool
7
+ @cooltext.gsub("z", "s")
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module CoolifyGem
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -2,18 +2,22 @@ require "test_helper"
2
2
 
3
3
  class CoolifyTest < Test::Unit::TestCase
4
4
  def test_blank
5
- assert_equal "", Cool.coolify("")
5
+ assert_equal "", Coolify_Gem.coolify("")
6
6
  end
7
7
 
8
8
  def test_hi
9
- assert_equal "hi", Cool.coolify("hi")
9
+ assert_equal "hi", Coolify_Gem.coolify("hi")
10
10
  end
11
11
 
12
12
  def test_switch_characters
13
- assert_equal "z", Cool.coolify("s")
13
+ assert_equal "z", Coolify_Gem.coolify("s")
14
14
  end
15
15
 
16
16
  def test_coolify
17
- assert_equal "Thiz iz my firzt gem called Coolify!" , Cool.coolify("This is my first gem called Coolify!")
17
+ assert_equal "Thiz iz my firzt gem called Coolify!" , Coolify_Gem.coolify("This is my first gem called Coolify!")
18
+ end
19
+
20
+ def test_undo
21
+ assert_equal "s", Coolify_Gem.undoCoolify("z")
18
22
  end
19
23
  end
@@ -0,0 +1,9 @@
1
+ require "coolify_gem"
2
+
3
+ text = "This is a test"
4
+
5
+ coolified = Coolify_Gem.coolify(text)
6
+ puts coolified
7
+
8
+ notCoolified = Coolify_Gem.undoCoolify(coolified)
9
+ puts notCoolified
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coolify_gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Zaragoza
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-24 00:00:00.000000000 Z
11
+ date: 2014-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -28,14 +28,14 @@ dependencies:
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  description: This gem was created thanks to a YouTube tutorial by user Lasse Bunk.
@@ -55,10 +55,12 @@ files:
55
55
  - coolify_gem.gemspec
56
56
  - lib/coolify_gem.rb
57
57
  - lib/coolify_gem/coolify.rb
58
+ - lib/coolify_gem/undo.rb
58
59
  - lib/coolify_gem/version.rb
59
60
  - test/coolify_gem_test.rb
60
61
  - test/test_helper.rb
61
- homepage: ''
62
+ - testingGem.rb
63
+ homepage: https://github.com/carlitosz/coolify_gem
62
64
  licenses:
63
65
  - MIT
64
66
  metadata: {}