demo_mode 1.0.3 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/demo_mode/sessions_controller.rb +3 -0
- data/lib/demo_mode/clever_sequence.rb +1 -1
- data/lib/demo_mode/config.rb +2 -6
- data/lib/demo_mode/engine.rb +5 -11
- data/lib/demo_mode/version.rb +1 -1
- metadata +2 -142
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46e73fd41a2de481e57d7f7d7fcb472bf44f29f4869d5bdd821f018fd56ea0d9
|
4
|
+
data.tar.gz: 8cb5e91911955f47c15fb9287191357a50ffe6af24d0f3672bf1e049443ba179
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1609e4d9fbbaf1947ec091adb980f551b9a9fbd438aee36a8a6077be2348caf091bcb8935462eb42e160285477d32c40a12d91accde230855bbc986d7b9b75a5
|
7
|
+
data.tar.gz: 3d1f6a8ab675c5ae226dcde560af0da76b65690cbadc62d1fbe5d36e64fc75684f44d114d43e7bad8c1dee971a6e746c2b0cf4014151a018fde8e2cb546455d3
|
@@ -2,6 +2,9 @@ module DemoMode
|
|
2
2
|
class SessionsController < DemoMode::ApplicationController
|
3
3
|
skip_before_action :demo_splash!, raise: false
|
4
4
|
|
5
|
+
# Support link based session creation
|
6
|
+
skip_forgery_protection only: :create
|
7
|
+
|
5
8
|
def show
|
6
9
|
@session = Session.find(params[:id])
|
7
10
|
respond_to do |f|
|
data/lib/demo_mode/config.rb
CHANGED
@@ -22,11 +22,7 @@ module DemoMode
|
|
22
22
|
configurations << :sign_in_path
|
23
23
|
|
24
24
|
def self.app_name
|
25
|
-
|
26
|
-
Rails.application.class.module_parent.name
|
27
|
-
else
|
28
|
-
Rails.application.class.parent.name
|
29
|
-
end
|
25
|
+
Rails.application.class.module_parent.name
|
30
26
|
end
|
31
27
|
|
32
28
|
def logo(&block)
|
@@ -113,7 +109,7 @@ module DemoMode
|
|
113
109
|
private
|
114
110
|
|
115
111
|
def auto_load_personas!
|
116
|
-
|
112
|
+
Rails.root.glob("#{personas_path}/**/*.rb").sort.each do |persona|
|
117
113
|
raise <<~ERROR if File.readlines(persona).grep(/DemoMode\.add_persona/).empty?
|
118
114
|
This file does not define a persona: #{persona}\n
|
119
115
|
Please use `DemoMode.add_persona`
|
data/lib/demo_mode/engine.rb
CHANGED
@@ -10,18 +10,12 @@ module DemoMode
|
|
10
10
|
load 'demo_mode/tasks.rb'
|
11
11
|
end
|
12
12
|
|
13
|
-
initializer 'demo_mode' do |
|
14
|
-
|
15
|
-
|
16
|
-
raise 'DemoMode only supports Zeitwerk::VERSION >= 2.4.2' unless Gem::Version.new(Zeitwerk::VERSION) >= Gem::Version.new('2.4.2')
|
13
|
+
initializer 'demo_mode' do |_app|
|
14
|
+
require 'zeitwerk/version'
|
15
|
+
raise 'DemoMode only supports Zeitwerk::VERSION >= 2.4.2' unless Gem::Version.new(Zeitwerk::VERSION) >= Gem::Version.new('2.4.2')
|
17
16
|
|
18
|
-
|
19
|
-
|
20
|
-
end
|
21
|
-
else
|
22
|
-
ActiveSupport.on_load(:action_controller) do
|
23
|
-
DemoMode.app_base_controller_name.constantize.include Demoable
|
24
|
-
end
|
17
|
+
Rails.autoloaders.main.on_load(DemoMode.app_base_controller_name) do
|
18
|
+
DemoMode.app_base_controller_name.constantize.include Demoable
|
25
19
|
end
|
26
20
|
end
|
27
21
|
end
|
data/lib/demo_mode/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: demo_mode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Griffith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -52,146 +52,6 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: appraisal
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: betterlint
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: capybara
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: combustion
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ">="
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: factory_bot
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ">="
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - ">="
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: net-smtp
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - ">="
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - ">="
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '0'
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: rspec-rails
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - ">="
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: '0'
|
146
|
-
type: :development
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - ">="
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '0'
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: selenium-webdriver
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
157
|
-
- - ">="
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: '0'
|
160
|
-
type: :development
|
161
|
-
prerelease: false
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
163
|
-
requirements:
|
164
|
-
- - ">="
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: '0'
|
167
|
-
- !ruby/object:Gem::Dependency
|
168
|
-
name: uncruft
|
169
|
-
requirement: !ruby/object:Gem::Requirement
|
170
|
-
requirements:
|
171
|
-
- - ">="
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: '0'
|
174
|
-
type: :development
|
175
|
-
prerelease: false
|
176
|
-
version_requirements: !ruby/object:Gem::Requirement
|
177
|
-
requirements:
|
178
|
-
- - ">="
|
179
|
-
- !ruby/object:Gem::Version
|
180
|
-
version: '0'
|
181
|
-
- !ruby/object:Gem::Dependency
|
182
|
-
name: webrick
|
183
|
-
requirement: !ruby/object:Gem::Requirement
|
184
|
-
requirements:
|
185
|
-
- - ">="
|
186
|
-
- !ruby/object:Gem::Version
|
187
|
-
version: '0'
|
188
|
-
type: :development
|
189
|
-
prerelease: false
|
190
|
-
version_requirements: !ruby/object:Gem::Requirement
|
191
|
-
requirements:
|
192
|
-
- - ">="
|
193
|
-
- !ruby/object:Gem::Version
|
194
|
-
version: '0'
|
195
55
|
description: A configurable demo mode for your Rails app. Specify your desired "personas"
|
196
56
|
and DemoMode will handle the rest.
|
197
57
|
email:
|