gorilla-patch 2.3.0 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gorilla-patch.rb +2 -0
- data/lib/gorilla-patch/blank.rb +2 -0
- data/lib/gorilla-patch/compact.rb +2 -0
- data/lib/gorilla-patch/cover.rb +2 -0
- data/lib/gorilla-patch/deep_dup.rb +2 -0
- data/lib/gorilla-patch/except.rb +2 -0
- data/lib/gorilla-patch/inflections.rb +2 -0
- data/lib/gorilla-patch/keys.rb +2 -0
- data/lib/gorilla-patch/namespace.rb +16 -4
- data/lib/gorilla-patch/slice.rb +2 -0
- data/lib/gorilla-patch/symbolize.rb +2 -0
- data/lib/gorilla-patch/truncate.rb +2 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39cd07b28717192ffffb7de68f1d85a68395474c
|
4
|
+
data.tar.gz: 5aa35a4d83aa6148db41bb5872f9dae196c1ded4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2cb7d827100cfd226e89be4834fdce362552c742cf09dbdc9fb4268587c69d403c64ca2f50fd4ba579eb4c5bf4fb4b67f833d9c4921e927549ad9cbc4f5dafa
|
7
|
+
data.tar.gz: 27228e4b4c0af5c39759171bb5af830e71adc080807316c008b834106fdc6534d2f8c1384446e8987651bb8c2da91c39c298f22591732cf2e8306abe5517b687
|
data/lib/gorilla-patch.rb
CHANGED
data/lib/gorilla-patch/blank.rb
CHANGED
data/lib/gorilla-patch/cover.rb
CHANGED
data/lib/gorilla-patch/except.rb
CHANGED
data/lib/gorilla-patch/keys.rb
CHANGED
@@ -1,15 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module GorillaPatch
|
2
4
|
## Adding namespaces-changing methods
|
3
5
|
module Namespace
|
4
6
|
refine String do
|
5
7
|
def demodulize
|
6
|
-
split('::').last
|
8
|
+
split('::').last.to_s
|
9
|
+
end
|
10
|
+
|
11
|
+
def deconstantize
|
12
|
+
self[0, rindex('::') || 0]
|
7
13
|
end
|
8
14
|
end
|
9
15
|
|
10
|
-
|
11
|
-
|
12
|
-
|
16
|
+
[Module, Class].each do |klass|
|
17
|
+
refine klass do
|
18
|
+
def demodulize
|
19
|
+
name.demodulize
|
20
|
+
end
|
21
|
+
|
22
|
+
def deconstantize
|
23
|
+
name.deconstantize
|
24
|
+
end
|
13
25
|
end
|
14
26
|
end
|
15
27
|
end
|
data/lib/gorilla-patch/slice.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gorilla-patch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Popov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -148,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
148
|
version: '0'
|
149
149
|
requirements: []
|
150
150
|
rubyforge_project:
|
151
|
-
rubygems_version: 2.6.
|
151
|
+
rubygems_version: 2.6.8
|
152
152
|
signing_key:
|
153
153
|
specification_version: 4
|
154
154
|
summary: Refining core classes
|