evostream-event 1.0.2.pre.75 → 1.0.2.pre.77

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
  SHA256:
3
- metadata.gz: 26bc5703d4d777d8d4427c528310aff1c403b42ff397b04d54aac6c4c8241459
4
- data.tar.gz: 7c37775b0e6c2d526317efb38adb56a00dc502ef2251e498694d963608097ed4
3
+ metadata.gz: 81c55b826fdc2c3964fced43d0826f4000efdafcfc57ce0959e237c407661837
4
+ data.tar.gz: 298a0cabbfb25feb69873191f229f9b18ce80b3c4c77fdb56ab70e018807a347
5
5
  SHA512:
6
- metadata.gz: 3ee670895b42f9e1766dc257f885330cd002af4b828d56f7b0dab4a2d2789bf61478bef2c2093dfe830456ebe14681267e895b5280dc4250c258c4b2330d1bda
7
- data.tar.gz: 6326c3ba4e6cef1fd12a7f076eb61941ef6869b4805a4900b96c39dc45424f0498f731aaf849eb8871e5657746c30716ce3e0d1704c58a4dda931d3c19814955
6
+ metadata.gz: 1833c901e46ce0648ecbac302bb6ae9a35408f9b9623a8b1cb5393858b5c0fc1aa506cedf50a163d3afe6419ec93ecf3e23621e7f06860588a28d48c6184876c
7
+ data.tar.gz: 66cb28fa2b7781269d3ff5b0375d5fa83ce85fa70967fa2f9910a2d2a8731748da64739fba0ebed6cf47f1ffa3534a94aa8cb29b6d896005c9c227f71eba6e0a
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Evostream::Event | [![Build Status](https://travis-ci.org/Dev-Crea/evostream-event.svg?branch=master)](https://travis-ci.org/Dev-Crea/evostream-event) [![Gem Version](https://badge.fury.io/rb/evostream-event.svg)](https://badge.fury.io/rb/evostream-event) [![inline docs](https://inch-ci.org/github/Dev-Crea/evostream-event.svg)](https://inch-ci.org/github/Dev-Crea/evostream-event)
1
+ # Evostream::Event | [![Build Status](https://travis-ci.org/Dev-Crea/evostream-event.svg?branch=master)](https://travis-ci.org/Dev-Crea/evostream-event) [![Gem Version](https://badge.fury.io/rb/evostream-event.svg)](https://badge.fury.io/rb/evostream-event) [![inline docs](https://inch-ci.org/github/Dev-Crea/evostream-event.svg)](https://inch-ci.org/github/Dev-Crea/evostream-event) [![Maintainability](https://api.codeclimate.com/v1/badges/8fc5d78d80473fd9ae3e/maintainability)](https://codeclimate.com/github/Dev-Crea/cli-evostream/maintainability)
2
2
 
3
3
  Evostream Event listen event to Evostream and execute task.
4
4
 
@@ -57,7 +57,7 @@ config.model = ModelUsedInDatabase
57
57
  config.model_id = :identifier_used_in_model
58
58
 
59
59
  # Use environment for this gem. Choose between :
60
- # - development : Write in log and Send request to evoStream
60
+ # - development : Write in log and Send request to EvoStream
61
61
  # - test : Write in Log
62
62
  # - production : Send request to EvoStream
63
63
  config.environement = :test
@@ -4,7 +4,7 @@
4
4
  module Net
5
5
  # Override Net::HTTPResponse for create response with body
6
6
  class HTTPResponse
7
- def self.mock(body = {})
7
+ def self.mock(body = {}.to_json)
8
8
  # construct
9
9
  clazz = self
10
10
  response = clazz.new('1.1', '200', 'OK')
@@ -13,7 +13,7 @@ module Net
13
13
  response.instance_variable_set :@body, body
14
14
 
15
15
  # mockulate
16
- response.instance_eval 'def body; @body; end'
16
+ response.instance_eval 'def body; @body.to_json; end'
17
17
 
18
18
  response
19
19
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  require 'spec_helper'
4
4
 
5
- describe Evostream::Action, type: :request, broken: true do
5
+ describe Evostream::Action, type: :request do
6
6
  let(:action) { Evostream::Action.new(payload) }
7
7
  let(:payload) { {} }
8
8
 
@@ -20,13 +20,29 @@ describe Evostream::Action, type: :request, broken: true do
20
20
  }
21
21
  end
22
22
 
23
- include_examples 'test request action'
23
+ context 'global Evostream variable' do
24
+ include_examples 'test request action'
25
+ end
26
+
27
+ context 'local Evostream variable' do
28
+ let(:action) { Evostream::Action.new(payload, 'evostream.dazzl.local') }
29
+
30
+ include_examples 'test request action'
31
+ end
24
32
  end
25
33
 
26
34
  describe 'remove_config' do
27
35
  let(:action_name) { 'removeConfig' }
28
36
  let(:payload) { { id: Faker::Number.between(1, 999_999) } }
29
37
 
30
- include_examples 'test request action'
38
+ context 'global Evostream variable' do
39
+ include_examples 'test request action'
40
+ end
41
+
42
+ context 'local Evostream variable' do
43
+ let(:action) { Evostream::Action.new(payload, 'evostream.dazzl.local') }
44
+
45
+ include_examples 'test request action'
46
+ end
31
47
  end
32
48
  end
data/spec/spec_helper.rb CHANGED
@@ -33,12 +33,13 @@ RSpec.configure do |config|
33
33
  # Configure Service DSL
34
34
  config.before do
35
35
  Evostream::Service.configuration do |c|
36
- c.uri_in = 'http://server_stream.local:80'
37
- c.uri_out = 'http://server_stream.local:7777'
38
- c.name = 'srteamming_'
39
- c.web_root = '/var/www/html'
40
- c.model = Test
41
- c.model_id = :identifier_used_in_model
36
+ c.uri_in = 'http://server_stream.local:80'
37
+ c.uri_out = 'http://server_stream.local:7777'
38
+ c.name = 'srteamming_'
39
+ c.web_root = '/var/www/html'
40
+ c.model = Test
41
+ c.model_id = :identifier_used_in_model
42
+ c.environment = :test
42
43
  end
43
44
  end
44
45
 
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: 1.0.2.pre.75
4
+ version: 1.0.2.pre.77
5
5
  platform: ruby
6
6
  authors:
7
7
  - VAILLANT Jeremy