mongoid-permalinks 0.4.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1f4c76d8d0fa60c0252e205222c02455b4cc9af3
4
- data.tar.gz: 11275c45290f146ccf133f06a8e02cefd5478334
3
+ metadata.gz: 3f8ad12c0daf0e93e6a6f52ec5f198d388ac63c6
4
+ data.tar.gz: 51dc0ae46dc6c1329d6d4bf2d5c4939a5ee5de9a
5
5
  SHA512:
6
- metadata.gz: 16860f9e5499b0872903c670be110f8addd06847e087ca80b6966390f0fad1b5c6d3e4f0f63ed86288b9fc3ac3a1bed52297da1fcaee8b64afa970448c5cb929
7
- data.tar.gz: 5825e52f9f3edfd0cdd750d1f4f060920c3e2dbca4547531b0be4723b2663c66424babd1de918dc4cc53a71dbfb27d8ce2d8c6673bf44f2f620bd1399f524d61
6
+ metadata.gz: 6366424d28b2df6b45941420ca81d7d7993d48899f18f5a36221ce315a47ab567d007c94545ae66b4ddb5e93a68a335199c84dc644bf8a5a67bff6d346b08163
7
+ data.tar.gz: 875038894da17dc619281b07b4f04bf29491efd105ec25bc4851cb2360890eeb6a6f7a09dcf6693f98362d3297c4036f32f4257634abf91991a767d51789a341
@@ -1,3 +1,8 @@
1
+ # 1.0.0 (March 7, 2014)
2
+
3
+ * Fixes I18n deprecation warning.
4
+ * Permalinks will be dasherized as of now.
5
+
1
6
  # 0.4.0 (March 3, 2014)
2
7
 
3
8
  * Use Rake::FileList.
@@ -13,7 +13,7 @@ module Mongoid
13
13
 
14
14
  private
15
15
  def set_permalink
16
- self.permalink = (permalink.presence || to_s).parameterize
16
+ self.permalink = (permalink.presence || to_s).dasherize.parameterize
17
17
  end
18
18
  end
19
19
  end
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module Permalinks
3
- VERSION = '0.4.0'
3
+ VERSION = '1.0.0'
4
4
  end
5
5
  end
@@ -41,6 +41,11 @@ class PermalinksTest < Minitest::Unit::TestCase
41
41
  end
42
42
 
43
43
 
44
+ def test_underscores_are_removed
45
+ assert_equal 'custom-permalink', Document.create(permalink: 'custom_permalink', name: 'Name').permalink
46
+ end
47
+
48
+
44
49
  def test_localized_permalink
45
50
  document = Localized.new
46
51
 
@@ -5,5 +5,7 @@ require 'minitest/pride'
5
5
 
6
6
  require 'mongoid/permalinks'
7
7
 
8
- # Load support *.rb files in ./support
8
+ I18n.available_locales = [:en, :de]
9
+ I18n.enforce_available_locales = true
10
+
9
11
  Mongoid.load!(File.expand_path('../mongoid.yml', __FILE__), 'test')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-permalinks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mario Uher
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-03 00:00:00.000000000 Z
11
+ date: 2014-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport