pseudocephalopod 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile
CHANGED
@@ -41,7 +41,7 @@ begin
|
|
41
41
|
test.libs << 'test'
|
42
42
|
test.pattern = 'test/**/*_test.rb'
|
43
43
|
test.verbose = true
|
44
|
-
test.rcov_opts << '--exclude
|
44
|
+
test.rcov_opts << '--exclude /gems/,/Library/,/usr/,lib/tasks,.bundle,config,/lib/rspec/,/lib/rspec-'
|
45
45
|
test.output_dir = "metrics/coverage"
|
46
46
|
end
|
47
47
|
rescue LoadError
|
@@ -16,7 +16,7 @@ module Pseudocephalopod
|
|
16
16
|
alias_method :to_param, :to_slug if use_slug_to_param
|
17
17
|
include Pseudocephalopod::SlugHistory if use_slug_history
|
18
18
|
include Pseudocephalopod::Caching if use_slug_cache
|
19
|
-
|
19
|
+
before_save :autogenerate_slug
|
20
20
|
end
|
21
21
|
|
22
22
|
module InstanceMethods
|
data/pseudocephalopod.gemspec
CHANGED
data/test/is_sluggable_test.rb
CHANGED
@@ -76,10 +76,10 @@ class IsSluggableTest < Test::Unit::TestCase
|
|
76
76
|
user = User.create :name => "bob is awesome"
|
77
77
|
assert_equal "bob-is-awesome", user.to_param
|
78
78
|
assert !user.new_record?
|
79
|
-
user.update_attributes
|
79
|
+
user.update_attributes :name => "BOB-is-AWESOME"
|
80
80
|
assert_equal "bob-is-awesome", user.to_param
|
81
81
|
end
|
82
|
-
|
82
|
+
|
83
83
|
end
|
84
84
|
|
85
85
|
context 'with slug syncing disabled' do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pseudocephalopod
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 1
|
10
|
+
version: 0.3.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Darcy Laycock
|