gmaps4rails 0.11.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +6 -2
- data/app/views/gmaps4rails/_gmaps4rails.html.erb +18 -20
- data/lib/gmaps4rails/base.rb +95 -0
- data/lib/gmaps4rails/extensions/hash.rb +3 -67
- data/lib/gmaps4rails/helper/gmaps4rails_helper.rb +13 -2
- data/public/javascripts/gmaps4rails/all_apis.js +5 -0
- data/public/javascripts/gmaps4rails/gmaps4rails.base.js +147 -112
- data/public/javascripts/gmaps4rails/gmaps4rails.bing.js +182 -171
- data/public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js +269 -235
- data/public/javascripts/gmaps4rails/gmaps4rails.mapquest.js +135 -125
- data/public/javascripts/gmaps4rails/gmaps4rails.openlayers.js +227 -218
- data/public/stylesheets/gmaps4rails.css +2 -2
- metadata +9 -111
- data/test/dummy/app/controllers/application_controller.rb +0 -3
- data/test/dummy/app/controllers/users_controller.rb +0 -60
- data/test/dummy/app/helpers/application_helper.rb +0 -2
- data/test/dummy/app/helpers/users_helper.rb +0 -3
- data/test/dummy/app/models/user.rb +0 -38
- data/test/dummy/config/application.rb +0 -41
- data/test/dummy/config/boot.rb +0 -6
- data/test/dummy/config/environment.rb +0 -5
- data/test/dummy/config/environments/development.rb +0 -26
- data/test/dummy/config/environments/production.rb +0 -49
- data/test/dummy/config/environments/test.rb +0 -35
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy/config/initializers/inflections.rb +0 -10
- data/test/dummy/config/initializers/mime_types.rb +0 -5
- data/test/dummy/config/initializers/secret_token.rb +0 -7
- data/test/dummy/config/initializers/session_store.rb +0 -8
- data/test/dummy/config/routes.rb +0 -7
- data/test/dummy/db/migrate/20110306182914_create_users.rb +0 -21
- data/test/dummy/db/migrate/20110430081624_add_addresses_to_users.rb +0 -11
- data/test/dummy/db/migrate/20110430083824_remove_address_from_users.rb +0 -9
- data/test/dummy/db/schema.rb +0 -35
- data/test/dummy/db/seeds.rb +0 -7
- data/test/dummy/spec/base/base_spec.rb +0 -127
- data/test/dummy/spec/helpers/gmaps4rails_helper_spec.rb +0 -13
- data/test/dummy/spec/javascripts/support/jasmine_config.rb +0 -23
- data/test/dummy/spec/javascripts/support/jasmine_runner.rb +0 -20
- data/test/dummy/spec/models/user_spec.rb +0 -284
- data/test/dummy/spec/requests/users_spec.rb +0 -22
- data/test/dummy/spec/spec_helper.rb +0 -41
- data/test/dummy/spec/support/factories.rb +0 -20
- data/test/dummy/spec/support/matchers.rb +0 -7
- data/test/dummy31/app/controllers/application_controller.rb +0 -3
- data/test/dummy31/app/controllers/users_controller.rb +0 -83
- data/test/dummy31/app/helpers/application_helper.rb +0 -2
- data/test/dummy31/app/helpers/users_helper.rb +0 -2
- data/test/dummy31/app/models/user.rb +0 -7
- data/test/dummy31/config/application.rb +0 -43
- data/test/dummy31/config/boot.rb +0 -6
- data/test/dummy31/config/environment.rb +0 -5
- data/test/dummy31/config/environments/development.rb +0 -27
- data/test/dummy31/config/environments/production.rb +0 -51
- data/test/dummy31/config/environments/test.rb +0 -39
- data/test/dummy31/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy31/config/initializers/inflections.rb +0 -10
- data/test/dummy31/config/initializers/mime_types.rb +0 -5
- data/test/dummy31/config/initializers/secret_token.rb +0 -7
- data/test/dummy31/config/initializers/session_store.rb +0 -8
- data/test/dummy31/config/initializers/wrap_parameters.rb +0 -12
- data/test/dummy31/config/routes.rb +0 -61
- data/test/dummy31/db/migrate/20110809134019_create_users.rb +0 -13
- data/test/dummy31/db/schema.rb +0 -25
- data/test/dummy31/db/seeds.rb +0 -7
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gmaps4rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
|
-
- 0
|
8
|
-
- 11
|
9
7
|
- 1
|
10
|
-
|
8
|
+
- 0
|
9
|
+
- 0
|
10
|
+
version: 1.0.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Benjamin Roth
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-08-
|
19
|
+
date: 2011-08-30 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: crack
|
@@ -54,6 +54,7 @@ files:
|
|
54
54
|
- lib/gmaps4rails/extensions/hash.rb
|
55
55
|
- lib/gmaps4rails/helper/gmaps4rails_helper.rb
|
56
56
|
- public/images/marker.png
|
57
|
+
- public/javascripts/gmaps4rails/all_apis.js
|
57
58
|
- public/javascripts/gmaps4rails/bing.js
|
58
59
|
- public/javascripts/gmaps4rails/gmaps4rails.base.js
|
59
60
|
- public/javascripts/gmaps4rails/gmaps4rails.bing.js
|
@@ -66,58 +67,6 @@ files:
|
|
66
67
|
- public/stylesheets/gmaps4rails.css
|
67
68
|
- LICENSE.txt
|
68
69
|
- README.rdoc
|
69
|
-
- test/dummy/app/controllers/application_controller.rb
|
70
|
-
- test/dummy/app/controllers/users_controller.rb
|
71
|
-
- test/dummy/app/helpers/application_helper.rb
|
72
|
-
- test/dummy/app/helpers/users_helper.rb
|
73
|
-
- test/dummy/app/models/user.rb
|
74
|
-
- test/dummy/config/application.rb
|
75
|
-
- test/dummy/config/boot.rb
|
76
|
-
- test/dummy/config/environment.rb
|
77
|
-
- test/dummy/config/environments/development.rb
|
78
|
-
- test/dummy/config/environments/production.rb
|
79
|
-
- test/dummy/config/environments/test.rb
|
80
|
-
- test/dummy/config/initializers/backtrace_silencers.rb
|
81
|
-
- test/dummy/config/initializers/inflections.rb
|
82
|
-
- test/dummy/config/initializers/mime_types.rb
|
83
|
-
- test/dummy/config/initializers/secret_token.rb
|
84
|
-
- test/dummy/config/initializers/session_store.rb
|
85
|
-
- test/dummy/config/routes.rb
|
86
|
-
- test/dummy/db/migrate/20110306182914_create_users.rb
|
87
|
-
- test/dummy/db/migrate/20110430081624_add_addresses_to_users.rb
|
88
|
-
- test/dummy/db/migrate/20110430083824_remove_address_from_users.rb
|
89
|
-
- test/dummy/db/schema.rb
|
90
|
-
- test/dummy/db/seeds.rb
|
91
|
-
- test/dummy/spec/base/base_spec.rb
|
92
|
-
- test/dummy/spec/helpers/gmaps4rails_helper_spec.rb
|
93
|
-
- test/dummy/spec/javascripts/support/jasmine_config.rb
|
94
|
-
- test/dummy/spec/javascripts/support/jasmine_runner.rb
|
95
|
-
- test/dummy/spec/models/user_spec.rb
|
96
|
-
- test/dummy/spec/requests/users_spec.rb
|
97
|
-
- test/dummy/spec/spec_helper.rb
|
98
|
-
- test/dummy/spec/support/factories.rb
|
99
|
-
- test/dummy/spec/support/matchers.rb
|
100
|
-
- test/dummy31/app/controllers/application_controller.rb
|
101
|
-
- test/dummy31/app/controllers/users_controller.rb
|
102
|
-
- test/dummy31/app/helpers/application_helper.rb
|
103
|
-
- test/dummy31/app/helpers/users_helper.rb
|
104
|
-
- test/dummy31/app/models/user.rb
|
105
|
-
- test/dummy31/config/application.rb
|
106
|
-
- test/dummy31/config/boot.rb
|
107
|
-
- test/dummy31/config/environment.rb
|
108
|
-
- test/dummy31/config/environments/development.rb
|
109
|
-
- test/dummy31/config/environments/production.rb
|
110
|
-
- test/dummy31/config/environments/test.rb
|
111
|
-
- test/dummy31/config/initializers/backtrace_silencers.rb
|
112
|
-
- test/dummy31/config/initializers/inflections.rb
|
113
|
-
- test/dummy31/config/initializers/mime_types.rb
|
114
|
-
- test/dummy31/config/initializers/secret_token.rb
|
115
|
-
- test/dummy31/config/initializers/session_store.rb
|
116
|
-
- test/dummy31/config/initializers/wrap_parameters.rb
|
117
|
-
- test/dummy31/config/routes.rb
|
118
|
-
- test/dummy31/db/migrate/20110809134019_create_users.rb
|
119
|
-
- test/dummy31/db/schema.rb
|
120
|
-
- test/dummy31/db/seeds.rb
|
121
70
|
homepage: http://github.com/apneadiving/Google-Maps-for-Rails
|
122
71
|
licenses: []
|
123
72
|
|
@@ -147,60 +96,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
96
|
requirements: []
|
148
97
|
|
149
98
|
rubyforge_project:
|
150
|
-
rubygems_version: 1.8.
|
99
|
+
rubygems_version: 1.8.6
|
151
100
|
signing_key:
|
152
101
|
specification_version: 3
|
153
102
|
summary: Enables easy display of items (taken from a Rails 3 model) on a Google Maps (JS API V3), OpenLayers, Mapquest and Bing. Geocoding + Directions included.
|
154
|
-
test_files:
|
155
|
-
|
156
|
-
- test/dummy/app/controllers/users_controller.rb
|
157
|
-
- test/dummy/app/helpers/application_helper.rb
|
158
|
-
- test/dummy/app/helpers/users_helper.rb
|
159
|
-
- test/dummy/app/models/user.rb
|
160
|
-
- test/dummy/config/application.rb
|
161
|
-
- test/dummy/config/boot.rb
|
162
|
-
- test/dummy/config/environment.rb
|
163
|
-
- test/dummy/config/environments/development.rb
|
164
|
-
- test/dummy/config/environments/production.rb
|
165
|
-
- test/dummy/config/environments/test.rb
|
166
|
-
- test/dummy/config/initializers/backtrace_silencers.rb
|
167
|
-
- test/dummy/config/initializers/inflections.rb
|
168
|
-
- test/dummy/config/initializers/mime_types.rb
|
169
|
-
- test/dummy/config/initializers/secret_token.rb
|
170
|
-
- test/dummy/config/initializers/session_store.rb
|
171
|
-
- test/dummy/config/routes.rb
|
172
|
-
- test/dummy/db/migrate/20110306182914_create_users.rb
|
173
|
-
- test/dummy/db/migrate/20110430081624_add_addresses_to_users.rb
|
174
|
-
- test/dummy/db/migrate/20110430083824_remove_address_from_users.rb
|
175
|
-
- test/dummy/db/schema.rb
|
176
|
-
- test/dummy/db/seeds.rb
|
177
|
-
- test/dummy/spec/base/base_spec.rb
|
178
|
-
- test/dummy/spec/helpers/gmaps4rails_helper_spec.rb
|
179
|
-
- test/dummy/spec/javascripts/support/jasmine_config.rb
|
180
|
-
- test/dummy/spec/javascripts/support/jasmine_runner.rb
|
181
|
-
- test/dummy/spec/models/user_spec.rb
|
182
|
-
- test/dummy/spec/requests/users_spec.rb
|
183
|
-
- test/dummy/spec/spec_helper.rb
|
184
|
-
- test/dummy/spec/support/factories.rb
|
185
|
-
- test/dummy/spec/support/matchers.rb
|
186
|
-
- test/dummy31/app/controllers/application_controller.rb
|
187
|
-
- test/dummy31/app/controllers/users_controller.rb
|
188
|
-
- test/dummy31/app/helpers/application_helper.rb
|
189
|
-
- test/dummy31/app/helpers/users_helper.rb
|
190
|
-
- test/dummy31/app/models/user.rb
|
191
|
-
- test/dummy31/config/application.rb
|
192
|
-
- test/dummy31/config/boot.rb
|
193
|
-
- test/dummy31/config/environment.rb
|
194
|
-
- test/dummy31/config/environments/development.rb
|
195
|
-
- test/dummy31/config/environments/production.rb
|
196
|
-
- test/dummy31/config/environments/test.rb
|
197
|
-
- test/dummy31/config/initializers/backtrace_silencers.rb
|
198
|
-
- test/dummy31/config/initializers/inflections.rb
|
199
|
-
- test/dummy31/config/initializers/mime_types.rb
|
200
|
-
- test/dummy31/config/initializers/secret_token.rb
|
201
|
-
- test/dummy31/config/initializers/session_store.rb
|
202
|
-
- test/dummy31/config/initializers/wrap_parameters.rb
|
203
|
-
- test/dummy31/config/routes.rb
|
204
|
-
- test/dummy31/db/migrate/20110809134019_create_users.rb
|
205
|
-
- test/dummy31/db/schema.rb
|
206
|
-
- test/dummy31/db/seeds.rb
|
103
|
+
test_files: []
|
104
|
+
|
@@ -1,60 +0,0 @@
|
|
1
|
-
class UsersController < ApplicationController
|
2
|
-
|
3
|
-
respond_to :html, :json, :gmaps4rails
|
4
|
-
|
5
|
-
def index
|
6
|
-
@users = User.all
|
7
|
-
@json = User.all.to_gmaps4rails do |user|
|
8
|
-
"\"id\": #{user.id}"
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
def show
|
13
|
-
@user = User.find(params[:id])
|
14
|
-
end
|
15
|
-
|
16
|
-
def new
|
17
|
-
@user = User.new
|
18
|
-
end
|
19
|
-
|
20
|
-
def renderer
|
21
|
-
@users = User.all
|
22
|
-
respond_with @users
|
23
|
-
end
|
24
|
-
|
25
|
-
def create
|
26
|
-
@user = User.new(params[:user])
|
27
|
-
if @user.save
|
28
|
-
redirect_to @user, :notice => "Successfully created user."
|
29
|
-
else
|
30
|
-
render :action => 'new'
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
def edit
|
35
|
-
@user = User.find(params[:id])
|
36
|
-
end
|
37
|
-
|
38
|
-
def update
|
39
|
-
@user = User.find(params[:id])
|
40
|
-
if @user.update_attributes(params[:user])
|
41
|
-
redirect_to @user, :notice => "Successfully updated user."
|
42
|
-
else
|
43
|
-
render :action => 'edit'
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
def destroy
|
48
|
-
@user = User.find(params[:id])
|
49
|
-
@user.destroy
|
50
|
-
redirect_to users_url, :notice => "Successfully destroyed user."
|
51
|
-
end
|
52
|
-
|
53
|
-
def test_list
|
54
|
-
@json = User.all.to_gmaps4rails
|
55
|
-
end
|
56
|
-
|
57
|
-
def ajax_map
|
58
|
-
end
|
59
|
-
|
60
|
-
end
|
@@ -1,38 +0,0 @@
|
|
1
|
-
class User < ActiveRecord::Base
|
2
|
-
|
3
|
-
acts_as_gmappable
|
4
|
-
|
5
|
-
def gmaps4rails_address
|
6
|
-
sec_address
|
7
|
-
end
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
# def gmaps4rails_marker_picture
|
13
|
-
# {
|
14
|
-
# "width" => "32",
|
15
|
-
# "height" => "32",
|
16
|
-
# "marker_anchor" => [2, -30],
|
17
|
-
# "rich_marker" => "<div class='my-marker'>It works!<img height='30' width='30' src='http://farm4.static.flickr.com/3212/3012579547_097e27ced9_m.jpg'/></div>",
|
18
|
-
# "shadow_picture" => "https://secure.gravatar.com/avatar/808bec1c640143bd7091888d9edfb2f2.png",
|
19
|
-
# "shadow_height" => 40,
|
20
|
-
# "shadow_width" => 50,
|
21
|
-
# "shadow_anchor" => [10, -30]
|
22
|
-
# }
|
23
|
-
# end
|
24
|
-
|
25
|
-
#
|
26
|
-
# def gmaps4rails_title
|
27
|
-
# "Sweet Title"
|
28
|
-
# end
|
29
|
-
#
|
30
|
-
# def gmaps4rails_sidebar
|
31
|
-
# "<b>#{name}</b>"
|
32
|
-
# end
|
33
|
-
#
|
34
|
-
# def gmaps4rails_infowindow
|
35
|
-
# "<div style='width:500px; background-color:#b0c4de;'><b>je suis l'infowindow de <h1>#{name}</h1></b> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>"
|
36
|
-
# end
|
37
|
-
|
38
|
-
end
|
@@ -1,41 +0,0 @@
|
|
1
|
-
require File.expand_path('../boot', __FILE__)
|
2
|
-
|
3
|
-
require 'rails/all'
|
4
|
-
# If you have a Gemfile, require the gems listed there, including any gems
|
5
|
-
# you've limited to :test, :development, or :production.
|
6
|
-
Bundler.require(:default, Rails.env) if defined?(Bundler)
|
7
|
-
|
8
|
-
module Dummy
|
9
|
-
class Application < Rails::Application
|
10
|
-
# Settings in config/environments/* take precedence over those specified here.
|
11
|
-
# Application configuration should go into files in config/initializers
|
12
|
-
# -- all .rb files in that directory are automatically loaded.
|
13
|
-
|
14
|
-
# Custom directories with classes and modules you want to be autoloadable.
|
15
|
-
# config.autoload_paths += %W(#{config.root}/extras)
|
16
|
-
|
17
|
-
# Only load the plugins named here, in the order given (default is alphabetical).
|
18
|
-
# :all can be used as a placeholder for all plugins not explicitly named.
|
19
|
-
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
20
|
-
|
21
|
-
# Activate observers that should always be running.
|
22
|
-
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
23
|
-
|
24
|
-
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
25
|
-
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
26
|
-
# config.time_zone = 'Central Time (US & Canada)'
|
27
|
-
|
28
|
-
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
29
|
-
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
30
|
-
# config.i18n.default_locale = :de
|
31
|
-
|
32
|
-
# JavaScript files you want as :defaults (application.js is always included).
|
33
|
-
# config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
|
34
|
-
|
35
|
-
# Configure the default encoding used in templates for Ruby 1.9.
|
36
|
-
config.encoding = "utf-8"
|
37
|
-
# Configure sensitive parameters which will be filtered from the log file.
|
38
|
-
config.filter_parameters += [:password]
|
39
|
-
|
40
|
-
end
|
41
|
-
end
|
data/test/dummy/config/boot.rb
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
Dummy::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb
|
3
|
-
|
4
|
-
# In the development environment your application's code is reloaded on
|
5
|
-
# every request. This slows down response time but is perfect for development
|
6
|
-
# since you don't have to restart the webserver when you make code changes.
|
7
|
-
config.cache_classes = false
|
8
|
-
|
9
|
-
# Log error messages when you accidentally call methods on nil.
|
10
|
-
config.whiny_nils = true
|
11
|
-
|
12
|
-
# Show full error reports and disable caching
|
13
|
-
config.consider_all_requests_local = true
|
14
|
-
config.action_view.debug_rjs = true
|
15
|
-
config.action_controller.perform_caching = false
|
16
|
-
|
17
|
-
# Don't care if the mailer can't send
|
18
|
-
config.action_mailer.raise_delivery_errors = false
|
19
|
-
|
20
|
-
# Print deprecation notices to the Rails logger
|
21
|
-
config.active_support.deprecation = :log
|
22
|
-
|
23
|
-
# Only use best-standards-support built into browsers
|
24
|
-
config.action_dispatch.best_standards_support = :builtin
|
25
|
-
end
|
26
|
-
|
@@ -1,49 +0,0 @@
|
|
1
|
-
Dummy::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb
|
3
|
-
|
4
|
-
# The production environment is meant for finished, "live" apps.
|
5
|
-
# Code is not reloaded between requests
|
6
|
-
config.cache_classes = true
|
7
|
-
|
8
|
-
# Full error reports are disabled and caching is turned on
|
9
|
-
config.consider_all_requests_local = false
|
10
|
-
config.action_controller.perform_caching = true
|
11
|
-
|
12
|
-
# Specifies the header that your server uses for sending files
|
13
|
-
config.action_dispatch.x_sendfile_header = "X-Sendfile"
|
14
|
-
|
15
|
-
# For nginx:
|
16
|
-
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
|
17
|
-
|
18
|
-
# If you have no front-end server that supports something like X-Sendfile,
|
19
|
-
# just comment this out and Rails will serve the files
|
20
|
-
|
21
|
-
# See everything in the log (default is :info)
|
22
|
-
# config.log_level = :debug
|
23
|
-
|
24
|
-
# Use a different logger for distributed setups
|
25
|
-
# config.logger = SyslogLogger.new
|
26
|
-
|
27
|
-
# Use a different cache store in production
|
28
|
-
# config.cache_store = :mem_cache_store
|
29
|
-
|
30
|
-
# Disable Rails's static asset server
|
31
|
-
# In production, Apache or nginx will already do this
|
32
|
-
config.serve_static_assets = false
|
33
|
-
|
34
|
-
# Enable serving of images, stylesheets, and javascripts from an asset server
|
35
|
-
# config.action_controller.asset_host = "http://assets.example.com"
|
36
|
-
|
37
|
-
# Disable delivery errors, bad email addresses will be ignored
|
38
|
-
# config.action_mailer.raise_delivery_errors = false
|
39
|
-
|
40
|
-
# Enable threaded mode
|
41
|
-
# config.threadsafe!
|
42
|
-
|
43
|
-
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
44
|
-
# the I18n.default_locale when a translation can not be found)
|
45
|
-
config.i18n.fallbacks = true
|
46
|
-
|
47
|
-
# Send deprecation notices to registered listeners
|
48
|
-
config.active_support.deprecation = :notify
|
49
|
-
end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
Dummy::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb
|
3
|
-
|
4
|
-
# The test environment is used exclusively to run your application's
|
5
|
-
# test suite. You never need to work with it otherwise. Remember that
|
6
|
-
# your test database is "scratch space" for the test suite and is wiped
|
7
|
-
# and recreated between test runs. Don't rely on the data there!
|
8
|
-
config.cache_classes = true
|
9
|
-
|
10
|
-
# Log error messages when you accidentally call methods on nil.
|
11
|
-
config.whiny_nils = true
|
12
|
-
|
13
|
-
# Show full error reports and disable caching
|
14
|
-
config.consider_all_requests_local = true
|
15
|
-
config.action_controller.perform_caching = false
|
16
|
-
|
17
|
-
# Raise exceptions instead of rendering exception templates
|
18
|
-
config.action_dispatch.show_exceptions = false
|
19
|
-
|
20
|
-
# Disable request forgery protection in test environment
|
21
|
-
config.action_controller.allow_forgery_protection = false
|
22
|
-
|
23
|
-
# Tell Action Mailer not to deliver emails to the real world.
|
24
|
-
# The :test delivery method accumulates sent emails in the
|
25
|
-
# ActionMailer::Base.deliveries array.
|
26
|
-
config.action_mailer.delivery_method = :test
|
27
|
-
|
28
|
-
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
29
|
-
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
30
|
-
# like if you have constraints or database-specific column types
|
31
|
-
# config.active_record.schema_format = :sql
|
32
|
-
|
33
|
-
# Print deprecation notices to the stderr
|
34
|
-
config.active_support.deprecation = :stderr
|
35
|
-
end
|
@@ -1,7 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
-
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
-
|
6
|
-
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
-
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -1,10 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Add new inflection rules using the following format
|
4
|
-
# (all these examples are active by default):
|
5
|
-
# ActiveSupport::Inflector.inflections do |inflect|
|
6
|
-
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
-
# inflect.singular /^(ox)en/i, '\1'
|
8
|
-
# inflect.irregular 'person', 'people'
|
9
|
-
# inflect.uncountable %w( fish sheep )
|
10
|
-
# end
|
@@ -1,7 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Your secret key for verifying the integrity of signed cookies.
|
4
|
-
# If you change this key, all old signed cookies will become invalid!
|
5
|
-
# Make sure the secret is at least 30 characters and all random,
|
6
|
-
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
-
Dummy::Application.config.secret_token = '2a919a7d43f61da3daa4f6ea302b6c57ecc7ba76129e9ab4d8021e5588c927e6f52027e10bbc5a82cc0715002c5455e36461e8c785b47a5c2e1db59dcf53c6e1'
|
@@ -1,8 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
Dummy::Application.config.session_store :cookie_store, :key => '_dummy_session'
|
4
|
-
|
5
|
-
# Use the database for sessions instead of the cookie-based default,
|
6
|
-
# which shouldn't be used to store highly confidential information
|
7
|
-
# (create the session table with "rails generate session_migration")
|
8
|
-
# Dummy::Application.config.session_store :active_record_store
|
data/test/dummy/config/routes.rb
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
Dummy::Application.routes.draw do
|
2
|
-
match "users/test_list" => "users#test_list", :as => "test_list"
|
3
|
-
match "users/ajax_map" => "users#ajax_map", :as => "ajax_map"
|
4
|
-
match "users/renderer" => "users#renderer", :as => "renderer"
|
5
|
-
resources :users
|
6
|
-
root :to => "users#index"
|
7
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
class CreateUsers < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :users do |t|
|
4
|
-
t.string :name
|
5
|
-
t.string :address
|
6
|
-
t.text :description
|
7
|
-
t.string :picture
|
8
|
-
t.float :lat_test
|
9
|
-
t.float :long_test
|
10
|
-
t.float :latitude
|
11
|
-
t.float :longitude
|
12
|
-
t.boolean :gmaps
|
13
|
-
t.boolean :bool_test
|
14
|
-
t.timestamps
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
def self.down
|
19
|
-
drop_table :users
|
20
|
-
end
|
21
|
-
end
|
@@ -1,11 +0,0 @@
|
|
1
|
-
class AddAddressesToUsers < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
add_column :users, :norm_address, :string
|
4
|
-
add_column :users, :sec_address, :string
|
5
|
-
end
|
6
|
-
|
7
|
-
def self.down
|
8
|
-
remove_column :users, :sec_address
|
9
|
-
remove_column :users, :norm_address
|
10
|
-
end
|
11
|
-
end
|
data/test/dummy/db/schema.rb
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
# This file is auto-generated from the current state of the database. Instead
|
2
|
-
# of editing this file, please use the migrations feature of Active Record to
|
3
|
-
# incrementally modify your database, and then regenerate this schema definition.
|
4
|
-
#
|
5
|
-
# Note that this schema.rb definition is the authoritative source for your
|
6
|
-
# database schema. If you need to create the application database on another
|
7
|
-
# system, you should be using db:schema:load, not running all the migrations
|
8
|
-
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
9
|
-
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
10
|
-
#
|
11
|
-
# It's strongly recommended to check this file into your version control system.
|
12
|
-
|
13
|
-
ActiveRecord::Schema.define(:version => 20110729164234) do
|
14
|
-
|
15
|
-
create_table "user_profiles", :force => true do |t|
|
16
|
-
t.string "name"
|
17
|
-
end
|
18
|
-
|
19
|
-
create_table "users", :force => true do |t|
|
20
|
-
t.string "name"
|
21
|
-
t.text "description"
|
22
|
-
t.string "picture"
|
23
|
-
t.float "lat_test"
|
24
|
-
t.float "long_test"
|
25
|
-
t.float "latitude"
|
26
|
-
t.float "longitude"
|
27
|
-
t.boolean "gmaps"
|
28
|
-
t.boolean "bool_test"
|
29
|
-
t.datetime "created_at"
|
30
|
-
t.datetime "updated_at"
|
31
|
-
t.string "norm_address"
|
32
|
-
t.string "sec_address"
|
33
|
-
end
|
34
|
-
|
35
|
-
end
|
data/test/dummy/db/seeds.rb
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
# This file should contain all the record creation needed to seed the database with its default values.
|
2
|
-
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
|
3
|
-
#
|
4
|
-
# Examples:
|
5
|
-
#
|
6
|
-
# cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
|
7
|
-
# Mayor.create(:name => 'Daley', :city => cities.first)
|