fromage 0.0.3 → 0.1.0

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.
Files changed (4) hide show
  1. data/LICENSE +21 -0
  2. data/README.md +48 -0
  3. data/lib/fromage/version.rb +1 -1
  4. metadata +18 -28
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT LICENSE
2
+
3
+ Copyright (c) chatgris <jboyer@af83.com>
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,48 @@
1
+ # FROMAGE
2
+
3
+ Add roles to mongoid's model with ease.
4
+
5
+ ## Installation
6
+
7
+ Ruby 1.9.2 is required.
8
+
9
+ Install it with rubygems:
10
+
11
+ gem install fromage
12
+
13
+ With bundler, add it to your `Gemfile`:
14
+
15
+ ``` ruby
16
+ gem "fromage"
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ Two steps are required. Include `Mongoid::Fromage`, and defines roles with
22
+ `fromage` method.
23
+
24
+ ``` ruby
25
+ class Person
26
+ include Mongoid::Document
27
+ include Mongoid::Fromage
28
+
29
+ fromages :time_lord, :companion
30
+ end
31
+ ```
32
+
33
+ ``` ruby
34
+ # adds time_lord and save
35
+ person.time_lord!
36
+ # check if person has time_lord role
37
+ person.time_lord?
38
+ # remove time_lord from person and save
39
+ person.un_time_lord!
40
+ # Return a criteria of persons having time_lord or companion role.
41
+ Person.any_role(:time_lord, :companion)
42
+ # Return a criteria of persons having time_lord an companion role.
43
+ Person.all_role(:time_lord, :companion)
44
+ ```
45
+
46
+ ## Copyright
47
+
48
+ MIT. See LICENSE for further details.
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
  #
3
3
  module Fromage
4
- VERSION = "0.0.3"
4
+ VERSION = "0.1.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fromage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,62 +9,52 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-19 00:00:00.000000000 Z
12
+ date: 2012-12-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &20263540 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - ~>
19
+ - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
- version: '2.7'
21
+ version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *20263540
25
- - !ruby/object:Gem::Dependency
26
- name: activesupport
27
- requirement: &20263020 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
28
25
  none: false
29
26
  requirements:
30
- - - ~>
27
+ - - ! '>='
31
28
  - !ruby/object:Gem::Version
32
- version: '3.1'
33
- type: :development
34
- prerelease: false
35
- version_requirements: *20263020
29
+ version: '0'
36
30
  - !ruby/object:Gem::Dependency
37
31
  name: mongoid
38
- requirement: &20262180 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
39
33
  none: false
40
34
  requirements:
41
- - - ~>
35
+ - - ! '>='
42
36
  - !ruby/object:Gem::Version
43
- version: '2.3'
37
+ version: '0'
44
38
  type: :development
45
39
  prerelease: false
46
- version_requirements: *20262180
47
- - !ruby/object:Gem::Dependency
48
- name: bson_ext
49
- requirement: &20261320 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
50
41
  none: false
51
42
  requirements:
52
- - - ~>
43
+ - - ! '>='
53
44
  - !ruby/object:Gem::Version
54
- version: '1.5'
55
- type: :development
56
- prerelease: false
57
- version_requirements: *20261320
45
+ version: '0'
58
46
  description: Role model for mongoid.
59
47
  email: jboyer@af83.com
60
48
  executables: []
61
49
  extensions: []
62
50
  extra_rdoc_files: []
63
51
  files:
52
+ - LICENSE
53
+ - README.md
64
54
  - lib/fromage/version.rb
65
55
  - lib/mongoid/fromage.rb
66
56
  - lib/mongoid_fromage.rb
67
- homepage: https://github.com/chatgris/fromage
57
+ homepage: http://chatgris.github.com/fromage
68
58
  licenses: []
69
59
  post_install_message:
70
60
  rdoc_options: []
@@ -84,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
74
  version: '0'
85
75
  requirements: []
86
76
  rubyforge_project:
87
- rubygems_version: 1.8.10
77
+ rubygems_version: 1.8.24
88
78
  signing_key:
89
79
  specification_version: 3
90
80
  summary: Role model for mongoid.