finishing_moves 0.6.1 → 0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/finishing_moves/object.rb +5 -0
- data/lib/finishing_moves/string.rb +0 -14
- data/lib/finishing_moves/version.rb +1 -1
- data/spec/object_spec.rb +11 -0
- data/spec/symbol_spec.rb +20 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2c6e4670bf1a9e377d73ab245a84e26c8ecff3f
|
4
|
+
data.tar.gz: 019d4bf4fa0b5ed8877ea072e761554a78d6f28b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17e6414b9e771af698ae0273641eda9ab7b469252324fe4549b4806a3baafa3ccb7dbd97686eaa2a55c69fd97a2bebfeae7a47eaa5ce2c3265c7730c5610e4b5
|
7
|
+
data.tar.gz: ed6bbc3cf2ce0140c8da03e261b61e33ea4c2d7738244ca3a0d0163f5adeddcb131cb92b9d452149a56394d712a87e4af90259e6f7ee8d7ba0779543927284f7
|
@@ -136,17 +136,3 @@ class String
|
|
136
136
|
end
|
137
137
|
|
138
138
|
end
|
139
|
-
|
140
|
-
# We aren't reopening Symbol class for anything else yet, so we'll just define
|
141
|
-
# it in this file.
|
142
|
-
class Symbol
|
143
|
-
|
144
|
-
def keyify
|
145
|
-
to_s.keyify
|
146
|
-
end
|
147
|
-
|
148
|
-
def slugify
|
149
|
-
to_s.slugify
|
150
|
-
end
|
151
|
-
|
152
|
-
end
|
data/spec/object_spec.rb
CHANGED
@@ -24,6 +24,17 @@ describe Object do
|
|
24
24
|
end
|
25
25
|
|
26
26
|
it "#is_an?" do
|
27
|
+
a = Array
|
28
|
+
expect(a.is_an?(Array)).to be_true
|
29
|
+
expect(a.is_an?(Hash)).to be_false
|
30
|
+
end
|
31
|
+
|
32
|
+
it "#is_not_a?" do
|
33
|
+
a = Array
|
34
|
+
expect(a.is_not_a?(Array)).to be_false
|
35
|
+
expect(a.is_not_a?(Hash)).to be_true
|
36
|
+
expect(a.is_not_an?(Array)).to be_false
|
37
|
+
expect(a.is_not_an?(Hash)).to be_true
|
27
38
|
end
|
28
39
|
|
29
40
|
end
|
data/spec/symbol_spec.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Symbol do
|
4
|
+
|
5
|
+
it "unary respond_to" do
|
6
|
+
a_thing = TestThing.new 'foo bar'
|
7
|
+
expect(a_thing).to eq 'foo bar'
|
8
|
+
expect
|
9
|
+
end
|
10
|
+
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
class TestThing < String
|
15
|
+
|
16
|
+
def custom_method
|
17
|
+
'it works!'
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: finishing_moves
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.7'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank Koehl
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-02-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rb-readline
|
@@ -134,6 +134,7 @@ files:
|
|
134
134
|
- spec/object_spec.rb
|
135
135
|
- spec/spec_helper.rb
|
136
136
|
- spec/string_spec.rb
|
137
|
+
- spec/symbol_spec.rb
|
137
138
|
- spec/to_bool_spec.rb
|
138
139
|
homepage: https://github.com/forgecrafted/finishing_moves
|
139
140
|
licenses:
|
@@ -180,4 +181,5 @@ test_files:
|
|
180
181
|
- spec/object_spec.rb
|
181
182
|
- spec/spec_helper.rb
|
182
183
|
- spec/string_spec.rb
|
184
|
+
- spec/symbol_spec.rb
|
183
185
|
- spec/to_bool_spec.rb
|