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 '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" |
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
| 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 |
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 'albacore' | |
| task :default => [:msbuild] | |
| msbuild :msbuild do |msb| | |
| msb.properties = { :configuration => :Debug } | |
| msb.targets = [ :Clean, :Build ] | |
| msb.solution = "AlbacoreDemo.sln" | |
| end |
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
| 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")] |
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
| task :default => [:foo, :bar] | |
| task :foo do | |
| puts "foo" | |
| end | |
| task :bar do | |
| puts "bar" | |
| end |
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
| git init | |
| git add . | |
| git commit -m "<message>" | |
| git remote add origin git@github.com:<username>/<git repo>.git | |
| git push origin master |
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
| curl -I http://localhost:3000/posts.json\?per_page\=20\&page\=1 |
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
| 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' |
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
| module MyModule | |
| def self.extend_object(obj) | |
| puts "Hello from #{self}" | |
| super # important | |
| end | |
| def self.hello | |
| puts "Hello from #{self}" | |
| end | |
| end |
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
| # execute this snippet | |
| module MyModule | |
| def self.extended(base) | |
| puts "Howdy!" | |
| end | |
| end | |
| class Blah | |
| extend MyModule |