factor-connector-api 0.0.7 → 0.0.8
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 +15 -0
- data/lib/factor-connector-api/test.rb +15 -11
- metadata +8 -22
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
ZTE3ZDViMTM4ZGVhNTY4ZmRkZTVlZTg1MzBmYTgxZDlkMWQ5NmUzMw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MzAzMjYzOGNlYmQ3ZWEzY2E1NDNhYTc4ZTVmNTdjY2I0NGFhMDBmNA==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
YzQ2MjQ4MWY4MzcyMzQzNGRhY2UzOWRjYmU0ODBlYjIxMzBmYzE0M2M0ZjQ5
|
10
|
+
YmNhMmU3NTE0NmY4ZDA4NjY0ODU0ZTM0NzZiODc3MTljMDc4Y2JiNmUwNGRl
|
11
|
+
MzQ2NzY3NzA0YmY1MjM3NTNhMzk1Nzk1NDI2MjgyODE4ZmRmMTQ=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ZTYyMjg2MzJhYmFhMDU5ZTVlYmYxM2UzNTQ1N2E0YjU2MmRlYWE5MWE0MDZj
|
14
|
+
ODMyM2Y1ZmJhMDkzNmY0MjAyZmVlOTYzOTBiZGY2Y2RjYmZiYThlYjQwMGM2
|
15
|
+
M2RhYjRkNDczNzFiNDdlNzhmNzI2OWIyNDZkNWZkZWVkZjU3Zjk=
|
@@ -10,10 +10,10 @@ end
|
|
10
10
|
|
11
11
|
module Factor::Connector
|
12
12
|
class ServiceInstance
|
13
|
-
include
|
13
|
+
include Wrong
|
14
14
|
|
15
15
|
def expect_response(options={}, &block)
|
16
|
-
|
16
|
+
eventually options do
|
17
17
|
@logs.any? do |log|
|
18
18
|
block.call(log)
|
19
19
|
end
|
@@ -22,34 +22,38 @@ module Factor::Connector
|
|
22
22
|
|
23
23
|
def expect_return(options={})
|
24
24
|
expect_response(options) do |log|
|
25
|
-
log[:type]=='return'
|
25
|
+
assert { log[:type] == 'return' }
|
26
|
+
assert { log[:payload] == log[:type] }
|
26
27
|
end
|
27
28
|
end
|
28
29
|
|
29
30
|
def expect_fail(options={})
|
30
31
|
expect_response(options) do |log|
|
31
|
-
log[:type]=='fail'
|
32
|
+
assert { log[:type] == 'fail' }
|
32
33
|
end
|
33
34
|
end
|
34
35
|
|
35
36
|
def expect_info(options={})
|
36
37
|
expect_response(options) do |log|
|
37
|
-
|
38
|
-
|
38
|
+
assert { log[:type] == 'log' }
|
39
|
+
assert { log[:status] == 'info' } if log[:type] == 'log'
|
40
|
+
assert { log[:message] == options[:message] } if options[:message] && log[:type]=='log' && log[:status]=='info'
|
39
41
|
end
|
40
42
|
end
|
41
43
|
|
42
44
|
def expect_warn(options={})
|
43
45
|
expect_response(options) do |log|
|
44
|
-
|
45
|
-
|
46
|
+
assert { log[:type] == 'log' }
|
47
|
+
assert { log[:status] == 'warn' } if log[:type] == 'log'
|
48
|
+
assert { log[:message] == options[:message] } if options[:message] && log[:type]=='log' && log[:status]=='warn'
|
46
49
|
end
|
47
50
|
end
|
48
51
|
|
49
52
|
def expect_error(options={})
|
50
53
|
expect_response(options) do |log|
|
51
|
-
|
52
|
-
|
54
|
+
assert { log[:type] == 'log' }
|
55
|
+
assert { log[:status] == 'error' } if log[:type] == 'log'
|
56
|
+
assert { log[:message] == options[:message] } if options[:message] && log[:type]=='log' && log[:status]=='error'
|
53
57
|
end
|
54
58
|
end
|
55
59
|
|
@@ -59,7 +63,7 @@ module Factor::Connector
|
|
59
63
|
self.callback = proc do |action_response|
|
60
64
|
@logs << action_response
|
61
65
|
end
|
62
|
-
call_action(
|
66
|
+
call_action(action_name,params)
|
63
67
|
|
64
68
|
instance_exec &block
|
65
69
|
end
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: factor-connector-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.8
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Maciej Skierkowski
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-07 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: addressable
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,7 +27,6 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: rest-client
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ~>
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ~>
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,7 +41,6 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: celluloid
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ~>
|
52
46
|
- !ruby/object:Gem::Version
|
@@ -54,7 +48,6 @@ dependencies:
|
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ~>
|
60
53
|
- !ruby/object:Gem::Version
|
@@ -62,7 +55,6 @@ dependencies:
|
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: codeclimate-test-reporter
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
59
|
- - ~>
|
68
60
|
- !ruby/object:Gem::Version
|
@@ -70,7 +62,6 @@ dependencies:
|
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
66
|
- - ~>
|
76
67
|
- !ruby/object:Gem::Version
|
@@ -78,7 +69,6 @@ dependencies:
|
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: rspec
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
73
|
- - ~>
|
84
74
|
- !ruby/object:Gem::Version
|
@@ -86,7 +76,6 @@ dependencies:
|
|
86
76
|
type: :development
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
80
|
- - ~>
|
92
81
|
- !ruby/object:Gem::Version
|
@@ -94,7 +83,6 @@ dependencies:
|
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: rake
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
87
|
- - ~>
|
100
88
|
- !ruby/object:Gem::Version
|
@@ -102,12 +90,11 @@ dependencies:
|
|
102
90
|
type: :development
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
93
|
requirements:
|
107
94
|
- - ~>
|
108
95
|
- !ruby/object:Gem::Version
|
109
96
|
version: 10.3.2
|
110
|
-
description:
|
97
|
+
description:
|
111
98
|
email:
|
112
99
|
- maciej@factor.io
|
113
100
|
executables: []
|
@@ -123,8 +110,8 @@ files:
|
|
123
110
|
- ./lib/definitions/service_definition.rb
|
124
111
|
- ./lib/definitions/web_hook_definition.rb
|
125
112
|
- ./lib/errors.rb
|
126
|
-
- ./lib/factor-connector-api/test.rb
|
127
113
|
- ./lib/factor-connector-api.rb
|
114
|
+
- ./lib/factor-connector-api/test.rb
|
128
115
|
- ./lib/instances/action_instance.rb
|
129
116
|
- ./lib/instances/instance.rb
|
130
117
|
- ./lib/instances/listener_instance.rb
|
@@ -133,27 +120,26 @@ files:
|
|
133
120
|
- ./spec/spec_helper.rb
|
134
121
|
homepage: https://factor.io
|
135
122
|
licenses: []
|
123
|
+
metadata: {}
|
136
124
|
post_install_message:
|
137
125
|
rdoc_options: []
|
138
126
|
require_paths:
|
139
127
|
- lib
|
140
128
|
required_ruby_version: !ruby/object:Gem::Requirement
|
141
|
-
none: false
|
142
129
|
requirements:
|
143
130
|
- - ! '>='
|
144
131
|
- !ruby/object:Gem::Version
|
145
132
|
version: '0'
|
146
133
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
|
-
none: false
|
148
134
|
requirements:
|
149
135
|
- - ! '>='
|
150
136
|
- !ruby/object:Gem::Version
|
151
137
|
version: '0'
|
152
138
|
requirements: []
|
153
139
|
rubyforge_project:
|
154
|
-
rubygems_version:
|
140
|
+
rubygems_version: 2.4.2
|
155
141
|
signing_key:
|
156
|
-
specification_version:
|
157
|
-
summary:
|
142
|
+
specification_version: 4
|
143
|
+
summary: Factor.io Connector API Library
|
158
144
|
test_files:
|
159
145
|
- ./spec/spec_helper.rb
|