Skip to content

Commit

Permalink
Added gemspec for GemPlugin, updated README.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Bleigh committed Jun 13, 2008
1 parent 5e60119 commit 4fc63f0
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 31 deletions.
3 changes: 2 additions & 1 deletion MIT-LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Copyright (c) 2008 [name of plugin creator]
Copyright (c) 2008 Michael Bleigh (http://www.mbleigh.com) and
Intridea, Inc (http://www.intridea.com)

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
19 changes: 17 additions & 2 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,24 @@
*******************************************************************

SubdomainFu
=========
===========

SubdomainFu provides a modern implementation of subdomain handling in Rails.
It takes aspects from account_location, request_routing, and other snippets
found around the web and combines them to provide a single, simple solution
for subdomain-based route management.
for subdomain-based route and url management.

Installation
============

SubdomainFu is available both as a traditional plugin and a GemPlugin. To
install it as a traditional plugin (Rails 2.1 or later):

script/plugin install git://github.com/mbleigh/subdomain-fu.git

To use it as a GemPlugin, add it to your environment.rb:

config.gem 'mbleigh-subdomain-fu', :source => "http://gems.github.com", :lib => "subdomain-fu"

Configuration
=============
Expand All @@ -18,6 +30,7 @@ configuration required is:

tld_size
--------

A hash for each environment of the size of the top-level domain name.
(something.com = 1, localhost = 0, etc.)

Expand All @@ -44,5 +57,7 @@ call to use (or lose) a subdomain:
url_for(:controller => "my_controller", :action => "my_action", :subdomain => "awesome")
users_url(:subdomain => false) # specifying "false" will remove any current subdomain



Copyright (c) 2008 Michael Bleigh (http://www.mbleigh.com/) and
Intridea, Inc. (http://www.intridea.com/). Released under the MIT license
22 changes: 0 additions & 22 deletions Rakefile

This file was deleted.

7 changes: 1 addition & 6 deletions init.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
require 'subdomain_fu'

ActionController::Base.send :include, SubdomainFu::Controller

ActionController::Routing::RouteSet.send :include, SubdomainFu::RouteSetExtensions
ActionController::Routing::Route.send :include, SubdomainFu::RouteExtensions
require File.dirname(__FILE__) + "/rails/init"
File renamed without changes.
8 changes: 8 additions & 0 deletions rails/init.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
require 'subdomain-fu'

ActionController::Base.send :include, SubdomainFu::Controller

ActionController::Routing::RouteSet.send :include, SubdomainFu::RouteSetExtensions
ActionController::Routing::Route.send :include, SubdomainFu::RouteExtensions

RAILS_DEFAULT_LOGGER.info("** SubdomainFu: initialized properly")
27 changes: 27 additions & 0 deletions subdomain-fu.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Gem::Specification.new do |s|
s.name = "subdomain-fu"
s.version = "0.0.1"
s.date = "2008-06-13"
s.summary = "Provides a simple solution for route handling and linking between subdomains in a Rails application."
s.email = "michael@intridea.com"
s.homepage = "http://www.actsascommunity.com/projects/subdomain-fu"
s.description = "SubdomainFu aims to solve the problem of subdomain-based routing and in a unified way, establishing simple conventions for linking between subdomains of a Rails app."
s.has_rdoc = true
s.authors = ["Michael Bleigh"]
s.files = [ "MIT-LICENSE",
"README",
"init.rb",
"lib/subdomain_fu",
"lib/subdomain_fu/routing_extensions.rb",
"lib/subdomain_fu/url_rewriter.rb",
"lib/subdomain_fu.rb",
"rails/init.rb",
"spec/debug.log",
"spec/spec_helper.rb",
"spec/subdomain_fu_spec.rb",
"spec/url_rewriter_spec.rb",
"subdomain-fu.gemspec" ]
s.rdoc_options = ["--main", "README"]
#s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.txt"]
#s.add_dependency("mbleigh-mash", [">= 0.0.5"])
end

0 comments on commit 4fc63f0

Please sign in to comment.