wowza_rest 0.2.2 → 0.2.3

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: 8ed08a4543064704cfc079d99b01ca482ac3b8a1
4
- data.tar.gz: 37bb85b09e1e544019344e88ec2ecee4792bc316
3
+ metadata.gz: a5832e1b90ea446b80f13a40b8e91c28a7a3a17e
4
+ data.tar.gz: 01e65cade305ec83ea2cf8f78f85c9a03ec7dd0b
5
5
  SHA512:
6
- metadata.gz: 64daccebf840c89b41bdc941476691912db53ff08e79bc34fb8c35d7b38e810779ad379798fc11487c744fc779927c80ec83d50390607ec65b2738d22a993ffc
7
- data.tar.gz: 6a35ba443f8f52838bdbf99168ba82f4c64ac5e236c63082b02b80204add1c8dd14c26bf59ca1cb4e537c83805bc47a7ebd0139933c767c1b41f8ef13664b05c
6
+ metadata.gz: 1ad3e763386de9a51027aefebdfe9b8312b927e7180dc088b254acdb366740a2199fd8540db57db3aa35eb96c8582a721bf7ef4aa425c6dd92e3cf074bf6af3f
7
+ data.tar.gz: 303108a94cb1bbb408a46b164143579ebf1fa1d3918bbae8ba38cd928c382ae84057d6f19b84ea821c8c38fa9be44b9fbf97aab64be19bd58f08cf83b9c6ad2d
@@ -1,7 +1,8 @@
1
1
  require 'wowza_rest/version'
2
2
  require 'wowza_rest/client'
3
- require 'wowza_rest/ext/string'
3
+ require 'wowza_rest/core_ext/string/inflections'
4
4
  require 'json'
5
5
 
6
6
  module WowzaRest
7
+ String.include WowzaRest::CoreExt::String::Inflections
7
8
  end
@@ -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
@@ -1,3 +1,3 @@
1
1
  module WowzaRest
2
- VERSION = '0.2.2'.freeze
2
+ VERSION = '0.2.3'.freeze
3
3
  end
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.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-17 00:00:00.000000000 Z
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