mongoid_favoriteable 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.rubocop.yml +42 -0
- data/.ruby-version +1 -0
- data/.travis.yml +4 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +4 -0
- data/Guardfile +11 -0
- data/LICENSE.txt +21 -0
- data/README.md +134 -0
- data/Rakefile +6 -0
- data/lib/mongoid_favoriteable.rb +73 -0
- data/lib/mongoid_favoriteable/version.rb +3 -0
- data/mongoid_favoriteable.gemspec +32 -0
- data/spec/config/mongoid.yml +6 -0
- data/spec/mongoid_favoriteable_spec.rb +47 -0
- data/spec/spec_helper.rb +14 -0
- metadata +218 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c59ba777852d20e63ba6ccb3770e1f461ab6920d
|
4
|
+
data.tar.gz: a5c99b617e77950ab7b5b9d153d054e4a7808134
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4e8fcf957bee025dd328821901103d3591bed347f8e7d5148f42195ceeb53ae3cc91c399f70619f7a78b157d72178c11d614a3186f9ac302424c31158f412329
|
7
|
+
data.tar.gz: 7e49186eb2dbdd600a66c4095c440924728a944d19a7495d64af0a93d78c282bf2e845e25bc1b9a95d0f32eb52e85b4df1b3257c0134e0a81d4a84c260c366ee
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
AllCops:
|
2
|
+
RunRailsCops: false
|
3
|
+
|
4
|
+
LineLength:
|
5
|
+
Max: 120
|
6
|
+
|
7
|
+
ClassLength:
|
8
|
+
CountComments: false # count full line comments?
|
9
|
+
Max: 175
|
10
|
+
|
11
|
+
MethodLength:
|
12
|
+
CountComments: false # count full line comments?
|
13
|
+
Max: 20
|
14
|
+
|
15
|
+
HashSyntax:
|
16
|
+
EnforcedStyle: hash_rockets
|
17
|
+
|
18
|
+
Documentation:
|
19
|
+
Enabled: false
|
20
|
+
|
21
|
+
DefaultScope:
|
22
|
+
Enabled: false
|
23
|
+
|
24
|
+
CollectionMethods:
|
25
|
+
PreferredMethods:
|
26
|
+
map: 'collect'
|
27
|
+
map!: 'collect!'
|
28
|
+
reduce: 'inject'
|
29
|
+
find: 'detect'
|
30
|
+
find_all: 'select'
|
31
|
+
|
32
|
+
Output:
|
33
|
+
Enabled: false
|
34
|
+
|
35
|
+
HasAndBelongsToMany:
|
36
|
+
Enabled: false
|
37
|
+
|
38
|
+
Metrics/AbcSize:
|
39
|
+
Enabled: false
|
40
|
+
|
41
|
+
Style/RegexpLiteral:
|
42
|
+
Enabled: false
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.2.2
|
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
+
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
|
6
|
+
|
7
|
+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
+
|
9
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
+
|
11
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
+
|
13
|
+
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
data/Gemfile
ADDED
data/Guardfile
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
guard 'rspec', :cmd => 'rspec --colour', :all_on_start => false, :all_after_pass => false do
|
2
|
+
watch('spec/spec_helper.rb') { 'spec' }
|
3
|
+
watch(%r{^spec/.+_spec\.rb})
|
4
|
+
watch(%r{^lib/(.+)\.rb}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
5
|
+
end
|
6
|
+
|
7
|
+
guard :rubocop do
|
8
|
+
watch(%r{.+\.gemspec$})
|
9
|
+
watch(%r{.+\.rb$})
|
10
|
+
watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
|
11
|
+
end
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Greg Morrison (Crush & Lovely)
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,134 @@
|
|
1
|
+
# Favoriting for Mongoid Documents
|
2
|
+
|
3
|
+
[![RubyGem Version](http://img.shields.io/gem/v/mongoid_favoriteable.svg?style=flat)](https://rubygems.org/gems/mongoid_favoriteable)
|
4
|
+
[![Dependency Status](http://img.shields.io/gemnasium/crushlovely/mongoid_favoriteable.svg?style=flat)](https://gemnasium.com/crushlovely/mongoid_favoriteable)
|
5
|
+
[![Circle CI](https://circleci.com/gh/crushlovely/mongoid_favoriteable.svg?style=shield)](https://circleci.com/gh/crushlovely/mongoid_favoriteable)
|
6
|
+
[![Code Climate](http://img.shields.io/codeclimate/github/crushlovely/mongoid_favoriteable.svg?style=flat)](https://codeclimate.com/github/crushlovely/mongoid_favoriteable)
|
7
|
+
[![Code Coverage](http://img.shields.io/codeclimate/coverage/github/crushlovely/mongoid_favoriteable.svg?style=flat)](https://codeclimate.com/github/crushlovely/mongoid_favoriteable)
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Add this line to your application's Gemfile:
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
gem 'mongoid_favoriteable'
|
15
|
+
```
|
16
|
+
|
17
|
+
And then execute:
|
18
|
+
|
19
|
+
$ bundle
|
20
|
+
|
21
|
+
Or install it yourself as:
|
22
|
+
|
23
|
+
$ gem install mongoid_favoriteable
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
|
27
|
+
Make sure you require the library and include the module within any mongoid models you wish to use the functionality.
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
require 'mongoid_favoriteable'
|
31
|
+
|
32
|
+
class Person
|
33
|
+
include MongoidFavoriteable
|
34
|
+
include Mongoid::Document
|
35
|
+
end
|
36
|
+
```
|
37
|
+
|
38
|
+
Add the `favoriteable` declaration and include the designated model to be favorited
|
39
|
+
|
40
|
+
```ruby
|
41
|
+
class Food
|
42
|
+
include Mongoid::Document
|
43
|
+
field :name, :type => String
|
44
|
+
end
|
45
|
+
|
46
|
+
class Person
|
47
|
+
include MongoidFavoriteable
|
48
|
+
include Mongoid::Document
|
49
|
+
|
50
|
+
favoriteable :food
|
51
|
+
end
|
52
|
+
```
|
53
|
+
|
54
|
+
You may also supply an optional `class_name` value to compensate for namespaced models
|
55
|
+
|
56
|
+
```ruby
|
57
|
+
favoriteable :city, :class_name => Location::City
|
58
|
+
```
|
59
|
+
|
60
|
+
## Module Methods
|
61
|
+
|
62
|
+
By declaring the `favoriteable` functionality, a few dynamically generated methods are provided to handle favoriting. The class supplied to the module designates the method names:
|
63
|
+
|
64
|
+
* `favorite_{klass}!`
|
65
|
+
* `unfavorite_{klass}!`
|
66
|
+
* `favorite_{pluralized_klass}`
|
67
|
+
* `favorite_{klass}_ids`
|
68
|
+
|
69
|
+
|
70
|
+
Let's say we've designated the `Food` class as favoriteable
|
71
|
+
|
72
|
+
```ruby
|
73
|
+
favoriteable :food
|
74
|
+
```
|
75
|
+
|
76
|
+
The following convenience methods become available:
|
77
|
+
* `favorite_food!`
|
78
|
+
* `unfavorite_food!`
|
79
|
+
* `favorite_foods`
|
80
|
+
* `favorite_food_ids`
|
81
|
+
|
82
|
+
The bang methods require a model instance to be supplied:
|
83
|
+
|
84
|
+
```ruby
|
85
|
+
person = Person.create(:name => 'john')
|
86
|
+
pizza = Food.create(:name => 'pizza')
|
87
|
+
|
88
|
+
person.favorite_food!(pizza)
|
89
|
+
|
90
|
+
=> true
|
91
|
+
|
92
|
+
person.unfavorite_food!(pizza)
|
93
|
+
|
94
|
+
=> true
|
95
|
+
```
|
96
|
+
|
97
|
+
`favorite_foods` will return a ```Mongoid::Criteria``` query object of all favorited food records
|
98
|
+
|
99
|
+
```ruby
|
100
|
+
person.favorite_foods
|
101
|
+
|
102
|
+
=> #<Mongoid::Criteria
|
103
|
+
selector: {"_id"=>{"$in"=>[BSON::ObjectId('54fe002469702d5011c60100')]}}
|
104
|
+
options: {}
|
105
|
+
class: Food
|
106
|
+
embedded: false>
|
107
|
+
|
108
|
+
person.favorite_foods.entries
|
109
|
+
|
110
|
+
=> [#<Food _id: 54fe002469702d5011c60100, name: 'pizza' >]
|
111
|
+
```
|
112
|
+
|
113
|
+
`favorite_food_ids` will return an array of bson identifiers
|
114
|
+
|
115
|
+
```ruby
|
116
|
+
person.favorite_food_ids
|
117
|
+
|
118
|
+
=> [BSON::ObjectId('54fe002469702d5011c60100')]
|
119
|
+
```
|
120
|
+
|
121
|
+
## Contributing
|
122
|
+
|
123
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
124
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
125
|
+
* Fork the project
|
126
|
+
* Start a feature/bugfix branch
|
127
|
+
* Commit and push until you are happy with your contribution
|
128
|
+
* Make sure to add tests for it. This is important so we don't break it in a future version unintentionally.
|
129
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so we can cherry-pick around it.
|
130
|
+
|
131
|
+
|
132
|
+
## Copyright
|
133
|
+
|
134
|
+
Copyright (c) 2015 Greg Morrison (Crush & Lovely). See LICENSE for further details.
|
data/Rakefile
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
require 'active_support'
|
2
|
+
require 'mongoid'
|
3
|
+
require 'mongoid_favoriteable/version'
|
4
|
+
|
5
|
+
module MongoidFavoriteable
|
6
|
+
extend ActiveSupport::Concern
|
7
|
+
|
8
|
+
included do
|
9
|
+
extend ClassMethods
|
10
|
+
end
|
11
|
+
|
12
|
+
module ClassMethods
|
13
|
+
# Public: Create a favoriteable attribute on the model.
|
14
|
+
#
|
15
|
+
# favoriteable - A symbol representing the singularized class name of the attribute to be favorited.
|
16
|
+
# An optional :class_name value may be explicitly provided for namespaced classes.
|
17
|
+
# Examples:
|
18
|
+
#
|
19
|
+
# class User
|
20
|
+
# favoriteable :product, :class_name => Product
|
21
|
+
# end
|
22
|
+
#
|
23
|
+
# The 'favoriteable' declaration will provide the following dynamically generated conveniences:
|
24
|
+
|
25
|
+
# Examples:
|
26
|
+
#
|
27
|
+
# class User
|
28
|
+
# favoriteable :product, :class_name => Product
|
29
|
+
# end
|
30
|
+
#
|
31
|
+
# => field :favorite_product_ids, :type => Array, :default => []
|
32
|
+
# => index :favorite_product_ids => 1
|
33
|
+
# => user#favorite_product!(product)
|
34
|
+
# - persists the provided product by performin an atomic #push to the
|
35
|
+
# - favorite_product_ids array
|
36
|
+
#
|
37
|
+
# => user#unfavorite_product!(product)
|
38
|
+
# - returns a boolean value contingent on whether the provided argument id
|
39
|
+
# - is present in the favorite_product_ids array
|
40
|
+
#
|
41
|
+
# => user#favorited_product?(product)
|
42
|
+
# - removes the provided product by performing an atomic #pull on the
|
43
|
+
# - favorite_product_ids array
|
44
|
+
#
|
45
|
+
# => user#favorite_products
|
46
|
+
# - executes a scoped query to return all favorited product instances
|
47
|
+
# - NOTE: scoped query class is inferred from the favoriteable attribute declaration
|
48
|
+
# - if the :class_name options is not explicitly provided
|
49
|
+
#
|
50
|
+
def favoriteable(klass, opts = {})
|
51
|
+
pluralized_klass = klass.to_s.pluralize
|
52
|
+
klass_constant = opts.fetch(:class_name, klass.to_s.classify).constantize
|
53
|
+
|
54
|
+
field :"favorite_#{klass}_ids", :type => Array, :default => []
|
55
|
+
index(:"favorite_#{klass}_ids" => 1)
|
56
|
+
|
57
|
+
define_method :"favorite_#{klass}!" do |favoritee|
|
58
|
+
return if send(:"favorited_#{klass}?", favoritee)
|
59
|
+
push(:"favorite_#{klass}_ids" => favoritee.id)
|
60
|
+
end
|
61
|
+
define_method :"unfavorite_#{klass}!" do |favoritee|
|
62
|
+
return unless send(:"favorited_#{klass}?", favoritee)
|
63
|
+
pull(:"favorite_#{klass}_ids" => favoritee.id)
|
64
|
+
end
|
65
|
+
define_method :"favorited_#{klass}?" do |favoritee|
|
66
|
+
send(:"favorite_#{klass}_ids").include? favoritee.id
|
67
|
+
end
|
68
|
+
define_method :"favorite_#{pluralized_klass}" do
|
69
|
+
klass_constant.where(:_id.in => send(:"favorite_#{klass}_ids"))
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'mongoid_favoriteable/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'mongoid_favoriteable'
|
8
|
+
spec.version = MongoidFavoriteable::VERSION
|
9
|
+
spec.authors = ['Greg Morrison']
|
10
|
+
spec.email = ['greg@crushlovely.com']
|
11
|
+
spec.homepage = 'https://github.com/crushlovely/mongoid_favoriteable'
|
12
|
+
spec.summary = 'Favoriting functionality for your Mongoid models'
|
13
|
+
spec.description = 'Favoriting functionality for your Mongoid models'
|
14
|
+
|
15
|
+
spec.files = `git ls-files`.split("\n")
|
16
|
+
spec.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
17
|
+
spec.executables = `git ls-files -- bin/*`.split("\n").collect { |f| File.basename(f) }
|
18
|
+
spec.require_paths = ['lib']
|
19
|
+
|
20
|
+
spec.add_development_dependency 'bundler'
|
21
|
+
spec.add_development_dependency 'pry'
|
22
|
+
spec.add_development_dependency 'rake'
|
23
|
+
spec.add_development_dependency 'rspec'
|
24
|
+
spec.add_development_dependency 'rubocop'
|
25
|
+
spec.add_development_dependency 'guard'
|
26
|
+
spec.add_development_dependency 'guard-rspec'
|
27
|
+
spec.add_development_dependency 'guard-rubocop'
|
28
|
+
spec.add_development_dependency 'codeclimate-test-reporter'
|
29
|
+
|
30
|
+
spec.add_dependency 'activesupport', '>=2.1.0'
|
31
|
+
spec.add_runtime_dependency 'mongoid'
|
32
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe MongoidFavoriteable do
|
4
|
+
class Food
|
5
|
+
include Mongoid::Document
|
6
|
+
field :name, :type => String
|
7
|
+
end
|
8
|
+
|
9
|
+
class Person
|
10
|
+
include Mongoid::Document
|
11
|
+
include MongoidFavoriteable
|
12
|
+
favoriteable :food
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'has a version number' do
|
16
|
+
expect(MongoidFavoriteable::VERSION).not_to be nil
|
17
|
+
end
|
18
|
+
|
19
|
+
context 'module methods' do
|
20
|
+
let(:person) { Person.new }
|
21
|
+
it 'responds to included module methods' do
|
22
|
+
[:favorite_food!, :unfavorite_food!, :favorite_foods, :favorite_food_ids].each do |method|
|
23
|
+
expect(person.respond_to? method).to eq(true)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
context 'favoriting' do
|
29
|
+
let(:food) { Food.create(:name => 'pizza') }
|
30
|
+
let(:person) { Person.create }
|
31
|
+
|
32
|
+
it 'favorites the instance' do
|
33
|
+
person.favorite_food!(food)
|
34
|
+
expect(person.favorite_food_ids).to include(food.id)
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'unfavorites the instance' do
|
38
|
+
person.unfavorite_food!(food)
|
39
|
+
expect(person.favorite_food_ids).not_to include(food.id)
|
40
|
+
end
|
41
|
+
|
42
|
+
it 'returns favorited instances' do
|
43
|
+
person.favorite_food!(food)
|
44
|
+
expect(person.favorite_foods.present?).to eq(true)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
2
|
+
|
3
|
+
require 'codeclimate-test-reporter'
|
4
|
+
CodeClimate::TestReporter.start
|
5
|
+
|
6
|
+
require 'rspec'
|
7
|
+
require 'mongoid_favoriteable'
|
8
|
+
|
9
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
10
|
+
|
11
|
+
Mongoid.load!('./spec/config/mongoid.yml', :development)
|
12
|
+
|
13
|
+
# RSpec.configure do |config|
|
14
|
+
# end
|
metadata
ADDED
@@ -0,0 +1,218 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mongoid_favoriteable
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Greg Morrison
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-07-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: pry
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubocop
|
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
|
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
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: guard-rspec
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: guard-rubocop
|
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
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: codeclimate-test-reporter
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: activesupport
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 2.1.0
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 2.1.0
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: mongoid
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :runtime
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
description: Favoriting functionality for your Mongoid models
|
168
|
+
email:
|
169
|
+
- greg@crushlovely.com
|
170
|
+
executables: []
|
171
|
+
extensions: []
|
172
|
+
extra_rdoc_files: []
|
173
|
+
files:
|
174
|
+
- ".gitignore"
|
175
|
+
- ".rspec"
|
176
|
+
- ".rubocop.yml"
|
177
|
+
- ".ruby-version"
|
178
|
+
- ".travis.yml"
|
179
|
+
- CODE_OF_CONDUCT.md
|
180
|
+
- Gemfile
|
181
|
+
- Guardfile
|
182
|
+
- LICENSE.txt
|
183
|
+
- README.md
|
184
|
+
- Rakefile
|
185
|
+
- lib/mongoid_favoriteable.rb
|
186
|
+
- lib/mongoid_favoriteable/version.rb
|
187
|
+
- mongoid_favoriteable.gemspec
|
188
|
+
- spec/config/mongoid.yml
|
189
|
+
- spec/mongoid_favoriteable_spec.rb
|
190
|
+
- spec/spec_helper.rb
|
191
|
+
homepage: https://github.com/crushlovely/mongoid_favoriteable
|
192
|
+
licenses: []
|
193
|
+
metadata: {}
|
194
|
+
post_install_message:
|
195
|
+
rdoc_options: []
|
196
|
+
require_paths:
|
197
|
+
- lib
|
198
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
199
|
+
requirements:
|
200
|
+
- - ">="
|
201
|
+
- !ruby/object:Gem::Version
|
202
|
+
version: '0'
|
203
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
204
|
+
requirements:
|
205
|
+
- - ">="
|
206
|
+
- !ruby/object:Gem::Version
|
207
|
+
version: '0'
|
208
|
+
requirements: []
|
209
|
+
rubyforge_project:
|
210
|
+
rubygems_version: 2.4.5
|
211
|
+
signing_key:
|
212
|
+
specification_version: 4
|
213
|
+
summary: Favoriting functionality for your Mongoid models
|
214
|
+
test_files:
|
215
|
+
- spec/config/mongoid.yml
|
216
|
+
- spec/mongoid_favoriteable_spec.rb
|
217
|
+
- spec/spec_helper.rb
|
218
|
+
has_rdoc:
|