Run rails new --help
to see all of the options you can use to create a new Rails application:
Output for Rails 8+
Usage:
rails COMMAND [options]
You must specify a command:
{"version":1,"resource":"file:///Users/melo/Projects/Angular/controlled-health-frontend/src/app/exams/services/exams-facade.service.ts","entries":[{"id":"qela.ts","timestamp":1650461783059},{"id":"1DVY.ts","timestamp":1650462325935},{"id":"mUEH.ts","timestamp":1650462392089},{"id":"FCQI.ts","timestamp":1650463035177}]} |
Run rails new --help
to see all of the options you can use to create a new Rails application:
Output for Rails 8+
Usage:
rails COMMAND [options]
You must specify a command:
It can be difficult to test the different scenarious for a module intended for use by including in another class.
If the class is statically defined in the spec, any later definitions extend, not replace, the first definition - which can cause test issues and breaks isolation between examples.
RSpec.describe SomeModule do
class SomeIncluder
include SomeModule
end
module AuthRequestHelper | |
def http_auth_as(username, password, &block) | |
@env = {} unless @env | |
old_auth = @env['HTTP_AUTHORIZATION'] | |
@env['HTTP_AUTHORIZATION'] = ActionController::HttpAuthentication::Basic.encode_credentials(username, password) | |
yield block | |
@env['HTTP_AUTHORIZATION'] = old_auth | |
end | |
def auth_get(url, params={}, env={}) |
unless File.exist?('Gemfile') | |
File.write('Gemfile', <<-GEMFILE) | |
source 'https://rubygems.org' | |
gem 'activerecord', '4.2.1' | |
gem 'state_machines' | |
gem 'sqlite3' | |
gem 'minitest' | |
GEMFILE | |
system 'bundle' |
This list is based on aliases_spec.rb.
You can see also Module: RSpec::Matchers API.
matcher | aliased to | description |
---|---|---|
a_truthy_value | be_truthy | a truthy value |
a_falsey_value | be_falsey | a falsey value |
be_falsy | be_falsey | be falsy |
a_falsy_value | be_falsey | a falsy value |
#encoding: utf-8 | |
module M3nd3s | |
def me_ajuda! | |
"NÃO" | |
end | |
end |
Use the natural Vim navigation keys hjkl to navigate the files. | |
Press o to open the file in a new buffer or open/close directory. | |
Press t to open the file in a new tab. | |
Press i to open the file in a new horizontal split. | |
Press s to open the file in a new vertical split. | |
Press p to go to parent directory. | |
Press r to refresh the current directory. | |
Press m to launch NERDTree menu inside Vim. |
#!/usr/bin/env bash | |
mkdir /var/app/ondeck/vendor /var/app/ondeck/public /var/app/support/bundle /var/app/support/assets /var/app/support/cache | |
ln -s /var/app/support/bundle /var/app/ondeck/vendor | |
ln -s /var/app/support/assets /var/app/ondeck/public | |
ln -s /var/app/support/cache /var/app/ondeck/vendor | |
sed -i 's/"rake/"bundle exec rake/' /opt/elasticbeanstalk/hooks/appdeploy/pre/11_asset_compilation.sh |
Prereq:
apt-get install zsh
apt-get install git-core
Getting zsh to work in ubuntu is weird, since sh
does not understand the source
command. So, you do this to install zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh