evostream-event 0.2.7 → 0.3.0.pre.48
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/evostream/event.rb +7 -3
- data/lib/evostream/event/action.rb +1 -1
- data/lib/evostream/event/commands.rb +2 -0
- data/lib/evostream/event/commands/list_config.rb +24 -0
- data/lib/evostream/event/commands/list_streams.rb +26 -0
- data/lib/evostream/event/commands/push_stream.rb +5 -1
- data/lib/evostream/event/info.rb +1 -1
- data/lib/evostream/event/service.rb +1 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 800de409b06f72da9fea360d1fb258fa5c8b3679
|
4
|
+
data.tar.gz: d87582089071ece66fd76c04ee941e6bb60fedde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac2bfbc13159faf03523569e3d6cd599f126471a3d255e6f4704e6be443407b35f2b25fd9af7cbb5028f630d87991e6c0db3664476dd1000da1e0e42b2c59b62
|
7
|
+
data.tar.gz: d93acbb0635b58751e4dc9a789777b804e32b11cdbc54109e331c1a02fe53e318e48f8f866d713b377ec8bdece419a98facc455775834d4da257b09afee0f098
|
data/lib/evostream/event.rb
CHANGED
@@ -18,13 +18,17 @@ module Evostream
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def self.logger(message)
|
21
|
-
Rails.logger.debug "[#{Evostream::GEM_NAME}] #{message}"
|
21
|
+
Rails.logger.debug "[#{Evostream::GEM_NAME}] #{message}" \
|
22
|
+
if Evostream::Service.environment.eql?('development') && defined?(Rails)
|
22
23
|
end
|
23
24
|
|
24
25
|
def self.prepare_request(cmd)
|
25
|
-
|
26
|
+
env = Evostream::Service.environment.to_sym
|
27
|
+
Evostream.logger "ENV ------> #{env}"
|
28
|
+
case env
|
29
|
+
when :test
|
26
30
|
Evostream.request_test(cmd)
|
27
|
-
|
31
|
+
when :development, :production
|
28
32
|
Evostream.request_real(URI.parse("#{Evostream::Service.uri_in}/#{cmd}"))
|
29
33
|
end
|
30
34
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Evostream
|
4
|
+
module Commands
|
5
|
+
# Returns a list with all push/pull configurations.
|
6
|
+
#
|
7
|
+
# Whenever the pullStream or pushStream interfaces are called, a record
|
8
|
+
# containing the details of the pull or push is created in the
|
9
|
+
# pullpushconfig.xml file. Then, the next time the EMS is started, the
|
10
|
+
# pullpushconfig.xml file is read, and the EMS attempts to reconnect all of
|
11
|
+
# the previous pulled or pushed streams.
|
12
|
+
#
|
13
|
+
# This function has no parameters.
|
14
|
+
class ListConfig < Command
|
15
|
+
def initialize(commands = {})
|
16
|
+
super(commands)
|
17
|
+
end
|
18
|
+
|
19
|
+
def cmd
|
20
|
+
'listConfig'
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Evostream
|
4
|
+
module Commands
|
5
|
+
# Provides a detailed description of all active streams.
|
6
|
+
class ListStreams < Command
|
7
|
+
def initialize(commands = {})
|
8
|
+
super(commands)
|
9
|
+
end
|
10
|
+
|
11
|
+
def cmd
|
12
|
+
"listStreams?params=#{Base64.encode64(command.join)}"
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
attr_reader :command
|
18
|
+
|
19
|
+
# If this is 1 (true), internal streams (origin-edge related)
|
20
|
+
# are filtered out from the list
|
21
|
+
def disable_internal_streams(param = 'true')
|
22
|
+
"disableInternalStreams=#{param} "
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -11,7 +11,11 @@ module Evostream
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def cmd
|
14
|
-
|
14
|
+
base = command.join
|
15
|
+
Evostream.logger "Parameters : #{base}"
|
16
|
+
string = Base64.strict_encode64(base)
|
17
|
+
Evostream.logger "Base 64 decoded : #{Base64.strict_decode64(string)}"
|
18
|
+
"pushStream?params=#{string}"
|
15
19
|
end
|
16
20
|
|
17
21
|
private
|
data/lib/evostream/event/info.rb
CHANGED
@@ -15,6 +15,7 @@ module Evostream
|
|
15
15
|
|
16
16
|
# Environment for this gem
|
17
17
|
# :test -- Dont send command to EvoStream instance
|
18
|
+
# :development -- Dont send command to EvoStream instance and write logs
|
18
19
|
# :production -- Execute command HTTP
|
19
20
|
def self.environment
|
20
21
|
@@environment || :test
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: evostream-event
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0.pre.48
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- VAILLANT Jeremy
|
@@ -269,6 +269,8 @@ files:
|
|
269
269
|
- lib/evostream/event/commands/create/dash.rb
|
270
270
|
- lib/evostream/event/commands/create/hls.rb
|
271
271
|
- lib/evostream/event/commands/destroy.rb
|
272
|
+
- lib/evostream/event/commands/list_config.rb
|
273
|
+
- lib/evostream/event/commands/list_streams.rb
|
272
274
|
- lib/evostream/event/commands/push_stream.rb
|
273
275
|
- lib/evostream/event/event.rb
|
274
276
|
- lib/evostream/event/event/events.rb
|
@@ -337,9 +339,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
337
339
|
version: '0'
|
338
340
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
339
341
|
requirements:
|
340
|
-
- - "
|
342
|
+
- - ">"
|
341
343
|
- !ruby/object:Gem::Version
|
342
|
-
version:
|
344
|
+
version: 1.3.1
|
343
345
|
requirements: []
|
344
346
|
rubyforge_project:
|
345
347
|
rubygems_version: 2.4.5
|