This file contains 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
// Based on apidock.org Ubiquity Search: http://gist.github.com/8132 | |
CmdUtils.CreateCommand( | |
{ | |
name: "code", | |
takes: {"function": noun_arb_text}, | |
icon: "http://github.com/fluidicon.png", | |
homepage: "http://tiago.zusee.com", | |
author: {name: "Tiago Bastos", email: "[email protected]"}, | |
license: "MPL,GPL", | |
description: "Search on Github Code Search", |
This file contains 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
class HaveALineWithMatcher | |
# HaveALineWithMatcher is a simple rspec matcher that tests whether strings exist in a file | |
# | |
# = Usage | |
# | |
# 1. place this file in your spec/support directory. | |
# | |
# 2. use it in your specs: | |
# | |
# "/path/to/file".should have_a_line_with "some string" |
This file contains 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
# Extend hashes by adding one method that allows you to split a hash into an array of equal-sized hashes. | |
# Filter items to be included in the result by adding a selecting block that returns true | |
# if the key/value is to be kept. | |
# Per the usage example, return values are not ordered unless you're using Ruby 1.9 | |
# usage: | |
# a = {1 => 'a', 2 => 'b', 3 => 'c', 4 => 'd', 5 => 'e'} | |
# a.split_into(3) {|k,v| k.instance_of?(Integer)} |
This file contains 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
# | |
# NOTICE: The stop/restart tasks won't work properly due to a bug in the daemons gem | |
# unless you use the ghazel-daemons gem by putting this in your environment.rb file: | |
# | |
# config.gem "ghazel-daemons", :lib => "daemons" | |
# gem "ghazel-daemons" | |
# require "daemons" | |
# | |
# This will force-load the 'ghazel-daemons' gem and make sure it's used instead of | |
# the 'daemons' gem. It works even with the 'daemons' gem installed, so you won't |
This file contains 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
#! /usr/bin/env ruby | |
# the following maps the protocol handler txmt to open a vim file | |
# For example, if you have a link in Firefox with this URL: | |
# | |
# txmt:///home/my_user/.../index.html.haml | |
# | |
# then you can use this script to open VIM in the to the | |
# corresponding file and line number. | |
# |
This file contains 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
/home/bernie/.rvm/rubies/ruby-1.9.2-rc2/bin/ruby -rrubygems /home/bernie/.rvm/gems/ruby-1.9.2-rc2/gems/rspec-core-2.0.0.beta.19/bin/rspec /home/bernie/development/reports/vendor/plugins/reporter/spec/lib/reporter/models_spec.rb /home/bernie/development/reports/vendor/plugins/reporter/spec/lib/reporter_spec.rb /home/bernie/development/reports/vendor/plugins/reporter/spec/controllers/controller_spec.rb /home/bernie/development/reports/vendor/plugins/reporter/spec/routing/routing_spec.rb | |
/home/bernie/.rvm/gems/ruby-1.9.2-rc2/bundler/gems/rspec-core-e529683/lib/rspec/core/formatters/helpers.rb:8: warning: already initialized constant SUB_SECOND_PRECISION | |
/home/bernie/.rvm/gems/ruby-1.9.2-rc2/bundler/gems/rspec-core-e529683/lib/rspec/core/formatters/helpers.rb:9: warning: already initialized constant DEFAULT_PRECISION | |
/home/bernie/.rvm/gems/ruby-1.9.2-rc2/bundler/gems/rspec-core-e529683/lib/rspec/core/metadata.rb:17: warning: already initialized constant RESERVED_KEYS | |
/home/bernie/.rvm/gems/ruby-1.9.2-rc2/bundler/ |
This file contains 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 Reporter #:nodoc: | |
module Routing #:nodoc: | |
module MapperExtensions | |
def reporter | |
@set.add_route("/reporter/:id", {:controller => "reports", :action => "show"}) | |
end | |
end | |
end | |
end | |
ActionController::Routing::RouteSet::Mapper.send :include, Reporter::Routing::MapperExtensions |
This file contains 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
before :all do | |
Report.make(:id => 1, :name => "some report for us") | |
Person.make(:id => 1) | |
Reports::Application.routes.draw do | |
match "/report_some_report_for_us" => "report#report_some_report_for_us", :as => :report_some_report_for_us | |
end | |
Rails.application.reload_routes! | |
end | |
it "route for every record" do | |
{:get => '/report_some_report_for_us'}.should route_to(:controller => 'report', :action => 'report_some_report_for_us') |
This file contains 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
bernie@ubuntu:/home/aaaa/development/myfloridaadmin$ git push heroku heroku:master | |
Everything up-to-date | |
bernie@ubuntu:/home/aaaa/development/myfloridaadmin$ heroku addons:add newrelic:bronze | |
Adding newrelic:bronze to dmssalaries... FAILED | |
! newrelic:bronze add-on already added. | |
bernie@ubuntu:/home/aaaa/development/myfloridaadmin$ |
This file contains 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
bernie@ubuntu:/home/aaaa/development/myfloridaadmin$ git push heroku heroku:master | |
Counting objects: 14, done. | |
Delta compression using up to 2 threads. | |
Compressing objects: 100% (8/8), done. | |
Writing objects: 100% (10/10), 906 bytes, done. | |
Total 10 (delta 6), reused 0 (delta 0) | |
-----> Heroku receiving push | |
-----> WARNING: git submodule detected in: | |
vendor/plugins/squirrel |
OlderNewer