rocket_tag 0.0.0 → 0.0.1

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/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  Rocket Tag
2
2
  ==========
3
3
 
4
- Clean, modern an maintainable, context aware tagging library for rails 3.1 +
4
+ Clean, modern and maintainable, context aware tagging library for rails 3.1 +
5
5
 
6
6
  Installation
7
7
  ------------
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.0
1
+ 0.0.1
@@ -103,6 +103,11 @@ module RocketTag
103
103
  :conditions => [ "taggings.context = ?", context ]
104
104
 
105
105
 
106
+ validate context do
107
+ if not send(context).kind_of? Enumerable
108
+ errors.add context, :invalid
109
+ end
110
+ end
106
111
  before_save do
107
112
  @tag_dirty ||= Set.new
108
113
 
data/rocket_tag.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rocket_tag}
8
- s.version = "0.0.0"
8
+ s.version = "0.0.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = [%q{Brad Phelan}]
@@ -18,7 +18,16 @@ describe TaggableModel do
18
18
  @model.reload
19
19
  @model.languages.should == ["x", "y"]
20
20
  end
21
+
22
+ it "validates the model wrt to the context" do
23
+ @model.languages = 100
24
+ @model.save.should == false
25
+ pp @model.errors.messages
26
+
27
+
28
+ end
21
29
  end
30
+
22
31
  describe "#reload" do
23
32
  it "resets the tags caches to what is in the database" do
24
33
  @model.languages = ["a", "b", "c"]
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rocket_tag
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.0
5
+ version: 0.0.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Brad Phelan
@@ -143,7 +143,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
143
143
  requirements:
144
144
  - - ">="
145
145
  - !ruby/object:Gem::Version
146
- hash: -3991953909619882683
146
+ hash: 198466425924794403
147
147
  segments:
148
148
  - 0
149
149
  version: "0"