pseudocephalopod 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -2
- data/lib/pseudocephalopod/slug_history.rb +1 -1
- data/lib/pseudocephalopod/version.rb +1 -1
- data/pseudocephalopod.gemspec +85 -0
- data/test/slug_history_test.rb +11 -2
- metadata +4 -3
data/.gitignore
CHANGED
@@ -0,0 +1,85 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{pseudocephalopod}
|
8
|
+
s.version = "0.2.2"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Darcy Laycock"]
|
12
|
+
s.date = %q{2010-04-29}
|
13
|
+
s.description = %q{Super simple slugs for ActiveRecord 3.0 and higher, with support for slug history}
|
14
|
+
s.email = %q{sutto@sutto.net}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.md"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".gitignore",
|
22
|
+
"Gemfile",
|
23
|
+
"LICENSE",
|
24
|
+
"README.md",
|
25
|
+
"Rakefile",
|
26
|
+
"lib/generators/pseudocephalopod/slug_migration/slug_migration_generator.rb",
|
27
|
+
"lib/generators/pseudocephalopod/slug_migration/templates/migration.erb",
|
28
|
+
"lib/generators/pseudocephalopod/slugs/slugs_generator.rb",
|
29
|
+
"lib/generators/pseudocephalopod/slugs/templates/migration.erb",
|
30
|
+
"lib/pseudocephalopod.rb",
|
31
|
+
"lib/pseudocephalopod/active_record_methods.rb",
|
32
|
+
"lib/pseudocephalopod/caching.rb",
|
33
|
+
"lib/pseudocephalopod/finders.rb",
|
34
|
+
"lib/pseudocephalopod/memory_cache.rb",
|
35
|
+
"lib/pseudocephalopod/railtie.rb",
|
36
|
+
"lib/pseudocephalopod/scopes.rb",
|
37
|
+
"lib/pseudocephalopod/slug.rb",
|
38
|
+
"lib/pseudocephalopod/slug_history.rb",
|
39
|
+
"lib/pseudocephalopod/version.rb",
|
40
|
+
"metrics/.gitignore",
|
41
|
+
"pseudocephalopod.gemspec",
|
42
|
+
"test/caching_test.rb",
|
43
|
+
"test/helper.rb",
|
44
|
+
"test/is_sluggable_test.rb",
|
45
|
+
"test/model_definitions.rb",
|
46
|
+
"test/pseudocephalopod_test.rb",
|
47
|
+
"test/slug_history_test.rb"
|
48
|
+
]
|
49
|
+
s.homepage = %q{http://github.com/Sutto/pseudocephalopod}
|
50
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
51
|
+
s.require_paths = ["lib"]
|
52
|
+
s.rubygems_version = %q{1.3.6}
|
53
|
+
s.summary = %q{Super simple slugs for ActiveRecord 3.0 and higher, with support for slug history}
|
54
|
+
s.test_files = [
|
55
|
+
"test/caching_test.rb",
|
56
|
+
"test/helper.rb",
|
57
|
+
"test/is_sluggable_test.rb",
|
58
|
+
"test/model_definitions.rb",
|
59
|
+
"test/pseudocephalopod_test.rb",
|
60
|
+
"test/slug_history_test.rb"
|
61
|
+
]
|
62
|
+
|
63
|
+
if s.respond_to? :specification_version then
|
64
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
65
|
+
s.specification_version = 3
|
66
|
+
|
67
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
68
|
+
s.add_runtime_dependency(%q<activerecord>, [">= 3.0.0.beta2"])
|
69
|
+
s.add_runtime_dependency(%q<uuid>, [">= 0"])
|
70
|
+
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
71
|
+
s.add_development_dependency(%q<reversible_data>, [">= 0"])
|
72
|
+
else
|
73
|
+
s.add_dependency(%q<activerecord>, [">= 3.0.0.beta2"])
|
74
|
+
s.add_dependency(%q<uuid>, [">= 0"])
|
75
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
76
|
+
s.add_dependency(%q<reversible_data>, [">= 0"])
|
77
|
+
end
|
78
|
+
else
|
79
|
+
s.add_dependency(%q<activerecord>, [">= 3.0.0.beta2"])
|
80
|
+
s.add_dependency(%q<uuid>, [">= 0"])
|
81
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
82
|
+
s.add_dependency(%q<reversible_data>, [">= 0"])
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
data/test/slug_history_test.rb
CHANGED
@@ -70,8 +70,17 @@ class SlugHistoryTest < Test::Unit::TestCase
|
|
70
70
|
assert_none_for_slug "bob"
|
71
71
|
end
|
72
72
|
|
73
|
+
should 'remove slug history for a record by default on destroy' do
|
74
|
+
setup_slugs!
|
75
|
+
user = User.create :name => "Bob"
|
76
|
+
user.update_attributes! :name => "Sal"
|
77
|
+
user.update_attributes! :name => "Red"
|
78
|
+
user.update_attributes! :name => "Jim"
|
79
|
+
assert_equal ["red", "sal", "bob"], user.previous_slugs
|
80
|
+
user.destroy
|
81
|
+
assert_equal [], user.previous_slugs
|
82
|
+
end
|
83
|
+
|
73
84
|
end
|
74
|
-
|
75
85
|
end
|
76
|
-
|
77
86
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 0.2.
|
8
|
+
- 2
|
9
|
+
version: 0.2.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Darcy Laycock
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-04-
|
17
|
+
date: 2010-04-29 00:00:00 +08:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -99,6 +99,7 @@ files:
|
|
99
99
|
- lib/pseudocephalopod/slug_history.rb
|
100
100
|
- lib/pseudocephalopod/version.rb
|
101
101
|
- metrics/.gitignore
|
102
|
+
- pseudocephalopod.gemspec
|
102
103
|
- test/caching_test.rb
|
103
104
|
- test/helper.rb
|
104
105
|
- test/is_sluggable_test.rb
|