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
require 'command_line_reporter' | |
class Example | |
include CommandLineReporter | |
def initialize | |
self.formatter = 'progress' | |
end | |
def run |
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
# Put this in your .travis.yml file | |
before_install: | |
- sed -i "s_https\(://rubygems.org\)_http\1_g" Gemfile Gemfile.lock |
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
snippet s | |
$(s${1}) | |
snippet i | |
$(i${1}) | |
snippet if | |
<if variavel="${1}" operador="${2}" valor="${3}" > | |
${4} | |
</if> | |
snippet ife | |
<if variavel="${1}" operador="${2}" valor="${3}" > |
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
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance| | |
html = %(<div class="field_with_errors">#{html_tag}</div>).html_safe | |
# add nokogiri gem to Gemfile | |
form_fields = %w(textarea input select) | |
elements = Nokogiri::HTML::DocumentFragment.parse(html_tag).css "label, " + form_fields.join(', ') | |
elements.each do |e| | |
if form_fields.include? e.node_name |