/Users/qichunren/.rvm/gems/ruby-1.9.2-p0/gems/rcov-0.9.9/lib/rcov/file_statistics.rb:115:in `block in is_code?': invalid byte sequence in US-ASCII (ArgumentError)
rcov 0.9.8
rake spec:rcov not work
in file
if ActiveRecord::Base.connection.adapter_name != "Mysql2" |
# in Gemfile | |
gem 'factory_girl_rails', "1.0.0" | |
# gem 'shoulda-matchers' | |
gem 'remarkable_activerecord', '>=4.0.0.alpha4' | |
# in spec/support/remarkable.rb | |
require 'remarkable/active_record' | |
# in a rspec test |
# | |
sudo su | |
# 使用下面的命令启动 XAMPP: | |
/Applications/XAMPP/xamppfiles/xampp start |
<%= content_for :html_head do %> | |
<%= javascript_include_tag "jquery.bbcode.js" %> | |
<%= javascript_tag do %> | |
$(function(){ | |
$("#web_message_content").bbcode({tag_bold:true,tag_italic:true,tag_underline:true,tag_link:true,tag_image:true,button_image:true,image_url:'/images/bbcode/'}); | |
$("#bbcode_preview_btn").bind("click", function(){ | |
var bbcode = $("#web_message_content").val(); | |
$.get("/utils/parse_bbcode", {id:bbcode}, function(text){ |
class ApplicationController < ActionController::Base | |
USER_NAME, PASSWORD = "xx", "secret" | |
protect_from_forgery | |
before_filter :login_from_http_auth | |
protected | |
def login_from_http_auth | |
authenticate_or_request_with_http_basic do |user_name, password| | |
user_name == USER_NAME && password == PASSWORD |
namespace :dev do | |
task :s do | |
sh "thin start -d -e production -p 5000" | |
end | |
task :stop do | |
sh "kill -9 `cat tmp/pids/thin.pid`" | |
end |
# encoding: utf-8 | |
require 'rubygems' | |
require 'capybara' | |
require 'capybara/dsl' | |
# require 'capybara/rspec' | |
Capybara.run_server = false | |
Capybara.current_driver = :selenium | |
Capybara.app_host = 'http://cqrorx.com:3000' | |
Capybara.default_wait_time = 4 |
qichunren@ubuntu:~/repos$ cat auto_pull.sh | |
#!/usr/bin/expect | |
set timeout 30 | |
cd /home/qichunren/repos/web_backend | |
spawn git pull --rebase | |
expect "[email protected]'s password:" | |
send "secretpassword\r" | |
send "\r" | |
sleep 10 |
Tool::Growl.notify("提示", "完成任务!")