sadie 0.0.47 → 0.0.48

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/CHANGELOG +1 -0
  2. data/lib/sadie.rb +16 -5
  3. data/lib/sadie/version.rb +1 -1
  4. metadata +61 -38
data/CHANGELOG CHANGED
@@ -20,3 +20,4 @@
20
20
  [0.0.45] bugfix (punt worked!) in templated file handling
21
21
  [0.0.46] massive code cleanup. moved lots of things to private. documented all public methods.
22
22
  [0.0.47] eachers now sane and can be set on any key, even other eacher provided keys
23
+ [0.0.48] fixed bug that limited to one the number of eachers that could be associated with a key.
data/lib/sadie.rb CHANGED
@@ -261,6 +261,8 @@ class Sadie
261
261
  sadiekey = params["sadiekey"]
262
262
  end
263
263
 
264
+ whichEacherFrame != Sadie::EACH and debug! 8, "whicheacherframe: #{whichEacherFrame}, occur_at: #{occur_at}"
265
+
264
266
  if midEacherInit?
265
267
 
266
268
  debug! 10, "in mid eacher init (#{sadiekey})"
@@ -279,11 +281,16 @@ class Sadie
279
281
  end
280
282
 
281
283
  elsif whichEacherFrame == occur_at
284
+
285
+ occur_at != Sadie::EACH and debug! 8, "pre-yield for skey: #{sadiekey}, #{occur_at}"
286
+
282
287
  if block.arity == 0
283
288
  yield self
284
289
  else
285
290
  yield self, getEacherParam
286
291
  end
292
+
293
+ occur_at != Sadie::EACH and debug! 8, "post-yield for skey: #{sadiekey}, #{occur_at}"
287
294
  end
288
295
  end
289
296
 
@@ -295,7 +302,7 @@ class Sadie
295
302
  #
296
303
  def eacherFrame( sadiekey, occur_at, param=nil )
297
304
 
298
- debug! 8, "eacherFrame(#{occur_at}): #{sadiekey}"
305
+ occur_at != Sadie::EACH and debug! 8, "eacherFrame(#{occur_at}): #{sadiekey}"
299
306
 
300
307
  key = sadiekey
301
308
  # if defined? @eacher_frame_redirect
@@ -308,7 +315,7 @@ class Sadie
308
315
  defined? param and setEacherParam( param )
309
316
  if filepaths = eacherFilepaths( key )
310
317
  filepaths.each do |filepath|
311
- debug! 10, "each frame loading: #{filepath} for key: #{key}"
318
+ occur_at != Sadie::EACH and debug! 8, "eacher frame loading: #{filepath} for key: #{key}"
312
319
  load filepath
313
320
  end
314
321
  end
@@ -709,15 +716,19 @@ class Sadie
709
716
 
710
717
 
711
718
  def whichEacherFrame
712
- @eacher_frame
719
+ return nil if ! defined? @eacher_frame
720
+ @eacher_frame.last
713
721
  end
714
722
 
715
723
  def setEacherFrame( f )
716
- @eacher_frame = f
724
+ defined? @eacher_frame or @eacher_frame = Array.new
725
+ @eacher_frame.push f
717
726
  end
718
727
 
719
728
  def unsetEacherFrame
720
- @eacher_frame = nil
729
+ if defined? @eacher_frame
730
+ @eacher_frame.pop
731
+ end
721
732
  end
722
733
 
723
734
  def setEacherParam( p )
data/lib/sadie/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Sadie
2
- VERSION = "0.0.47"
2
+ VERSION = "0.0.48"
3
3
  end
metadata CHANGED
@@ -1,49 +1,62 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: sadie
3
- version: !ruby/object:Gem::Version
4
- version: 0.0.47
3
+ version: !ruby/object:Gem::Version
4
+ hash: 127
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 48
10
+ version: 0.0.48
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Fred McDavid
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-04-29 00:00:00.000000000Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2012-04-30 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: dbi
16
- requirement: &22657300 !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
17
24
  none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 0
31
+ version: "0"
22
32
  type: :runtime
23
- prerelease: false
24
- version_requirements: *22657300
25
- - !ruby/object:Gem::Dependency
33
+ version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
26
35
  name: dbd-mysql
27
- requirement: &22656880 !ruby/object:Gem::Requirement
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
28
38
  none: false
29
- requirements:
30
- - - ! '>='
31
- - !ruby/object:Gem::Version
32
- version: '0'
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ hash: 3
43
+ segments:
44
+ - 0
45
+ version: "0"
33
46
  type: :runtime
34
- prerelease: false
35
- version_requirements: *22656880
36
- description: Sadie is a data framework intended to ease the pain of managing related
37
- data.
38
- email:
47
+ version_requirements: *id002
48
+ description: Sadie is a data framework intended to ease the pain of managing related data.
49
+ email:
39
50
  - fred@landmetrics.com
40
51
  executables: []
52
+
41
53
  extensions: []
42
- extra_rdoc_files:
54
+
55
+ extra_rdoc_files:
43
56
  - README
44
57
  - CHANGELOG
45
58
  - TODO
46
- files:
59
+ files:
47
60
  - .gitignore
48
61
  - CHANGELOG
49
62
  - Gemfile
@@ -95,26 +108,36 @@ files:
95
108
  - test/test_primers/two/deep/two_results.res
96
109
  homepage: http://www.landmetrics.com/Sadie
97
110
  licenses: []
111
+
98
112
  post_install_message:
99
113
  rdoc_options: []
100
- require_paths:
114
+
115
+ require_paths:
101
116
  - lib
102
- required_ruby_version: !ruby/object:Gem::Requirement
117
+ required_ruby_version: !ruby/object:Gem::Requirement
103
118
  none: false
104
- requirements:
105
- - - ! '>='
106
- - !ruby/object:Gem::Version
107
- version: '0'
108
- required_rubygems_version: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ hash: 3
123
+ segments:
124
+ - 0
125
+ version: "0"
126
+ required_rubygems_version: !ruby/object:Gem::Requirement
109
127
  none: false
110
- requirements:
111
- - - ! '>='
112
- - !ruby/object:Gem::Version
113
- version: '0'
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ hash: 3
132
+ segments:
133
+ - 0
134
+ version: "0"
114
135
  requirements: []
136
+
115
137
  rubyforge_project: sadie
116
138
  rubygems_version: 1.8.15
117
139
  signing_key:
118
140
  specification_version: 3
119
141
  summary: A gem that provides sadie, a data access framework
120
142
  test_files: []
143
+