mongoid-suicide 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +11 -0
- data/Gemfile +1 -0
- data/README.md +45 -3
- data/lib/mongoid/suicide/version.rb +1 -1
- metadata +4 -5
- data/.ruby-gemset +0 -1
- data/.ruby-version +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07b024b8415dfd6e2358eddcfab081d014f0ac0d
|
4
|
+
data.tar.gz: 37208118af8046cd3c7105a54cd906a920162ca4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 882e82c22625c8168635df530c2c19a12e9ee277ce5d7c1ff26005440a4f89cf9dd9cf9d729cdeb2c558551bef16993193d77dad4451b7b3f1766eaf398c3b8c
|
7
|
+
data.tar.gz: f7d8cf688d09f0636a444406b3e3e0638d96b535d6ab29dd217e6a93aab18b2f1cca34146d05eba690d6aeedbaa4a2f26b2600f1f9bc2e55129df64d5f0f2011
|
data/.travis.yml
ADDED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
# Mongoid::Suicide
|
2
2
|
|
3
|
-
|
3
|
+
[![Build Status][travis_badge]][travis]
|
4
|
+
[![Gem Version][rubygems_badge]][rubygems]
|
5
|
+
[![Code Climate][codeclimate_badge]][codeclimate]
|
6
|
+
|
7
|
+
Provides methods to remove fields from Mongoid models
|
4
8
|
|
5
9
|
## Installation
|
6
10
|
|
@@ -20,12 +24,50 @@ Or install it yourself as:
|
|
20
24
|
|
21
25
|
## Usage
|
22
26
|
|
23
|
-
|
27
|
+
Set up a `Mongoid::Suicide`:
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
class Person
|
31
|
+
include Mongoid::Document
|
32
|
+
include Mongoid::Suicide
|
33
|
+
|
34
|
+
field :username, type: String
|
35
|
+
end
|
36
|
+
|
37
|
+
p = Person.first
|
38
|
+
p.username
|
39
|
+
=> ...
|
40
|
+
```
|
41
|
+
|
42
|
+
Remove a field from a document:
|
43
|
+
|
44
|
+
```ruby
|
45
|
+
Person.remove_field(:username)
|
46
|
+
|
47
|
+
p = Person.first
|
48
|
+
p.username
|
49
|
+
=> NoMethodError: undefined method `username'
|
50
|
+
```
|
24
51
|
|
25
52
|
## Contributing
|
26
53
|
|
27
|
-
1. Fork it ( https://github.com/
|
54
|
+
1. Fork it ( https://github.com/mamantoha/mongoid-suicide/fork )
|
28
55
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
29
56
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
30
57
|
4. Push to the branch (`git push origin my-new-feature`)
|
31
58
|
5. Create a new Pull Request
|
59
|
+
|
60
|
+
## License and Author
|
61
|
+
|
62
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
63
|
+
|
64
|
+
Copyright (c) 2015-2016 by Anton Maminov
|
65
|
+
|
66
|
+
[travis_badge]: http://img.shields.io/travis/mamantoha/mongoid-suicide.svg?style=flat
|
67
|
+
[travis]: https://travis-ci.org/mamantoha/mongoid-suicide
|
68
|
+
|
69
|
+
[rubygems_badge]: http://img.shields.io/gem/v/mongoid-suicide.svg?style=flat
|
70
|
+
[rubygems]: http://rubygems.org/gems/mongoid-suicide
|
71
|
+
|
72
|
+
[codeclimate_badge]: http://img.shields.io/codeclimate/github/mamantoha/mongoid-suicide.svg?style=flat
|
73
|
+
[codeclimate]: https://codeclimate.com/github/mamantoha/mongoid-suicide
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid-suicide
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anton Maminov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -67,8 +67,7 @@ extra_rdoc_files: []
|
|
67
67
|
files:
|
68
68
|
- ".gitignore"
|
69
69
|
- ".rspec"
|
70
|
-
- ".
|
71
|
-
- ".ruby-version"
|
70
|
+
- ".travis.yml"
|
72
71
|
- Gemfile
|
73
72
|
- LICENSE.txt
|
74
73
|
- README.md
|
@@ -100,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
99
|
version: '0'
|
101
100
|
requirements: []
|
102
101
|
rubyforge_project:
|
103
|
-
rubygems_version: 2.
|
102
|
+
rubygems_version: 2.5.1
|
104
103
|
signing_key:
|
105
104
|
specification_version: 4
|
106
105
|
summary: Hacks to support Mongoid remove field
|
data/.ruby-gemset
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
mongoid-suicide
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
ruby-2.2.0
|