Skip to content

Instantly share code, notes, and snippets.

View hone's full-sized avatar

Terence Lee hone

View GitHub Profile
class NewCard
attr_reader :cardname
def initialize(name, life, damage)
@cardname = name
@life = life
@damage = damage
end
def card
require "spec_helper"
describe "bundle ruby" do
it "returns ruby version when explicit" do
gemfile <<-G
source "file://#{gem_repo1}"
ruby_version "1.9.3", :engine => 'ruby', :engine_version => '1.9.3'
gem "foo"
G
@hone
hone / aspen mri 1.8.6
Created March 6, 2012 22:40
aspen/bamboo gem list
abstract (1.0.0)
actionmailer (2.3.5, 2.3.4, 2.3.3, 2.3.2, 2.2.2, 2.1.2, 2.1.0, 2.0.2)
actionpack (2.3.5, 2.3.4, 2.3.3, 2.3.2, 2.2.2, 2.1.2, 2.1.0, 2.0.2)
activerecord (2.3.5, 2.3.4, 2.3.3, 2.3.2, 2.2.2, 2.1.0, 2.0.2)
activeresource (2.3.5, 2.3.4, 2.3.3, 2.3.2, 2.2.2, 2.1.0, 2.0.2)
activesupport (2.3.5, 2.3.4, 2.3.3, 2.3.2, 2.2.2, 2.1.2, 2.1.0, 2.0.2)
acts_as_ferret (0.4.3)
addressable (2.0.2, 2.0.1)
amqp (0.6.7, 0.6.6)
aws-s3 (0.6.2)
$ bundle -v
Bundler version 1.1.rc.8
$ bundle install
Fetching gem metadata from http://rubygems.org/....
Installing sqlite3 (1.3.5) with native extensions
Installing sqlite3-ruby (1.3.3)
Using bundler (1.1.rc.8)
Your bundle is complete! It was installed into ./vendor/bundle
$ gem install sqlite3-ruby
Fetching: sqlite3-1.3.5.gem (100%)
GEM
specs:
PLATFORMS
ruby
DEPENDENCIES
require 'bundler/setup'
require 'sinatra'
get '/' do
`ruby -v`
end
run Sinatra::Application
@hone
hone / ruby
Created January 10, 2012 16:47
if [ -z "$JRUBY_HOME" ]; then
JRUBY_HOME_1=`dirname "$PRG"` # the ./bin dir
if [ "$JRUBY_HOME_1" = '.' ] ; then
cwd=`pwd`
JRUBY_HOME=`dirname $cwd` # JRUBY-2699
else
JRUBY_HOME=`dirname "$JRUBY_HOME_1"` # the . dir
fi
fi
@hone
hone / gems_sort
Created November 29, 2011 19:39
gems with broken gemspecs
active_metadata (0.5.1)
acts_as_archive (0.4.1)
adapter-postgres (0.1.1)
aggregator-gem (0.1.9)
alondra (0.0.2)
api_resource (0.1.0)
arrest (0.0.5)
aruba (0.4.7)
auditor (2.1.2)
bartender (0.4.0)
namespace :assets do
desc "Compile all the assets named in config.assets.precompile"
task :precompile do
# We need to do this dance because RAILS_GROUPS is used
# too early in the boot process and changing here is already too late.
if ENV["RAILS_GROUPS"].to_s.empty? || ENV["RAILS_ENV"].to_s.empty?
ENV["RAILS_GROUPS"] ||= "assets"
ENV["RAILS_ENV"] ||= "production"
Kernel.exec $0, *ARGV
else
@hone
hone / gist:1228013
Created September 20, 2011 00:38
Bundler 1.2 Roadmap
1. Remove Index#use
2. Separate Definition/DSL concerns
3. Move Source#run_hooks into RubyGemsIntegration
4. bundle issues command (posts a gist of the stuff in ISSUES)
5. Get specs passing on JRuby and RBX
6. ruby version check
7. git clone --shallow 1 in bundler, during autoclean mode
8. allow git/path for the same gem: http://www.cowboycoded.com/2010/08/10/using-2-sources-for-a-gem-in-different-environments-with-bundler/