fake_smith 0.0.12 → 0.1.0
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/README.md +1 -1
- data/lib/fake_smith/version.rb +1 -1
- data/lib/fake_smith.rb +12 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 32024088bc7448d01170ae23c9053673c4a804e4
|
|
4
|
+
data.tar.gz: 2c2929e478ac089f91ac7707f6b1faf407a20150
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2dd36aebfebb8576deb1732a12de20c84485d08eabec589a436d27ec7c39c3b03f99883c8aa6616c6a6429dd8ba3cee2724c1ffe8ec1ff6d98823ff98b022db5
|
|
7
|
+
data.tar.gz: bf00541b8f77fd5e38c95fe56dd6cb11d6126445c4e8e2a6fef8436880b19c266333dcd73021cc67640d3c334d5ed3426213256d938cf271e4ab1a73291d5d0d
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# FakeSmith
|
|
2
2
|
|
|
3
|
-
FakeSmith is here to help you unit test your Smith Agents.
|
|
3
|
+
FakeSmith is here to help you unit test your [Smith](https://github.com/filterfish/smith2) Agents.
|
|
4
4
|
|
|
5
5
|
Have you ever wanted to test your agents without having to worry about all the overhead of running the agency and sending messages and waiting asynchronously for the magic to happen? Well want no longer and do now!
|
|
6
6
|
|
data/lib/fake_smith/version.rb
CHANGED
data/lib/fake_smith.rb
CHANGED
|
@@ -23,12 +23,17 @@ class FakeSmith
|
|
|
23
23
|
def self.clear_all
|
|
24
24
|
clear_subscriptions
|
|
25
25
|
clear_messages
|
|
26
|
+
clear_logger
|
|
26
27
|
end
|
|
27
28
|
|
|
28
29
|
def self.subscribed_queues
|
|
29
30
|
subscriptions.keys
|
|
30
31
|
end
|
|
31
32
|
|
|
33
|
+
def self.logger
|
|
34
|
+
@logger ||= FakeSmith::Logger.new
|
|
35
|
+
end
|
|
36
|
+
|
|
32
37
|
private
|
|
33
38
|
|
|
34
39
|
def self.messages
|
|
@@ -47,7 +52,13 @@ class FakeSmith
|
|
|
47
52
|
@subscriptions = {}
|
|
48
53
|
end
|
|
49
54
|
|
|
55
|
+
def self.clear_logger
|
|
56
|
+
@logger = nil
|
|
57
|
+
end
|
|
58
|
+
|
|
50
59
|
class Logger
|
|
60
|
+
attr_reader :logs
|
|
61
|
+
|
|
51
62
|
def initialize
|
|
52
63
|
@logs = {}
|
|
53
64
|
end
|
|
@@ -152,7 +163,7 @@ module Smith
|
|
|
152
163
|
end
|
|
153
164
|
|
|
154
165
|
def logger
|
|
155
|
-
|
|
166
|
+
FakeSmith.logger
|
|
156
167
|
end
|
|
157
168
|
|
|
158
169
|
def get_test_logger
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fake_smith
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0
|
|
4
|
+
version: 0.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dylan Griffith
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-03-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|