invitational 1.3.3 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -21,7 +21,7 @@ describe Entity do
21
21
  And {result.invitable.should == entity}
22
22
  And {result.user.should == user }
23
23
  And {result.role.should == :admin}
24
- And {result.claimed?.should be_true}
24
+ And {result.claimed?.should be_truthy}
25
25
  end
26
26
 
27
27
  context "Users cannot be invited again if they are already invited" do
@@ -41,24 +41,24 @@ describe Invitational::Invitation do
41
41
 
42
42
  context "Type" do
43
43
  context "Standard Role" do
44
- Then {unclaimed.uberadmin?.should_not be_true}
45
- And {claimed.uberadmin?.should_not be_true}
44
+ Then {unclaimed.uberadmin?.should_not be_truthy}
45
+ And {claimed.uberadmin?.should_not be_truthy}
46
46
  end
47
47
 
48
48
  context "Uber Admin" do
49
- Then {uber_admin.uberadmin?.should be_true}
49
+ Then {uber_admin.uberadmin?.should be_truthy}
50
50
  end
51
51
  end
52
52
 
53
53
  context "Claim Status" do
54
54
  context "Unclaimed" do
55
- Then {unclaimed.claimed?.should_not be_true}
56
- And {unclaimed.unclaimed?.should be_true}
55
+ Then {unclaimed.claimed?.should_not be_truthy}
56
+ And {unclaimed.unclaimed?.should be_truthy}
57
57
  end
58
58
 
59
59
  context "Claimed" do
60
- Then {claimed.claimed?.should be_true}
61
- And {claimed.unclaimed?.should_not be_true}
60
+ Then {claimed.claimed?.should be_truthy}
61
+ And {claimed.unclaimed?.should_not be_truthy}
62
62
  end
63
63
  end
64
64
 
@@ -87,7 +87,7 @@ describe Invitational::Invitation do
87
87
  And {result.invitable.should be_nil}
88
88
  And {result.email.should == user4.email}
89
89
  And {result.role.should == :uberadmin }
90
- And {result.unclaimed?.should be_true}
90
+ And {result.unclaimed?.should be_truthy}
91
91
  end
92
92
 
93
93
  context "Existing user" do
@@ -97,7 +97,7 @@ describe Invitational::Invitation do
97
97
  And {result.invitable.should be_nil}
98
98
  And {result.email.should == user4.email}
99
99
  And {result.role.should == :uberadmin}
100
- And {result.claimed?.should be_true}
100
+ And {result.claimed?.should be_truthy}
101
101
  And {result.user.should == user4 }
102
102
  end
103
103
 
@@ -117,7 +117,7 @@ describe Invitational::Invitation do
117
117
  And {result.invitable.should be_nil}
118
118
  And {result.email.should == user4.email}
119
119
  And {result.role.should == :employer }
120
- And {result.unclaimed?.should be_true}
120
+ And {result.unclaimed?.should be_truthy}
121
121
  end
122
122
 
123
123
  context "Existing user" do
@@ -127,7 +127,7 @@ describe Invitational::Invitation do
127
127
  And {result.invitable.should be_nil}
128
128
  And {result.email.should == user4.email}
129
129
  And {result.role.should == :employer}
130
- And {result.claimed?.should be_true}
130
+ And {result.claimed?.should be_truthy}
131
131
  And {result.user.should == user4 }
132
132
  end
133
133
 
@@ -21,13 +21,13 @@ describe User do
21
21
  context 'when an uberadmin' do
22
22
  When {invite_uber_admin user2}
23
23
 
24
- Then {user2.uberadmin?.should be_true}
24
+ Then {user2.uberadmin?.should be_truthy}
25
25
  end
26
26
 
27
27
  context 'when not an uberadmin' do
28
28
  When {invite_user user1, entity1, :admin}
29
29
 
30
- Then {user1.uberadmin?.should_not be_true}
30
+ Then {user1.uberadmin?.should_not be_truthy}
31
31
  end
32
32
  end
33
33
 
@@ -35,13 +35,13 @@ describe User do
35
35
  context 'when an invited' do
36
36
  When {invite_system_role user2, :employer}
37
37
 
38
- Then {user2.invited_to_system?(:employer).should be_true}
38
+ Then {user2.invited_to_system?(:employer).should be_truthy}
39
39
  end
40
40
 
41
41
  context 'when not invited' do
42
42
  When {invite_user user1, entity1, :admin}
43
43
 
44
- Then {user1.invited_to_system?(:employer).should_not be_true}
44
+ Then {user1.invited_to_system?(:employer).should_not be_truthy}
45
45
  end
46
46
  end
47
47
 
@@ -51,13 +51,13 @@ describe User do
51
51
  context 'when invited' do
52
52
  When {invite_user user1, entity1, :admin}
53
53
 
54
- Then {user1.invited_to?(entity1).should be_true}
54
+ Then {user1.invited_to?(entity1).should be_truthy}
55
55
  end
56
56
 
57
57
  context 'when not invited' do
58
58
  When {invite_user user2, entity1, :admin}
59
59
 
60
- Then {user1.invited_to?(entity1).should_not be_true}
60
+ Then {user1.invited_to?(entity1).should_not be_truthy}
61
61
  end
62
62
  end
63
63
 
@@ -66,15 +66,15 @@ describe User do
66
66
  When {invite_user user1, entity1, :admin}
67
67
 
68
68
  context 'when invited' do
69
- Then {user1.invited_to?(entity1, :admin).should be_true}
69
+ Then {user1.invited_to?(entity1, :admin).should be_truthy}
70
70
  end
71
71
 
72
72
  context 'when not invited' do
73
- Then {user2.invited_to?(entity1, :admin).should_not be_true}
73
+ Then {user2.invited_to?(entity1, :admin).should_not be_truthy}
74
74
  end
75
75
 
76
76
  context 'when invited to a different role' do
77
- Then {user1.invited_to?(entity1, :user).should_not be_true}
77
+ Then {user1.invited_to?(entity1, :user).should_not be_truthy}
78
78
  end
79
79
  end
80
80
 
@@ -18,19 +18,19 @@ describe Invitational::ChecksForInvitation do
18
18
  context "when invited" do
19
19
  When(:result) { Invitational::ChecksForInvitation.for user1, entity }
20
20
 
21
- Then {result.should be_true}
21
+ Then {result.should be_truthy}
22
22
  end
23
23
 
24
24
  context "when not invited" do
25
25
  When(:result) { Invitational::ChecksForInvitation.for user2, entity }
26
26
 
27
- Then {result.should_not be_true}
27
+ Then {result.should_not be_truthy}
28
28
  end
29
29
 
30
30
  context "when uber admin" do
31
31
  When(:result) { Invitational::ChecksForInvitation.for user3, entity }
32
32
 
33
- Then {result.should be_true}
33
+ Then {result.should be_truthy}
34
34
  end
35
35
 
36
36
  end
@@ -39,25 +39,25 @@ describe Invitational::ChecksForInvitation do
39
39
  context "when invited in that role" do
40
40
  When(:result) { Invitational::ChecksForInvitation.for user1, entity, :user }
41
41
 
42
- Then {result.should be_true}
42
+ Then {result.should be_truthy}
43
43
  end
44
44
 
45
45
  context "when invited in another role" do
46
46
  When(:result) { Invitational::ChecksForInvitation.for user1, entity, :admin }
47
47
 
48
- Then {result.should_not be_true}
48
+ Then {result.should_not be_truthy}
49
49
  end
50
50
 
51
51
  context "when not invited" do
52
52
  When(:result) { Invitational::ChecksForInvitation.for user2, entity, :user }
53
53
 
54
- Then {result.should_not be_true}
54
+ Then {result.should_not be_truthy}
55
55
  end
56
56
 
57
57
  context "when uber admin" do
58
58
  When(:result) { Invitational::ChecksForInvitation.for user3, entity, :user }
59
59
 
60
- Then {result.should be_true}
60
+ Then {result.should be_truthy}
61
61
  end
62
62
  end
63
63
 
@@ -65,25 +65,25 @@ describe Invitational::ChecksForInvitation do
65
65
  context "when invited to one of the roles" do
66
66
  When(:result) { Invitational::ChecksForInvitation.for user1, entity, [:user, :admin] }
67
67
 
68
- Then {result.should be_true}
68
+ Then {result.should be_truthy}
69
69
  end
70
70
 
71
71
  context "when invited in another role" do
72
72
  When(:result) { Invitational::ChecksForInvitation.for user1, entity, [:none, :admin] }
73
73
 
74
- Then {result.should_not be_true}
74
+ Then {result.should_not be_truthy}
75
75
  end
76
76
 
77
77
  context "when not invited" do
78
78
  When(:result) { Invitational::ChecksForInvitation.for user2, entity, [:user, :admin] }
79
79
 
80
- Then {result.should_not be_true}
80
+ Then {result.should_not be_truthy}
81
81
  end
82
82
 
83
83
  context "when uber admin" do
84
84
  When(:result) { Invitational::ChecksForInvitation.for user3, entity, [:user, :admin] }
85
85
 
86
- Then {result.should be_true}
86
+ Then {result.should be_truthy}
87
87
  end
88
88
 
89
89
  end
@@ -15,7 +15,7 @@ describe Invitational::CreatesInvitation do
15
15
  And {result.invitable.should == entity}
16
16
  And {result.email.should == "test@d-i.co"}
17
17
  And {result.role.should == :admin}
18
- And {result.unclaimed?.should be_true}
18
+ And {result.unclaimed?.should be_truthy}
19
19
  end
20
20
 
21
21
  context "when already invited" do
@@ -38,7 +38,7 @@ describe Invitational::CreatesInvitation do
38
38
  And {result.invitable.should == entity}
39
39
  And {result.email.should == "test@d-i.co"}
40
40
  And {result.role.should == :admin}
41
- And {result.claimed?.should be_true}
41
+ And {result.claimed?.should be_truthy}
42
42
  And {result.user.should == user }
43
43
  end
44
44
 
@@ -12,7 +12,7 @@ describe Invitational::CreatesSystemUserInvitation do
12
12
  And {result.invitable.should be_nil}
13
13
  And {result.email.should == "test@d-i.co"}
14
14
  And {result.role.should == :employer }
15
- And {result.unclaimed?.should be_true}
15
+ And {result.unclaimed?.should be_truthy}
16
16
  end
17
17
 
18
18
  context "when already invited" do
@@ -35,7 +35,7 @@ describe Invitational::CreatesSystemUserInvitation do
35
35
  And {result.invitable.should be_nil}
36
36
  And {result.email.should == "test2@d-i.co"}
37
37
  And {result.role.should == :employer}
38
- And {result.claimed?.should be_true}
38
+ And {result.claimed?.should be_truthy}
39
39
  And {result.user.should == user }
40
40
  end
41
41
 
@@ -12,7 +12,7 @@ describe Invitational::CreatesUberAdminInvitation do
12
12
  And {result.invitable.should be_nil}
13
13
  And {result.email.should == "test@d-i.co"}
14
14
  And {result.role.should == :uberadmin }
15
- And {result.unclaimed?.should be_true}
15
+ And {result.unclaimed?.should be_truthy}
16
16
  end
17
17
 
18
18
  context "when already invited" do
@@ -35,7 +35,7 @@ describe Invitational::CreatesUberAdminInvitation do
35
35
  And {result.invitable.should be_nil}
36
36
  And {result.email.should == "test2@d-i.co"}
37
37
  And {result.role.should == :uberadmin}
38
- And {result.claimed?.should be_true}
38
+ And {result.claimed?.should be_truthy}
39
39
  And {result.user.should == user }
40
40
  end
41
41
 
data/spec/spec_helper.rb CHANGED
@@ -14,5 +14,6 @@ require 'capybara/rails'
14
14
 
15
15
  RSpec.configure do |config|
16
16
  config.use_transactional_fixtures = true
17
+ config.expect_with(:rspec) { |c| c.syntax = [:should, :expect] }
17
18
  end
18
19
 
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: invitational
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.3
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Goerlich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-12 00:00:00.000000000 Z
11
+ date: 2016-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '4.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: '4.0'
27
27
  - !ruby/object:Gem::Dependency
@@ -53,21 +53,21 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: capybara
56
+ name: combustion
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: 2.0.2
61
+ version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: 2.0.2
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: combustion
70
+ name: capybara
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ">="
@@ -84,44 +84,44 @@ dependencies:
84
84
  name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: 2.12.0
89
+ version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: 2.12.0
96
+ version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rspec-rails
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
- version: 2.12.0
103
+ version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
- version: 2.12.0
110
+ version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rspec-given
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - "~>"
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: 2.3.0
117
+ version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - "~>"
122
+ - - ">="
123
123
  - !ruby/object:Gem::Version
124
- version: 2.3.0
124
+ version: '0'
125
125
  description: Solution that eliminates the tight coupling between user identity/authentication
126
126
  and application functional authorization
127
127
  email:
@@ -201,35 +201,35 @@ required_rubygems_version: !ruby/object:Gem::Requirement
201
201
  version: '0'
202
202
  requirements: []
203
203
  rubyforge_project:
204
- rubygems_version: 2.2.2
204
+ rubygems_version: 2.5.1
205
205
  signing_key:
206
206
  specification_version: 4
207
207
  summary: Solution that eliminates the tight coupling between user identity/authentication
208
208
  and application functional authorization
209
209
  test_files:
210
- - spec/internal/log/test.log
211
- - spec/internal/config/database.yml
212
- - spec/internal/config/routes.rb
213
- - spec/internal/db/schema.rb
214
- - spec/internal/db/combustion_test.sqlite
215
- - spec/internal/public/favicon.ico
216
- - spec/internal/app/models/child.rb
217
- - spec/internal/app/models/user.rb
218
- - spec/internal/app/models/invitation.rb
219
- - spec/internal/app/models/system_thing.rb
220
- - spec/internal/app/models/grandparent.rb
221
- - spec/internal/app/models/entity.rb
222
- - spec/internal/app/models/ability.rb
223
- - spec/internal/app/models/other_entity.rb
224
- - spec/invitational/models/ability_spec.rb
225
- - spec/invitational/models/user_spec.rb
226
210
  - spec/invitational/models/invitation_spec.rb
211
+ - spec/invitational/models/user_spec.rb
212
+ - spec/invitational/models/ability_spec.rb
227
213
  - spec/invitational/models/entity_spec.rb
228
214
  - spec/invitational/services/service_helper.rb
229
- - spec/invitational/services/creates_invitation_spec.rb
230
- - spec/invitational/services/creates_uber_admin_invitation_spec.rb
231
215
  - spec/invitational/services/claims_invitation_spec.rb
216
+ - spec/invitational/services/creates_invitation_spec.rb
232
217
  - spec/invitational/services/checks_for_invitation_spec.rb
233
- - spec/invitational/services/creates_system_user_invitation_spec.rb
218
+ - spec/invitational/services/creates_uber_admin_invitation_spec.rb
234
219
  - spec/invitational/services/claims_all_invitations_spec.rb
220
+ - spec/invitational/services/creates_system_user_invitation_spec.rb
235
221
  - spec/spec_helper.rb
222
+ - spec/internal/public/favicon.ico
223
+ - spec/internal/db/schema.rb
224
+ - spec/internal/db/combustion_test.sqlite
225
+ - spec/internal/config/database.yml
226
+ - spec/internal/config/routes.rb
227
+ - spec/internal/app/models/entity.rb
228
+ - spec/internal/app/models/child.rb
229
+ - spec/internal/app/models/other_entity.rb
230
+ - spec/internal/app/models/invitation.rb
231
+ - spec/internal/app/models/user.rb
232
+ - spec/internal/app/models/grandparent.rb
233
+ - spec/internal/app/models/ability.rb
234
+ - spec/internal/app/models/system_thing.rb
235
+ - spec/internal/log/test.log