demo_mode 1.0.2 → 1.0.3
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,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aff56a7cf57f06b2ea63470a4c73b5de9aaad1eb56c36be532050e0e4f8fd0bd
|
4
|
+
data.tar.gz: 126999b5796f0ea60bcdb0cc1d1b2a3832c761ea6c56c9fb3802739512b8a235
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf2cefd09c23be659d164de543f1dd0e91a6b7e42b4158a220015d5e39074711885dc12f2ceefdb036cc8b81ba62d095694ee9e7a13a2b42115ce6d1f3ed5f3a
|
7
|
+
data.tar.gz: 3dea16e7a2f59dd9be98c916479a795cc7592c94b8cdba292d6c5e7d367db4c7503b26d5a9df22f73f3bc68a2f26c4a91055331c540936d194cd042081d74c8a
|
@@ -0,0 +1,26 @@
|
|
1
|
+
class AddDemoModeSessions < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
# Uncomment this line to enable :uuid support on PostgreSQL >= 9.4
|
4
|
+
# enable_extension 'pgcrypto' unless extension_enabled?('pgcrypto')
|
5
|
+
#
|
6
|
+
# Uncomment this line to enable :uuid support on PostgreSQL < 9.4
|
7
|
+
# enable_extension 'uuid-ossp' unless extension_enabled?('uuid-ossp')
|
8
|
+
|
9
|
+
create_table :demo_mode_sessions, id: primary_key_type do |t|
|
10
|
+
t.string :persona_name, null: false
|
11
|
+
t.references :signinable, polymorphic: true, type: :string
|
12
|
+
t.timestamps
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def primary_key_type
|
19
|
+
if connection.adapter_name.casecmp('postgresql').zero? &&
|
20
|
+
(extension_enabled?('pgcrypto') || extension_enabled?('uuid-ossp'))
|
21
|
+
:uuid
|
22
|
+
else
|
23
|
+
:bigint
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class AddDemoModeSessionsPassword < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
add_column :demo_mode_sessions, :signinable_password, :string, null: false, default: ''
|
4
|
+
|
5
|
+
reversible do |dir|
|
6
|
+
dir.up do
|
7
|
+
change_column :demo_mode_sessions, :signinable_password, :string, null: false, default: nil
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
data/lib/demo_mode/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: demo_mode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Griffith
|
@@ -221,6 +221,9 @@ files:
|
|
221
221
|
- app/views/demo_mode/sessions/show.html.erb
|
222
222
|
- app/views/layouts/demo_mode/application.html.erb
|
223
223
|
- config/routes.rb
|
224
|
+
- db/migrate/20190503143021_add_demo_mode_sessions.rb
|
225
|
+
- db/migrate/20201111000000_add_demo_mode_sessions_variant.rb
|
226
|
+
- db/migrate/20210505000000_add_demo_mode_sessions_password.rb
|
224
227
|
- lib/demo_mode.rb
|
225
228
|
- lib/demo_mode/clever_sequence.rb
|
226
229
|
- lib/demo_mode/cli.rb
|