finishing_moves 0.6.1 → 0.7

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: 69a404faf013aed724182275a9161c727b342964
4
- data.tar.gz: 5aa8ac458731e843686630cb0c17684f3057a03c
3
+ metadata.gz: f2c6e4670bf1a9e377d73ab245a84e26c8ecff3f
4
+ data.tar.gz: 019d4bf4fa0b5ed8877ea072e761554a78d6f28b
5
5
  SHA512:
6
- metadata.gz: e8efc6183a72dfa6d7608442151d9e47a933e986dae04f069a48783cedc3319868dc74bb664182b122813dc8415d917830723bea57cdbaca0935595d376e7995
7
- data.tar.gz: 164284b79295232351b67a00abb58afb106050bbe9f5b8ef69fe737a017c828838d613230a66d8f6ded2230ff32623c6c32087c90a394d0406713af82e281d1d
6
+ metadata.gz: 17e6414b9e771af698ae0273641eda9ab7b469252324fe4549b4806a3baafa3ccb7dbd97686eaa2a55c69fd97a2bebfeae7a47eaa5ce2c3265c7730c5610e4b5
7
+ data.tar.gz: ed6bbc3cf2ce0140c8da03e261b61e33ea4c2d7738244ca3a0d0163f5adeddcb131cb92b9d452149a56394d712a87e4af90259e6f7ee8d7ba0779543927284f7
@@ -6,6 +6,11 @@ class Object
6
6
 
7
7
  alias_method :is_an?, :is_a?
8
8
 
9
+ def is_not_a?(compare)
10
+ !is_a? compare
11
+ end
12
+ alias_method :is_not_an?, :is_not_a?
13
+
9
14
  def same_as(compare)
10
15
  if compare.respond_to? :to_s
11
16
  self.to_s == compare.to_s
@@ -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
@@ -1,3 +1,3 @@
1
1
  module FinishingMoves
2
- VERSION = "0.6.1"
2
+ VERSION = "0.7"
3
3
  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
@@ -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.6.1
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: 2015-06-15 00:00:00.000000000 Z
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