Skip to content

Instantly share code, notes, and snippets.

require 'albacore'
require 'version_bumper'
# snip
assemblyinfo :assemblyinfo do |asm|
asm.version = bumper_version.to_s
asm.file_version = bumper_version.to_s
asm.company_name = "ACME"
asm.product_name = "AlbacoreDemo"
mstest :mstest => [:msbuild] do |mstest|
mstest.command = "C:/Program\ Files\ (x86)/Microsoft Visual Studio 10.0/Common7/IDE/mstest.exe"
mstest.assemblies "AlbacoreDemo.Tests/bin/Debug/AlbacoreDemo.Tests.dll"
end
require 'albacore'
task :default => [:msbuild]
msbuild :msbuild do |msb|
msb.properties = { :configuration => :Debug }
msb.targets = [ :Clean, :Build ]
msb.solution = "AlbacoreDemo.sln"
end
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyCompany("ACME")]
[assembly: AssemblyProduct("AlbacoreDemo")]
[assembly: AssemblyCopyright("Wile E. Coyote")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
@ruprict
ruprict / gist:2878894
Created June 5, 2012 23:42
Ian Oxley Albacore article
task :default => [:foo, :bar]
task :foo do
puts "foo"
end
task :bar do
puts "bar"
end
git init
git add .
git commit -m "<message>"
git remote add origin git@github.com:<username>/<git repo>.git
git push origin master
@ruprict
ruprict / console
Created May 4, 2012 14:06
Rails HEAD
curl -I http://localhost:3000/posts.json\?per_page\=20\&page\=1
class MyCustomError < StandardError; end
# super terribad
def Object.const_missing(name)
raise MyCustomError, "You attempted to use a constant that wasn't defined: #{name}"
end
pry(main)> WTF
#=> MyCustomError: You attempted to use a constant that wasn't defined: WTF from :3:in `const_missing'
module MyModule
def self.extend_object(obj)
puts "Hello from #{self}"
super # important
end
def self.hello
puts "Hello from #{self}"
end
end
# execute this snippet
module MyModule
def self.extended(base)
puts "Howdy!"
end
end
class Blah
extend MyModule