make_watchable 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/make_watchable/version.rb +1 -1
- data/lib/make_watchable/watcher.rb +2 -0
- data/make_watchable.gemspec +1 -0
- data/spec/lib/make_watchable_spec.rb +14 -6
- metadata +13 -2
data/make_watchable.gemspec
CHANGED
@@ -20,6 +20,7 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.add_development_dependency "database_cleaner", "0.6.7.RC"
|
21
21
|
s.add_development_dependency "sqlite3-ruby", "~> 1.3.0"
|
22
22
|
s.add_development_dependency "generator_spec", "~> 0.8.2"
|
23
|
+
s.add_development_dependency "rake", "0.8.7"
|
23
24
|
|
24
25
|
s.files = `git ls-files`.split("\n")
|
25
26
|
s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
|
@@ -16,6 +16,12 @@ describe "Make Watchable" do
|
|
16
16
|
@watcher.class.watcher?.should == true
|
17
17
|
end
|
18
18
|
|
19
|
+
it "should have watchings" do
|
20
|
+
@watcher.watchings.length.should == 0
|
21
|
+
@watcher.watch!(@watchable)
|
22
|
+
@watcher.watchings.reload.length.should == 1
|
23
|
+
end
|
24
|
+
|
19
25
|
describe "watcher" do
|
20
26
|
describe "watch" do
|
21
27
|
it "should create a watching" do
|
@@ -63,12 +69,14 @@ describe "Make Watchable" do
|
|
63
69
|
end
|
64
70
|
end
|
65
71
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
+
describe "watches?" do
|
73
|
+
it "should check if watcher is watches the watchable" do
|
74
|
+
@watcher.watches?(@watchable).should == false
|
75
|
+
@watcher.watch!(@watchable)
|
76
|
+
@watcher.watches?(@watchable).should == true
|
77
|
+
@watcher.unwatch!(@watchable)
|
78
|
+
@watcher.watches?(@watchable).should == false
|
79
|
+
end
|
72
80
|
end
|
73
81
|
end
|
74
82
|
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: make_watchable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Kai Schlamp
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-06-
|
13
|
+
date: 2011-06-19 00:00:00 +02:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -79,6 +79,17 @@ dependencies:
|
|
79
79
|
version: 0.8.2
|
80
80
|
type: :development
|
81
81
|
version_requirements: *id006
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: rake
|
84
|
+
prerelease: false
|
85
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
86
|
+
none: false
|
87
|
+
requirements:
|
88
|
+
- - "="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: 0.8.7
|
91
|
+
type: :development
|
92
|
+
version_requirements: *id007
|
82
93
|
description: A user-centric watching extension for Rails 3 applications.
|
83
94
|
email:
|
84
95
|
- schlamp@gmx.de
|