mongoid-minimal_tags 0.1.0 → 0.1.1
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 +4 -4
- data/README.md +1 -58
- data/Rakefile +1 -1
- data/lib/mongoid/minimal_tags.rb +2 -0
- data/lib/mongoid/minimal_tags/version.rb +1 -1
- data/mongoid-minimal_tags.gemspec +6 -0
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 578a70803d21ce896154f0619f90ea49a94a5370
|
4
|
+
data.tar.gz: a9382b271cea64069a0eadfa662076258a0f93e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a42634cf51ad4a8c803f578725b8ce6bb215f269b20d28cc3fe6ff533e74017f9dcd50f3ad79a296e67411a3c4cfb25112c577c9c60e7326de2b1c3e09f9b8db
|
7
|
+
data.tar.gz: 44d4a7124f6007c6ad530a973428b751464b237d71306456e20b8fbe757b0680dcc2f76034ee9d4e8a61e546963849c7a1a6d95b2cd58ffbe122a11877cf2954
|
data/README.md
CHANGED
@@ -1,58 +1 @@
|
|
1
|
-
[
|
2
|
-
[](https://codeclimate.com/github/harrisbaird/mongoid-minimal_tags)
|
3
|
-
[](https://codeclimate.com/github/harrisbaird/mongoid-minimal_tags/coverage)
|
4
|
-
[](http://inch-ci.org/github/harrisbaird/mongoid-minimal_tags)
|
5
|
-
|
6
|
-
---
|
7
|
-
|
8
|
-
# Mongoid::MinimalTags
|
9
|
-
|
10
|
-
Mongoid::MinimalTags is a tiny gem for adding tagging support to [Mongoid](https://github.com/mongodb/mongoid) documents.
|
11
|
-
|
12
|
-
Multiple tag fields can be used, each with their own way of formatting.
|
13
|
-
|
14
|
-
## Installation
|
15
|
-
|
16
|
-
Add to your Gemfile:
|
17
|
-
|
18
|
-
```ruby
|
19
|
-
gem 'mongoid-minimal_tags'
|
20
|
-
```
|
21
|
-
|
22
|
-
## Usage
|
23
|
-
|
24
|
-
Start by including the `Mongoid::MinimalTags` module and define your tag fields
|
25
|
-
with the `tag_field` method.
|
26
|
-
|
27
|
-
```ruby
|
28
|
-
class Document
|
29
|
-
include Mongoid::Document
|
30
|
-
include Mongoid::MinimalTags
|
31
|
-
|
32
|
-
tag_field :tags
|
33
|
-
tag_field :upcase_tags, formatter: UpcaseFormatter.new
|
34
|
-
end
|
35
|
-
```
|
36
|
-
|
37
|
-
You can define multiple tag fields, just ensure they have unique names.
|
38
|
-
Formatters can be defined on each tag field if needed, otherwise the default be used.
|
39
|
-
|
40
|
-
## Searching
|
41
|
-
The following scopes are also added for each tag field:
|
42
|
-
`.any_*`, `.all_*`, `.without_any_*`
|
43
|
-
All scopes return a `Mongoid::Criteria` and can be chained.
|
44
|
-
|
45
|
-
```ruby
|
46
|
-
Document.any_tags(['a', 'b', 'c'])
|
47
|
-
Document.all_tags(['a', 'b', 'c'])
|
48
|
-
Document.without_any_tags(['a', 'b', 'c'])
|
49
|
-
```
|
50
|
-
|
51
|
-
## Contributing
|
52
|
-
|
53
|
-
1. Fork it
|
54
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
55
|
-
3. Write your tests
|
56
|
-
4. Commit your changes (`git commit -am 'Add some feature'`)
|
57
|
-
5. Push to the branch (`git push origin my-new-feature`)
|
58
|
-
6. Create new Pull Request
|
1
|
+
Moved to [harrisbaird/minimal_tags](https://github.com/harrisbaird/mongoid-minimal_tags)
|
data/Rakefile
CHANGED
data/lib/mongoid/minimal_tags.rb
CHANGED
@@ -9,6 +9,12 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ['harrisbaird']
|
10
10
|
spec.email = ['mydancake@gmail.com']
|
11
11
|
|
12
|
+
spec.post_install_message = <<-MESSAGE
|
13
|
+
! The 'mongoid-minimal_tags'' gem has been deprecated and has been replaced by 'minimal_tags''.
|
14
|
+
! See: https://rubygems.org/gems/minimal_tags'
|
15
|
+
! And: https://github.com/harrisbaird/minimal_tags'
|
16
|
+
MESSAGE
|
17
|
+
|
12
18
|
spec.summary = 'Simple tag fields for mongodb documents.'
|
13
19
|
spec.description = 'Simple tag fields for mongodb documents.'
|
14
20
|
spec.homepage = 'https://github.com/harrisbaird/mongoid-minimal_tags'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid-minimal_tags
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- harrisbaird
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mongoid
|
@@ -134,7 +134,10 @@ files:
|
|
134
134
|
homepage: https://github.com/harrisbaird/mongoid-minimal_tags
|
135
135
|
licenses: []
|
136
136
|
metadata: {}
|
137
|
-
post_install_message:
|
137
|
+
post_install_message: |2
|
138
|
+
! The 'mongoid-minimal_tags'' gem has been deprecated and has been replaced by 'minimal_tags''.
|
139
|
+
! See: https://rubygems.org/gems/minimal_tags'
|
140
|
+
! And: https://github.com/harrisbaird/minimal_tags'
|
138
141
|
rdoc_options: []
|
139
142
|
require_paths:
|
140
143
|
- lib
|
@@ -150,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
153
|
version: '0'
|
151
154
|
requirements: []
|
152
155
|
rubyforge_project:
|
153
|
-
rubygems_version: 2.
|
156
|
+
rubygems_version: 2.5.0
|
154
157
|
signing_key:
|
155
158
|
specification_version: 4
|
156
159
|
summary: Simple tag fields for mongodb documents.
|