Skip to content

Instantly share code, notes, and snippets.

View devboy's full-sized avatar

Dominic Graefen devboy

View GitHub Profile
@devboy
devboy / yield.rb
Created August 21, 2011 15:54
Does anyone know why block_given? always returns false?
class Configuration
def create_method(name, &block)
self.class.send(:define_method, name, &block )
end
def add_configuration(name)
create_method "#{name.to_s}=" do |val|
instance_variable_set("@#{name}",val)
end
@devboy
devboy / buildfile.rb
Created July 13, 2011 09:23
Example buildfile with modules depending on each other
require "buildr/as3"
FLEX_SDK = FlexSDK.new("4.5.0.20967")
define "BuildingModules" do
project.version = "0.0.0"
define "Application" do
compile.using :mxmlc
@devboy
devboy / gator_config.rb
Created July 1, 2011 14:30
Gator - Example configuration
#This file has been generated by gator and wants to be edited by you!
Gator.project = Gator::Project.new "gator"
Gator.project.layout[:source,:main,:ruby] = "lib"
Gator.project.layout[:source,:test,:ruby] = "test"
puts Gator.project.path(:source,:main,:ruby)
@devboy
devboy / Rakefile.rb
Created June 9, 2011 11:57
rake test
desc "a"
task :a do
system "tree"
system "git status"
end
desc "b"
task :b => :a do
system "ls"
end
java -jar ~/Development/Libraries/RedTamarin/redtamarin_0.3.1.1049_OSX/asc.jar -AS3 -strict -import ~/Development/Libraries/RedTamarin/redtamarin_0.3.1.1049_OSX/toplevel.abc -import ~/Development/Libraries/RedTamarin/redtamarin_0.3.1.1049_OSX/builtin.abc -import lib/main/as3/avmglue_0.1.0.2305/avmglue.abc src/main/as3/ftask.as
$ buildr test
require 'buildr/as3'
# We need these maven repositories to download the flexunit4 and junit files
repositories.remote << "http://artifacts.devboy.org" << "http://repo2.maven.org/maven2"
define "AdvancedExample" do
define "MyApplication" do
compile.using :mxmlc
compile.options[:flexsdk] = FlexSDK.new("4.1.0.16076")
AdvancedExample
├── MyApplication
│   └── src
│      ├── main
│      │   └── as3
│      │   └── MyApplication.as
│      └── test
│      └── as3
│      ├── MyApplicationTest.as
│      └── TestRunner.mxml
$ buildr compile
$ buildr clean