mushin 0.0.0.pre93 → 0.0.0.pre94

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8e27529db318776e77cf55e16d76930fc4a77dcf
4
- data.tar.gz: 1fc5246e4ea479e3892a22ee951384b7708c0ecc
3
+ metadata.gz: 173b049e2e256622d7aa4445dfcf79ea967b6fbc
4
+ data.tar.gz: 297aa258200c1c26cbfb2aaef4f197da52306f3d
5
5
  SHA512:
6
- metadata.gz: 160b24fef6168991a105c805be3a40d14fadec4d88a3d6d026598284e6cc8fa1b275948194b0757574f622d17c835b81038a434905c67fb0ff9cc48213ebe862
7
- data.tar.gz: c7ac0aebc6870d38bd6b903b6f0699c9baed105ac9a1eef89688975669963d4f2bc5b05b1da33d71e7b500d720e089463e54c96eeaa4114ef78562156b45b27c
6
+ metadata.gz: a8ed502492200450ad67c22b93b78aee42e74017ba6d7f80f1a2f0775cd18ff4813131728de1a1b26e7656f4c00e2d5f1620ae9d382e16c8efa3f12a7be12043
7
+ data.tar.gz: ea16155207c863b948276c159a3c2fc034f85ceacb36a60f9e8da80f6bdf86d8314e6a9e3e5ddf174ce853126cc9d6d5b57f75e3f254b65492147a0d0d32d5fc
data/lib/mushin/base.rb CHANGED
@@ -21,10 +21,12 @@ module Mushin # Domain Frameworks Generator
21
21
  class << self
22
22
  attr_accessor :opts, :params
23
23
  def opts
24
- @opts ||= {}
24
+ #@opts ||= {}
25
+ @opts = Hash.new
25
26
  end
26
27
  def params
27
- @params ||= {}
28
+ #@params ||= {}
29
+ @params = Hash.new
28
30
  end
29
31
  end
30
32
  module Opts
@@ -79,7 +81,8 @@ module Mushin # Domain Frameworks Generator
79
81
  def activity activity=[], &block
80
82
  @activity = Mushin::DSL::Activity.new activity
81
83
  def use name, opts={}, params={}
82
- if !@activity.uses.bsearch {|x| x == [name,opts,params]}
84
+ if !@activity.uses.bsearch {|x| x == [name,opts,params]} #TODO I think bsearch should be commented out as there are certain sequential logics that requires the use of a certain middleware more than once in a single activity
85
+
83
86
  @use = Mushin::DSL::Use.new name, opts, params
84
87
  @activity.uses << @use
85
88
  end
@@ -88,7 +91,7 @@ module Mushin # Domain Frameworks Generator
88
91
  @context.activities << @activity
89
92
  end
90
93
  yield
91
- Mushin::DSL.contexts << @context
94
+ Mushin::DSL.contexts << @context #TODO can't deal with class variables, needs to initialize this? or the DSL will be the same for all users? I think the DSL will be the same for all users so no need to worry about this being class variable on the application level.
92
95
  end
93
96
  end
94
97
 
@@ -96,7 +99,7 @@ module Mushin # Domain Frameworks Generator
96
99
  require_relative './middleware/builder'
97
100
  require_relative './middleware/runner'
98
101
 
99
- attr_accessor :setup_middlewares
102
+ attr_reader :setup_middlewares # set it through the setup method and then read it no need for attr_accessor :setup_middlewares
100
103
  def setup before_stack = []
101
104
  @setup_middlewares = before_stack
102
105
  end
File without changes
File without changes
data/lib/mushin.rb CHANGED
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mushin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0.pre93
4
+ version: 0.0.0.pre94
5
5
  platform: ruby
6
6
  authors:
7
7
  - theotherstupidguy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-14 00:00:00.000000000 Z
11
+ date: 2014-10-21 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: In the beginner’s mind there are many possibilities, in the expert’s
14
14
  mind there are few!