mongoid_permalink_extension 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Guardfile +8 -0
- data/README.md +6 -2
- data/lib/mongoid_permalink_extension/permalink.rb +1 -1
- data/lib/mongoid_permalink_extension/version.rb +1 -1
- data/mongoid_permalink_extension.gemspec +2 -0
- data/test/mongoid_permalink_extension/permalink_test.rb +1 -0
- data/test/test_helper.rb +4 -2
- metadata +49 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc0ea8bbe92ca2029b1f68a4c3c79b069224c537
|
4
|
+
data.tar.gz: 5b10800406a9c8e46de37982af384dbb1ac205b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2617f90afbc0ee4eb3ae4c16829c03f562d723a0c9bb08fb812065774f75c5e722503042e5712a5c1e56516c1170918d4a93a292f1c81e61cb051644d2aa3ab3
|
7
|
+
data.tar.gz: 0a506ac5f04d984107dc300e8b1c324acb310091c0a654c6faff2b03633b2001a34331d1351dedc85845eb79d2f543e8d9bc9cc5a46b4bcfeeaf78d9f8542330
|
data/Guardfile
ADDED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Mongoid Permalink Extension
|
2
2
|
|
3
|
-
[![Build Status](https://travis-ci.org/tomasc/mongoid_permalink_extension.svg)](https://travis-ci.org/tomasc/mongoid_permalink_extension) [![Coverage Status](https://img.shields.io/coveralls/tomasc/mongoid_permalink_extension.svg)](https://coveralls.io/r/tomasc/mongoid_permalink_extension)
|
3
|
+
[![Build Status](https://travis-ci.org/tomasc/mongoid_permalink_extension.svg)](https://travis-ci.org/tomasc/mongoid_permalink_extension) [![Gem Version](https://badge.fury.io/rb/mongoid_permalink_extension.svg)](http://badge.fury.io/rb/mongoid_permalink_extension) [![Coverage Status](https://img.shields.io/coveralls/tomasc/mongoid_permalink_extension.svg)](https://coveralls.io/r/tomasc/mongoid_permalink_extension)
|
4
4
|
|
5
5
|
A [Mongoid](https://github.com/mongoid/mongoid) field extension that stores any String as a permalink slug.
|
6
6
|
|
@@ -28,12 +28,16 @@ Or install it yourself as:
|
|
28
28
|
|
29
29
|
Add to Mongoid models as:
|
30
30
|
|
31
|
-
|
31
|
+
```ruby
|
32
|
+
field :permalink, type: MongoidPermalinkExtension::Permalink
|
33
|
+
```
|
32
34
|
|
33
35
|
Produces slugs in the form of:
|
34
36
|
|
35
37
|
A-Hard-Days-Night
|
36
38
|
|
39
|
+
See tests for more examples.
|
40
|
+
|
37
41
|
## Contributing
|
38
42
|
|
39
43
|
1. Fork it
|
@@ -23,6 +23,8 @@ Gem::Specification.new do |spec|
|
|
23
23
|
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.3"
|
25
25
|
spec.add_development_dependency "coveralls"
|
26
|
+
spec.add_development_dependency "guard"
|
27
|
+
spec.add_development_dependency "guard-minitest"
|
26
28
|
spec.add_development_dependency "minitest"
|
27
29
|
spec.add_development_dependency "rake"
|
28
30
|
end
|
@@ -55,6 +55,7 @@ module MongoidPermalinkExtension
|
|
55
55
|
it 'produces nice slugs' do
|
56
56
|
MongoidPermalinkExtension::Permalink.mongoize('Future Vocabularies?').must_equal 'Future-Vocabularies'
|
57
57
|
MongoidPermalinkExtension::Permalink.mongoize('2011 space odyssey').must_equal '2011-Space-Odyssey'
|
58
|
+
MongoidPermalinkExtension::Permalink.mongoize('A permalink with & in it').must_equal 'A-Permalink-With-In-It'
|
58
59
|
end
|
59
60
|
end
|
60
61
|
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,97 +1,125 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid_permalink_extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomas Celizna
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mongoid
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '4.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '4.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: stringex
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '1.3'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.3'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: coveralls
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: guard
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: guard-minitest
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
67
95
|
- !ruby/object:Gem::Version
|
68
96
|
version: '0'
|
69
97
|
- !ruby/object:Gem::Dependency
|
70
98
|
name: minitest
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|
72
100
|
requirements:
|
73
|
-
- -
|
101
|
+
- - ">="
|
74
102
|
- !ruby/object:Gem::Version
|
75
103
|
version: '0'
|
76
104
|
type: :development
|
77
105
|
prerelease: false
|
78
106
|
version_requirements: !ruby/object:Gem::Requirement
|
79
107
|
requirements:
|
80
|
-
- -
|
108
|
+
- - ">="
|
81
109
|
- !ruby/object:Gem::Version
|
82
110
|
version: '0'
|
83
111
|
- !ruby/object:Gem::Dependency
|
84
112
|
name: rake
|
85
113
|
requirement: !ruby/object:Gem::Requirement
|
86
114
|
requirements:
|
87
|
-
- -
|
115
|
+
- - ">="
|
88
116
|
- !ruby/object:Gem::Version
|
89
117
|
version: '0'
|
90
118
|
type: :development
|
91
119
|
prerelease: false
|
92
120
|
version_requirements: !ruby/object:Gem::Requirement
|
93
121
|
requirements:
|
94
|
-
- -
|
122
|
+
- - ">="
|
95
123
|
- !ruby/object:Gem::Version
|
96
124
|
version: '0'
|
97
125
|
description: Custom field type for Mongoid that automatically converts strings to
|
@@ -102,10 +130,11 @@ executables: []
|
|
102
130
|
extensions: []
|
103
131
|
extra_rdoc_files: []
|
104
132
|
files:
|
105
|
-
- .coveralls.yml
|
106
|
-
- .gitignore
|
107
|
-
- .travis.yml
|
133
|
+
- ".coveralls.yml"
|
134
|
+
- ".gitignore"
|
135
|
+
- ".travis.yml"
|
108
136
|
- Gemfile
|
137
|
+
- Guardfile
|
109
138
|
- LICENSE
|
110
139
|
- LICENSE.txt
|
111
140
|
- README.md
|
@@ -126,17 +155,17 @@ require_paths:
|
|
126
155
|
- lib
|
127
156
|
required_ruby_version: !ruby/object:Gem::Requirement
|
128
157
|
requirements:
|
129
|
-
- -
|
158
|
+
- - ">="
|
130
159
|
- !ruby/object:Gem::Version
|
131
160
|
version: '0'
|
132
161
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
162
|
requirements:
|
134
|
-
- -
|
163
|
+
- - ">="
|
135
164
|
- !ruby/object:Gem::Version
|
136
165
|
version: '0'
|
137
166
|
requirements: []
|
138
167
|
rubyforge_project:
|
139
|
-
rubygems_version: 2.
|
168
|
+
rubygems_version: 2.2.2
|
140
169
|
signing_key:
|
141
170
|
specification_version: 4
|
142
171
|
summary: Custom field type for Mongoid that automatically converts strings to URL
|
@@ -144,4 +173,3 @@ summary: Custom field type for Mongoid that automatically converts strings to UR
|
|
144
173
|
test_files:
|
145
174
|
- test/mongoid_permalink_extension/permalink_test.rb
|
146
175
|
- test/test_helper.rb
|
147
|
-
has_rdoc:
|