mushin 0.6.0 → 0.7.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/lib/mushin/test_helper.rb +8 -4
- data/lib/mushin/version.rb +1 -1
- data/samples/sample1.rb +1 -18
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9057df63207a6d4c35c403ed8e75e2cc29c78f9c
|
4
|
+
data.tar.gz: c05c889e8cab74022ab63a1bd1e6e193b1f66f9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0b9754021490b0e953b880b00e84518cb3869af261c25213bd1a1ad3f8681a4ef3debe61a83bfe3a851bf2404e69266aeba147d547cffff411a925e399e12e1
|
7
|
+
data.tar.gz: aeea601253a532556130e000605723ccde419ef2726e67b6147e7ecc2bb8a5b0c31acdb7915af2bbd08d9528ccd6c1f29cad495250da111e017c3dca15f2e15e
|
data/lib/mushin/test_helper.rb
CHANGED
@@ -3,19 +3,23 @@ module Mushin
|
|
3
3
|
module Sample
|
4
4
|
class Ext < Mushin::Ext
|
5
5
|
def initialize(ext, opts = {}, params= {})
|
6
|
-
@ext
|
6
|
+
@ext = ext
|
7
7
|
@opts = opts
|
8
8
|
@params = params
|
9
9
|
end
|
10
10
|
|
11
11
|
def call(env)
|
12
|
-
|
12
|
+
|
13
|
+
$log.info "#{self} ext is called with the following options: #{@opts} & params: #{@params}; and env: #{env}"
|
14
|
+
|
13
15
|
# Inbound maniuplation
|
14
16
|
env = Hash.new if env.nil?
|
15
|
-
|
17
|
+
|
18
|
+
$log.info env[:var] = "#{self} new_value_inbound"
|
16
19
|
@ext.call(env)
|
20
|
+
|
17
21
|
#Outbound maniuplation
|
18
|
-
|
22
|
+
$log.info env[:var] = "#{self} new_value_outbound"
|
19
23
|
end
|
20
24
|
end
|
21
25
|
end
|
data/lib/mushin/version.rb
CHANGED
data/samples/sample1.rb
CHANGED
@@ -2,23 +2,6 @@ require 'mushin'
|
|
2
2
|
|
3
3
|
$log.level = Logger::WARN
|
4
4
|
module Sample
|
5
|
-
class Ext < Mushin::Ext
|
6
|
-
def initialize(ext, opts = {}, params= {})
|
7
|
-
@ext = ext
|
8
|
-
@opts = opts
|
9
|
-
@params = params
|
10
|
-
end
|
11
|
-
|
12
|
-
def call(env)
|
13
|
-
p "middleware called #{self}, #{@opts}, #{@params}"
|
14
|
-
# Inbound maniuplation
|
15
|
-
env = Hash.new if env.nil?
|
16
|
-
p env[:var] = "#{self} new_value_inbound"
|
17
|
-
@ext.call(env)
|
18
|
-
#Outbound maniuplation
|
19
|
-
p env[:var] = "#{self} new_value_outbound"
|
20
|
-
end
|
21
|
-
end
|
22
5
|
|
23
6
|
class TBP < Mushin::Test::Sample::Ext; end
|
24
7
|
class SSD < Mushin::Test::Sample::Ext; end
|
@@ -45,7 +28,7 @@ module Sample
|
|
45
28
|
Domain.new do
|
46
29
|
torrent_bots do
|
47
30
|
tpb search_result_max: "20", storage_path:"crazypath_here"
|
48
|
-
rutracker search_result_max: s
|
31
|
+
# rutracker search_result_max: s
|
49
32
|
end
|
50
33
|
end
|
51
34
|
end
|