Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added gemspec for GemPlugin, updated README.

  • Loading branch information...
commit 4fc63f00417411e845600f8d8a1d6ea607895c22 1 parent 5e60119
Michael Bleigh authored
View
3  MIT-LICENSE
@@ -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
View
19 README
@@ -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
=============
@@ -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.)
@@ -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
View
22 Rakefile
@@ -1,22 +0,0 @@
-require 'rake'
-require 'rake/testtask'
-require 'rake/rdoctask'
-
-desc 'Default: run unit tests.'
-task :default => :test
-
-desc 'Test the account_fu plugin.'
-Rake::TestTask.new(:test) do |t|
- t.libs << 'lib'
- t.pattern = 'test/**/*_test.rb'
- t.verbose = true
-end
-
-desc 'Generate documentation for the account_fu plugin.'
-Rake::RDocTask.new(:rdoc) do |rdoc|
- rdoc.rdoc_dir = 'rdoc'
- rdoc.title = 'AccountFu'
- rdoc.options << '--line-numbers' << '--inline-source'
- rdoc.rdoc_files.include('README')
- rdoc.rdoc_files.include('lib/**/*.rb')
-end
View
7 init.rb
@@ -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"
View
0  lib/subdomain_fu.rb → lib/subdomain-fu.rb
File renamed without changes
View
8 rails/init.rb
@@ -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")
View
27 subdomain-fu.gemspec
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.