wowza_rest 0.2.2 → 0.2.3
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 +4 -4
- data/lib/wowza_rest.rb +2 -1
- data/lib/wowza_rest/core_ext/string/inflections.rb +22 -0
- data/lib/wowza_rest/version.rb +1 -1
- metadata +3 -3
- data/lib/wowza_rest/ext/string.rb +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5832e1b90ea446b80f13a40b8e91c28a7a3a17e
|
4
|
+
data.tar.gz: 01e65cade305ec83ea2cf8f78f85c9a03ec7dd0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ad3e763386de9a51027aefebdfe9b8312b927e7180dc088b254acdb366740a2199fd8540db57db3aa35eb96c8582a721bf7ef4aa425c6dd92e3cf074bf6af3f
|
7
|
+
data.tar.gz: 303108a94cb1bbb408a46b164143579ebf1fa1d3918bbae8ba38cd928c382ae84057d6f19b84ea821c8c38fa9be44b9fbf97aab64be19bd58f08cf83b9c6ad2d
|
data/lib/wowza_rest.rb
CHANGED
@@ -0,0 +1,22 @@
|
|
1
|
+
module WowzaRest
|
2
|
+
module CoreExt
|
3
|
+
module String
|
4
|
+
module Inflections
|
5
|
+
def underscore
|
6
|
+
gsub(/::/, '/')
|
7
|
+
.gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
|
8
|
+
.gsub(/([a-z\d])([A-Z])/, '\1_\2')
|
9
|
+
.tr('-', '_')
|
10
|
+
.downcase
|
11
|
+
end
|
12
|
+
|
13
|
+
def camelize
|
14
|
+
tr('-', '_')
|
15
|
+
.gsub(/\b[A-Z]+/, &:downcase)
|
16
|
+
.gsub(/_(.)/, &:upcase)
|
17
|
+
.tr('_', '')
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/wowza_rest/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wowza_rest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hazem Taha
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -173,13 +173,13 @@ files:
|
|
173
173
|
- lib/wowza_rest/applications.rb
|
174
174
|
- lib/wowza_rest/client.rb
|
175
175
|
- lib/wowza_rest/connection.rb
|
176
|
+
- lib/wowza_rest/core_ext/string/inflections.rb
|
176
177
|
- lib/wowza_rest/data/application.rb
|
177
178
|
- lib/wowza_rest/data/application_short.rb
|
178
179
|
- lib/wowza_rest/data/base.rb
|
179
180
|
- lib/wowza_rest/data/incoming_stream_stats.rb
|
180
181
|
- lib/wowza_rest/data/instance.rb
|
181
182
|
- lib/wowza_rest/errors.rb
|
182
|
-
- lib/wowza_rest/ext/string.rb
|
183
183
|
- lib/wowza_rest/instances.rb
|
184
184
|
- lib/wowza_rest/publishers.rb
|
185
185
|
- lib/wowza_rest/version.rb
|
@@ -1,16 +0,0 @@
|
|
1
|
-
class String
|
2
|
-
def underscore
|
3
|
-
gsub(/::/, '/')
|
4
|
-
.gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
|
5
|
-
.gsub(/([a-z\d])([A-Z])/, '\1_\2')
|
6
|
-
.tr('-', '_')
|
7
|
-
.downcase
|
8
|
-
end
|
9
|
-
|
10
|
-
def camelize
|
11
|
-
tr('-', '_')
|
12
|
-
.gsub(/\b[A-Z]+/, &:downcase)
|
13
|
-
.gsub(/_(.)/, &:upcase)
|
14
|
-
.tr('_', '')
|
15
|
-
end
|
16
|
-
end
|