mockingcase 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 +4 -4
- data/.gitignore +1 -0
- data/Gemfile +1 -0
- data/LICENSE.txt +21 -0
- data/README.md +2 -2
- data/lib/mockingcase.rb +1 -14
- data/lib/mockingcase/version.rb +1 -1
- data/mockingcase.gemspec +1 -0
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb7ad40f616dbdb093690e0818fb46867b9107f2ef3cd1671f392f5d500fff44
|
4
|
+
data.tar.gz: 640942f8b41523266ddbe69aed275a497b4f9ba1634eab3c4f4fb1ca6853b83c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de18fc3e5f3dec20936068fe6bba25c1a97de76126aa267e3eaea413a59771eb4dac63af443f63925f8f013f668eff675d283fedc47cac8c8664baf6a082ffe3
|
7
|
+
data.tar.gz: b538f0af1d0c96d1a72f990f222070feb6178258dd04ffa028f7078d5338c14a444287fa23eb87ba4978559a6cabdc5f56fe27648862b1a10bc9f68851e51fd7
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2018 6167656e74323431
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Mockingcase
|
2
2
|
|
3
|
-
Allows strings to be converted to mOcKiNgCaSe.
|
3
|
+
Allows strings to be converted to mOcKiNgCaSe. Inspired by [this](http://dannypage.github.io/spongebob.html).
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -20,7 +20,7 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
## Usage
|
22
22
|
|
23
|
-
You can convert a string to mOcKiNgCaSe like this
|
23
|
+
You can convert a string to mOcKiNgCaSe like this:
|
24
24
|
```ruby
|
25
25
|
require 'mockingcase'
|
26
26
|
|
data/lib/mockingcase.rb
CHANGED
@@ -18,20 +18,7 @@ module Mockingcase
|
|
18
18
|
new.join
|
19
19
|
end
|
20
20
|
def to_mockingcase! random = false
|
21
|
-
|
22
|
-
new = []
|
23
|
-
self.chars.each do |c|
|
24
|
-
if random then
|
25
|
-
state = [true, false].sample
|
26
|
-
end
|
27
|
-
if state then
|
28
|
-
new << c.upcase
|
29
|
-
else
|
30
|
-
new << c.downcase
|
31
|
-
end
|
32
|
-
state = ! state
|
33
|
-
end
|
34
|
-
replace new.join
|
21
|
+
replace self.to_mockingcase random
|
35
22
|
nil
|
36
23
|
end
|
37
24
|
end
|
data/lib/mockingcase/version.rb
CHANGED
data/mockingcase.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mockingcase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 6167656e74323431
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.8'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.8'
|
41
55
|
description: Allows strings to be converted to mOcKiNgCaSe.
|
42
56
|
email:
|
43
57
|
- tpreduta@gmail.com
|
@@ -47,6 +61,7 @@ extra_rdoc_files: []
|
|
47
61
|
files:
|
48
62
|
- ".gitignore"
|
49
63
|
- Gemfile
|
64
|
+
- LICENSE.txt
|
50
65
|
- README.md
|
51
66
|
- Rakefile
|
52
67
|
- bin/console
|