demo_mode 1.0.3 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aff56a7cf57f06b2ea63470a4c73b5de9aaad1eb56c36be532050e0e4f8fd0bd
4
- data.tar.gz: 126999b5796f0ea60bcdb0cc1d1b2a3832c761ea6c56c9fb3802739512b8a235
3
+ metadata.gz: 75aafd7b7a819a309fa828efd3286f643d388cdce8671c4ab4eb7528c4d8acfa
4
+ data.tar.gz: e06d89e4d097336c722aa95f085ab928048ebb403dea3441c966b1d2703557b9
5
5
  SHA512:
6
- metadata.gz: bf2cefd09c23be659d164de543f1dd0e91a6b7e42b4158a220015d5e39074711885dc12f2ceefdb036cc8b81ba62d095694ee9e7a13a2b42115ce6d1f3ed5f3a
7
- data.tar.gz: 3dea16e7a2f59dd9be98c916479a795cc7592c94b8cdba292d6c5e7d367db4c7503b26d5a9df22f73f3bc68a2f26c4a91055331c540936d194cd042081d74c8a
6
+ metadata.gz: 554ca6d85599f4963a8abd6cd7b50c5e4a07766cc5d62cdccacc3a0f02d6927ffa30c55ec8f25aaa6de46167c100b66f22f62c021329a69fa2e576b637b15d10
7
+ data.tar.gz: 740c03ad7ddccb28af7c5462105cb1ced27b5b13be287820258ff24529226c635e3d9e8657d44cb10dace3935d62f1d4f77182fac64ab0a7afc3abc44e7ad884
@@ -3,7 +3,7 @@ class CleverSequence
3
3
 
4
4
  class << self
5
5
  def reset!
6
- sequences.values.each(&:reset!)
6
+ sequences.each_value(&:reset!)
7
7
  end
8
8
 
9
9
  def next(klass, name)
@@ -22,11 +22,7 @@ module DemoMode
22
22
  configurations << :sign_in_path
23
23
 
24
24
  def self.app_name
25
- if Rails::VERSION::MAJOR >= 6
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
- Dir.glob(Rails.root.join(personas_path, '**', '*.rb')).sort.each do |persona|
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`
@@ -10,18 +10,12 @@ module DemoMode
10
10
  load 'demo_mode/tasks.rb'
11
11
  end
12
12
 
13
- initializer 'demo_mode' do |app|
14
- if app.config.respond_to?(:autoloader) && app.config.autoloader.to_sym == :zeitwerk
15
- require 'zeitwerk/version'
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
- Rails.autoloaders.main.on_load(DemoMode.app_base_controller_name) do
19
- DemoMode.app_base_controller_name.constantize.include Demoable
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
@@ -1,3 +1,3 @@
1
1
  module DemoMode
2
- VERSION = '1.0.3'.freeze
2
+ VERSION = '1.1.0'.freeze
3
3
  end
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.0.3
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Griffith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-15 00:00:00.000000000 Z
11
+ date: 2023-05-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: