Skip to content

Commit

Permalink
Separated the Google Maps web-app related functionalities of YM4R fro…
Browse files Browse the repository at this point in the history
…m the rest. The former are now put into a Rails plugin. The latter are still distributed as gems but both are independant from each other. This has been done in order to have a better integration with Rails and the Rails conventions.

git-svn-id: http://ym4r.rubyforge.org/svn/Plugins/GM/trunk/gm@18 c9bc9743-7714-0410-b404-d8b1d4e1ace9
  • Loading branch information
Guilhem Vellut committed Jul 7, 2006
0 parents commit 657ca7e
Show file tree
Hide file tree
Showing 20 changed files with 1,788 additions and 0 deletions.
241 changes: 241 additions & 0 deletions README

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'

desc 'Default: run unit tests.'
task :default => :test

desc 'Test the gm plugin.'
Rake::TestTask.new(:test) do |t|
t.libs << 'lib'
t.pattern = 'test/**/*_test.rb'
t.verbose = true
end

desc 'Generate documentation for the gm plugin.'
Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'gm-rdoc'
rdoc.title = 'GM'
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files.include('README')
rdoc.rdoc_files.include('lib/**/*.rb')
end
13 changes: 13 additions & 0 deletions gmaps_api_key.yml.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#Fill here the Google Maps API keys for your application

#For development always the same host
development:
ABQIAAAAzMUFFnT9uH0xq39J0Y4kbhTJQa0g3IQ9GZqIMmInSLzwtGDKaBR6j135zrztfTGVOm2QlWnkaidDIQ

test:
ABQIAAAAzMUFFnT9uH0xq39J0Y4kbhTJQa0g3IQ9GZqIMmInSLzwtGDKaBR6j135zrztfTGVOm2QlWnkaidDIQ

#In our case, in production, the app can be accessed through 2 different hosts: thepochisuperstarmegashow.com and exmaple.com. There then needs a 2-key hash. If you deploy to one host, only the API key is needed (as in development and test)
production:
thepochisuperstarmegashow.com: ABQIAAAAzMUFFnT9uH0Sfg76Y4kbhTJQa0g3IQ9GZqIMmInSLzwtGDmlRT6e90j135zat56yhJKQlWnkaidDIQ
example.com: ABQIAAAAzMUFFnT9uH0Sfg98Y4kbhGFJQa0g3IQ9GZqIMmInSLrthJKGDmlRT98f4j135zat56yjRKQlWnkmod3TB
2 changes: 2 additions & 0 deletions init.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require 'gm'
include Ym4r::GmPlugin
9 changes: 9 additions & 0 deletions install.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require 'fileutils'

#Copy the Javascript files
FileUtils.copy(Dir[File.dirname(__FILE__) + '/javascript/*.js'],RAILS_ROOT + '/public/javascripts/')

gmaps_config = RAILS_ROOT + '/config/gmaps_api_key.yml'
unless File.exist?(gmaps_config)
FileUtils.copy(File.dirname(__FILE__) + '/gmaps_api_key.yml.sample',gmaps_config)
end
Loading

0 comments on commit 657ca7e

Please sign in to comment.