Permalink
Browse files

now using nakajima gem to manage core extensions

  • Loading branch information...
1 parent 93d4854 commit e530f7cf145f03aba7c8b32bb55177a9b0ed604a @nakajima committed Nov 5, 2008
Showing with 12 additions and 41 deletions.
  1. +7 −0 README.textile
  2. +0 −5 lib/core_ext/array.rb
  3. +0 −15 lib/core_ext/object.rb
  4. +0 −13 lib/core_ext/proc.rb
  5. +1 −7 lib/roleful.rb
  6. +4 −1 roleful.gemspec
View
7 README.textile
@@ -202,6 +202,13 @@ user.can_do_anything? # => false
h3. Install
+Make sure you you have the @nakajima@ gem. This is where I manage my common
+extensions:
+
+ gem install nakajima-nakajima --source=http://gems.github.com
+
+Then install roleful like so:
+
gem install nakajima-roleful --source=http://gems.github.com
"View the CI build":http://ci.patnakajima.com/roleful
View
5 lib/core_ext/array.rb
@@ -1,5 +0,0 @@
-class Array
- def extract_options!
- last.is_a?(Hash) ? pop : { }
- end
-end
View
15 lib/core_ext/object.rb
@@ -1,15 +0,0 @@
-class Object
- def try(sym, *args, &block)
- respond_to?(sym) ? send(sym, *args, &block) : nil
- end
-
- def blank?
- to_s == nil.to_s
- end
-
- unless respond_to?(:instance_exec)
- def instance_exec(*arguments, &block)
- block.bind(self)[*arguments]
- end
- end
-end
View
13 lib/core_ext/proc.rb
@@ -1,13 +0,0 @@
-# from activesupport
-class Proc
- def bind(object)
- block, time = self, Time.now
- (class << object; self end).class_eval do
- method_name = "__bind_#{time.to_i}_#{time.usec}"
- define_method(method_name, &block)
- method = instance_method(method_name)
- remove_method(method_name)
- method
- end.bind(object)
- end
-end
View
8 lib/roleful.rb
@@ -1,14 +1,8 @@
$LOAD_PATH << File.dirname(__FILE__) + '/roleful'
-$LOAD_PATH << File.dirname(__FILE__) + '/core_ext'
require 'rubygems'
-require 'metaid'
+require 'nakajima'
require 'set'
-
-require 'array'
-require 'proc'
-require 'object'
-
require 'role'
require 'inclusion'
View
5 roleful.gemspec
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
s.authors = ["Pat Nakajima"]
s.date = %q{2008-10-27}
s.email = %q{patnakajima@gmail.com}
- s.files = ["lib/core_ext", "lib/core_ext/array.rb", "lib/core_ext/object.rb", "lib/core_ext/proc.rb", "lib/roleful", "lib/roleful/inclusion.rb", "lib/roleful/role.rb", "lib/roleful.rb"]
+ s.files = ["lib/roleful", "lib/roleful/inclusion.rb", "lib/roleful/role.rb", "lib/roleful.rb"]
s.homepage = %q{http://github.com/nakajima/roleful}
s.require_paths = ["lib"]
s.rubygems_version = %q{1.3.0}
@@ -20,10 +20,13 @@ Gem::Specification.new do |s|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<metaid>, [">= 0"])
+ s.add_runtime_dependency(%q<nakajima-nakajima>, ['>= 0'])
else
s.add_dependency(%q<metaid>, [">= 0"])
+ s.add_dependency(%q<nakajima-nakajima>, ['>= 0'])
end
else
+ s.add_dependency(%q<nakajima-nakajima>, ['>= 0'])
s.add_dependency(%q<metaid>, [">= 0"])
end
end

0 comments on commit e530f7c

Please sign in to comment.