demo_mode 1.2.0 → 1.2.1

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: 4b7267b0e0096c7bf3003f8208dd32d8a2db0d6a49d4a645d75d962f15395cfa
4
- data.tar.gz: e3e3b0c6fdb6c2950025cff88f3d79e037ec258763a0d2677898b9e0c40fe71f
3
+ metadata.gz: 4fa471d71f9b23bdf5f3699471633cb453b1b71d36ef42281061803c14577eb3
4
+ data.tar.gz: b02c14aa3dcebba1acfe0d1dbf46860f6a3b8a6c794b8f01a6773c2886518e41
5
5
  SHA512:
6
- metadata.gz: 9bb7fa0335b8de78b772e72b976a2d05cd89f4a7f406eb073cd9dd398a7f057b603b3fdc26578c341e22965de8c9f0770da2504196973a962bd3a66c43393ddb
7
- data.tar.gz: f248e3d0cba23586bcf7af1ed7eee72f1ed8c21d27174e20c345ca26b99501041aaa768d056354ee0bace46a32e1e97ab38d6903d7efa46e90955510442ea01f
6
+ metadata.gz: 525c40df108867d7a10815cf0ab172302e1718321f560e6c5e7e449d0ad2507c4ae8fe4ee86bf054eb4e607ac2e32ea14e21f9038dae444bfe07a8db8bb188c2
7
+ data.tar.gz: bfe47613f072cd372d622f3b2f38c75a1ce053fd09492c447fc22d829f3e5324d6a7dcc973a01db4bb39ca4471ccec112be9d54abd222027ef404e71cc4b7f22
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  begin
2
4
  require 'bundler/setup'
3
5
  rescue LoadError
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DemoMode
2
4
  module Demoable
3
5
  extend ActiveSupport::Concern
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DemoMode
2
4
  class ApplicationController < DemoMode.splash_base_controller_name.constantize
3
5
  protect_from_forgery with: :null_session
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DemoMode
2
4
  class SessionsController < DemoMode::ApplicationController
3
5
  skip_before_action :demo_splash!, raise: false
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DemoMode
2
4
  class AccountGenerationJob < DemoMode.base_job_name.constantize
3
5
  def perform(session)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DemoMode
2
4
  class Session < ActiveRecord::Base
3
5
  attribute :variant, default: :default
data/config/routes.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  DemoMode::Engine.routes.draw do
2
4
  resources :sessions, only: %i(show new create update)
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class AddDemoModeSessions < ActiveRecord::Migration[5.1]
2
4
  def change
3
5
  # Uncomment this line to enable :uuid support on PostgreSQL >= 9.4
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class AddDemoModeSessionsVariant < ActiveRecord::Migration[5.1]
2
4
  def change
3
5
  add_column :demo_mode_sessions, :variant, :string, null: false, default: 'default'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class AddDemoModeSessionsPassword < ActiveRecord::Migration[5.1]
2
4
  def change
3
5
  add_column :demo_mode_sessions, :signinable_password, :string, null: false, default: ''
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class CleverSequence
2
4
  DEFAULT_BLOCK = ->(i) { i }
3
5
 
data/lib/demo_mode/cli.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'demo_mode/clis/multi_word_search_patch'
2
4
 
3
5
  # rubocop:disable Rails/Output, Rails/Exit
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # FIXME: This patches the 'f' option so that it is capable of multi-word searches.
2
4
  # Otherwise entering 'word1 word3' will fail to find 'word1 word2 word3'
3
5
  # LINES CHANGED: 17-20
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Configurable
2
4
  extend ActiveSupport::Concern
3
5
 
@@ -13,8 +15,8 @@ module Configurable
13
15
 
14
16
  def configurable_boolean(name, default: false)
15
17
  configurable(name, -> { default })
16
- alias_method "#{name}?", name
17
- configurations << "#{name}?".to_sym
18
+ alias_method :"#{name}?", name
19
+ configurations << :"#{name}?"
18
20
  end
19
21
 
20
22
  private
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'concerns/configurable'
2
4
 
3
5
  module DemoMode
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'sprockets/railtie'
2
4
 
3
5
  module DemoMode
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module FactoryBot
2
4
  class DefinitionProxy
3
5
  def clever_sequence(name, &block)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'active_model'
2
4
 
3
5
  module DemoMode
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'demo_mode/cli'
2
4
 
3
5
  namespace :persona do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DemoMode
2
- VERSION = '1.2.0'.freeze
4
+ VERSION = '1.2.1'
3
5
  end
data/lib/demo_mode.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rails'
2
4
  require 'typedjs-rails'
3
5
  require 'demo_mode/version'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rails/generators/base'
2
4
  require 'demo_mode/engine'
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # See README at https://github.com/Betterment/demo_mode
2
4
 
3
5
  DemoMode.configure do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  DemoMode.add_persona do
2
4
  # See README at https://github.com/Betterment/demo_mode
3
5
 
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: demo_mode
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.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: 2023-08-24 00:00:00.000000000 Z
11
+ date: 2024-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: cli-ui
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: rails
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -119,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
133
  - !ruby/object:Gem::Version
120
134
  version: '0'
121
135
  requirements: []
122
- rubygems_version: 3.4.18
136
+ rubygems_version: 3.4.22
123
137
  signing_key:
124
138
  specification_version: 4
125
139
  summary: A configurable demo mode for your Rails app.