This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Configure colors, if available. | |
| if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then | |
| c_reset='\[\e[0m\]' | |
| c_user='\[\033[1;33m\]' | |
| c_path='\[\e[0;33m\]' | |
| c_git_clean='\[\e[0;36m\]' | |
| c_git_dirty='\[\e[0;35m\]' | |
| else | |
| c_reset= | |
| c_user= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # Author: Jakub Godawa <[email protected]> | |
| # Licence: MIT | |
| # | |
| # | |
| # Original script for Ubuntu 10.04 LTS: Josh Frye <[email protected]> | |
| # | |
| # Contributions from: Wayne E. Seguin <[email protected]> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # A class-based template for jQuery plugins in Coffeescript | |
| # | |
| # $('.target').myPlugin({ paramA: 'not-foo' }); | |
| # $('.target').myPlugin('myMethod', 'Hello, world'); | |
| # | |
| # Check out Alan Hogan's original jQuery plugin template: | |
| # https://github.com/alanhogan/Coffeescript-jQuery-Plugin-Template | |
| # | |
| (($, window) -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace :deploy do | |
| task :setup_solr_data_dir do | |
| run "mkdir -p #{shared_path}/solr/data" | |
| end | |
| end | |
| namespace :solr do | |
| desc "start solr" | |
| task :start, :roles => :app, :except => { :no_release => true } do | |
| run "cd #{current_path} && RAILS_ENV=#{rails_env} bundle exec sunspot-solr start --port=8983 --data-directory=#{shared_path}/solr/data --pid-dir=#{shared_path}/pids" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module CarrierWave | |
| module MiniMagick | |
| def toaster_filter | |
| manipulate! do |img| | |
| img.modulate '150,80,100' | |
| img.gamma 1.1 | |
| img.contrast | |
| img.contrast | |
| img.contrast | |
| img.contrast |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module CancanLinkHelper | |
| def show_link(*args, &block) | |
| if block_given? && can?(:read, args[0]) | |
| object = args[0] | |
| html_options = args[1] || {} | |
| show_link(object, capture(&block), html_options) | |
| elsif can?(:read, args[0]) | |
| object = args[0] | |
| content = args[1] || glyph(:eye_open) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module SimpleForm | |
| module Inputs | |
| class DatePickerInput < SimpleForm::Inputs::StringInput | |
| def input_html_options | |
| value = object.send(attribute_name) | |
| options = { | |
| value: value.nil?? nil : I18n.localize(value, format: :datepicker), | |
| data: { | |
| behaviour: 'datepicker' | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def without_transactional_fixtures(&block) | |
| self.use_transactional_fixtures = false | |
| before(:all) do | |
| if ENV["RAILS_ENV"].eql? 'test_ci' | |
| DatabaseCleaner.strategy = :truncation | |
| else | |
| DatabaseCleaner.strategy = :truncation | |
| DatabaseCleaner.clean_with(:truncation) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def without_transactional_fixtures(&block) | |
| self.use_transactional_fixtures = false | |
| before(:all) do | |
| if ENV["RAILS_ENV"].eql? 'test_ci' | |
| DatabaseCleaner.strategy = :truncation | |
| else | |
| DatabaseCleaner.strategy = :truncation | |
| DatabaseCleaner.clean_with(:truncation) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if [ -f "$rvm_path/scripts/rvm" ] && [ -f ".ruby-version" ]; then | |
| source "$rvm_path/scripts/rvm" | |
| if [ -f ".ruby-gemset" ]; then | |
| rvm use `cat .ruby-version`@`cat .ruby-gemset` | |
| else | |
| rvm use `cat .ruby-version` | |
| fi | |
| fi |
OlderNewer