redisabel 0.1.0 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c3c8c70acdee7a5f3241bcdea83c38da43ed4360
4
- data.tar.gz: e8db271bab1fbab6bd989d9711557d1c122afee2
3
+ metadata.gz: d895b7d432bc13fba69a6dd6d39ae5920b0c19db
4
+ data.tar.gz: 25f9c6163b9efd8e5bc7aa928290d7cfd335b0bc
5
5
  SHA512:
6
- metadata.gz: e59e627086b94b466f55da6aa0123bf29b0f76a1616c6a2d7a8ed9979877afc491ef67d5746717c0012deda2928ac5d5c0e65d00c894dc2d8d1ca970a2e1d145
7
- data.tar.gz: 0aee823341f55bba873ce6c6db3e64393ad99ce56341cffb93bef999bd4cef84cba31cfba313ebcdf0ed68bc156e975ce9d2089a61d10d02f5a98061428b716c
6
+ metadata.gz: 3b7667b8310ba500856babe1e4feda058f89ba106029ff283025b62a38e8e0fb1f2f90de256e8a509f02ce47959bf05a74a46258a24be6c2fdf5d6af458f1186
7
+ data.tar.gz: 1df2742c315cc5ee576dc79d1c9e51545d4c2cef1e33160425b68c80a7d874aa54789cbd73f16d640e64a7783a2fd940644baa7d47cd339341a03f279a51fd48
@@ -37,7 +37,8 @@ class String
37
37
  end
38
38
 
39
39
  def camelize
40
- return self.to_s.split(/_/).map(&:capitalize).join
40
+ return self.to_s.split(/_/).map(&:capitalize).join.
41
+ split(/\//).map(&:capitalize).join('::')
41
42
  end
42
43
 
43
44
  def camelize!
@@ -45,8 +46,8 @@ class String
45
46
  end
46
47
 
47
48
  def underscore
48
- return self.to_s.split(/([A-Z]?[^A-Z]*)/).reject(&:empty?).
49
- map(&:downcase).join('_')
49
+ return self.to_s.sub(/:+/, '/').split(/([A-Z]?[^A-Z]*)/).reject(&:empty?).
50
+ map(&:downcase).join('_').gsub(/\/_/, '/')
50
51
  end
51
52
 
52
53
  def underscore!
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redisabel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthias Geier