tarpaulin 0.3.3 → 0.3.4

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.3
1
+ 0.3.4
@@ -35,10 +35,12 @@ module CampingHooks
35
35
 
36
36
  end # ClassMethods
37
37
 
38
- def self.included(mod)
39
- mod.extend(ClassMethods) # both are class methods, but what Object is @hooks an instance variable of?
38
+ def self.included(base)
39
+ base.extend(ClassMethods) # both are class methods, but what Object is @hooks an instance variable of?
40
40
  end
41
41
 
42
+ # TODO skip ::I and handle :except :)
43
+
42
44
  def run_filter(sym)
43
45
  o = self.class.to_s.split("::")
44
46
  app = Object.const_get(o.first)
@@ -6,10 +6,26 @@
6
6
  # => Use ClassName.instance_eval to define class methods.
7
7
  # => Use ClassName.class_eval to define instance methods.
8
8
  #
9
+
10
+ # http://stackoverflow.com/questions/1766741/comparing-ruby-hashes
11
+ =begin
12
+ class Hash
13
+ def diff(other)
14
+ self.keys.inject({}) do |memo, key|
15
+ unless self[key] == other[key]
16
+ memo[key] = [self[key], other[key]]
17
+ end
18
+ memo
19
+ end
20
+ end
21
+ =end
22
+
9
23
  module CampingFlash
10
24
 
11
25
  def self.included(base)
12
- Camping::H.class_eval do
26
+ # self is CampingFlash
27
+ # base is TheApp
28
+ Camping::H.class_eval <<-EOT
13
29
  def diff(other)
14
30
  self.keys.inject({}) do |memo, key|
15
31
  unless self[key] == other[key]
@@ -18,7 +34,7 @@ module CampingFlash
18
34
  memo
19
35
  end
20
36
  end
21
- end
37
+ EOT
22
38
  end
23
39
 
24
40
  def to_a #:nodoc:
@@ -26,10 +42,11 @@ module CampingFlash
26
42
  diff = @_state.diff(@state)
27
43
  diff.each {|k,v| @env['rack.session'].delete(k) }
28
44
  end
29
- super
45
+ #super
46
+ until_to_a_gets_into_camping
30
47
  end
31
48
 
32
- def to_a #:nodoc:
49
+ def until_to_a_gets_into_camping #:nodoc:
33
50
  # overwrite the session with how @state is now
34
51
  # depeding on whether diff is defined for H or not
35
52
  if @state.respond_to? :diff
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "tarpaulin"
8
- s.version = "0.3.3"
8
+ s.version = "0.3.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Anthony Durity"]
12
- s.date = "2011-11-02"
12
+ s.date = "2011-11-03"
13
13
  s.description = "So I don't have to copy and paste a million times."
14
14
  s.email = "github@jollyrotten.org"
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tarpaulin
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 3
10
- version: 0.3.3
9
+ - 4
10
+ version: 0.3.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Anthony Durity
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-11-02 00:00:00 Z
18
+ date: 2011-11-03 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  version_requirements: &id001 !ruby/object:Gem::Requirement