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: f5c2aba2f095198967b8781b28d20d3a57c5d0c4d9d816792fe275c6d039148b
4
- data.tar.gz: 607c5cdaa82d3070aa37447d7c268c98df3ba0bb91ca6cff2b465a5fa0888dd0
3
+ metadata.gz: aff56a7cf57f06b2ea63470a4c73b5de9aaad1eb56c36be532050e0e4f8fd0bd
4
+ data.tar.gz: 126999b5796f0ea60bcdb0cc1d1b2a3832c761ea6c56c9fb3802739512b8a235
5
5
  SHA512:
6
- metadata.gz: 9ba3edc9678b5d98819abd4fe1a12b631ced1d145ce781e6780dd60515776bf1c4f6dad8ef1abbc0a317f5135c179ecbaf9987318388681c2c3f6800d79ff701
7
- data.tar.gz: eab477fb3021f61f9c6d35586228e7880e901f72ac03f717df7bafd3664a5e838f0f28fb04e8b490e6f9350a2a7fdb9a3b27840873561f93bb96a09f2bf930a9
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,5 @@
1
+ class AddDemoModeSessionsVariant < ActiveRecord::Migration[5.1]
2
+ def change
3
+ add_column :demo_mode_sessions, :variant, :string, null: false, default: 'default'
4
+ end
5
+ 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
@@ -1,3 +1,3 @@
1
1
  module DemoMode
2
- VERSION = '1.0.2'.freeze
2
+ VERSION = '1.0.3'.freeze
3
3
  end
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.2
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