mongoid_slug 2.0.1 → 3.0.0.rc1
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.
- checksums.yaml +15 -0
- data/README.md +45 -12
- data/lib/mongoid/slug/criteria.rb +9 -1
- data/lib/mongoid/slug/version.rb +1 -1
- data/lib/mongoid/slug.rb +10 -6
- data/spec/models/page_localize.rb +9 -0
- data/spec/models/page_slug_localized.rb +9 -0
- data/spec/models/page_slug_localized_history.rb +9 -0
- data/spec/models/paranoid_document.rb +8 -0
- data/spec/mongoid/slug_spec.rb +208 -17
- data/spec/spec_helper.rb +1 -0
- metadata +31 -25
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
ODMzODllM2NkMGQ3ZjJiYjFjNDdjMzUwYWU4ZWJkYjg2NTI0NTkyZg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
YmQ3MTlmYjZlMmRmZWNkZWEyY2I5NGU1OGM0ZmE4NDlhYjRjMmYxMg==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NTVhOGRjYzBlOTc2MTYwMTgzNzdhNjQ4NjRhNGQyZWFhOWU5ZTlhZTJmMzgz
|
10
|
+
Y2QwYjM3ZDhhZGI2MWQ2OTZiZDQ0OTBkNmU3YmM5ODE2NmJlM2Q2Y2ZjN2Qy
|
11
|
+
NWE5M2I1YTk0YzFkYWE4ZGE0MDgxZjNhOTBjZmQwZTBkYWJlODc=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MjE2ZjA5MGIyYjkzYmNjM2MzMzZmYmMwNDU4MjlhZjU1NDRlZWU2YWUwNTRi
|
14
|
+
ZWNmMzU2ZjM3ZTMyOGI3MzUwMjg3YWRmOWUxNzY1NmY0ZTY4OTY2OTQwMjVj
|
15
|
+
NjcwZjQ4NmViNjgzODA0MzZiNDBkOTAyZTA2Y2Y5MjQ5MGE4MDg=
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
*IMPORTANT:* If you are upgrading to Mongoid Slug 1.0.0 please migrate in accordance with the instructions in https://github.com/digitalplaywright/mongoid-slug/wiki/How-to-upgrade-to-1.0.0.
|
1
|
+
*IMPORTANT:* If you are upgrading to Mongoid Slug 1.0.0 please migrate in accordance with the instructions in https://github.com/digitalplaywright/mongoid-slug/wiki/How-to-upgrade-to-1.0.0-or-newer.
|
2
2
|
Mongoid Slug 1.0.0 stores the slugs in a single field _slugs of array type, and all previous slugs must be migrated.
|
3
3
|
|
4
4
|
Mongoid Slug
|
@@ -69,7 +69,7 @@ Post.fields['_id'].type
|
|
69
69
|
=> String
|
70
70
|
post = Post.find 'a-thousand-plateaus' # Finds by slugs
|
71
71
|
=> ...
|
72
|
-
post = Post.find '
|
72
|
+
post = Post.find '50b1386a0482939864000001' # Finds by bson ids
|
73
73
|
=> ...
|
74
74
|
```
|
75
75
|
[Read here] [4] for all available options.
|
@@ -80,7 +80,7 @@ Custom Slug Generation
|
|
80
80
|
By default Mongoid Slug generates slugs with stringex. If this is not desired you can
|
81
81
|
define your own slug generator like this:
|
82
82
|
|
83
|
-
```
|
83
|
+
```ruby
|
84
84
|
class Caption
|
85
85
|
include Mongoid::Document
|
86
86
|
include Mongoid::Slug
|
@@ -91,8 +91,8 @@ class Caption
|
|
91
91
|
cur_object.slug_builder.to_url
|
92
92
|
end
|
93
93
|
end
|
94
|
-
|
95
94
|
```
|
95
|
+
You can call stringex `to_url` method.
|
96
96
|
|
97
97
|
Scoping
|
98
98
|
-------
|
@@ -102,17 +102,17 @@ To scope a slug by a reference association, pass `:scope`:
|
|
102
102
|
```ruby
|
103
103
|
class Company
|
104
104
|
include Mongoid::Document
|
105
|
-
|
105
|
+
|
106
106
|
references_many :employees
|
107
107
|
end
|
108
108
|
|
109
109
|
class Employee
|
110
110
|
include Mongoid::Document
|
111
111
|
include Mongoid::Slug
|
112
|
-
|
112
|
+
|
113
113
|
field :name
|
114
114
|
referenced_in :company
|
115
|
-
|
115
|
+
|
116
116
|
slug :name, :scope => :company
|
117
117
|
end
|
118
118
|
```
|
@@ -131,10 +131,10 @@ The value of `:scope` can alternatively be a field within the model itself:
|
|
131
131
|
class Employee
|
132
132
|
include Mongoid::Document
|
133
133
|
include Mongoid::Slug
|
134
|
-
|
134
|
+
|
135
135
|
field :name
|
136
136
|
field :company_id
|
137
|
-
|
137
|
+
|
138
138
|
slug :name, :scope => :company_id
|
139
139
|
end
|
140
140
|
```
|
@@ -149,9 +149,9 @@ To specify that the history of a document should be kept track of, pass
|
|
149
149
|
class Page
|
150
150
|
include Mongoid::Document
|
151
151
|
include Mongoid::Slug
|
152
|
-
|
152
|
+
|
153
153
|
field :title
|
154
|
-
|
154
|
+
|
155
155
|
slug :title, history: true
|
156
156
|
end
|
157
157
|
```
|
@@ -184,6 +184,39 @@ Friend.find('admin') # => nil
|
|
184
184
|
friend.slug # => 'admin-1'
|
185
185
|
```
|
186
186
|
|
187
|
+
When reserved words are not specified, the words 'new' and 'edit' are considered reserved by default.
|
188
|
+
Specifying an array of custom reserved words will overwrite these defaults.
|
189
|
+
|
190
|
+
Custom Find Strategies
|
191
|
+
--------------
|
192
|
+
|
193
|
+
By default find will search for the document by the id field if the provided id
|
194
|
+
looks like a BSON ObjectId, and it will otherwise find by the _slugs field. However,
|
195
|
+
custom strategies can ovveride the default behavior, like e.g:
|
196
|
+
|
197
|
+
```ruby
|
198
|
+
module Mongoid::Slug::UuidIdStrategy
|
199
|
+
def self.call id
|
200
|
+
id =~ /\A([0-9a-fA-F]){8}-(([0-9a-fA-F]){4}-){3}([0-9a-fA-F]){12}\z/
|
201
|
+
end
|
202
|
+
end
|
203
|
+
```
|
204
|
+
|
205
|
+
Use a custom strategy by adding the slug_id_strategy annotation to the _id field:
|
206
|
+
|
207
|
+
```ruby
|
208
|
+
class Entity
|
209
|
+
include Mongoid::Document
|
210
|
+
include Mongoid::Slug
|
211
|
+
|
212
|
+
field :_id, type: String, slug_id_strategy: UuidIdStrategy
|
213
|
+
|
214
|
+
field :user_edited_variation
|
215
|
+
slug :user_edited_variation, :history => true
|
216
|
+
end
|
217
|
+
```
|
218
|
+
|
219
|
+
|
187
220
|
Adhoc checking whether a string is unique on a per Model basis
|
188
221
|
--------------------------------------------------------------
|
189
222
|
|
@@ -201,4 +234,4 @@ unique = Mongoid::Slug::UniqueSlug.new(Book.new).find_unique(title)
|
|
201
234
|
[1]: https://github.com/rsl/stringex/
|
202
235
|
[2]: https://secure.travis-ci.org/hakanensari/mongoid-slug.png
|
203
236
|
[3]: http://travis-ci.org/hakanensari/mongoid-slug
|
204
|
-
[4]: https://github.com/
|
237
|
+
[4]: https://github.com/digitalplaywright/mongoid-slug/blob/master/lib/mongoid/slug.rb
|
@@ -79,7 +79,15 @@ module Mongoid
|
|
79
79
|
|
80
80
|
|
81
81
|
def for_slugs(slugs)
|
82
|
-
|
82
|
+
#_translations
|
83
|
+
localized = (@klass.fields['_slugs'].options[:localize] rescue false)
|
84
|
+
if localized
|
85
|
+
def_loc = I18n.default_locale
|
86
|
+
query = { '$in' => slugs }
|
87
|
+
where({'$or' => [{ _slugs: query }, { "_slugs.#{def_loc}" => query }]}).limit(slugs.length)
|
88
|
+
else
|
89
|
+
where({ _slugs: { '$in' => slugs } }).limit(slugs.length)
|
90
|
+
end
|
83
91
|
end
|
84
92
|
|
85
93
|
def execute_or_raise_for_slugs(slugs, multi)
|
data/lib/mongoid/slug/version.rb
CHANGED
data/lib/mongoid/slug.rb
CHANGED
@@ -10,8 +10,8 @@ module Mongoid
|
|
10
10
|
:url_builder,
|
11
11
|
:history
|
12
12
|
|
13
|
-
field :_slugs, type: Array, default: []
|
14
|
-
alias_attribute :slugs, :_slugs
|
13
|
+
# field :_slugs, type: Array, default: [], localize: false
|
14
|
+
# alias_attribute :slugs, :_slugs
|
15
15
|
end
|
16
16
|
|
17
17
|
module ClassMethods
|
@@ -50,10 +50,13 @@ module Mongoid
|
|
50
50
|
options = fields.extract_options!
|
51
51
|
|
52
52
|
self.slug_scope = options[:scope]
|
53
|
-
self.reserved_words = options[:reserve] || Set.new([
|
53
|
+
self.reserved_words = options[:reserve] || Set.new(["new", "edit"])
|
54
54
|
self.slugged_attributes = fields.map &:to_s
|
55
55
|
self.history = options[:history]
|
56
56
|
|
57
|
+
field :_slugs, type: Array, default: [], localize: options[:localize]
|
58
|
+
alias_attribute :slugs, :_slugs
|
59
|
+
|
57
60
|
unless embedded?
|
58
61
|
if slug_scope
|
59
62
|
scope_key = (metadata = self.reflect_on_association(slug_scope)) ? metadata.key : slug_scope
|
@@ -115,8 +118,8 @@ module Mongoid
|
|
115
118
|
# @return [true]
|
116
119
|
def build_slug
|
117
120
|
_new_slug = find_unique_slug
|
118
|
-
self._slugs.delete(_new_slug)
|
119
|
-
if !!self.history
|
121
|
+
self._slugs.delete(_new_slug) if self._slugs
|
122
|
+
if !!self.history && self._slugs.is_a?(Array)
|
120
123
|
self._slugs << _new_slug
|
121
124
|
else
|
122
125
|
self._slugs = [_new_slug]
|
@@ -151,7 +154,8 @@ module Mongoid
|
|
151
154
|
|
152
155
|
# @return [String] the slug, or nil if the document does not have a slug.
|
153
156
|
def slug
|
154
|
-
_slugs.last
|
157
|
+
return _slugs.last if _slugs
|
158
|
+
return _id.to_s
|
155
159
|
end
|
156
160
|
|
157
161
|
def slug_builder
|
data/spec/mongoid/slug_spec.rb
CHANGED
@@ -507,26 +507,44 @@ module Mongoid
|
|
507
507
|
end
|
508
508
|
end
|
509
509
|
|
510
|
-
context "
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
510
|
+
context "for reserved words" do
|
511
|
+
context "when the :reserve option is used on the model" do
|
512
|
+
it "does not use the reserved slugs" do
|
513
|
+
friend1 = Friend.create(:name => "foo")
|
514
|
+
friend1.slugs.should_not include("foo")
|
515
|
+
friend1.slugs.should include("foo-1")
|
516
|
+
|
517
|
+
friend2 = Friend.create(:name => "bar")
|
518
|
+
friend2.slugs.should_not include("bar")
|
519
|
+
friend2.slugs.should include("bar-1")
|
520
|
+
|
521
|
+
friend3 = Friend.create(:name => "en")
|
522
|
+
friend3.slugs.should_not include("en")
|
523
|
+
friend3.slugs.should include("en-1")
|
524
|
+
end
|
515
525
|
|
516
|
-
|
517
|
-
|
518
|
-
|
526
|
+
it "should start with concatenation -1" do
|
527
|
+
friend1 = Friend.create(:name => "foo")
|
528
|
+
friend1.slugs.should include("foo-1")
|
529
|
+
friend2 = Friend.create(:name => "foo")
|
530
|
+
friend2.slugs.should include("foo-2")
|
531
|
+
end
|
519
532
|
|
520
|
-
|
521
|
-
|
522
|
-
|
533
|
+
["new", "edit"].each do |word|
|
534
|
+
it "should overwrite the default reserved words allowing the word '#{word}'" do
|
535
|
+
friend = Friend.create(:name => word)
|
536
|
+
friend.slugs.should include word
|
537
|
+
end
|
538
|
+
end
|
523
539
|
end
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
540
|
+
context "when the model does not have any reserved words set" do
|
541
|
+
["new", "edit"].each do |word|
|
542
|
+
it "does not use the default reserved word '#{word}'" do
|
543
|
+
book = Book.create(:title => word)
|
544
|
+
book.slugs.should_not include word
|
545
|
+
book.slugs.should include("#{word}-1")
|
546
|
+
end
|
547
|
+
end
|
530
548
|
end
|
531
549
|
end
|
532
550
|
|
@@ -832,5 +850,178 @@ module Mongoid
|
|
832
850
|
end
|
833
851
|
end
|
834
852
|
end
|
853
|
+
|
854
|
+
context "slug can be localized" do
|
855
|
+
it "generate a new slug for each localization" do
|
856
|
+
old_locale = I18n.locale
|
857
|
+
|
858
|
+
# Using a default locale of en.
|
859
|
+
page = PageSlugLocalize.new
|
860
|
+
page.title = "Title on English"
|
861
|
+
page.save
|
862
|
+
page.slug.should eql "title-on-english"
|
863
|
+
I18n.locale = :nl
|
864
|
+
page.title = "Title on Netherlands"
|
865
|
+
page.save
|
866
|
+
page.slug.should eql "title-on-netherlands"
|
867
|
+
|
868
|
+
# Set locale back to english
|
869
|
+
I18n.locale = old_locale
|
870
|
+
end
|
871
|
+
|
872
|
+
it "returns _id if no slug" do
|
873
|
+
old_locale = I18n.locale
|
874
|
+
|
875
|
+
# Using a default locale of en.
|
876
|
+
page = PageSlugLocalize.new
|
877
|
+
page.title = "Title on English"
|
878
|
+
page.save
|
879
|
+
page.slug.should eql "title-on-english"
|
880
|
+
I18n.locale = :nl
|
881
|
+
page.slug.should eql page._id.to_s
|
882
|
+
|
883
|
+
# Set locale back to english
|
884
|
+
I18n.locale = old_locale
|
885
|
+
end
|
886
|
+
|
887
|
+
it "fallbacks if slug not localized yet" do
|
888
|
+
old_locale = I18n.locale
|
889
|
+
|
890
|
+
# Using a default locale of en.
|
891
|
+
page = PageSlugLocalize.new
|
892
|
+
page.title = "Title on English"
|
893
|
+
page.save
|
894
|
+
page.slug.should eql "title-on-english"
|
895
|
+
I18n.locale = :nl
|
896
|
+
page.slug.should eql page._id.to_s
|
897
|
+
|
898
|
+
# Turn on i18n fallback
|
899
|
+
require "i18n/backend/fallbacks"
|
900
|
+
I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks)
|
901
|
+
::I18n.fallbacks[:nl] = [ :nl, :en ]
|
902
|
+
page.slug.should eql "title-on-english"
|
903
|
+
fallback_slug = page.slug
|
904
|
+
|
905
|
+
fallback_page = PageSlugLocalize.find(fallback_slug) rescue nil
|
906
|
+
fallback_page.should eq(page)
|
907
|
+
|
908
|
+
# Set locale back to english
|
909
|
+
I18n.locale = old_locale
|
910
|
+
|
911
|
+
# Restore fallback for next tests
|
912
|
+
::I18n.fallbacks[:nl] = [ :nl ]
|
913
|
+
end
|
914
|
+
|
915
|
+
it "returns default slug if not localized" do
|
916
|
+
old_locale = I18n.locale
|
917
|
+
|
918
|
+
# Using a default locale of en.
|
919
|
+
page = PageLocalize.new
|
920
|
+
page.title = "Title on English"
|
921
|
+
page.save
|
922
|
+
page.slug.should eql "title-on-english"
|
923
|
+
I18n.locale = :nl
|
924
|
+
page.title = "Title on Netherlands"
|
925
|
+
page.slug.should eql "title-on-english"
|
926
|
+
page.save
|
927
|
+
page.slug.should eql "title-on-netherlands"
|
928
|
+
|
929
|
+
|
930
|
+
# Set locale back to english
|
931
|
+
I18n.locale = old_locale
|
932
|
+
end
|
933
|
+
end
|
934
|
+
|
935
|
+
context "slug can be localized when using history" do
|
936
|
+
it "generate a new slug for each localization and keep history" do
|
937
|
+
old_locale = I18n.locale
|
938
|
+
|
939
|
+
# Using a default locale of en.
|
940
|
+
page = PageSlugLocalizeHistory.new
|
941
|
+
page.title = "Title on English"
|
942
|
+
page.save
|
943
|
+
page.slug.should eql "title-on-english"
|
944
|
+
I18n.locale = :nl
|
945
|
+
page.title = "Title on Netherlands"
|
946
|
+
page.save
|
947
|
+
page.slug.should eql "title-on-netherlands"
|
948
|
+
I18n.locale = old_locale
|
949
|
+
page.title = "Modified title on English"
|
950
|
+
page.save
|
951
|
+
page.slug.should eql "modified-title-on-english"
|
952
|
+
page.slug.should include("title-on-english")
|
953
|
+
I18n.locale = :nl
|
954
|
+
page.title = "Modified title on Netherlands"
|
955
|
+
page.save
|
956
|
+
page.slug.should eql "modified-title-on-netherlands"
|
957
|
+
page.slug.should include("title-on-netherlands")
|
958
|
+
|
959
|
+
# Set locale back to english
|
960
|
+
I18n.locale = old_locale
|
961
|
+
end
|
962
|
+
|
963
|
+
it "returns _id if no slug" do
|
964
|
+
old_locale = I18n.locale
|
965
|
+
|
966
|
+
# Using a default locale of en.
|
967
|
+
page = PageSlugLocalizeHistory.new
|
968
|
+
page.title = "Title on English"
|
969
|
+
page.save
|
970
|
+
page.slug.should eql "title-on-english"
|
971
|
+
I18n.locale = :nl
|
972
|
+
page.slug.should eql page._id.to_s
|
973
|
+
|
974
|
+
# Set locale back to english
|
975
|
+
I18n.locale = old_locale
|
976
|
+
end
|
977
|
+
|
978
|
+
it "fallbacks if slug not localized yet" do
|
979
|
+
old_locale = I18n.locale
|
980
|
+
|
981
|
+
# Using a default locale of en.
|
982
|
+
page = PageSlugLocalizeHistory.new
|
983
|
+
page.title = "Title on English"
|
984
|
+
page.save
|
985
|
+
page.slug.should eql "title-on-english"
|
986
|
+
I18n.locale = :nl
|
987
|
+
page.slug.should eql page._id.to_s
|
988
|
+
|
989
|
+
# Turn on i18n fallback
|
990
|
+
require "i18n/backend/fallbacks"
|
991
|
+
I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks)
|
992
|
+
::I18n.fallbacks[:nl] = [ :nl, :en ]
|
993
|
+
page.slug.should eql "title-on-english"
|
994
|
+
fallback_slug = page.slug
|
995
|
+
|
996
|
+
fallback_page = PageSlugLocalizeHistory.find(fallback_slug) rescue nil
|
997
|
+
fallback_page.should eq(page)
|
998
|
+
|
999
|
+
# Set locale back to english
|
1000
|
+
I18n.locale = old_locale
|
1001
|
+
end
|
1002
|
+
end
|
1003
|
+
|
1004
|
+
context "Mongoid paranoia with mongoid slug model" do
|
1005
|
+
|
1006
|
+
let(:paranoid_doc) {ParanoidDocument.create!(:title => "slug")}
|
1007
|
+
|
1008
|
+
it "returns paranoid_doc for correct slug" do
|
1009
|
+
expect(ParanoidDocument.find(paranoid_doc.slug)).to eq(paranoid_doc)
|
1010
|
+
end
|
1011
|
+
|
1012
|
+
it "raises for deleted slug" do
|
1013
|
+
paranoid_doc.delete
|
1014
|
+
expect{ParanoidDocument.find(paranoid_doc.slug)}.to raise_error(Mongoid::Errors::DocumentNotFound)
|
1015
|
+
end
|
1016
|
+
|
1017
|
+
it "returns paranoid_doc for correct restored slug" do
|
1018
|
+
paranoid_doc.delete
|
1019
|
+
ParanoidDocument.deleted.first.restore
|
1020
|
+
expect(ParanoidDocument.find(paranoid_doc.slug)).to eq(paranoid_doc)
|
1021
|
+
end
|
1022
|
+
|
1023
|
+
|
1024
|
+
|
1025
|
+
end
|
835
1026
|
end
|
836
1027
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,36 +1,32 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid_slug
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
5
|
-
prerelease:
|
4
|
+
version: 3.0.0.rc1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Andreas Saebjoernsen
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-02-25 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: mongoid
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ! '>'
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '3.0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ! '>'
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '3.0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: stringex
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ~>
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ~>
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,7 +41,6 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: guard-rspec
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ! '>='
|
52
46
|
- !ruby/object:Gem::Version
|
@@ -54,7 +48,6 @@ dependencies:
|
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ! '>='
|
60
53
|
- !ruby/object:Gem::Version
|
@@ -62,7 +55,6 @@ dependencies:
|
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: rake
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
59
|
- - ! '>='
|
68
60
|
- !ruby/object:Gem::Version
|
@@ -70,7 +62,6 @@ dependencies:
|
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
66
|
- - ! '>='
|
76
67
|
- !ruby/object:Gem::Version
|
@@ -78,7 +69,6 @@ dependencies:
|
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: rspec
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
73
|
- - ! '>='
|
84
74
|
- !ruby/object:Gem::Version
|
@@ -86,7 +76,6 @@ dependencies:
|
|
86
76
|
type: :development
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
80
|
- - ! '>='
|
92
81
|
- !ruby/object:Gem::Version
|
@@ -94,7 +83,6 @@ dependencies:
|
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: awesome_print
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
87
|
- - ! '>='
|
100
88
|
- !ruby/object:Gem::Version
|
@@ -102,7 +90,6 @@ dependencies:
|
|
102
90
|
type: :development
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
93
|
requirements:
|
107
94
|
- - ! '>='
|
108
95
|
- !ruby/object:Gem::Version
|
@@ -110,7 +97,6 @@ dependencies:
|
|
110
97
|
- !ruby/object:Gem::Dependency
|
111
98
|
name: uuid
|
112
99
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
100
|
requirements:
|
115
101
|
- - ! '>='
|
116
102
|
- !ruby/object:Gem::Version
|
@@ -118,7 +104,20 @@ dependencies:
|
|
118
104
|
type: :development
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
|
107
|
+
requirements:
|
108
|
+
- - ! '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: pry
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
121
|
requirements:
|
123
122
|
- - ! '>='
|
124
123
|
- !ruby/object:Gem::Version
|
@@ -148,6 +147,10 @@ files:
|
|
148
147
|
- spec/models/integer_id.rb
|
149
148
|
- spec/models/magazine.rb
|
150
149
|
- spec/models/page.rb
|
150
|
+
- spec/models/page_localize.rb
|
151
|
+
- spec/models/page_slug_localized.rb
|
152
|
+
- spec/models/page_slug_localized_history.rb
|
153
|
+
- spec/models/paranoid_document.rb
|
151
154
|
- spec/models/partner.rb
|
152
155
|
- spec/models/person.rb
|
153
156
|
- spec/models/relationship.rb
|
@@ -158,27 +161,26 @@ files:
|
|
158
161
|
- spec/spec_helper.rb
|
159
162
|
homepage: https://github.com/digitalplaywright/mongoid-slug
|
160
163
|
licenses: []
|
164
|
+
metadata: {}
|
161
165
|
post_install_message:
|
162
166
|
rdoc_options: []
|
163
167
|
require_paths:
|
164
168
|
- lib
|
165
169
|
required_ruby_version: !ruby/object:Gem::Requirement
|
166
|
-
none: false
|
167
170
|
requirements:
|
168
171
|
- - ! '>='
|
169
172
|
- !ruby/object:Gem::Version
|
170
173
|
version: '0'
|
171
174
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
172
|
-
none: false
|
173
175
|
requirements:
|
174
|
-
- - ! '
|
176
|
+
- - ! '>'
|
175
177
|
- !ruby/object:Gem::Version
|
176
|
-
version:
|
178
|
+
version: 1.3.1
|
177
179
|
requirements: []
|
178
180
|
rubyforge_project: mongoid_slug
|
179
|
-
rubygems_version:
|
181
|
+
rubygems_version: 2.0.0
|
180
182
|
signing_key:
|
181
|
-
specification_version:
|
183
|
+
specification_version: 4
|
182
184
|
summary: Mongoid URL slugs
|
183
185
|
test_files:
|
184
186
|
- spec/models/alias.rb
|
@@ -191,6 +193,10 @@ test_files:
|
|
191
193
|
- spec/models/integer_id.rb
|
192
194
|
- spec/models/magazine.rb
|
193
195
|
- spec/models/page.rb
|
196
|
+
- spec/models/page_localize.rb
|
197
|
+
- spec/models/page_slug_localized.rb
|
198
|
+
- spec/models/page_slug_localized_history.rb
|
199
|
+
- spec/models/paranoid_document.rb
|
194
200
|
- spec/models/partner.rb
|
195
201
|
- spec/models/person.rb
|
196
202
|
- spec/models/relationship.rb
|