betterment / demo_mode Goto Github PK
View Code? Open in Web Editor NEWA configurable demo mode for your Rails app. Specify your desired "personas" and Demo Mode will handle the rest.
License: MIT License
A configurable demo mode for your Rails app. Specify your desired "personas" and Demo Mode will handle the rest.
License: MIT License
It would be nice to be able to def
up some helper methods inside the add_persona
block that are callable from within sign_in_as
but don't pollute any global namespaces (at the least to avoid naming conflicts).
I'm trying to set up demo_mode in a new Rails app (tried with an older one as well, but same issue).
Running it on a Rails 7 app with Ruby 3.0.3.
What I'm getting is a failure with the rake task.
bundle exec rails generate demo_mode:install
create config/initializers/demo_mode.rb
create config/personas/sample_persona.rb
rake demo_mode:install:migrations
rake aborted!
Don't know how to build task 'demo_mode:install:migrations' (See the list of available tasks with `rake --tasks`)
And running it with --trace:
rake demo_mode:install:migrations --trace
rake aborted!
Don't know how to build task 'demo_mode:install:migrations' (See the list of available tasks with `rake --tasks`)
/home/daniel/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/task_manager.rb:59:in `[]'
/home/daniel/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:159:in `invoke_task'
/home/daniel/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/home/daniel/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
/home/daniel/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
/home/daniel/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
/home/daniel/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
/home/daniel/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:83:in `block in run'
/home/daniel/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/home/daniel/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:80:in `run'
/home/daniel/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/home/daniel/.rbenv/versions/3.0.3/bin/rake:25:in `load'
/home/daniel/.rbenv/versions/3.0.3/bin/rake:25:in `<main>'
Thank you in advance! Demo_mode looks amazing!
When running with demo mode enabled in local development, running rake db:reset
will clear out any existing DemoMode::Session
record. This can cause the application to break due to an ActiveRecord::RecordNotFound
error triggered by one of the controller before_action
s. Instead of raising a hard error, we could probably force a logout instead. We'd just need to think about whether this wouldn't mask real lookup issues.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.