punk 0.3.6 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +1 -1
  3. data/.rubocop.yml +1091 -93
  4. data/.standard.yml +2 -0
  5. data/Gemfile +60 -60
  6. data/Gemfile.lock +22 -17
  7. data/README.md +7 -3
  8. data/Rakefile +9 -7
  9. data/VERSION +1 -1
  10. data/app/migrations/001_lets_punk.rb +1 -1
  11. data/app/routes/hello.rb +1 -1
  12. data/bin/punk +5 -5
  13. data/lib/punk.rb +7 -7
  14. data/lib/punk/actions/sessions/create.rb +3 -3
  15. data/lib/punk/actions/sessions/verify.rb +2 -2
  16. data/lib/punk/commands/auth.rb +4 -4
  17. data/lib/punk/commands/generate.rb +5 -5
  18. data/lib/punk/commands/http.rb +4 -4
  19. data/lib/punk/commands/list.rb +10 -10
  20. data/lib/punk/core/app.rb +41 -41
  21. data/lib/punk/core/boot.rb +5 -5
  22. data/lib/punk/core/cli.rb +3 -3
  23. data/lib/punk/core/commander.rb +28 -28
  24. data/lib/punk/core/commands.rb +8 -8
  25. data/lib/punk/core/env.rb +27 -27
  26. data/lib/punk/core/exec.rb +8 -8
  27. data/lib/punk/core/interface.rb +19 -19
  28. data/lib/punk/core/load.rb +2 -2
  29. data/lib/punk/core/logger.rb +3 -3
  30. data/lib/punk/core/monkey.rb +1 -1
  31. data/lib/punk/core/pry.rb +2 -2
  32. data/lib/punk/core/settings.rb +4 -4
  33. data/lib/punk/core/version.rb +1 -1
  34. data/lib/punk/core/worker.rb +6 -6
  35. data/lib/punk/framework/all.rb +8 -8
  36. data/lib/punk/framework/model.rb +6 -5
  37. data/lib/punk/framework/plugins/all.rb +1 -1
  38. data/lib/punk/framework/plugins/validation.rb +8 -8
  39. data/lib/punk/framework/service.rb +5 -3
  40. data/lib/punk/framework/worker.rb +3 -3
  41. data/lib/punk/helpers/all.rb +5 -5
  42. data/lib/punk/helpers/loggable.rb +3 -3
  43. data/lib/punk/helpers/publishable.rb +1 -1
  44. data/lib/punk/helpers/renderable.rb +10 -10
  45. data/lib/punk/helpers/validatable.rb +7 -6
  46. data/lib/punk/migrations/001_punk.rb +12 -12
  47. data/lib/punk/models/group.rb +1 -1
  48. data/lib/punk/models/identity.rb +1 -1
  49. data/lib/punk/models/session.rb +7 -7
  50. data/lib/punk/models/tenant.rb +1 -1
  51. data/lib/punk/models/user.rb +2 -2
  52. data/lib/punk/plugins/all.rb +2 -2
  53. data/lib/punk/plugins/cors.rb +2 -2
  54. data/lib/punk/plugins/ssl.rb +1 -1
  55. data/lib/punk/routes/groups.rb +1 -1
  56. data/lib/punk/routes/plivo.rb +1 -1
  57. data/lib/punk/routes/sessions.rb +2 -2
  58. data/lib/punk/routes/swagger.rb +2 -2
  59. data/lib/punk/routes/tenants.rb +1 -1
  60. data/lib/punk/routes/users.rb +1 -1
  61. data/lib/punk/services/challenge_claim.rb +5 -5
  62. data/lib/punk/services/generate_swagger.rb +6 -6
  63. data/lib/punk/services/prove_claim.rb +1 -1
  64. data/lib/punk/startup/cache.rb +3 -3
  65. data/lib/punk/startup/database.rb +4 -4
  66. data/lib/punk/startup/environment.rb +6 -6
  67. data/lib/punk/startup/logger.rb +2 -2
  68. data/lib/punk/startup/task.rb +5 -5
  69. data/lib/punk/views/fail.rb +2 -2
  70. data/lib/punk/views/groups/list.rb +2 -2
  71. data/lib/punk/views/info.rb +2 -2
  72. data/lib/punk/views/plivo_store.rb +2 -2
  73. data/lib/punk/views/sessions/list.rb +2 -2
  74. data/lib/punk/views/sessions/pending.rb +2 -2
  75. data/lib/punk/views/tenants/list.rb +2 -2
  76. data/lib/punk/views/users/list.rb +2 -2
  77. data/lib/punk/views/users/show.rb +2 -2
  78. data/lib/punk/workers/geocode_session_worker.rb +3 -3
  79. data/lib/punk/workers/identify_session_worker.rb +1 -1
  80. data/lib/punk/workers/send_email_worker.rb +3 -3
  81. data/lib/punk/workers/send_sms_worker.rb +3 -3
  82. data/punk.gemspec +8 -4
  83. data/spec/actions/groups/punk/list_groups_action_spec.rb +9 -9
  84. data/spec/actions/sessions/punk/clear_session_action_spec.rb +11 -11
  85. data/spec/actions/sessions/punk/create_session_action_spec.rb +9 -9
  86. data/spec/actions/sessions/punk/list_sessions_action_spec.rb +8 -8
  87. data/spec/actions/sessions/punk/verify_session_action_spec.rb +24 -24
  88. data/spec/actions/tenants/punk/list_tenants_action_spec.rb +6 -6
  89. data/spec/actions/users/punk/list_group_users_action_spec.rb +6 -6
  90. data/spec/actions/users/punk/list_tenant_users_action_spec.rb +6 -6
  91. data/spec/factories/group.rb +1 -1
  92. data/spec/factories/group_user_metadata.rb +1 -1
  93. data/spec/factories/identity.rb +4 -4
  94. data/spec/factories/session.rb +1 -1
  95. data/spec/factories/tenant.rb +1 -1
  96. data/spec/factories/tenant_user_metadata.rb +1 -1
  97. data/spec/factories/user.rb +1 -1
  98. data/spec/lib/commands/generate_spec.rb +2 -2
  99. data/spec/lib/commands/list_spec.rb +2 -2
  100. data/spec/lib/commands/swagger_spec.rb +2 -2
  101. data/spec/lib/engine/punk_env_spec.rb +4 -4
  102. data/spec/lib/engine/punk_exec_spec.rb +2 -2
  103. data/spec/lib/engine/punk_init_spec.rb +2 -2
  104. data/spec/lib/engine/punk_store_spec.rb +2 -2
  105. data/spec/models/punk/group_spec.rb +4 -4
  106. data/spec/models/punk/group_user_metadata_spec.rb +2 -2
  107. data/spec/models/punk/identity_spec.rb +17 -17
  108. data/spec/models/punk/session_spec.rb +4 -4
  109. data/spec/models/punk/tenant_spec.rb +3 -3
  110. data/spec/models/punk/tenant_user_metadata_spec.rb +2 -2
  111. data/spec/models/punk/user_spec.rb +9 -9
  112. data/spec/routes/groups/get_groups_spec.rb +4 -4
  113. data/spec/routes/plivo/get_plivo_spec.rb +1 -1
  114. data/spec/routes/sessions/delete_session_spec.rb +1 -1
  115. data/spec/routes/sessions/get_sessions_spec.rb +5 -5
  116. data/spec/routes/sessions/patch_session_spec.rb +1 -1
  117. data/spec/routes/sessions/post_session_spec.rb +1 -1
  118. data/spec/routes/swagger/get_swagger_spec.rb +1 -1
  119. data/spec/routes/tenants/get_tenants_spec.rb +5 -5
  120. data/spec/routes/users/get_users_spec.rb +6 -6
  121. data/spec/services/punk/challenge_claim_service_spec.rb +2 -2
  122. data/spec/services/punk/create_identities_service_spec.rb +1 -1
  123. data/spec/services/punk/generate_swagger_service_spec.rb +2 -2
  124. data/spec/services/punk/prove_claim_service_spec.rb +2 -2
  125. data/spec/services/punk/secret_service_spec.rb +2 -2
  126. data/spec/spec_helper.rb +27 -27
  127. data/spec/views/punk/plivo_store_spec.rb +2 -2
  128. data/spec/views/sessions/punk/list_sessions_view_spec.rb +2 -2
  129. data/spec/views/sessions/punk/pending_session_view_spec.rb +2 -2
  130. data/spec/views/tenants/punk/list_tenants_view_spec.rb +2 -2
  131. data/spec/views/users/punk/list_groups_view_spec.rb +2 -2
  132. data/spec/views/users/punk/list_users_view_spec.rb +2 -2
  133. data/spec/workers/punk/geocode_session_worker_spec.rb +2 -2
  134. data/spec/workers/punk/identify_session_worker_spec.rb +3 -3
  135. data/spec/workers/punk/send_email_worker_spec.rb +1 -1
  136. metadata +18 -3
@@ -4,21 +4,21 @@ describe PUNK::ListGroupsAction do
4
4
  let(:user) { create(:user) }
5
5
  let(:tenant) { create(:tenant) }
6
6
 
7
- context 'with no user provided' do
8
- it 'returns a validation error' do
7
+ context "with no user provided" do
8
+ it "returns a validation error" do
9
9
  view = described_class.run(tenant: tenant).result.render(:json)
10
- expect(view).to match('user is not present')
10
+ expect(view).to match("user is not present")
11
11
  end
12
12
  end
13
13
 
14
- context 'with no tenant provided' do
15
- it 'returns a validation error' do
14
+ context "with no tenant provided" do
15
+ it "returns a validation error" do
16
16
  view = described_class.run(user: user).result.render(:json)
17
- expect(view).to match('tenant is not present')
17
+ expect(view).to match("tenant is not present")
18
18
  end
19
19
  end
20
20
 
21
- context 'with valid arguments' do
21
+ context "with valid arguments" do
22
22
  let(:groups) { create_list(:group, 3, tenant: tenant) }
23
23
 
24
24
  before do
@@ -27,10 +27,10 @@ describe PUNK::ListGroupsAction do
27
27
  groups[1].add_user(user)
28
28
  end
29
29
 
30
- it 'returns groups for the tenant that the user is a member of' do
30
+ it "returns groups for the tenant that the user is a member of" do
31
31
  expect(tenant.groups.count).to eq(3)
32
32
  view = JSON.parse(described_class.run(user: user, tenant: tenant).result.render(:json))
33
- expect(view.map { |h| h['id'] }.sort).to eq([groups[0].id, groups[1].id].sort)
33
+ expect(view.map { |h| h["id"] }.sort).to eq([groups[0].id, groups[1].id].sort)
34
34
  end
35
35
  end
36
36
  end
@@ -1,28 +1,28 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  describe PUNK::ClearSessionAction do
4
- context 'with no session provided' do
5
- it 'returns a validation error' do
4
+ context "with no session provided" do
5
+ it "returns a validation error" do
6
6
  view = described_class.run.result.render(:json)
7
- expect(view).to match('session is not present')
8
- expect(view).to match('session is empty')
7
+ expect(view).to match("session is not present")
8
+ expect(view).to match("session is empty")
9
9
  end
10
10
  end
11
11
 
12
- context 'with an inactive session provided' do
13
- it 'returns a validation error' do
12
+ context "with an inactive session provided" do
13
+ it "returns a validation error" do
14
14
  session = create(:session)
15
15
  view = described_class.run(session: session).result.render(:json)
16
- expect(view).to match('session is not in active state')
17
- expect(view).to match('session may not clear')
16
+ expect(view).to match("session is not in active state")
17
+ expect(view).to match("session may not clear")
18
18
  end
19
19
  end
20
20
 
21
- context 'with an active session provided' do
22
- it 'clears the session' do
21
+ context "with an active session provided" do
22
+ it "clears the session" do
23
23
  session = create(:session, state: :active)
24
24
  view = described_class.run(session: session).result.render(:json)
25
- expect(view).to match('You have been logged out')
25
+ expect(view).to match("You have been logged out")
26
26
  expect(session.deleted?).to be(true)
27
27
  end
28
28
  end
@@ -4,28 +4,28 @@ describe PUNK::CreateSessionAction do
4
4
  let(:remote_addr) { Faker::Internet.ip_v4_address }
5
5
  let(:user_agent) { Faker::Internet.user_agent }
6
6
 
7
- context 'with no claim provided' do
8
- it 'returns a validation error' do
7
+ context "with no claim provided" do
8
+ it "returns a validation error" do
9
9
  view = described_class.run(remote_addr: remote_addr, user_agent: user_agent).result.render(:json)
10
- expect(view).to match('claim is not present')
10
+ expect(view).to match("claim is not present")
11
11
  end
12
12
  end
13
13
 
14
- context 'with an email claim provided' do
15
- it 'created an identity and a session' do
14
+ context "with an email claim provided" do
15
+ it "created an identity and a session" do
16
16
  email = Faker::Internet.email
17
17
  view = described_class.run(claim: email, remote_addr: remote_addr, user_agent: user_agent).result.render(:json)
18
- session = PUNK::Session.find(slug: ActiveSupport::JSON.decode(view)['slug'])
18
+ session = PUNK::Session.find(slug: ActiveSupport::JSON.decode(view)["slug"])
19
19
  expect(session.identity.claim_type).to eq(:email)
20
20
  expect(session.identity.claim).to eq(email)
21
21
  end
22
22
  end
23
23
 
24
- context 'with a phone claim provided' do
25
- it 'created an identity and a session' do
24
+ context "with a phone claim provided" do
25
+ it "created an identity and a session" do
26
26
  phone = generate(:phone)
27
27
  view = described_class.run(claim: phone, remote_addr: remote_addr, user_agent: user_agent).result.render(:json)
28
- session = PUNK::Session.find(slug: ActiveSupport::JSON.decode(view)['slug'])
28
+ session = PUNK::Session.find(slug: ActiveSupport::JSON.decode(view)["slug"])
29
29
  expect(session.identity.claim_type).to eq(:phone)
30
30
  expect(session.identity.claim).to eq(phone)
31
31
  end
@@ -1,26 +1,26 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  describe PUNK::ListSessionsAction do
4
- context 'with no user provided' do
5
- it 'returns a validation error' do
4
+ context "with no user provided" do
5
+ it "returns a validation error" do
6
6
  view = described_class.run.result.render(:json)
7
- expect(view).to match('user is not present')
7
+ expect(view).to match("user is not present")
8
8
  end
9
9
  end
10
10
 
11
- context 'with a user provided' do
11
+ context "with a user provided" do
12
12
  let(:user) { create(:user) }
13
13
  let(:identity) { create(:identity, user: user) }
14
14
 
15
15
  before do
16
- create_list(:session, 3, state: 'active')
17
- create_list(:session, 3, state: 'active', identity: identity)
16
+ create_list(:session, 3, state: "active")
17
+ create_list(:session, 3, state: "active", identity: identity)
18
18
  end
19
19
 
20
- it 'returns active sessions that the user belongs to' do
20
+ it "returns active sessions that the user belongs to" do
21
21
  expect(PUNK::Session.count).to eq(6)
22
22
  view = JSON.parse(described_class.run(user: user).result.render(:json))
23
- expect(view.map { |h| h['id'] }.sort).to eq(user.active_sessions.map(&:id).sort)
23
+ expect(view.map { |h| h["id"] }.sort).to eq(user.active_sessions.map(&:id).sort)
24
24
  end
25
25
  end
26
26
  end
@@ -1,31 +1,31 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  describe PUNK::VerifySessionAction do
4
- context 'with no session provided' do
5
- it 'returns a validation error' do
4
+ context "with no session provided" do
5
+ it "returns a validation error" do
6
6
  view = described_class.run.result.render(:json)
7
- expect(view).to match('session is not present')
7
+ expect(view).to match("session is not present")
8
8
  end
9
9
  end
10
10
 
11
- context 'with no secret provided' do
12
- it 'returns a validation error' do
11
+ context "with no secret provided" do
12
+ it "returns a validation error" do
13
13
  session = create(:session)
14
14
  view = described_class.run(session: session).result.render(:json)
15
- expect(view).to match('secret is not present')
15
+ expect(view).to match("secret is not present")
16
16
  end
17
17
  end
18
18
 
19
- context 'with an inactive session provided' do
20
- it 'returns a validation error' do
19
+ context "with an inactive session provided" do
20
+ it "returns a validation error" do
21
21
  session = create(:session)
22
- view = described_class.run(session: session, secret: 'xyzzy').result.render(:json)
23
- expect(view).to match('session is not in pending state')
24
- expect(view).to match('session may not verify')
22
+ view = described_class.run(session: session, secret: "xyzzy").result.render(:json)
23
+ expect(view).to match("session is not in pending state")
24
+ expect(view).to match("session may not verify")
25
25
  end
26
26
  end
27
27
 
28
- context 'with a pending session provided' do
28
+ context "with a pending session provided" do
29
29
  let(:session) { create(:session) }
30
30
 
31
31
  before do
@@ -33,26 +33,26 @@ describe PUNK::VerifySessionAction do
33
33
  PUNK::ChallengeClaimService.run(session: session)
34
34
  end
35
35
 
36
- it 'returns an error if the secret is not correct' do
37
- expect { described_class.run(session: session, secret: 'qwerty') }.to raise_error(PUNK::BadRequest, "Secret is incorrect")
36
+ it "returns an error if the secret is not correct" do
37
+ expect { described_class.run(session: session, secret: "qwerty") }.to raise_error(PUNK::BadRequest, "Secret is incorrect")
38
38
  end
39
39
 
40
- it 'expires the session after three failed attempts' do
41
- described_class.run(session: session, secret: 'qwerty') rescue nil # rubocop:disable Style/RescueModifier
42
- described_class.run(session: session, secret: 'qwerty') rescue nil # rubocop:disable Style/RescueModifier
43
- expect { described_class.run(session: session, secret: 'qwerty') }.to raise_error(PUNK::BadRequest, "Too many attempts")
40
+ it "expires the session after three failed attempts" do
41
+ described_class.run(session: session, secret: "qwerty") rescue nil # rubocop:disable Style/RescueModifier
42
+ described_class.run(session: session, secret: "qwerty") rescue nil # rubocop:disable Style/RescueModifier
43
+ expect { described_class.run(session: session, secret: "qwerty") }.to raise_error(PUNK::BadRequest, "Too many attempts")
44
44
  end
45
45
 
46
- it 'expires the session if it is more than five minutes old' do
46
+ it "expires the session if it is more than five minutes old" do
47
47
  Timecop.travel(5.minutes.from_now)
48
- view = described_class.run(session: session, secret: 'xyzzy').result.render(:json)
49
- expect(view).to match('session may not verify')
48
+ view = described_class.run(session: session, secret: "xyzzy").result.render(:json)
49
+ expect(view).to match("session may not verify")
50
50
  expect(session.expired?).to be(true)
51
51
  end
52
52
 
53
- it 'verifies the session if the secret is correct' do
54
- view = described_class.run(session: session, secret: 'xyzzy').result.render(:json)
55
- expect(view).to match('We have succesfully verified your identity')
53
+ it "verifies the session if the secret is correct" do
54
+ view = described_class.run(session: session, secret: "xyzzy").result.render(:json)
55
+ expect(view).to match("We have succesfully verified your identity")
56
56
  expect(session.active?).to be(true)
57
57
  end
58
58
  end
@@ -1,14 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  describe PUNK::ListTenantsAction do
4
- context 'with no user provided' do
5
- it 'returns a validation error' do
4
+ context "with no user provided" do
5
+ it "returns a validation error" do
6
6
  view = described_class.run.result.render(:json)
7
- expect(view).to match('user is not present')
7
+ expect(view).to match("user is not present")
8
8
  end
9
9
  end
10
10
 
11
- context 'with a user provided' do
11
+ context "with a user provided" do
12
12
  let(:user) { create(:user) }
13
13
 
14
14
  before do
@@ -16,10 +16,10 @@ describe PUNK::ListTenantsAction do
16
16
  3.times { create(:tenant).add_user(user) }
17
17
  end
18
18
 
19
- it 'returns tenants that the user belongs to' do
19
+ it "returns tenants that the user belongs to" do
20
20
  expect(PUNK::Tenant.count).to eq(6)
21
21
  view = JSON.parse(described_class.run(user: user).result.render(:json))
22
- expect(view.map { |h| h['id'] }.sort).to eq(user.tenants.map(&:id).sort)
22
+ expect(view.map { |h| h["id"] }.sort).to eq(user.tenants.map(&:id).sort)
23
23
  end
24
24
  end
25
25
  end
@@ -1,14 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  describe PUNK::ListGroupUsersAction do
4
- context 'with no group provided' do
5
- it 'returns a validation error' do
4
+ context "with no group provided" do
5
+ it "returns a validation error" do
6
6
  view = described_class.run.result.render(:json)
7
- expect(view).to match('group is not present')
7
+ expect(view).to match("group is not present")
8
8
  end
9
9
  end
10
10
 
11
- context 'with valid arguments' do
11
+ context "with valid arguments" do
12
12
  let(:group) { create(:group) }
13
13
  let(:users) { create_list(:user, 3) }
14
14
 
@@ -17,10 +17,10 @@ describe PUNK::ListGroupUsersAction do
17
17
  users.each { |user| group.add_user(user) }
18
18
  end
19
19
 
20
- it 'returns users that are members of the given group' do
20
+ it "returns users that are members of the given group" do
21
21
  expect(PUNK::User.count).to eq(5)
22
22
  view = JSON.parse(described_class.run(group: group).result.render(:json))
23
- expect(view.map { |h| h['id'] }.sort).to eq(group.users.map(&:id).sort)
23
+ expect(view.map { |h| h["id"] }.sort).to eq(group.users.map(&:id).sort)
24
24
  end
25
25
  end
26
26
  end
@@ -1,14 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  describe PUNK::ListTenantUsersAction do
4
- context 'with no tenant provided' do
5
- it 'returns a validation error' do
4
+ context "with no tenant provided" do
5
+ it "returns a validation error" do
6
6
  view = described_class.run.result.render(:json)
7
- expect(view).to match('tenant is not present')
7
+ expect(view).to match("tenant is not present")
8
8
  end
9
9
  end
10
10
 
11
- context 'with valid arguments' do
11
+ context "with valid arguments" do
12
12
  let(:tenant) { create(:tenant) }
13
13
  let(:users) { create_list(:user, 3) }
14
14
 
@@ -17,10 +17,10 @@ describe PUNK::ListTenantUsersAction do
17
17
  users.each { |user| tenant.add_user(user) }
18
18
  end
19
19
 
20
- it 'returns users that are members of the given tenant' do
20
+ it "returns users that are members of the given tenant" do
21
21
  expect(PUNK::User.count).to eq(5)
22
22
  view = JSON.parse(described_class.run(tenant: tenant).result.render(:json))
23
- expect(view.map { |h| h['id'] }.sort).to eq(tenant.users.map(&:id).sort)
23
+ expect(view.map { |h| h["id"] }.sort).to eq(tenant.users.map(&:id).sort)
24
24
  end
25
25
  end
26
26
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  FactoryBot.define do
4
- factory :group, class: 'PUNK::Group' do
4
+ factory :group, class: "PUNK::Group" do
5
5
  to_create(&:save)
6
6
 
7
7
  tenant
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  FactoryBot.define do
4
- factory :group_user_metadata, class: 'PUNK::GroupUserMetadata' do
4
+ factory :group_user_metadata, class: "PUNK::GroupUserMetadata" do
5
5
  to_create(&:save)
6
6
 
7
7
  group
@@ -1,17 +1,17 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  FactoryBot.define do
4
- factory :identity, class: 'PUNK::Identity' do
4
+ factory :identity, class: "PUNK::Identity" do
5
5
  to_create(&:save)
6
6
 
7
7
  user
8
8
 
9
- claim_type { ['email', 'phone'].sample }
9
+ claim_type { ["email", "phone"].sample }
10
10
  claim do
11
11
  case claim_type
12
- when 'email'
12
+ when "email"
13
13
  Faker::Internet.email
14
- when 'phone'
14
+ when "phone"
15
15
  generate(:phone)
16
16
  end
17
17
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  FactoryBot.define do
4
- factory :session, class: 'PUNK::Session' do
4
+ factory :session, class: "PUNK::Session" do
5
5
  to_create(&:save)
6
6
 
7
7
  identity
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  FactoryBot.define do
4
- factory :tenant, class: 'PUNK::Tenant' do
4
+ factory :tenant, class: "PUNK::Tenant" do
5
5
  to_create(&:save)
6
6
 
7
7
  name { Faker::Name.name }
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  FactoryBot.define do
4
- factory :tenant_user_metadata, class: 'PUNK::TenantUserMetadata' do
4
+ factory :tenant_user_metadata, class: "PUNK::TenantUserMetadata" do
5
5
  to_create(&:save)
6
6
 
7
7
  tenant
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  FactoryBot.define do
4
- factory :user, class: 'PUNK::User' do
4
+ factory :user, class: "PUNK::User" do
5
5
  to_create(&:save)
6
6
 
7
7
  name { Faker::Name.name }
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- describe 'generate command', type: :feature do
4
- context 'when no tests have been written' do
3
+ describe "generate command", type: :feature do
4
+ context "when no tests have been written" do
5
5
  it 'displays "not yet implemented"'
6
6
  end
7
7
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- describe 'list command', type: :feature do
4
- context 'when no tests have been written' do
3
+ describe "list command", type: :feature do
4
+ context "when no tests have been written" do
5
5
  it 'displays "not yet implemented"'
6
6
  end
7
7
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- describe 'swagger command', type: :feature do
4
- context 'when no tests have been written' do
3
+ describe "swagger command", type: :feature do
4
+ context "when no tests have been written" do
5
5
  it 'displays "not yet implemented"'
6
6
  end
7
7
  end