Permalink
Browse files

prepping for first gemspec

  • Loading branch information...
1 parent 2873b7f commit 9949b86eab587946089e2d71a78fc70babfade08 @dsaronin dsaronin committed Oct 9, 2011
Showing with 76 additions and 5 deletions.
  1. +18 −0 .project
  2. +20 −0 Gemfile.lock
  3. +1 −1 LICENSE.txt
  4. +4 −4 Rakefile
  5. +5 −0 lib/milia.rb
  6. +12 −0 lib/milia/base.rb
  7. +16 −0 lib/milia/railtie.rb
View
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>milia</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.aptana.ide.core.unifiedBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.radrails.rails.core.railsnature</nature>
+ <nature>com.aptana.ruby.core.rubynature</nature>
+ </natures>
+</projectDescription>
View
@@ -0,0 +1,20 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ git (1.2.5)
+ jeweler (1.6.4)
+ bundler (~> 1.0)
+ git (>= 1.2.5)
+ rake
+ rake (0.9.2)
+ rcov (0.9.11)
+ shoulda (2.11.3)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ bundler (~> 1.0.0)
+ jeweler (~> 1.6.4)
+ rcov
+ shoulda
View
@@ -1,4 +1,4 @@
-Copyright (c) 2011 Daudi Amani
+Copyright (c) 2011 David Anderson
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
View
@@ -17,10 +17,10 @@ Jeweler::Tasks.new do |gem|
gem.name = "milia"
gem.homepage = "http://github.com/dsaronin/milia"
gem.license = "MIT"
- gem.summary = %Q{TODO: one-line summary of your gem}
- gem.description = %Q{TODO: longer description of your gem}
+ gem.summary = %Q{Multi-tenanting for hosted Rails 3.1+/Postgres applications}
+ gem.description = %Q{enables row-based multi-tenanting that is transparent to application; enforced at lowest DB connection level}
gem.email = "dsaronin@gmail.com"
- gem.authors = ["Daudi Amani"]
+ gem.authors = ["David Anderson"]
# dependencies defined in Gemfile
end
Jeweler::RubygemsDotOrgTasks.new
@@ -42,7 +42,7 @@ end
task :default => :test
-require 'rake/rdoctask'
+require 'rdoc/task'
Rake::RDocTask.new do |rdoc|
version = File.exist?('VERSION') ? File.read('VERSION') : ""
View
@@ -0,0 +1,5 @@
+
+require File.dirname(__FILE__) + '/milia/base'
+
+
+require File.dirname(__FILE__) + '/milia/railtie' if defined?(Rails::Railtie)
View
@@ -0,0 +1,12 @@
+module Milia
+ module Base
+ def self.included(base)
+ base.extend ClassMethods
+ end
+
+ module ClassMethods
+ # Add a job to the queue
+ end # module ClassMethods
+
+ end # module Base
+end # module Milia
View
@@ -0,0 +1,16 @@
+require 'milia'
+require 'rails'
+
+module Milia
+ class Railtie < Rails::Railtie
+ initializer :after_initialize do
+ ActiveRecord.on_load(:active_record) do
+ ActiveRecord::Base.send(:extend, Milia::Base)
+ end
+ end
+
+ rake_tasks do
+ load 'milia/tasks.rb'
+ end
+ end
+end

0 comments on commit 9949b86

Please sign in to comment.