Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated documents with how to sign up for a key in development + prod…
…uction. Fixed rdoc so that eschaton docs can ge generated like so: $ cd vendor/plugins/eschaton $ rake rdoc $ open rdoc/index.html
- Loading branch information
Guilio Karadanais
committed
Aug 14, 2008
1 parent
a2bc629
commit 948fb20
Showing
22 changed files
with
106 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
rdoc | ||
.DS_Store | ||
plugin_docs | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,46 @@ | ||
== eschaton => google maps on rails with hotness | ||
|
||
Helps with writing google map[http://code.google.com/apis/maps/documentation/reference.html] mashups in rails, | ||
brining together the power of Google Maps and Rails. | ||
Helps with writing google map[http://code.google.com/apis/maps/documentation/reference.html] mashups in Rails | ||
bringing together the power of Google Maps and Rails. | ||
|
||
Check out our blog[http://eschatonmaps.blogspot.com/] for updates. | ||
Check out our blog[http://eschatonmaps.blogspot.com/] for updates. If you have a bug or issue check the | ||
list[http://eschaton.lighthouseapp.com/projects/12849-eschaton/tickets] or help by | ||
reporting[http://eschaton.lighthouseapp.com/projects/12849-eschaton/tickets/new] your bug or issue. | ||
|
||
If you have a bug or issue check the list[http://eschaton.lighthouseapp.com/projects/12849-eschaton/tickets] or | ||
help by reporting[http://eschaton.lighthouseapp.com/projects/12849-eschaton/tickets/new] your bug or issue. | ||
You can also check out the github page[http://github.com/yawningman/eschaton/tree/master], patches are always welcome. | ||
|
||
== Get it... | ||
|
||
For Rails 2.1 and up | ||
script/plugin install git://github.com/yawningman/eschaton.git | ||
script/plugin install git://github.com/yawningman/quiver_core.git | ||
$ script/plugin install git://github.com/yawningman/eschaton.git | ||
$ script/plugin install git://github.com/yawningman/quiver_core.git | ||
|
||
Older versions of Rails | ||
cd vendor/plugins | ||
git clone git://github.com/yawningman/eschaton.git | ||
git clone git://github.com/yawningman/quiver_core.git | ||
$ cd vendor/plugins | ||
$ git clone git://github.com/yawningman/eschaton.git | ||
$ git clone git://github.com/yawningman/quiver_core.git | ||
|
||
== Get going... | ||
|
||
Generate a map, look at the files the generator created and play a bit | ||
script/generate map | ||
For developement if you are developing on anything other than http://localhost you will need to generate a google maps | ||
api key here[http://code.google.com/apis/maps/signup.html] as well as for production. | ||
|
||
# Generate a key for development and place this in your developement.rb file | ||
GOOGLE_MAPS_API_KEY = "paste_your_developement_api_key_here" | ||
|
||
# Generate a key for production and place this in your production.rb file | ||
GOOGLE_MAPS_API_KEY = "paste_your_production_api_key_here" | ||
|
||
Then generate a map, look at the files the generator created and play a bit | ||
$ script/generate map | ||
|
||
Then visit the map at http://localhost:3000/map | ||
|
||
== Documentation... | ||
|
||
Generate the eschaton docs | ||
$ cd vendor/plugins/eschaton | ||
$ rake rdoc | ||
$ open rdoc/index.html | ||
|
||
Check out the Google::Map and Google::Marker as these are the most commonly used mapping objects. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
class PresentationModel | ||
class PresentationModel # :nodoc: | ||
attr_reader :script | ||
|
||
def initialize(script) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,26 @@ | ||
class ActionController::Base | ||
before_filter :set_current_view | ||
module ActionController # :nodoc: | ||
class Base # :nodoc: | ||
before_filter :set_current_view | ||
|
||
# Create a presentation model using the given +model_name+ | ||
def presentation_model(model_name) | ||
model = "#{model_name.to_s.classify}PresentationModel".constantize | ||
# Create a presentation model using the given +model_name+ | ||
def presentation_model(model_name) | ||
model = "#{model_name.to_s.classify}PresentationModel".constantize | ||
|
||
render :update do |page| | ||
Eschaton.with_global_script page do | ||
yield model_name.presentation_modelify.new(page) | ||
render :update do |page| | ||
Eschaton.with_global_script page do | ||
yield model_name.presentation_modelify.new(page) | ||
end | ||
end | ||
end | ||
end | ||
|
||
def run_javascript(&block) | ||
render :update do |page| | ||
Eschaton.with_global_script page, &block | ||
def run_javascript(&block) | ||
render :update do |page| | ||
Eschaton.with_global_script page, &block | ||
end | ||
end | ||
end | ||
|
||
def set_current_view | ||
Eschaton.current_view = @template | ||
def set_current_view | ||
Eschaton.current_view = @template | ||
end | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
class ActionView::Base | ||
module ActionView # :nodoc: | ||
class Base # :nodoc: | ||
|
||
# Extends the ActionView::Base by including the +extention_module+. | ||
def self.extend_with_plugin(extention_module) | ||
include extention_module | ||
# Extends the ActionView::Base by including the +extention_module+. | ||
def self.extend_with_plugin(extention_module) | ||
include extention_module | ||
end | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,48 @@ | ||
class ActionView::Helpers::PrototypeHelper::JavaScriptGenerator | ||
module ActionView # :nodoc: | ||
module Helpers # :nodoc: | ||
module PrototypeHelper # :nodoc: | ||
class JavaScriptGenerator # :nodoc: | ||
|
||
module GeneratorMethods | ||
module GeneratorMethods # :nodoc: | ||
|
||
def <<(javascript) | ||
@recorder << javascript if @recorder | ||
@lines << javascript | ||
def <<(javascript) | ||
@recorder << javascript if @recorder | ||
@lines << javascript | ||
|
||
javascript | ||
end | ||
end | ||
javascript | ||
end | ||
end | ||
|
||
# Allows for recording any script contained within the block passed to this method. This will return what was | ||
# recorded in the form of a JavascriptGenerator. | ||
# | ||
# This is useful for testing and debugging output when generating script. | ||
# | ||
# Example: | ||
# script << "// This is before recording" | ||
# | ||
# # record will containin the script generated within the block | ||
# record = script.record_for_test do | ||
# script << "// This is within recording" | ||
# script << "// Again, this is within a record" | ||
# end | ||
# | ||
# script << "// This is after recording" | ||
def record_for_test(&block) | ||
recorder = Eschaton.javascript_generator | ||
# Allows for recording any script contained within the block passed to this method. This will return what was | ||
# recorded in the form of a JavascriptGenerator. | ||
# | ||
# This is useful for testing and debugging output when generating script. | ||
# | ||
# Example: | ||
# script << "// This is before recording" | ||
# | ||
# # record will containin the script generated within the block | ||
# record = script.record_for_test do | ||
# script << "// This is within recording" | ||
# script << "// Again, this is within a record" | ||
# end | ||
# | ||
# script << "// This is after recording" | ||
def record_for_test(&block) | ||
recorder = Eschaton.javascript_generator | ||
|
||
@recorder = recorder | ||
yield self | ||
@recorder = nil | ||
@recorder = recorder | ||
yield self | ||
@recorder = nil | ||
|
||
recorder | ||
end | ||
recorder | ||
end | ||
|
||
# Extends the JavaScriptGenerator by including the +extention_module+. | ||
def self.extend_with_plugin(extention_module) | ||
include extention_module | ||
# Extends the JavaScriptGenerator by including the +extention_module+. | ||
def self.extend_with_plugin(extention_module) | ||
include extention_module | ||
end | ||
end | ||
end | ||
end | ||
|
||
end |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters