bitroles 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Bitroles
2
2
 
3
- TODO: Write a gem description
3
+ Simple roles for your models without external tables
4
4
 
5
5
  ## Installation
6
6
 
@@ -18,7 +18,19 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- TODO: Write usage instructions here
21
+ ```ruby
22
+ class MyModel < ActiveRecord::Base
23
+ roles :admin, :moderator
24
+ end
25
+ ```
26
+ By default bitroles uses roles_mask integer column in your table to store the roles. You can change column name pretty
27
+ easy:
28
+
29
+ ```ruby
30
+ class MyModel < ActiveRecord::Base
31
+ roles :admin, :moderator, mask_column: :someothercolumn
32
+ end
33
+ ```
22
34
 
23
35
  ## Contributing
24
36
 
data/bitroles.gemspec CHANGED
@@ -4,7 +4,7 @@ require File.expand_path('../lib/bitroles/version', __FILE__)
4
4
  Gem::Specification.new do |gem|
5
5
  gem.authors = ["Andrey Voronkov"]
6
6
  gem.email = ["voronkovaa@gmail.com"]
7
- gem.description = %q{Simple roles for your models stored in a bitmask}
7
+ gem.description = %q{Simple roles for your models without external tables}
8
8
  gem.summary = "Bitroles gem v#{Bitroles::VERSION}"
9
9
  gem.homepage = "http://github.com/Antiarchitect/bitroles"
10
10
 
@@ -1,3 +1,3 @@
1
1
  module Bitroles
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bitroles
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -43,7 +43,7 @@ dependencies:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
45
  version: 3.0.0
46
- description: Simple roles for your models stored in a bitmask
46
+ description: Simple roles for your models without external tables
47
47
  email:
48
48
  - voronkovaa@gmail.com
49
49
  executables: []
@@ -81,5 +81,5 @@ rubyforge_project:
81
81
  rubygems_version: 1.8.24
82
82
  signing_key:
83
83
  specification_version: 3
84
- summary: Bitroles gem v0.0.1
84
+ summary: Bitroles gem v0.0.3
85
85
  test_files: []