cancancan 1.10.0 → 3.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +5 -5
  2. data/cancancan.gemspec +19 -21
  3. data/init.rb +2 -0
  4. data/lib/cancan/ability/actions.rb +93 -0
  5. data/lib/cancan/ability/rules.rb +96 -0
  6. data/lib/cancan/ability/strong_parameter_support.rb +41 -0
  7. data/lib/cancan/ability.rb +114 -146
  8. data/lib/cancan/class_matcher.rb +30 -0
  9. data/lib/cancan/conditions_matcher.rb +147 -0
  10. data/lib/cancan/config.rb +101 -0
  11. data/lib/cancan/controller_additions.rb +38 -41
  12. data/lib/cancan/controller_resource.rb +59 -215
  13. data/lib/cancan/controller_resource_builder.rb +26 -0
  14. data/lib/cancan/controller_resource_finder.rb +42 -0
  15. data/lib/cancan/controller_resource_loader.rb +120 -0
  16. data/lib/cancan/controller_resource_name_finder.rb +23 -0
  17. data/lib/cancan/controller_resource_sanitizer.rb +32 -0
  18. data/lib/cancan/exceptions.rb +25 -5
  19. data/lib/cancan/matchers.rb +17 -3
  20. data/lib/cancan/model_adapters/abstract_adapter.rb +30 -9
  21. data/lib/cancan/model_adapters/active_record_4_adapter.rb +43 -15
  22. data/lib/cancan/model_adapters/active_record_5_adapter.rb +61 -0
  23. data/lib/cancan/model_adapters/active_record_adapter.rb +157 -82
  24. data/lib/cancan/model_adapters/conditions_extractor.rb +75 -0
  25. data/lib/cancan/model_adapters/conditions_normalizer.rb +49 -0
  26. data/lib/cancan/model_adapters/default_adapter.rb +2 -0
  27. data/lib/cancan/model_adapters/sti_normalizer.rb +47 -0
  28. data/lib/cancan/model_adapters/strategies/base.rb +40 -0
  29. data/lib/cancan/model_adapters/strategies/joined_alias_each_rule_as_exists_subquery.rb +93 -0
  30. data/lib/cancan/model_adapters/strategies/joined_alias_exists_subquery.rb +31 -0
  31. data/lib/cancan/model_adapters/strategies/left_join.rb +11 -0
  32. data/lib/cancan/model_adapters/strategies/subquery.rb +18 -0
  33. data/lib/cancan/model_additions.rb +6 -3
  34. data/lib/cancan/parameter_validators.rb +9 -0
  35. data/lib/cancan/relevant.rb +29 -0
  36. data/lib/cancan/rule.rb +79 -91
  37. data/lib/cancan/rules_compressor.rb +23 -0
  38. data/lib/cancan/sti_detector.rb +12 -0
  39. data/lib/cancan/unauthorized_message_resolver.rb +24 -0
  40. data/lib/cancan/version.rb +3 -1
  41. data/lib/cancan.rb +16 -12
  42. data/lib/cancancan.rb +2 -0
  43. data/lib/generators/cancan/ability/ability_generator.rb +4 -2
  44. data/lib/generators/cancan/ability/templates/ability.rb +9 -9
  45. metadata +82 -93
  46. data/.gitignore +0 -15
  47. data/.rspec +0 -1
  48. data/.travis.yml +0 -48
  49. data/Appraisals +0 -135
  50. data/CHANGELOG.rdoc +0 -495
  51. data/CONTRIBUTING.md +0 -23
  52. data/Gemfile +0 -3
  53. data/LICENSE +0 -22
  54. data/README.md +0 -197
  55. data/Rakefile +0 -9
  56. data/gemfiles/activerecord_3.0.gemfile +0 -18
  57. data/gemfiles/activerecord_3.1.gemfile +0 -20
  58. data/gemfiles/activerecord_3.2.gemfile +0 -20
  59. data/gemfiles/activerecord_4.0.gemfile +0 -17
  60. data/gemfiles/activerecord_4.1.gemfile +0 -17
  61. data/gemfiles/activerecord_4.2.gemfile +0 -17
  62. data/gemfiles/datamapper_1.x.gemfile +0 -14
  63. data/gemfiles/mongoid_2.x.gemfile +0 -20
  64. data/gemfiles/sequel_3.x.gemfile +0 -20
  65. data/lib/cancan/inherited_resource.rb +0 -20
  66. data/lib/cancan/model_adapters/active_record_3_adapter.rb +0 -47
  67. data/lib/cancan/model_adapters/data_mapper_adapter.rb +0 -34
  68. data/lib/cancan/model_adapters/mongoid_adapter.rb +0 -54
  69. data/lib/cancan/model_adapters/sequel_adapter.rb +0 -87
  70. data/spec/README.rdoc +0 -27
  71. data/spec/cancan/ability_spec.rb +0 -487
  72. data/spec/cancan/controller_additions_spec.rb +0 -141
  73. data/spec/cancan/controller_resource_spec.rb +0 -648
  74. data/spec/cancan/exceptions_spec.rb +0 -58
  75. data/spec/cancan/inherited_resource_spec.rb +0 -71
  76. data/spec/cancan/matchers_spec.rb +0 -29
  77. data/spec/cancan/model_adapters/active_record_4_adapter_spec.rb +0 -40
  78. data/spec/cancan/model_adapters/active_record_adapter_spec.rb +0 -446
  79. data/spec/cancan/model_adapters/data_mapper_adapter_spec.rb +0 -119
  80. data/spec/cancan/model_adapters/default_adapter_spec.rb +0 -7
  81. data/spec/cancan/model_adapters/mongoid_adapter_spec.rb +0 -227
  82. data/spec/cancan/model_adapters/sequel_adapter_spec.rb +0 -132
  83. data/spec/cancan/rule_spec.rb +0 -52
  84. data/spec/matchers.rb +0 -13
  85. data/spec/spec.opts +0 -2
  86. data/spec/spec_helper.rb +0 -27
  87. data/spec/support/ability.rb +0 -7
@@ -1,15 +1,15 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Ability
2
4
  include CanCan::Ability
3
5
 
4
6
  def initialize(user)
5
- # Define abilities for the passed in user here. For example:
7
+ # Define abilities for the user here. For example:
6
8
  #
7
- # user ||= User.new # guest user (not logged in)
8
- # if user.admin?
9
- # can :manage, :all
10
- # else
11
- # can :read, :all
12
- # end
9
+ # return unless user.present?
10
+ # can :read, :all
11
+ # return unless user.admin?
12
+ # can :manage, :all
13
13
  #
14
14
  # The first argument to `can` is the action you are giving the user
15
15
  # permission to do.
@@ -24,9 +24,9 @@ class Ability
24
24
  # objects.
25
25
  # For example, here the user can only update published articles.
26
26
  #
27
- # can :update, Article, :published => true
27
+ # can :update, Article, published: true
28
28
  #
29
29
  # See the wiki for details:
30
- # https://github.com/CanCanCommunity/cancancan/wiki/Defining-Abilities
30
+ # https://github.com/CanCanCommunity/cancancan/blob/develop/docs/define_check_abilities.md
31
31
  end
32
32
  end
metadata CHANGED
@@ -1,35 +1,60 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cancancan
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0
4
+ version: 3.5.0
5
5
  platform: ruby
6
6
  authors:
7
+ - Alessandro Rodi (Renuo AG)
7
8
  - Bryan Rite
8
9
  - Ryan Bates
9
- autorequire:
10
+ - Richard Wilson
11
+ autorequire:
10
12
  bindir: bin
11
13
  cert_chain: []
12
- date: 2015-01-07 00:00:00.000000000 Z
14
+ date: 2023-03-05 00:00:00.000000000 Z
13
15
  dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: appraisal
18
+ requirement: !ruby/object:Gem::Requirement
19
+ requirements:
20
+ - - "~>"
21
+ - !ruby/object:Gem::Version
22
+ version: '2.0'
23
+ - - ">="
24
+ - !ruby/object:Gem::Version
25
+ version: 2.0.0
26
+ type: :development
27
+ prerelease: false
28
+ version_requirements: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - "~>"
31
+ - !ruby/object:Gem::Version
32
+ version: '2.0'
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: 2.0.0
14
36
  - !ruby/object:Gem::Dependency
15
37
  name: bundler
16
38
  requirement: !ruby/object:Gem::Requirement
17
39
  requirements:
18
40
  - - "~>"
19
41
  - !ruby/object:Gem::Version
20
- version: '1.3'
42
+ version: '2.0'
21
43
  type: :development
22
44
  prerelease: false
23
45
  version_requirements: !ruby/object:Gem::Requirement
24
46
  requirements:
25
47
  - - "~>"
26
48
  - !ruby/object:Gem::Version
27
- version: '1.3'
49
+ version: '2.0'
28
50
  - !ruby/object:Gem::Dependency
29
51
  name: rake
30
52
  requirement: !ruby/object:Gem::Requirement
31
53
  requirements:
32
54
  - - "~>"
55
+ - !ruby/object:Gem::Version
56
+ version: '10.1'
57
+ - - ">="
33
58
  - !ruby/object:Gem::Version
34
59
  version: 10.1.1
35
60
  type: :development
@@ -37,6 +62,9 @@ dependencies:
37
62
  version_requirements: !ruby/object:Gem::Requirement
38
63
  requirements:
39
64
  - - "~>"
65
+ - !ruby/object:Gem::Version
66
+ version: '10.1'
67
+ - - ">="
40
68
  - !ruby/object:Gem::Version
41
69
  version: 10.1.1
42
70
  - !ruby/object:Gem::Dependency
@@ -45,101 +73,91 @@ dependencies:
45
73
  requirements:
46
74
  - - "~>"
47
75
  - !ruby/object:Gem::Version
48
- version: 3.0.0
76
+ version: '3.2'
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: 3.2.0
49
80
  type: :development
50
81
  prerelease: false
51
82
  version_requirements: !ruby/object:Gem::Requirement
52
83
  requirements:
53
84
  - - "~>"
54
85
  - !ruby/object:Gem::Version
55
- version: 3.0.0
86
+ version: '3.2'
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: 3.2.0
56
90
  - !ruby/object:Gem::Dependency
57
- name: appraisal
91
+ name: rubocop
58
92
  requirement: !ruby/object:Gem::Requirement
59
93
  requirements:
60
- - - ">="
94
+ - - "~>"
61
95
  - !ruby/object:Gem::Version
62
- version: 1.0.0
96
+ version: 1.31.1
63
97
  type: :development
64
98
  prerelease: false
65
99
  version_requirements: !ruby/object:Gem::Requirement
66
100
  requirements:
67
- - - ">="
101
+ - - "~>"
68
102
  - !ruby/object:Gem::Version
69
- version: 1.0.0
70
- description: Continuation of the simple authorization solution for Rails which is
71
- decoupled from user roles. All permissions are stored in a single location.
72
- email: bryan@bryanrite.com
103
+ version: 1.31.1
104
+ description: Simple authorization solution for Rails. All permissions are stored in
105
+ a single location.
106
+ email: alessandro.rodi@renuo.ch
73
107
  executables: []
74
108
  extensions: []
75
109
  extra_rdoc_files: []
76
110
  files:
77
- - ".gitignore"
78
- - ".rspec"
79
- - ".travis.yml"
80
- - Appraisals
81
- - CHANGELOG.rdoc
82
- - CONTRIBUTING.md
83
- - Gemfile
84
- - LICENSE
85
- - README.md
86
- - Rakefile
87
111
  - cancancan.gemspec
88
- - gemfiles/activerecord_3.0.gemfile
89
- - gemfiles/activerecord_3.1.gemfile
90
- - gemfiles/activerecord_3.2.gemfile
91
- - gemfiles/activerecord_4.0.gemfile
92
- - gemfiles/activerecord_4.1.gemfile
93
- - gemfiles/activerecord_4.2.gemfile
94
- - gemfiles/datamapper_1.x.gemfile
95
- - gemfiles/mongoid_2.x.gemfile
96
- - gemfiles/sequel_3.x.gemfile
97
112
  - init.rb
98
113
  - lib/cancan.rb
99
114
  - lib/cancan/ability.rb
115
+ - lib/cancan/ability/actions.rb
116
+ - lib/cancan/ability/rules.rb
117
+ - lib/cancan/ability/strong_parameter_support.rb
118
+ - lib/cancan/class_matcher.rb
119
+ - lib/cancan/conditions_matcher.rb
120
+ - lib/cancan/config.rb
100
121
  - lib/cancan/controller_additions.rb
101
122
  - lib/cancan/controller_resource.rb
123
+ - lib/cancan/controller_resource_builder.rb
124
+ - lib/cancan/controller_resource_finder.rb
125
+ - lib/cancan/controller_resource_loader.rb
126
+ - lib/cancan/controller_resource_name_finder.rb
127
+ - lib/cancan/controller_resource_sanitizer.rb
102
128
  - lib/cancan/exceptions.rb
103
- - lib/cancan/inherited_resource.rb
104
129
  - lib/cancan/matchers.rb
105
130
  - lib/cancan/model_adapters/abstract_adapter.rb
106
- - lib/cancan/model_adapters/active_record_3_adapter.rb
107
131
  - lib/cancan/model_adapters/active_record_4_adapter.rb
132
+ - lib/cancan/model_adapters/active_record_5_adapter.rb
108
133
  - lib/cancan/model_adapters/active_record_adapter.rb
109
- - lib/cancan/model_adapters/data_mapper_adapter.rb
134
+ - lib/cancan/model_adapters/conditions_extractor.rb
135
+ - lib/cancan/model_adapters/conditions_normalizer.rb
110
136
  - lib/cancan/model_adapters/default_adapter.rb
111
- - lib/cancan/model_adapters/mongoid_adapter.rb
112
- - lib/cancan/model_adapters/sequel_adapter.rb
137
+ - lib/cancan/model_adapters/sti_normalizer.rb
138
+ - lib/cancan/model_adapters/strategies/base.rb
139
+ - lib/cancan/model_adapters/strategies/joined_alias_each_rule_as_exists_subquery.rb
140
+ - lib/cancan/model_adapters/strategies/joined_alias_exists_subquery.rb
141
+ - lib/cancan/model_adapters/strategies/left_join.rb
142
+ - lib/cancan/model_adapters/strategies/subquery.rb
113
143
  - lib/cancan/model_additions.rb
144
+ - lib/cancan/parameter_validators.rb
145
+ - lib/cancan/relevant.rb
114
146
  - lib/cancan/rule.rb
147
+ - lib/cancan/rules_compressor.rb
148
+ - lib/cancan/sti_detector.rb
149
+ - lib/cancan/unauthorized_message_resolver.rb
115
150
  - lib/cancan/version.rb
116
151
  - lib/cancancan.rb
117
152
  - lib/generators/cancan/ability/USAGE
118
153
  - lib/generators/cancan/ability/ability_generator.rb
119
154
  - lib/generators/cancan/ability/templates/ability.rb
120
- - spec/README.rdoc
121
- - spec/cancan/ability_spec.rb
122
- - spec/cancan/controller_additions_spec.rb
123
- - spec/cancan/controller_resource_spec.rb
124
- - spec/cancan/exceptions_spec.rb
125
- - spec/cancan/inherited_resource_spec.rb
126
- - spec/cancan/matchers_spec.rb
127
- - spec/cancan/model_adapters/active_record_4_adapter_spec.rb
128
- - spec/cancan/model_adapters/active_record_adapter_spec.rb
129
- - spec/cancan/model_adapters/data_mapper_adapter_spec.rb
130
- - spec/cancan/model_adapters/default_adapter_spec.rb
131
- - spec/cancan/model_adapters/mongoid_adapter_spec.rb
132
- - spec/cancan/model_adapters/sequel_adapter_spec.rb
133
- - spec/cancan/rule_spec.rb
134
- - spec/matchers.rb
135
- - spec/spec.opts
136
- - spec/spec_helper.rb
137
- - spec/support/ability.rb
138
155
  homepage: https://github.com/CanCanCommunity/cancancan
139
156
  licenses:
140
157
  - MIT
141
- metadata: {}
142
- post_install_message:
158
+ metadata:
159
+ funding_uri: https://github.com/sponsors/coorasse
160
+ post_install_message:
143
161
  rdoc_options: []
144
162
  require_paths:
145
163
  - lib
@@ -147,44 +165,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
147
165
  requirements:
148
166
  - - ">="
149
167
  - !ruby/object:Gem::Version
150
- version: 1.8.7
168
+ version: 2.2.0
151
169
  required_rubygems_version: !ruby/object:Gem::Requirement
152
170
  requirements:
153
171
  - - ">="
154
172
  - !ruby/object:Gem::Version
155
- version: 1.3.4
173
+ version: '0'
156
174
  requirements: []
157
- rubyforge_project: cancancan
158
- rubygems_version: 2.4.3
159
- signing_key:
175
+ rubygems_version: 3.3.7
176
+ signing_key:
160
177
  specification_version: 4
161
178
  summary: Simple authorization solution for Rails.
162
- test_files:
163
- - Appraisals
164
- - gemfiles/activerecord_3.0.gemfile
165
- - gemfiles/activerecord_3.1.gemfile
166
- - gemfiles/activerecord_3.2.gemfile
167
- - gemfiles/activerecord_4.0.gemfile
168
- - gemfiles/activerecord_4.1.gemfile
169
- - gemfiles/activerecord_4.2.gemfile
170
- - gemfiles/datamapper_1.x.gemfile
171
- - gemfiles/mongoid_2.x.gemfile
172
- - gemfiles/sequel_3.x.gemfile
173
- - spec/README.rdoc
174
- - spec/cancan/ability_spec.rb
175
- - spec/cancan/controller_additions_spec.rb
176
- - spec/cancan/controller_resource_spec.rb
177
- - spec/cancan/exceptions_spec.rb
178
- - spec/cancan/inherited_resource_spec.rb
179
- - spec/cancan/matchers_spec.rb
180
- - spec/cancan/model_adapters/active_record_4_adapter_spec.rb
181
- - spec/cancan/model_adapters/active_record_adapter_spec.rb
182
- - spec/cancan/model_adapters/data_mapper_adapter_spec.rb
183
- - spec/cancan/model_adapters/default_adapter_spec.rb
184
- - spec/cancan/model_adapters/mongoid_adapter_spec.rb
185
- - spec/cancan/model_adapters/sequel_adapter_spec.rb
186
- - spec/cancan/rule_spec.rb
187
- - spec/matchers.rb
188
- - spec/spec.opts
189
- - spec/spec_helper.rb
190
- - spec/support/ability.rb
179
+ test_files: []
data/.gitignore DELETED
@@ -1,15 +0,0 @@
1
- .DS_Store
2
- .idea/*
3
- *.swp
4
- **/*.swp
5
- *.gem
6
- .bundle
7
-
8
- gemfiles/*.lock
9
- Gemfile.lock
10
-
11
- .rvmrc
12
- .rbenv-version
13
- .ruby-version
14
- .ruby-gemset
15
- /tmp
data/.rspec DELETED
@@ -1 +0,0 @@
1
- --color
data/.travis.yml DELETED
@@ -1,48 +0,0 @@
1
- rvm:
2
- - 1.8.7
3
- - 1.9.2
4
- - 1.9.3
5
- - 2.0.0
6
- - 2.1.0
7
- - ree
8
- - jruby
9
- - rbx
10
- gemfile:
11
- - gemfiles/activerecord_3.0.gemfile
12
- - gemfiles/activerecord_3.1.gemfile
13
- - gemfiles/activerecord_3.2.gemfile
14
- - gemfiles/activerecord_4.0.gemfile
15
- - gemfiles/activerecord_4.1.gemfile
16
- - gemfiles/activerecord_4.2.gemfile
17
- - gemfiles/datamapper_1.x.gemfile
18
- - gemfiles/mongoid_2.x.gemfile
19
- - gemfiles/sequel_3.x.gemfile
20
- services:
21
- - mongodb
22
- matrix:
23
- allow_failures:
24
- - rvm: rbx
25
- - rvm: jruby
26
- gemfile: gemfiles/datamapper_1.x.gemfile
27
- exclude:
28
- - rvm: 1.8.7
29
- gemfile: gemfiles/activerecord_4.0.gemfile
30
- - rvm: 1.8.7
31
- gemfile: gemfiles/activerecord_4.1.gemfile
32
- - rvm: 1.8.7
33
- gemfile: gemfiles/activerecord_4.2.gemfile
34
- - rvm: 1.9.2
35
- gemfile: gemfiles/activerecord_4.0.gemfile
36
- - rvm: 1.9.2
37
- gemfile: gemfiles/activerecord_4.1.gemfile
38
- - rvm: 1.9.2
39
- gemfile: gemfiles/activerecord_4.2.gemfile
40
- - rvm: ree
41
- gemfile: gemfiles/activerecord_4.0.gemfile
42
- - rvm: ree
43
- gemfile: gemfiles/activerecord_4.1.gemfile
44
- - rvm: ree
45
- gemfile: gemfiles/activerecord_4.2.gemfile
46
- notifications:
47
- recipients:
48
- - bryan@bryanrite.com
data/Appraisals DELETED
@@ -1,135 +0,0 @@
1
- appraise "activerecord_3.0" do
2
- gem "activerecord", "~> 3.0.20", :require => "active_record"
3
- gem "activesupport", "~> 3.0.20", :require => "active_support/all"
4
- gem "meta_where"
5
-
6
- gemfile.platforms :jruby do
7
- gem "activerecord-jdbcsqlite3-adapter"
8
- gem "jdbc-sqlite3"
9
- end
10
-
11
- gemfile.platforms :ruby, :mswin, :mingw do
12
- gem "sqlite3"
13
- end
14
- end
15
-
16
- appraise "activerecord_3.1" do
17
- gem "activerecord", "~> 3.1.0", :require => "active_record"
18
-
19
- gemfile.platforms :ruby_18, :ruby_19 do
20
- gem "i18n", "< 0.7"
21
- end
22
-
23
- gemfile.platforms :jruby do
24
- gem "activerecord-jdbcsqlite3-adapter"
25
- gem "jdbc-sqlite3"
26
- end
27
-
28
- gemfile.platforms :ruby, :mswin, :mingw do
29
- gem "sqlite3"
30
- end
31
- end
32
-
33
- appraise "activerecord_3.2" do
34
- gem "activerecord", "~> 3.2.0", :require => "active_record"
35
-
36
- gemfile.platforms :ruby_18, :ruby_19 do
37
- gem "i18n", "< 0.7"
38
- end
39
-
40
- gemfile.platforms :jruby do
41
- gem "activerecord-jdbcsqlite3-adapter"
42
- gem "jdbc-sqlite3"
43
- end
44
-
45
- gemfile.platforms :ruby, :mswin, :mingw do
46
- gem "sqlite3"
47
- end
48
- end
49
-
50
- appraise "activerecord_4.0" do
51
- gem "activerecord", "~> 4.0.5", :require => "active_record"
52
- gem "activesupport", "~> 4.0.5", :require => "active_support/all"
53
-
54
- gemfile.platforms :jruby do
55
- gem "activerecord-jdbcsqlite3-adapter"
56
- gem "jdbc-sqlite3"
57
- end
58
-
59
- gemfile.platforms :ruby, :mswin, :mingw do
60
- gem "sqlite3"
61
- end
62
- end
63
-
64
- appraise "activerecord_4.1" do
65
- gem "activerecord", "~> 4.1.1", :require => "active_record"
66
- gem "activesupport", "~> 4.1.1", :require => "active_support/all"
67
-
68
- gemfile.platforms :jruby do
69
- gem "activerecord-jdbcsqlite3-adapter"
70
- gem "jdbc-sqlite3"
71
- end
72
-
73
- gemfile.platforms :ruby, :mswin, :mingw do
74
- gem "sqlite3"
75
- end
76
- end
77
-
78
- appraise "activerecord_4.2" do
79
- gem "activerecord", "~> 4.2.0", :require => "active_record"
80
- gem 'activesupport', '~> 4.2.0', :require => 'active_support/all'
81
-
82
- gemfile.platforms :jruby do
83
- gem "activerecord-jdbcsqlite3-adapter"
84
- gem "jdbc-sqlite3"
85
- end
86
-
87
- gemfile.platforms :ruby, :mswin, :mingw do
88
- gem "sqlite3"
89
- end
90
- end
91
-
92
- appraise "datamapper_1.x" do
93
- gem "activesupport", "~> 3.0", :require => "active_support/all"
94
- gem "dm-core", "~> 1.0"
95
- gem "dm-sqlite-adapter", "~> 1.0"
96
- gem "dm-migrations", "~> 1.0"
97
-
98
- gemfile.platforms :ruby_18, :ruby_19 do
99
- gem "i18n", "< 0.7"
100
- end
101
- end
102
-
103
- appraise "mongoid_2.x" do
104
- gem "activesupport", "~> 3.0", :require => "active_support/all"
105
- gem "mongoid", "~> 2.0.0"
106
-
107
- gemfile.platforms :ruby_18, :ruby_19 do
108
- gem "i18n", "< 0.7"
109
- end
110
-
111
- gemfile.platforms :ruby, :mswin, :mingw do
112
- gem "bson_ext", "~> 1.1"
113
- end
114
-
115
- gemfile.platforms :jruby do
116
- gem "mongo", "~> 1.9.2"
117
- end
118
- end
119
-
120
- appraise "sequel_3.x" do
121
- gem "sequel", "~> 3.47.0"
122
- gem "activesupport", "~> 3.0", :require => "active_support/all"
123
-
124
- gemfile.platforms :ruby_18, :ruby_19 do
125
- gem "i18n", "< 0.7"
126
- end
127
-
128
- gemfile.platforms :jruby do
129
- gem "jdbc-sqlite3"
130
- end
131
-
132
- gemfile.platforms :ruby, :mswin, :mingw do
133
- gem "sqlite3"
134
- end
135
- end