mushin 0.0.0.pre31 → 0.0.0.pre32
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/base.rb +9 -9
- 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: 6eb5d6a6e89bd59fab5fcfa562b12624aaf2348c
|
4
|
+
data.tar.gz: 1534cdbc7c8ebfd1a3363440da6610fc096e5161
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 872aa5fce097d8819e664dd963b765150ee24319537b7bfdb078f009d0a24b5ee7e8f24f80ca9bc1f544f1950d646c9bb586257d96597c079571a619e46e077a
|
7
|
+
data.tar.gz: 9f475b7914f4daf99c651c11d53fbc0950a6547f54050542acc6a76581e719396494009c6b25ff214c791585ed45af92824a6df761a2312ecc38819049d69664
|
data/lib/mushin/base.rb
CHANGED
@@ -1,10 +1,13 @@
|
|
1
|
+
require_relative './middleware/builder'
|
2
|
+
require_relative './middleware/runner'
|
3
|
+
|
1
4
|
module Mushin
|
2
5
|
module Errors
|
3
6
|
exceptions = %w[ UnkownDSLConstruct UnkownActivation UnknownOption ]
|
4
7
|
exceptions.each { |e| const_set(e, Class.new(StandardError)) }
|
5
8
|
end
|
6
9
|
|
7
|
-
|
10
|
+
module Customization
|
8
11
|
class << self
|
9
12
|
#attr_accessor :opts, :params
|
10
13
|
def opts
|
@@ -16,22 +19,22 @@ module Mushin
|
|
16
19
|
end
|
17
20
|
module Opts
|
18
21
|
def self.[] key
|
19
|
-
Mushin::
|
22
|
+
Mushin::Customization.opts[key]
|
20
23
|
end
|
21
24
|
def self.[]= key, value
|
22
|
-
Mushin::
|
25
|
+
Mushin::Customization.opts.merge! Hash[key, value]
|
23
26
|
end
|
24
27
|
end
|
25
28
|
module Params
|
26
29
|
def self.[] key
|
27
|
-
Mushin::
|
30
|
+
Mushin::Customization.params[key]
|
28
31
|
end
|
29
32
|
def self.[]= key, value
|
30
|
-
Mushin::
|
33
|
+
Mushin::Customization.params.merge! Hash[key, value]
|
31
34
|
end
|
32
35
|
end
|
33
36
|
end
|
34
|
-
|
37
|
+
|
35
38
|
module DSL
|
36
39
|
class Context
|
37
40
|
attr_accessor :title, :statments
|
@@ -149,9 +152,6 @@ module Mushin
|
|
149
152
|
end
|
150
153
|
|
151
154
|
module Engine
|
152
|
-
require_relative './middleware/builder'
|
153
|
-
require_relative './middleware/runner'
|
154
|
-
|
155
155
|
def Engine.setup before_stack = []
|
156
156
|
@@setup_middlewares = before_stack
|
157
157
|
end
|