$ rails g model User
belongs_to
has_one
require('dotenv').config() | |
var Fs = require('fs') | |
var Path = require('path') | |
var Botkit = require('botkit') | |
if (!process.env.SLACK_TOKEN) { | |
console.error('ERROR: this requires "SLACK_TOKEN" to be a valid Slack API token.') | |
process.exit(-1) | |
} |
FROM phusion/baseimage:0.9.22 | |
CMD ["/sbin/my_init"] | |
RUN add-apt-repository -y ppa:brightbox/ruby-ng | |
RUN apt-get update | |
RUN apt-get install -y libpq-dev git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev nodejs wget autoconf tzdata ruby2.4 ruby2.4-dev rubygems ruby-switch | |
RUN ruby-switch --set ruby2.4 | |
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* |
ACTIVE_CLASS = 'is-active'.freeze | |
def active_for(options) | |
name_of_controller = options.fetch(:controller) { nil } | |
name_of_action = options.fetch(:action) { nil } | |
request_path = options.fetch(:path) { nil } | |
return ACTIVE_CLASS if request_path && request_path == request.path | |
if name_of_controller == controller_name |
<style type="text/css"> | |
/****** EMAIL CLIENT BUG FIXES - BEST NOT TO CHANGE THESE ********/ | |
.ExternalClass { | |
width: 100%; | |
} | |
/* Forces Outlook.com to display emails at full width */ | |
.ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div { line-height: 100%; } | |
/* Forces Outlook.com to display normal line spacing, here is more on that: http://www.emailonacid.com/forum/viewthread/43/ */ | |
These are the scripts that I used to migrate from RSpec to Minitest in a Rails aplication.
It is expected for the test suite to be in RSpec 3.x sintax.
rename
library from Homebrewminitest-rails
gemspec
forder to test
test_helper.rb
file# config/initializer/notification_center.rb | |
NotificationCenter.queue | |
NotificationCenter.thread | |
ActiveSupport::Notifications.subscribe /(.)+\.notification/i do |*args| | |
NotificationCenter.queue << args | |
end |