indulgence 0.1.2 → 0.2.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.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZmJiMTU1MDg5ZDRhOWRmZjgwYTNhOTU1ZWRiMTcxNDMzMjU4YWU0Mg==
5
- data.tar.gz: !binary |-
6
- MTA3MjYwOTkwMGQyNjk2NzZmNWE3NzdmM2I4NDYyNTMxNjFlM2Q2MQ==
2
+ SHA1:
3
+ metadata.gz: f8f234d4658451ecf9f338b09b0c483f4fc269d6
4
+ data.tar.gz: aa0a25dc4d605700df60ac1aff1edcc08dc61447
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- YTYyOWE1ZWMwODMxZjkzNjUzNmQ1NjY4OTVlM2IxZWYxODJlNGQ5YzE2YTJk
10
- MzI4NmNiOGFmNjI0YTc0N2MxMGVhNzFlZjc4YzdmYTMxY2ZhNTJkY2VkYzQw
11
- N2FmYjM1NTA1YTFhNGZlNjFkYzM5MzU3MTA4YjFmY2I2YjA1M2I=
12
- data.tar.gz: !binary |-
13
- ZDY4Y2ZhYTZmZDE0MjBmZDZmNTQ1ZWIzNjA2OGRmYjE5ZmYwM2ZhNjczMGQ1
14
- N2IzYmE2NjVlZGIwZGFhMmNiMTExYThlODgzMmI3ZjkzY2E0N2NlYmY3YTBl
15
- ODFiNTJlZmE5N2U0ZmVmNDNjZmM0OTIzOTU1Y2VmYTM5ZTU3MzA=
6
+ metadata.gz: 3a9d519a3b1a14393a0c9ccc0c8e4300c4370ac96bfdfa10d5599eb10156b45be7af5f6a69b96089e046b58d04c3c2c99ada60fa1e7730fb4eec480c7af83963
7
+ data.tar.gz: b907d7477881668bcec5aea9525a44824b2774dc019abeecfa0f15c1ce33919110447749706cb5d19b4bc9d2322b236f343f688f7f650f93072a74fea8d280b2
@@ -118,7 +118,7 @@ Let's give Emperors the right to see and do anything by first creating an empero
118
118
  emperor = Role.create(:name => 'emperor')
119
119
  caesar = User.create(
120
120
  :first_name => 'Julius',
121
- :last_name => 'Ceasar',
121
+ :last_name => 'Caesar',
122
122
  :role => emperor
123
123
  )
124
124
 
data/Rakefile CHANGED
@@ -4,17 +4,21 @@ require 'rake'
4
4
  require 'rake/clean'
5
5
  require 'rake/testtask'
6
6
 
7
- Rake::TestTask.new do |t|
7
+ Rake::TestTask.new(:test) do |t|
8
+ t.libs << "test"
9
+ t.libs << "lib"
8
10
  t.test_files = FileList['test/**/*_test.rb']
9
11
  end
10
12
 
13
+ task :default => :test
14
+
11
15
  require 'standalone_migrations'
12
16
  StandaloneMigrations::Tasks.load_tasks
13
17
 
14
18
  task :console do
15
19
  require 'irb'
16
20
  require 'irb/completion'
17
- require 'indulgence'
21
+ require 'indulgence'
18
22
  ARGV.clear
19
23
  IRB.start
20
- end
24
+ end
@@ -6,7 +6,7 @@ require_relative 'active_record/acts/indulgent'
6
6
 
7
7
  module Indulgence
8
8
  def self.strict?
9
- @strict.nil? || @strict
9
+ !instance_variable_defined?(:@strict) || @strict
10
10
  end
11
11
 
12
12
  def self.strict=(boolean)
@@ -2,7 +2,7 @@
2
2
  module Indulgence
3
3
  class Ability
4
4
  attr_reader :name, :relationship, :args
5
-
5
+
6
6
  def initialize(args = {})
7
7
  @name = args[:name]
8
8
  @compare_single = args[:compare_single]
@@ -11,14 +11,14 @@ module Indulgence
11
11
  @args = args
12
12
  valid?
13
13
  end
14
-
14
+
15
15
  def ==(another_ability)
16
16
  [:name, :args].each do |method|
17
17
  return false if send(method) != another_ability.send(method)
18
18
  end
19
19
  return true
20
20
  end
21
-
21
+
22
22
  def valid?
23
23
  must_be_name
24
24
  unless relationship
@@ -26,41 +26,41 @@ module Indulgence
26
26
  must_respond_to_call @filter_many
27
27
  end
28
28
  end
29
-
29
+
30
30
  def compare_single(thing, entity)
31
31
  return @compare_single.call thing, entity if @compare_single
32
-
32
+
33
33
  identifier = thing.send(relationship)
34
- if identifier.kind_of?(Array)
34
+ if identifier.kind_of?(Array) || identifier.kind_of?(ActiveRecord::Relation)
35
35
  identifier.include? entity
36
- else
37
- identifier == entity.id || identifier == entity
36
+ else
37
+ identifier == entity.id || identifier == entity
38
38
  end
39
39
  end
40
-
40
+
41
41
  def filter_many(things, entity)
42
42
  return @filter_many.call things, entity if @filter_many
43
-
43
+
44
44
  if things.reflect_on_association(relationship)
45
45
  things.joins(relationship).where(entity.class.table_name => {:id => entity.id})
46
46
  else
47
47
  things.where(relationship => entity.id)
48
48
  end
49
49
  end
50
-
50
+
51
51
  private
52
52
  def must_be_name
53
53
  unless name
54
54
  raise AbilityConfigurationError, "A name is required for each ability"
55
55
  end
56
56
  end
57
-
57
+
58
58
  def must_respond_to_call(item)
59
59
  unless item.respond_to? :call
60
60
  raise AbilityConfigurationError, "item must respond to call: #{item.inspect}"
61
61
  end
62
62
  end
63
-
64
-
63
+
64
+
65
65
  end
66
66
  end
@@ -1,14 +1,16 @@
1
1
  module Indulgence
2
- VERSION = "0.1.2"
2
+ VERSION = "0.2.0"
3
3
  end
4
4
 
5
5
  # History
6
6
  # =======
7
7
  #
8
+ # 0.2.0 Updated to work with ActiveRecord 5.
9
+ #
8
10
  # 0.1.2 Adds strict mode - to allow more flexible use (if a none user object
9
11
  # is passed to indulge?, in strict mode a no method error is raised. When
10
12
  # indulgence.strict = false, indulge? will use the default abilities)
11
- #
13
+ #
12
14
  # 0.1.1 Makes it easier to use the state of an object to determine permissions
13
15
  # rather than a user's role.
14
16
  #
@@ -20,38 +22,38 @@ end
20
22
  #
21
23
  # 0.0.6 Specifies the default behaviour as assigning the none ability to
22
24
  # all CRUD actions.
23
- #
25
+ #
24
26
  # 0.0.5 Allows simplified ability definition to be used with has_many
25
- #
27
+ #
26
28
  # 0.0.4 Simplifies defining abilities
27
- #
28
- # Allows and ability to be defined by passing in the name of the
29
+ #
30
+ # Allows and ability to be defined by passing in the name of the
29
31
  # association that it refers to.
30
- #
32
+ #
31
33
  # 0.0.3 Updated to use latest version of standalone_migrations
32
- #
34
+ #
33
35
  # Branch this app has been using has been merged into standalone_migrations
34
36
  # main. So config in .standalone_migrations now works without
35
37
  # using a specific clone branch.
36
- #
38
+ #
37
39
  # 0.0.2 Rebuild with lessons learnt from first usage in host app
38
- #
39
- # Adds automatic caching of abilites. Required a reworking of ability
40
+ #
41
+ # Adds automatic caching of abilites. Required a reworking of ability
40
42
  # lambdas, so that a particular entity id wasn't cached
41
- #
42
- # Renamed ability methods truth as compare_single, and where_clause as
43
+ #
44
+ # Renamed ability methods truth as compare_single, and where_clause as
43
45
  # filter_many as more descriptive.
44
- #
45
- # Forced Ability methods #compare_single and #filter_many to use lambdas
46
+ #
47
+ # Forced Ability methods #compare_single and #filter_many to use lambdas
46
48
  # (or other object that responds to call). The reasons:
47
- #
49
+ #
48
50
  # 1. To remove the special way that the none ability was handled.
49
51
  # 2. Previously, if Ability#filter_many was nil everything would be returned,
50
52
  # which I think is counter-intuitive.
51
53
  # 3. Also if Ability#filter_many was undefined, then everything would
52
54
  # be returned, which is just poor design for a permission tool. Now
53
- # an error is raised.
54
- #
55
+ # an error is raised.
56
+ #
55
57
  # 0.0.1 Initial build
56
58
  # First alpa version
57
- #
59
+ #
Binary file
@@ -3,7 +3,7 @@ $:.unshift File.join(File.dirname(__FILE__),'units')
3
3
  $:.unshift File.join(File.dirname(__FILE__),'lib')
4
4
  $:.unshift File.join(File.dirname(__FILE__),'..','lib','indulgence')
5
5
 
6
- require 'test/unit'
6
+ require "minitest/autorun"
7
7
 
8
8
  require 'active_record'
9
9
  ActiveRecord::Base.establish_connection :adapter => 'sqlite3', :database => "test/db/test.sqlite3.db"
@@ -1,7 +1,7 @@
1
1
 
2
2
  module Indulgence
3
3
  module AbilityTests
4
- class MethodOnly < Test::Unit::TestCase
4
+ class MethodOnly < Minitest::Test
5
5
 
6
6
  def setup
7
7
  @attributes = {
@@ -28,7 +28,7 @@ module Indulgence
28
28
  end
29
29
 
30
30
  def assert_initiation_raises_error
31
- assert_raise AbilityConfigurationError do
31
+ assert_raises AbilityConfigurationError do
32
32
  Ability.new(@attributes)
33
33
  end
34
34
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Indulgence
4
4
  module AbilityTests
5
- class WithLambdas < Test::Unit::TestCase
5
+ class WithLambdas < Minitest::Test
6
6
 
7
7
  def setup
8
8
  @attributes = {
@@ -35,7 +35,7 @@ module Indulgence
35
35
  end
36
36
 
37
37
  def assert_initiation_raises_error
38
- assert_raise AbilityConfigurationError do
38
+ assert_raises AbilityConfigurationError do
39
39
  Ability.new(@attributes)
40
40
  end
41
41
  end
@@ -5,7 +5,7 @@ require 'permission'
5
5
  require 'ability'
6
6
 
7
7
  module Indulgence
8
- class PermissionTest < Test::Unit::TestCase
8
+ class PermissionTest < Minitest::Test
9
9
 
10
10
  def test_creation
11
11
  permission = Permission.new(User.create(:name => 'Whisp'), :read)
@@ -3,35 +3,36 @@ require 'user'
3
3
  require 'role'
4
4
  require 'role_permission'
5
5
 
6
- class RolePermissionTest < Test::Unit::TestCase
6
+ class RolePermissionTest < Minitest::Test
7
7
  def setup
8
8
  @role = Role.create(:name => 'mortal')
9
9
  @user = User.create(:name => 'Trevor', :role_id => @role.id)
10
10
  end
11
-
11
+
12
12
  def test_indulge_with_has_many
13
+ @role.reload
13
14
  assert_equal(true, @role.indulge?(@user, :read))
14
15
  assert_equal(false, @role.indulge?(@user, :delete))
15
16
  end
16
-
17
+
17
18
  def test_indulgence_with_has_many
18
19
  assert_equal([@role], Role.indulgence(@user, :read))
19
- assert_raise ActiveRecord::RecordNotFound do
20
+ assert_raises ActiveRecord::RecordNotFound do
20
21
  Role.indulgence(@user, :delete)
21
22
  end
22
23
  end
23
24
 
24
25
  def test_null_entity_indulge
25
26
  assert_equal(false, @role.indulge?(nil, :update))
26
- assert_not_equal(@role.indulge?(@user, :update), @role.indulge?(nil, :update))
27
+ refute_equal(@role.indulge?(@user, :update), @role.indulge?(nil, :update))
27
28
  end
28
29
 
29
30
  def test_null_entity_indulgence
30
- assert_raise ActiveRecord::RecordNotFound do
31
+ assert_raises ActiveRecord::RecordNotFound do
31
32
  assert_equal(0, Role.indulgence(nil, :update).count)
32
33
  end
33
34
  end
34
-
35
+
35
36
  def teardown
36
37
  User.delete_all
37
38
  Role.delete_all
@@ -2,7 +2,7 @@ require_relative '../test_helper'
2
2
  require 'user'
3
3
  require 'role'
4
4
 
5
- class RoleTest < Test::Unit::TestCase
5
+ class RoleTest < Minitest::Test
6
6
  def teardown
7
7
  User.delete_all
8
8
  Role.delete_all
@@ -3,7 +3,7 @@ require 'user'
3
3
  require 'role'
4
4
  require 'thing_permission'
5
5
 
6
- class ThingPermissionTest < Test::Unit::TestCase
6
+ class ThingPermissionTest < Minitest::Test
7
7
 
8
8
  Permission = Indulgence::Permission
9
9
 
@@ -47,7 +47,7 @@ class ThingPermissionTest < Test::Unit::TestCase
47
47
 
48
48
  def test_setting_unknown_role_method_causes_error
49
49
  Permission.role_method = :something_else
50
- assert_raise NoMethodError do
50
+ assert_raises NoMethodError do
51
51
  ThingPermission.new(@super_user, :read).role_name
52
52
  end
53
53
  end
@@ -59,7 +59,7 @@ class ThingPermissionTest < Test::Unit::TestCase
59
59
 
60
60
  def test_setting_unknown_role_name_method_causes_error
61
61
  Permission.role_name_method = :something_else
62
- assert_raise NoMethodError do
62
+ assert_raises NoMethodError do
63
63
  ThingPermission.new(@super_user, :read).role_name
64
64
  end
65
65
  end
@@ -70,7 +70,7 @@ class ThingPermissionTest < Test::Unit::TestCase
70
70
  end
71
71
 
72
72
  def test_with_unspecified_ability
73
- assert_raise Indulgence::AbilityNotFound do
73
+ assert_raises Indulgence::AbilityNotFound do
74
74
  ThingPermission.new(@user, :unspecified)
75
75
  end
76
76
  end
@@ -2,8 +2,8 @@ require_relative '../test_helper'
2
2
  require 'user'
3
3
  require 'thing'
4
4
 
5
- class ThingTest < Test::Unit::TestCase
6
-
5
+ class ThingTest < Minitest::Test
6
+
7
7
  def setup
8
8
  @god = Role.create(:name => 'god')
9
9
  @demigod = Role.create(:name => 'demigod')
@@ -13,38 +13,38 @@ class ThingTest < Test::Unit::TestCase
13
13
  @thing = Thing.create(:name => 'Stuff', :owner => @owner)
14
14
  end
15
15
 
16
-
16
+
17
17
  def test_user
18
18
  assert_equal(@owner, @thing.owner)
19
- assert_equal([@thing], @owner.things)
19
+ assert_equal([@thing], @owner.things)
20
20
  end
21
-
21
+
22
22
  def test_indulge
23
23
  make_second_thing
24
24
  assert_equal(false, @thing.indulge?(@owner, :read))
25
25
  assert_equal(false, @thing.indulge?(@owner, :delete))
26
26
  assert_equal(false, @other_thing.indulge?(@owner, :delete))
27
27
  end
28
-
28
+
29
29
  def test_indulge_by_god
30
30
  make_second_thing
31
31
  @owner.update_attribute(:role, @god)
32
32
  assert_equal(true, @thing.indulge?(@owner, :read))
33
33
  assert_equal(true, @thing.indulge?(@owner, :delete))
34
- assert_equal(true, @other_thing.indulge?(@owner, :delete))
34
+ assert_equal(true, @other_thing.indulge?(@owner, :delete))
35
35
  end
36
-
36
+
37
37
  def test_indulgence_by_god
38
38
  make_second_thing
39
39
  @owner.update_attribute(:role, @god)
40
- assert_equal(Thing.all, Thing.indulgence(@owner, :delete))
40
+ assert_equal(Thing.all, Thing.indulgence(@owner, :delete))
41
41
  end
42
-
42
+
43
43
  def test_indulge_by_demigod
44
44
  make_second_thing
45
45
  @owner.update_attribute(:role, @demigod)
46
46
  assert_equal(true, @thing.indulge?(@owner, :read))
47
- assert_equal(true, @thing.indulge?(@owner, :delete))
47
+ assert_equal(true, @thing.indulge?(@owner, :delete))
48
48
  assert_equal(false, @other_thing.indulge?(@owner, :delete))
49
49
  end
50
50
 
@@ -52,15 +52,15 @@ class ThingTest < Test::Unit::TestCase
52
52
  make_second_thing
53
53
  @owner.update_attribute(:role, @thief)
54
54
  assert_equal(true, @thing.indulge?(@owner, :read))
55
- assert_equal(true, @thing.indulge?(@owner, :update))
55
+ assert_equal(true, @thing.indulge?(@owner, :update))
56
56
  assert_equal(false, @thing.indulge?(@owner, :delete))
57
57
  end
58
-
58
+
59
59
  def test_indulge_via_entity_association
60
60
  make_second_thing
61
61
  @owner.update_attribute(:role, @friend)
62
62
  assert_equal(true, @thing.indulge?(@owner, :read))
63
- assert_equal(true, @thing.indulge?(@owner, :update))
63
+ assert_equal(true, @thing.indulge?(@owner, :update))
64
64
  assert_equal(false, @thing.indulge?(@owner, :delete))
65
65
  end
66
66
 
@@ -90,53 +90,53 @@ class ThingTest < Test::Unit::TestCase
90
90
  @owner.update_attribute(:role, @demigod)
91
91
  assert_equal(false, Thing.indulge?(@owner, :update))
92
92
  end
93
-
93
+
94
94
  def test_indulge_other_thing
95
95
  other_thing = OtherThing.create(:name => 'Other Stuff', :owner => @owner)
96
96
  assert_equal(false, other_thing.indulge?(@owner, :read))
97
97
  assert_equal(false, other_thing.indulge?(@owner, :delete))
98
98
  end
99
-
99
+
100
100
  def test_indulgence
101
101
  make_second_thing
102
102
  @owner.update_attribute(:role, @demigod)
103
103
  assert_equal(Thing.order('id'), Thing.indulgence(@owner, :read).order('id'))
104
- assert_raise ActiveRecord::RecordNotFound do
104
+ assert_raises ActiveRecord::RecordNotFound do
105
105
  Thing.indulgence(@user, :read).order('id')
106
106
  end
107
107
  assert_equal([@thing], Thing.indulgence(@owner, :delete))
108
- assert_raise ActiveRecord::RecordNotFound do
108
+ assert_raises ActiveRecord::RecordNotFound do
109
109
  Thing.indulgence(@user, :delete)
110
110
  end
111
111
  end
112
-
112
+
113
113
  def test_indulgence_via_entity_id_method
114
114
  make_second_thing
115
115
  @owner.update_attribute(:role, @thief)
116
116
  assert_equal(Thing.where(:owner_id => @owner.id), Thing.indulgence(@owner, :update))
117
117
  end
118
-
118
+
119
119
  def test_indulgence_via_entity_association
120
120
  make_second_thing
121
121
  @owner.update_attribute(:role, @friend)
122
- assert_equal(Thing.where(:owner_id => @owner.id).all, Thing.indulgence(@owner, :update).all)
122
+ assert_equal(Thing.where(:owner_id => @owner.id).to_a, Thing.indulgence(@owner, :update).to_a)
123
123
  end
124
-
124
+
125
125
  def test_indulgence_with_unspecified_ability
126
- assert_raise ActiveRecord::RecordNotFound do
126
+ assert_raises ActiveRecord::RecordNotFound do
127
127
  Thing.indulgence(@owner, :unspecified)
128
- end
128
+ end
129
129
  end
130
-
130
+
131
131
  def test_find
132
132
  make_second_thing
133
133
  @owner.update_attribute(:role, @demigod)
134
134
  assert_equal(@thing, Thing.indulgence(@owner, :delete).find(@thing.id))
135
- assert_raise ActiveRecord::RecordNotFound do
135
+ assert_raises ActiveRecord::RecordNotFound do
136
136
  assert_equal(@thing, Thing.indulgence(@user, :delete).find(@thing.id))
137
137
  end
138
138
  end
139
-
139
+
140
140
  def test_aliased_compare_single_method
141
141
  make_second_thing
142
142
  assert_equal(false, @thing.permit?(@owner, :read))
@@ -149,29 +149,29 @@ class ThingTest < Test::Unit::TestCase
149
149
  @owner.update_attribute(:role, @god)
150
150
  assert_equal(true, Thing.permit?(@owner, :read))
151
151
  end
152
-
152
+
153
153
  def test_aliased_filter_many_method
154
154
  make_second_thing
155
155
  @owner.update_attribute(:role, @demigod)
156
156
  assert_equal(Thing.order('id'), Thing.permitted(@owner, :read).order('id'))
157
- assert_raise ActiveRecord::RecordNotFound do
157
+ assert_raises ActiveRecord::RecordNotFound do
158
158
  Thing.permitted(@user, :read).order('id')
159
159
  end
160
160
  assert_equal([@thing], Thing.permitted(@owner, :delete))
161
- assert_raise ActiveRecord::RecordNotFound do
161
+ assert_raises ActiveRecord::RecordNotFound do
162
162
  Thing.permitted(@user, :delete)
163
163
  end
164
164
  end
165
-
165
+
166
166
  def make_second_thing
167
167
  @user = User.create(:name => 'Clive')
168
168
  @other_thing = Thing.create(:name => 'Debris', :owner => @user)
169
169
  end
170
-
170
+
171
171
  def teardown
172
172
  Role.delete_all
173
173
  User.delete_all
174
174
  Thing.delete_all
175
175
  end
176
-
176
+
177
177
  end
@@ -2,7 +2,7 @@ require_relative '../test_helper'
2
2
  require 'user'
3
3
  require 'role'
4
4
 
5
- class UserTest < Test::Unit::TestCase
5
+ class UserTest < Minitest::Test
6
6
  def teardown
7
7
  User.delete_all
8
8
  Role.delete_all
@@ -3,7 +3,7 @@ require 'user'
3
3
  require 'work_process'
4
4
  require 'work_process_permission'
5
5
 
6
- class WorkProcessTest < Test::Unit::TestCase
6
+ class WorkProcessTest < Minitest::Test
7
7
 
8
8
  def teardown
9
9
  User.delete_all
@@ -49,7 +49,7 @@ class WorkProcessTest < Test::Unit::TestCase
49
49
  end
50
50
 
51
51
  def test_indulgence_when_not_permitted
52
- assert_raise ActiveRecord::RecordNotFound do
52
+ assert_raises ActiveRecord::RecordNotFound do
53
53
  WorkProcess.indulgence(user, :update, :beginning)
54
54
  end
55
55
  end
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: indulgence
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Nichols
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-17 00:00:00.000000000 Z
11
+ date: 2018-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: sqlite3
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: standalone_migrations
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ! '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: 2.1.1
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ! '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: 2.1.1
55
55
  description: Packages permission functionality into a set of permission objects.
@@ -104,43 +104,43 @@ require_paths:
104
104
  - lib
105
105
  required_ruby_version: !ruby/object:Gem::Requirement
106
106
  requirements:
107
- - - ! '>='
107
+ - - ">="
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0'
110
110
  required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  requirements:
112
- - - ! '>='
112
+ - - ">="
113
113
  - !ruby/object:Gem::Version
114
114
  version: '0'
115
115
  requirements: []
116
116
  rubyforge_project:
117
- rubygems_version: 2.2.2
117
+ rubygems_version: 2.6.14
118
118
  signing_key:
119
119
  specification_version: 4
120
120
  summary: Yet another permissions gem
121
121
  test_files:
122
- - test/units/role_test.rb
122
+ - test/db/migrate/20141008101147_create_work_processes.rb
123
+ - test/db/migrate/20130408085511_create_users.rb
124
+ - test/db/migrate/20130408103015_create_roles.rb
125
+ - test/db/migrate/20130408132217_create_things.rb
126
+ - test/db/test.sqlite3.db
127
+ - test/db/schema.rb
128
+ - test/db/config.yml
129
+ - test/units/user_test.rb
130
+ - test/units/work_process_test.rb
131
+ - test/units/thing_test.rb
132
+ - test/units/indulgence/ability_tests/with_lambdas.rb
133
+ - test/units/indulgence/ability_tests/method_only.rb
123
134
  - test/units/indulgence/permission_test.rb
124
135
  - test/units/indulgence/ability_test.rb
125
- - test/units/indulgence/ability_tests/method_only.rb
126
- - test/units/indulgence/ability_tests/with_lambdas.rb
127
- - test/units/user_test.rb
128
136
  - test/units/role_permission_test.rb
129
- - test/units/work_process_test.rb
130
137
  - test/units/thing_permission_test.rb
131
- - test/units/thing_test.rb
132
- - test/lib/role.rb
133
- - test/lib/work_process.rb
134
- - test/lib/user.rb
138
+ - test/units/role_test.rb
135
139
  - test/lib/thing.rb
136
- - test/lib/thing_permission.rb
137
- - test/lib/work_process_permission.rb
138
140
  - test/lib/role_permission.rb
139
- - test/db/migrate/20130408103015_create_roles.rb
140
- - test/db/migrate/20130408085511_create_users.rb
141
- - test/db/migrate/20130408132217_create_things.rb
142
- - test/db/migrate/20141008101147_create_work_processes.rb
143
- - test/db/config.yml
144
- - test/db/test.sqlite3.db
145
- - test/db/schema.rb
141
+ - test/lib/work_process_permission.rb
142
+ - test/lib/user.rb
143
+ - test/lib/role.rb
144
+ - test/lib/thing_permission.rb
145
+ - test/lib/work_process.rb
146
146
  - test/test_helper.rb