`
- Website: https://stimulusjs.org/
- GitHub repo: https://github.com/stimulusjs/stimulus
- Handbook: https://stimulusjs.org/handbook/introduction
- Discourse: https://discourse.stimulusjs.org/
// .storybook/main.js | |
// | |
// this module makes the assumption that | |
// the local host is accessible at http://localhost:3001" | |
let fs = require('fs'); | |
module.exports = { | |
stories: ['../spec/components/**/*.stories.json'], | |
addons: [ |
`
class ApplicationController < ActionController::Base | |
include I18nHelper | |
end |
# http://stackoverflow.com/questions/8507798/rails-3-1-plugin-gem-dummy-test-app-rspec | |
# http://namick.tumblr.com/post/17663752365/how-to-create-a-gemified-plugin-with-rails-3-2-rspec | |
rails plugin new plugin_name --skip-test-unit --dummy-path=spec/dummy | |
cd plugin_name | |
# Add rspec-rails to gemspec dev deps | |
# s.add_development_dependency "rspec-rails" | |
bundle install |
# app/controllers/products_controller.rb | |
class ProductsController < Spree::ProductsController | |
helper Spree::Api::ApiHelpers | |
def index | |
@searcher = build_searcher(params.merge(include_images: true)) | |
@products = @searcher.retrieve_products | |
json = Rabl.render(nil, 'spree/api/products/index.v1', { |
#!/usr/bin/env ruby | |
require 'english' | |
require 'rubocop' | |
ADDED_OR_MODIFIED = /^\s*(A|AM|M)/.freeze | |
changed_files = `git status --porcelain`.split(/\n/). | |
select { |file_name_with_status| | |
file_name_with_status =~ ADDED_OR_MODIFIED |
### THIS SCRIPT IS EXECUTED IN THE APP ROOT FOLDER ### | |
# be sure scalingo.com is a known ssh host 00:00 | |
ssh-keyscan -H -p 22 scalingo.com >> ~/.ssh/known_hosts | |
# install Scalingo CLO | |
curl -O https://cli-dl.scalingo.io/install && bash install | |
# DPL is a deploy tool made for continuous deployment (ruby) | |
gem install dpl |
ActionView::Template::Error: private method `routes' called for #<ActionDispatch::Routing::RouteSet::NamedRouteCollection:0x007fde7a5e4498> | |
~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/js-routes-1.2.0/lib/js_routes.rb:62:in `generate' | |
~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/js-routes-1.2.0/app/assets/javascripts/js-routes.js.erb:2:in `_evaluate_template' | |
~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sprockets-3.5.2/lib/sprockets/erb_processor.rb:26:in `call' | |
~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sprockets-3.5.2/lib/sprockets/erb_processor.rb:13:in `call' | |
~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sprockets-3.5.2/lib/sprockets/processor_utils.rb:75:in `call_processor' | |
~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sprockets-3.5.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors' | |
~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sprockets-3.5.2/lib/sprockets/processor_utils.rb:56:in `reverse_each' | |
~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sprockets-3.5.2/ |
~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-5.0.0.beta1/lib/active_support/core_ext/module/aliasing.rb:37:in `alias_method': undefined method `attributes_for' for class `Devise::ParameterSanitizer' (NameError) | |
from ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-5.0.0.beta1/lib/active_support/core_ext/module/aliasing.rb:37:in `alias_method_chain' | |
from ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/bundler/gems/devise_invitable-5c4260faf54a/lib/devise_invitable/parameter_sanitizer.rb:12:in `included' | |
from ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/bundler/gems/devise_invitable-5c4260faf54a/lib/devise_invitable/rails.rb:20:in `include' | |
from ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/bundler/gems/devise_invitable-5c4260faf54a/lib/devise_invitable/rails.rb:20:in `block in <class:Engine>' | |
from ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-5.0.0.beta1/lib/active_support/lazy_load_hooks.rb:36:in `call' | |
from ~/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesuppo |