Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove old example, add script to run all examples

  • Loading branch information...
commit 4e5cb4581286fe8ac42fe0940cb12113c1749ce8 1 parent 5674211
@gcao authored
View
2  examples/design_by_contract.rb
@@ -58,6 +58,7 @@ class ContractExample < Aspector::Base
##############################
+=begin
class A
include DesignByContract
@@ -68,4 +69,5 @@ class A
def buy price
end
end
+=end
View
48 examples/dropbox_concern_rewrite.rb
@@ -1,48 +0,0 @@
-# http://37signals.com/svn/posts/3372-put-chubby-models-on-a-diet-with-concerns
-
-module Dropboxed
- extend ActiveSupport::Concern
-
- included do
- before_create :generate_dropbox_key
- end
-
- def rekey_dropbox
- generate_dropbox_key
- save!
- end
-
- private
-
- def generate_dropbox_key
- self.dropbox_key = SignalId::Token.unique(24) do |key|
- self.class.find_by_dropbox_key(key)
- end
- end
-end
-
-A.send :include, Dropboxd
-
-##############################
-
-class DropboxAspect < Aspector::Base
- target do
- def rekey_dropbox
- generate_dropbox_key
- save!
- end
-
- private
-
- def generate_dropbox_key
- self.dropbox_key = SignalId::Token.unique(24) do |key|
- self.class.find_by_dropbox_key(key)
- end
- end
- end
-
- before :create, :generate_dropbox_key
-end
-
-DropboxAspect.apply(A)
-
View
12 run_all_examples.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+for f in examples/*
+do
+ echo
+ echo === Running $f ===
+ echo
+ ruby $f
+ echo
+ echo
+done
+
Please sign in to comment.
Something went wrong with that request. Please try again.