bannable 0.1.1 → 0.1.2
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 +18 -2
- data/bannable.gemspec +1 -1
- data/lib/bannable/active_record/instance_methods.rb +0 -4
- data/lib/bannable/active_record.rb +1 -1
- data/lib/bannable/version.rb +1 -1
- data/lib/bannable.rb +1 -1
- data/travis.yml +3 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f3a1a4db883a3d8e841f6d34ee09256a84bf931
|
4
|
+
data.tar.gz: c10aadac3cac88c148f171032da8673b1ca1e300
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec8e99692dea63ea321b1ba35892fbdbecfbff33f274c78878151a91d1b284fcf12c192fa36e9fefb745067be5abfe1ba9c422e2b6d1f495a1e8bcef30942736
|
7
|
+
data.tar.gz: 092d9978fb7eab47a2723d34bfa61dfefd696d637a9509b24e9d4bf3dbcf73f41ec51937d23cb8fdf81f4868bf242f454b40a1e06b193f048d5f390a3c749536
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Bannable
|
2
|
-
Allow models to be bannable in Rails.
|
2
|
+
Allow models to be bannable in Rails. Designed to work like the [hideable](https://github.com/joecorcoran/hideable) gem.
|
3
|
+
|
4
|
+
[](https://travis-ci.org/notrab/bannable)
|
3
5
|
|
4
6
|
## Installation
|
5
7
|
|
@@ -17,7 +19,21 @@ Or install it yourself as:
|
|
17
19
|
|
18
20
|
## Usage
|
19
21
|
|
20
|
-
Add
|
22
|
+
Add the following to your models you wish to be bannable
|
23
|
+
|
24
|
+
extend Bannable::ActiveRecord
|
25
|
+
bannable
|
26
|
+
|
27
|
+
Something like...
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
class User
|
31
|
+
extend Bannable::ActiveRecord
|
32
|
+
bannable
|
33
|
+
end
|
34
|
+
```
|
35
|
+
|
36
|
+
You'll then need to run `rails generate bannable:migration Model`. Replacing `Model` with an array of the `Bannable` models.
|
21
37
|
|
22
38
|
## Contributing
|
23
39
|
|
data/bannable.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Jamie Barton"]
|
10
10
|
spec.email = ["jamie@codethisway.com"]
|
11
11
|
spec.summary = %q{Ban your ActiveRecord models}
|
12
|
-
spec.description = %q{Easily set models as banned}
|
12
|
+
spec.description = %q{Easily set ActiveRecord models as banned. Designed to work like the hideable gem.}
|
13
13
|
spec.homepage = "http://github.com/notrab/bannable"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
data/lib/bannable/version.rb
CHANGED
data/lib/bannable.rb
CHANGED
data/travis.yml
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bannable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamie Barton
|
@@ -38,7 +38,8 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
-
description: Easily set models as banned
|
41
|
+
description: Easily set ActiveRecord models as banned. Designed to work like the hideable
|
42
|
+
gem.
|
42
43
|
email:
|
43
44
|
- jamie@codethisway.com
|
44
45
|
executables: []
|
@@ -56,6 +57,7 @@ files:
|
|
56
57
|
- lib/bannable/active_record/instance_methods.rb
|
57
58
|
- lib/bannable/version.rb
|
58
59
|
- lib/generators/bannable/migration_generator.rb
|
60
|
+
- travis.yml
|
59
61
|
homepage: http://github.com/notrab/bannable
|
60
62
|
licenses:
|
61
63
|
- MIT
|