Updated for Rails 4.0.0+
-
Set up the
bowergem. -
Follow the Bower instructions and list your dependencies in your
bower.json, e.g.// bower.json
{
| { | |
| "491289025" : "ijinshan-kappmarket://", | |
| "301521403" : "fb103361823069955://", | |
| "492178411" : "ils492178411://", | |
| "346142396" : "fb234434003713://", | |
| "310633997" : "whatsapp://", | |
| "370614765" : "com.condenet.newyorker://", | |
| "325058491" : "rnmddisco://", | |
| "382952264" : "epichttp://", | |
| "477048487" : "predictwind://", |
Updated for Rails 4.0.0+
Set up the bower gem.
Follow the Bower instructions and list your dependencies in your bower.json, e.g.
// bower.json{
Sometimes you want to use a gem on Heroku that is in a private repository on GitHub.
Using git over http you can authenticate to GitHub using basic authentication. However, we don't want to embed usernames and passwords in Gemfiles. Instead, we can use authentication tokens.
First you will need to get an OAuth Token from GitHub using your own username and "note"
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
| Stripe.setPublishableKey('YOUR_PUBLISHABLE_KEY'); | |
| $("#payment-form").submit((event) -> | |
| # disable the submit button to prevent repeated clicks | |
| $('.submit-button').attr("disabled", "disabled") | |
| Stripe.createToken({ | |
| number: $('.card-number').val(), | |
| cvc: $('.card-cvc').val(), | |
| exp_month: $('.card-expiry-month').val(), |
| # lib/custom_logger.rb | |
| class CustomLogger < Logger | |
| def format_message(severity, timestamp, progname, msg) | |
| "#{timestamp.to_formatted_s(:db)} #{severity} #{msg}\n" | |
| end | |
| end | |
| logfile = File.open("#{Rails.root}/log/custom.log", 'a') # create log file | |
| logfile.sync = true # automatically flushes data to file | |
| CUSTOM_LOGGER = CustomLogger.new(logfile) # constant accessible anywhere |
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |