session_countdown 0.2.0 → 0.3.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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.3.0
data/created.rid ADDED
@@ -0,0 +1 @@
1
+ Fri, 06 Aug 2010 06:53:52 -0400
@@ -21,11 +21,20 @@ module SessionCountdown
21
21
  self[get_zero_key(name)] && ! countdown_running?(name)
22
22
  end
23
23
 
24
- # sanity check for existing countdown for some methods
24
+ # sanity checkpoint for some methods, checking for existing countdown
25
25
  def method_missing(method, *args)
26
- insist_countdown_exists(*args) # reason for this method_missing()
27
- method = "_#{method}"
28
- respond_to?(method) ? send(method, *args) : raise(NoMethodError)
26
+
27
+ method = "_#{method}" # super secret shadow method
28
+
29
+ # first check if method exists
30
+ raise NoMethodError unless respond_to?(method)
31
+
32
+ # check if specified countdown timer exists - reason for this method_missing
33
+ insist_countdown_exists(*args)
34
+
35
+ # finally run method
36
+ send(method, *args)
37
+
29
38
  end
30
39
 
31
40
  ## these methods all require a sanity check for existing countdown
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{session_countdown}
8
- s.version = "0.2.0"
8
+ s.version = "0.3.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Kevin Swope"]
@@ -24,6 +24,7 @@ Gem::Specification.new do |s|
24
24
  "README.rdoc",
25
25
  "Rakefile",
26
26
  "VERSION",
27
+ "created.rid",
27
28
  "lib/session_countdown.rb",
28
29
  "session_countdown.gemspec",
29
30
  "test/common/test_controller_test.rb",
@@ -4,6 +4,14 @@ require 'timecop'
4
4
  class TestControllerTest < ActionController::TestCase
5
5
 
6
6
 
7
+ test "fantasy/typo methods" do
8
+
9
+ assert_raise(NoMethodError) { session.countdown_banana }
10
+ assert_raise(NoMethodError) { session.countdown_banana(123) }
11
+
12
+ end
13
+
14
+
7
15
  test "single default" do
8
16
 
9
17
  assert ! session.countdown_running?
@@ -24,6 +32,7 @@ class TestControllerTest < ActionController::TestCase
24
32
 
25
33
  end
26
34
 
35
+
27
36
  test "truth table test" do
28
37
 
29
38
  # with no countdown started these conditions should be met
@@ -43,7 +52,6 @@ class TestControllerTest < ActionController::TestCase
43
52
  end
44
53
 
45
54
 
46
-
47
55
  test "mixed names" do
48
56
 
49
57
  ## start up two counters
@@ -4,6 +4,14 @@ require 'timecop'
4
4
  class TestControllerTest < ActionController::TestCase
5
5
 
6
6
 
7
+ test "fantasy/typo methods" do
8
+
9
+ assert_raise(NoMethodError) { session.countdown_banana }
10
+ assert_raise(NoMethodError) { session.countdown_banana(123) }
11
+
12
+ end
13
+
14
+
7
15
  test "single default" do
8
16
 
9
17
  assert ! session.countdown_running?
@@ -24,6 +32,7 @@ class TestControllerTest < ActionController::TestCase
24
32
 
25
33
  end
26
34
 
35
+
27
36
  test "truth table test" do
28
37
 
29
38
  # with no countdown started these conditions should be met
@@ -43,7 +52,6 @@ class TestControllerTest < ActionController::TestCase
43
52
  end
44
53
 
45
54
 
46
-
47
55
  test "mixed names" do
48
56
 
49
57
  ## start up two counters
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/kevin/Development/session_countdown
3
3
  specs:
4
- session_countdown (0.1)
4
+ session_countdown (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -4,6 +4,14 @@ require 'timecop'
4
4
  class TestControllerTest < ActionController::TestCase
5
5
 
6
6
 
7
+ test "fantasy/typo methods" do
8
+
9
+ assert_raise(NoMethodError) { session.countdown_banana }
10
+ assert_raise(NoMethodError) { session.countdown_banana(123) }
11
+
12
+ end
13
+
14
+
7
15
  test "single default" do
8
16
 
9
17
  assert ! session.countdown_running?
@@ -24,6 +32,7 @@ class TestControllerTest < ActionController::TestCase
24
32
 
25
33
  end
26
34
 
35
+
27
36
  test "truth table test" do
28
37
 
29
38
  # with no countdown started these conditions should be met
@@ -43,7 +52,6 @@ class TestControllerTest < ActionController::TestCase
43
52
  end
44
53
 
45
54
 
46
-
47
55
  test "mixed names" do
48
56
 
49
57
  ## start up two counters
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: session_countdown
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 2
8
+ - 3
9
9
  - 0
10
- version: 0.2.0
10
+ version: 0.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kevin Swope
@@ -36,6 +36,7 @@ files:
36
36
  - README.rdoc
37
37
  - Rakefile
38
38
  - VERSION
39
+ - created.rid
39
40
  - lib/session_countdown.rb
40
41
  - session_countdown.gemspec
41
42
  - test/common/test_controller_test.rb