calagator 0.0.1.pre1 → 1.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (182) hide show
  1. checksums.yaml +4 -4
  2. data/{LICENSE.txt → MIT-LICENSE.txt} +0 -0
  3. data/README.md +4 -18
  4. data/Rakefile +6 -0
  5. data/app/assets/javascripts/calagator.js +1 -0
  6. data/app/assets/stylesheets/calagator/changes.scss +45 -0
  7. data/app/assets/stylesheets/calagator/errors.css +8 -0
  8. data/app/assets/stylesheets/calagator/forms.scss +148 -2
  9. data/app/assets/stylesheets/calagator/index.scss +21 -0
  10. data/app/assets/stylesheets/calagator/layout.scss +731 -0
  11. data/app/assets/stylesheets/calagator/mobile.scss +196 -0
  12. data/app/assets/stylesheets/calagator/{reset.css → reset.scss} +0 -0
  13. data/app/assets/stylesheets/calagator/typography.scss +225 -0
  14. data/app/assets/stylesheets/calagator/{common.scss → utils.scss} +0 -0
  15. data/app/assets/stylesheets/calagator/variables.scss +21 -0
  16. data/app/controllers/calagator/admin_controller.rb +1 -1
  17. data/app/controllers/calagator/application_controller.rb +3 -3
  18. data/app/controllers/calagator/events_controller.rb +3 -3
  19. data/app/controllers/calagator/site_controller.rb +1 -1
  20. data/app/controllers/calagator/sources_controller.rb +3 -3
  21. data/app/controllers/calagator/venues_controller.rb +4 -4
  22. data/app/controllers/calagator/versions_controller.rb +2 -2
  23. data/app/helpers/calagator/application_helper.rb +0 -3
  24. data/app/helpers/calagator/mapping_helper.rb +9 -8
  25. data/app/models/calagator/event.rb +2 -3
  26. data/app/models/calagator/event/ical_renderer.rb +4 -2
  27. data/app/models/calagator/event/saver.rb +2 -2
  28. data/app/models/calagator/event/search_engine/sql.rb +2 -1
  29. data/app/models/calagator/source.rb +0 -26
  30. data/app/models/calagator/source/importer.rb +1 -1
  31. data/app/models/calagator/source/parser/meetup.rb +2 -2
  32. data/app/models/calagator/venue.rb +0 -2
  33. data/app/models/calagator/venue/geocoder.rb +1 -1
  34. data/app/models/calagator/venue/search_engine/sql.rb +1 -1
  35. data/app/views/calagator/events/_subnav.html.erb +2 -2
  36. data/app/views/calagator/events/show.html.erb +2 -2
  37. data/app/views/calagator/site/_description.html.erb +6 -3
  38. data/app/views/calagator/site/_sidebar_menu.html.erb +13 -0
  39. data/app/views/calagator/site/index.html.erb +1 -0
  40. data/app/views/calagator/sources/index.html.erb +1 -1
  41. data/app/views/calagator/sources/show.html.erb +1 -1
  42. data/app/views/calagator/venues/_subnav.html.erb +1 -1
  43. data/app/views/calagator/venues/show.html.erb +1 -1
  44. data/app/views/layouts/calagator/_after_footer.html.erb +2 -0
  45. data/app/views/layouts/calagator/_content.html.erb +6 -0
  46. data/app/views/layouts/calagator/_footer.html.erb +8 -0
  47. data/app/views/layouts/calagator/_global_search.html.erb +11 -0
  48. data/app/views/layouts/calagator/_header.html.erb +20 -0
  49. data/app/views/layouts/calagator/application.html.erb +9 -64
  50. data/config/routes.rb +16 -16
  51. data/config/spring.rb +1 -0
  52. data/db/development +0 -0
  53. data/db/development.sqlite3 +0 -0
  54. data/db/migrate/20150407014752_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb +14 -0
  55. data/db/migrate/20150407014754_change_collation_for_tag_names.acts_as_taggable_on_engine.rb +9 -0
  56. data/db/schema.rb +2 -8
  57. data/db/seeds.rb +64 -8
  58. data/lib/calagator.rb +42 -2
  59. data/lib/calagator/duplicate_checking/duplicate_finder.rb +1 -1
  60. data/lib/calagator/duplicate_checking/duplicate_squasher.rb +1 -1
  61. data/lib/calagator/engine.rb +12 -22
  62. data/lib/calagator/tag_model_extensions.rb +1 -1
  63. data/lib/calagator/version.rb +1 -1
  64. data/lib/generators/calagator/install_generator.rb +17 -12
  65. data/lib/generators/calagator/templates/config/initializers/01_calagator.rb +89 -0
  66. data/lib/generators/calagator/templates/config/initializers/02_geokit.rb +106 -0
  67. data/lib/tasks/sunspot_reindex_calagator.rake +16 -3
  68. data/lib/tasks/update_counter_caches.rake +3 -3
  69. data/spec/controllers/calagator/events_controller_spec.rb +3 -3
  70. data/spec/controllers/calagator/sources_controller_spec.rb +3 -3
  71. data/spec/controllers/calagator/venues_controller_spec.rb +5 -5
  72. data/spec/dummy/Gemfile +35 -27
  73. data/spec/dummy/README.rdoc +15 -248
  74. data/spec/dummy/Rakefile +1 -2
  75. data/spec/dummy/app/assets/javascripts/application.js +5 -4
  76. data/spec/dummy/app/assets/stylesheets/application.css +6 -4
  77. data/spec/dummy/app/controllers/application_controller.rb +3 -1
  78. data/spec/dummy/app/views/layouts/application.html.erb +2 -2
  79. data/spec/dummy/bin/bundle +3 -0
  80. data/spec/dummy/bin/rails +4 -0
  81. data/spec/dummy/bin/rake +4 -0
  82. data/spec/dummy/bin/setup +29 -0
  83. data/spec/dummy/config.ru +2 -2
  84. data/spec/dummy/config/application.rb +5 -41
  85. data/spec/dummy/config/boot.rb +1 -4
  86. data/spec/dummy/config/database.yml +8 -8
  87. data/spec/dummy/config/environment.rb +3 -3
  88. data/spec/dummy/config/environments/development.rb +22 -18
  89. data/spec/dummy/config/environments/production.rb +46 -34
  90. data/spec/dummy/config/environments/test.rb +19 -14
  91. data/spec/dummy/config/initializers/01_calagator.rb +89 -0
  92. data/spec/dummy/config/initializers/02_geokit.rb +106 -0
  93. data/spec/dummy/config/initializers/assets.rb +11 -0
  94. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  95. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  96. data/spec/dummy/config/initializers/inflections.rb +6 -5
  97. data/spec/dummy/config/initializers/mime_types.rb +0 -1
  98. data/spec/dummy/config/initializers/session_store.rb +1 -6
  99. data/spec/dummy/config/initializers/wrap_parameters.rb +6 -6
  100. data/spec/dummy/config/locales/en.yml +20 -2
  101. data/spec/dummy/config/routes.rb +23 -25
  102. data/spec/dummy/config/secrets.yml +16 -77
  103. data/spec/dummy/config/sunspot.yml +23 -0
  104. data/spec/dummy/db/development.sqlite3 +0 -0
  105. data/spec/dummy/db/schema.rb +31 -30
  106. data/spec/dummy/db/seeds.rb +1 -0
  107. data/spec/dummy/log/development.log +257 -235
  108. data/spec/dummy/public/404.html +54 -13
  109. data/spec/dummy/public/422.html +54 -13
  110. data/spec/dummy/public/500.html +53 -12
  111. data/spec/dummy/public/robots.txt +2 -2
  112. data/spec/dummy/test/test_helper.rb +2 -5
  113. data/spec/factories.rb +0 -54
  114. data/spec/features/admin_auth_spec.rb +2 -2
  115. data/spec/features/admin_lock_event_spec.rb +1 -1
  116. data/spec/features/import_events_from_feed_spec.rb +1 -1
  117. data/spec/helpers/calagator/google_event_export_helper_spec.rb +8 -11
  118. data/spec/helpers/calagator/sources_helper_spec.rb +1 -2
  119. data/spec/helpers/calagator/tags_helper_spec.rb +1 -2
  120. data/spec/models/calagator/event_spec.rb +7 -7
  121. data/spec/models/calagator/source/parser_meetup_spec.rb +3 -3
  122. data/spec/models/calagator/source_spec.rb +0 -29
  123. data/spec/models/calagator/venue_spec.rb +8 -11
  124. data/spec/spec_helper.rb +3 -1
  125. data/spec/support/admin_authentication.rb +2 -0
  126. data/spec/support/assert_dom_equal.rb +26 -0
  127. data/spec/support/paper_trail.rb +7 -0
  128. data/spec/support/rspec-activemodel-mocks_patch.rb +9 -0
  129. metadata +200 -280
  130. data/app/assets/stylesheets/calagator.scss +0 -8
  131. data/app/assets/stylesheets/calagator/datepicker.scss +0 -177
  132. data/app/assets/stylesheets/calagator/theme.css +0 -0
  133. data/app/models/event/search_engine/base.rb +0 -0
  134. data/config/deploy/local.rb +0 -37
  135. data/config/deploy/lucca.rb +0 -33
  136. data/config/initializers/geokit.rb +0 -74
  137. data/config/initializers/search_engine.rb +0 -4
  138. data/config/initializers/set_default_url_host.rb +0 -5
  139. data/db/test.sqlite3 +0 -0
  140. data/lib/generators/calagator/templates/config/calagator.rb +0 -26
  141. data/lib/generators/calagator/templates/config/secrets.yml.sample +0 -83
  142. data/lib/secrets_reader.rb +0 -76
  143. data/spec/dummy/Gemfile.lock +0 -195
  144. data/spec/dummy/app/assets/images/rails.png +0 -0
  145. data/spec/dummy/config/initializers/calagator.rb +0 -26
  146. data/spec/dummy/config/initializers/secret_token.rb +0 -7
  147. data/spec/dummy/db/migrate/20150309023304_create_events.calagator.rb +0 -18
  148. data/spec/dummy/db/migrate/20150309023305_create_venues.calagator.rb +0 -18
  149. data/spec/dummy/db/migrate/20150309023306_create_sources.calagator.rb +0 -17
  150. data/spec/dummy/db/migrate/20150309023307_add_detailed_fields_to_venue.calagator.rb +0 -20
  151. data/spec/dummy/db/migrate/20150309023308_add_end_time_to_events.calagator.rb +0 -10
  152. data/spec/dummy/db/migrate/20150309023309_add_source_id_to_events.calagator.rb +0 -10
  153. data/spec/dummy/db/migrate/20150309023310_add_source_id_to_venues.calagator.rb +0 -11
  154. data/spec/dummy/db/migrate/20150309023311_add_duplicate_of_column_to_venues.calagator.rb +0 -10
  155. data/spec/dummy/db/migrate/20150309023312_add_duplicate_of_column_to_events.calagator.rb +0 -10
  156. data/spec/dummy/db/migrate/20150309023313_change_lat_long_type.calagator.rb +0 -13
  157. data/spec/dummy/db/migrate/20150309023314_add_source_reimport.calagator.rb +0 -10
  158. data/spec/dummy/db/migrate/20150309023315_change_end_time_to_duration.calagator.rb +0 -12
  159. data/spec/dummy/db/migrate/20150309023316_remove_format_type_from_source.calagator.rb +0 -10
  160. data/spec/dummy/db/migrate/20150309023317_create_updates.calagator.rb +0 -16
  161. data/spec/dummy/db/migrate/20150309023318_remove_next_update_from_source.calagator.rb +0 -10
  162. data/spec/dummy/db/migrate/20150309023319_change_duration_to_end_time.calagator.rb +0 -12
  163. data/spec/dummy/db/migrate/20150309023320_create_tags_and_taggings.calagator.rb +0 -29
  164. data/spec/dummy/db/migrate/20150309023321_create_versioned_events.calagator.rb +0 -26
  165. data/spec/dummy/db/migrate/20150309023322_create_versioned_venues.calagator.rb +0 -33
  166. data/spec/dummy/db/migrate/20150309023323_add_rrule_to_events.calagator.rb +0 -16
  167. data/spec/dummy/db/migrate/20150309023324_create_versions.calagator.rb +0 -19
  168. data/spec/dummy/db/migrate/20150309023325_add_closed_flag_to_venues.calagator.rb +0 -10
  169. data/spec/dummy/db/migrate/20150309023326_add_wifi_flag_to_venues.calagator.rb +0 -10
  170. data/spec/dummy/db/migrate/20150309023327_add_access_notes_to_venues.calagator.rb +0 -10
  171. data/spec/dummy/db/migrate/20150309023328_add_events_count_to_venues.calagator.rb +0 -9
  172. data/spec/dummy/db/migrate/20150309023329_add_venue_details_to_events.calagator.rb +0 -10
  173. data/spec/dummy/db/migrate/20150309023330_acts_as_taggable_on_migration.calagator.rb +0 -51
  174. data/spec/dummy/db/migrate/20150309023331_cleanup.calagator.rb +0 -15
  175. data/spec/dummy/db/migrate/20150309023332_specify_venues_latitude_and_longitude_precision.calagator.rb +0 -12
  176. data/spec/dummy/db/migrate/20150309023333_remove_updates.calagator.rb +0 -14
  177. data/spec/dummy/db/migrate/20150309023334_add_locked_status_to_events.calagator.rb +0 -6
  178. data/spec/dummy/db/test.sqlite3 +0 -0
  179. data/spec/dummy/doc/README_FOR_APP +0 -2
  180. data/spec/dummy/script/rails +0 -6
  181. data/spec/dummy/test/performance/browsing_test.rb +0 -12
  182. data/spec/lib/secrets_reader_spec.rb +0 -65
@@ -1,6 +1,3 @@
1
- require 'rubygems'
2
-
3
- # Set up gems listed in the Gemfile.
4
1
  ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
5
2
 
6
- require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
3
+ require 'bundler/setup' # Set up gems listed in the Gemfile.
@@ -3,23 +3,23 @@
3
3
  #
4
4
  # Ensure the SQLite 3 gem is defined in your Gemfile
5
5
  # gem 'sqlite3'
6
- development:
6
+ #
7
+ default: &default
7
8
  adapter: sqlite3
8
- database: db/development.sqlite3
9
9
  pool: 5
10
10
  timeout: 5000
11
11
 
12
+ development:
13
+ <<: *default
14
+ database: db/development.sqlite3
15
+
12
16
  # Warning: The database defined as "test" will be erased and
13
17
  # re-generated from your development database when you run "rake".
14
18
  # Do not set this db to the same as development or production.
15
19
  test:
16
- adapter: sqlite3
20
+ <<: *default
17
21
  database: db/test.sqlite3
18
- pool: 5
19
- timeout: 5000
20
22
 
21
23
  production:
22
- adapter: sqlite3
24
+ <<: *default
23
25
  database: db/production.sqlite3
24
- pool: 5
25
- timeout: 5000
@@ -1,5 +1,5 @@
1
- # Load the rails application
1
+ # Load the Rails application.
2
2
  require File.expand_path('../application', __FILE__)
3
3
 
4
- # Initialize the rails application
5
- Dummy::Application.initialize!
4
+ # Initialize the Rails application.
5
+ Rails.application.initialize!
@@ -1,37 +1,41 @@
1
- Dummy::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
4
  # In the development environment your application's code is reloaded on
5
5
  # every request. This slows down response time but is perfect for development
6
6
  # since you don't have to restart the web server when you make code changes.
7
7
  config.cache_classes = false
8
8
 
9
- # Log error messages when you accidentally call methods on nil.
10
- config.whiny_nils = true
9
+ # Do not eager load code on boot.
10
+ config.eager_load = false
11
11
 
12
- # Show full error reports and disable caching
12
+ # Show full error reports and disable caching.
13
13
  config.consider_all_requests_local = true
14
14
  config.action_controller.perform_caching = false
15
15
 
16
- # Don't care if the mailer can't send
16
+ # Don't care if the mailer can't send.
17
17
  config.action_mailer.raise_delivery_errors = false
18
18
 
19
- # Print deprecation notices to the Rails logger
19
+ # Print deprecation notices to the Rails logger.
20
20
  config.active_support.deprecation = :log
21
21
 
22
- # Only use best-standards-support built into browsers
23
- config.action_dispatch.best_standards_support = :builtin
22
+ # Raise an error on page load if there are pending migrations.
23
+ config.active_record.migration_error = :page_load
24
24
 
25
- # Raise exception on mass assignment protection for Active Record models
26
- config.active_record.mass_assignment_sanitizer = :strict
25
+ # Debug mode disables concatenation and preprocessing of assets.
26
+ # This option may cause significant delays in view rendering with a large
27
+ # number of complex assets.
28
+ config.assets.debug = true
27
29
 
28
- # Log the query plan for queries taking more than this (works
29
- # with SQLite, MySQL, and PostgreSQL)
30
- config.active_record.auto_explain_threshold_in_seconds = 0.5
30
+ # Asset digests allow you to set far-future HTTP expiration dates on all assets,
31
+ # yet still be able to expire them through the digest params.
32
+ config.assets.digest = true
31
33
 
32
- # Do not compress assets
33
- config.assets.compress = false
34
+ # Adds additional error checking when serving assets at runtime.
35
+ # Checks for improperly declared sprockets dependencies.
36
+ # Raises helpful error messages.
37
+ config.assets.raise_runtime_errors = true
34
38
 
35
- # Expands the lines which load the assets
36
- config.assets.debug = true
39
+ # Raises error for missing translations
40
+ # config.action_view.raise_on_missing_translations = true
37
41
  end
@@ -1,67 +1,79 @@
1
- Dummy::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
- # Code is not reloaded between requests
4
+ # Code is not reloaded between requests.
5
5
  config.cache_classes = true
6
6
 
7
- # Full error reports are disabled and caching is turned on
7
+ # Eager load code on boot. This eager loads most of Rails and
8
+ # your application in memory, allowing both threaded web servers
9
+ # and those relying on copy on write to perform better.
10
+ # Rake tasks automatically ignore this option for performance.
11
+ config.eager_load = true
12
+
13
+ # Full error reports are disabled and caching is turned on.
8
14
  config.consider_all_requests_local = false
9
15
  config.action_controller.perform_caching = true
10
16
 
11
- # Disable Rails's static asset server (Apache or nginx will already do this)
12
- config.serve_static_assets = false
17
+ # Enable Rack::Cache to put a simple HTTP cache in front of your application
18
+ # Add `rack-cache` to your Gemfile before enabling this.
19
+ # For large-scale production use, consider using a caching reverse proxy like
20
+ # NGINX, varnish or squid.
21
+ # config.action_dispatch.rack_cache = true
22
+
23
+ # Disable serving static files from the `/public` folder by default since
24
+ # Apache or NGINX already handles this.
25
+ config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
13
26
 
14
- # Compress JavaScripts and CSS
15
- config.assets.compress = true
27
+ # Compress JavaScripts and CSS.
28
+ config.assets.js_compressor = :uglifier
29
+ # config.assets.css_compressor = :sass
16
30
 
17
- # Don't fallback to assets pipeline if a precompiled asset is missed
31
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
18
32
  config.assets.compile = false
19
33
 
20
- # Generate digests for assets URLs
34
+ # Asset digests allow you to set far-future HTTP expiration dates on all assets,
35
+ # yet still be able to expire them through the digest params.
21
36
  config.assets.digest = true
22
37
 
23
- # Defaults to nil and saved in location specified by config.assets.prefix
24
- # config.assets.manifest = YOUR_PATH
38
+ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
25
39
 
26
- # Specifies the header that your server uses for sending files
27
- # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
28
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
40
+ # Specifies the header that your server uses for sending files.
41
+ # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
42
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
29
43
 
30
44
  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
31
45
  # config.force_ssl = true
32
46
 
33
- # See everything in the log (default is :info)
34
- # config.log_level = :debug
47
+ # Use the lowest log level to ensure availability of diagnostic information
48
+ # when problems arise.
49
+ config.log_level = :debug
35
50
 
36
- # Prepend all log lines with the following tags
51
+ # Prepend all log lines with the following tags.
37
52
  # config.log_tags = [ :subdomain, :uuid ]
38
53
 
39
- # Use a different logger for distributed setups
54
+ # Use a different logger for distributed setups.
40
55
  # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
41
56
 
42
- # Use a different cache store in production
57
+ # Use a different cache store in production.
43
58
  # config.cache_store = :mem_cache_store
44
59
 
45
- # Enable serving of images, stylesheets, and JavaScripts from an asset server
46
- # config.action_controller.asset_host = "http://assets.example.com"
47
-
48
- # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
49
- # config.assets.precompile += %w( search.js )
60
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
61
+ # config.action_controller.asset_host = 'http://assets.example.com'
50
62
 
51
- # Disable delivery errors, bad email addresses will be ignored
63
+ # Ignore bad email addresses and do not raise email delivery errors.
64
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
52
65
  # config.action_mailer.raise_delivery_errors = false
53
66
 
54
- # Enable threaded mode
55
- # config.threadsafe!
56
-
57
67
  # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
58
- # the I18n.default_locale when a translation can not be found)
68
+ # the I18n.default_locale when a translation cannot be found).
59
69
  config.i18n.fallbacks = true
60
70
 
61
- # Send deprecation notices to registered listeners
71
+ # Send deprecation notices to registered listeners.
62
72
  config.active_support.deprecation = :notify
63
73
 
64
- # Log the query plan for queries taking more than this (works
65
- # with SQLite, MySQL, and PostgreSQL)
66
- # config.active_record.auto_explain_threshold_in_seconds = 0.5
74
+ # Use default logging formatter so that PID and timestamp are not suppressed.
75
+ config.log_formatter = ::Logger::Formatter.new
76
+
77
+ # Do not dump schema after migrations.
78
+ config.active_record.dump_schema_after_migration = false
67
79
  end
@@ -1,5 +1,5 @@
1
- Dummy::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
4
  # The test environment is used exclusively to run your application's
5
5
  # test suite. You never need to work with it otherwise. Remember that
@@ -7,31 +7,36 @@ Dummy::Application.configure do
7
7
  # and recreated between test runs. Don't rely on the data there!
8
8
  config.cache_classes = true
9
9
 
10
- # Configure static asset server for tests with Cache-Control for performance
11
- config.serve_static_assets = true
12
- config.static_cache_control = "public, max-age=3600"
10
+ # Do not eager load code on boot. This avoids loading your whole application
11
+ # just for the purpose of running a single test. If you are using a tool that
12
+ # preloads Rails for running tests, you may have to set it to true.
13
+ config.eager_load = false
13
14
 
14
- # Log error messages when you accidentally call methods on nil
15
- config.whiny_nils = true
15
+ # Configure static file server for tests with Cache-Control for performance.
16
+ config.serve_static_files = true
17
+ config.static_cache_control = 'public, max-age=3600'
16
18
 
17
- # Show full error reports and disable caching
19
+ # Show full error reports and disable caching.
18
20
  config.consider_all_requests_local = true
19
21
  config.action_controller.perform_caching = false
20
22
 
21
- # Raise exceptions instead of rendering exception templates
23
+ # Raise exceptions instead of rendering exception templates.
22
24
  config.action_dispatch.show_exceptions = false
23
25
 
24
- # Disable request forgery protection in test environment
25
- config.action_controller.allow_forgery_protection = false
26
+ # Disable request forgery protection in test environment.
27
+ config.action_controller.allow_forgery_protection = false
26
28
 
27
29
  # Tell Action Mailer not to deliver emails to the real world.
28
30
  # The :test delivery method accumulates sent emails in the
29
31
  # ActionMailer::Base.deliveries array.
30
32
  config.action_mailer.delivery_method = :test
31
33
 
32
- # Raise exception on mass assignment protection for Active Record models
33
- config.active_record.mass_assignment_sanitizer = :strict
34
+ # Randomize the order test cases are executed.
35
+ config.active_support.test_order = :random
34
36
 
35
- # Print deprecation notices to the stderr
37
+ # Print deprecation notices to the stderr.
36
38
  config.active_support.deprecation = :stderr
39
+
40
+ # Raises error for missing translations
41
+ # config.action_view.raise_on_missing_translations = true
37
42
  end
@@ -0,0 +1,89 @@
1
+ Calagator.setup do |config|
2
+ # Site name
3
+ # config.title = 'Calagator'
4
+
5
+ # Site tagline
6
+ # config.tagline = 'A Tech Calendar'
7
+
8
+ # Site URL with trailing slash
9
+ # config.url = 'http://my-calagator.org/'
10
+
11
+ # Email address of administrator that will get exception notifications
12
+ # and requests for assistance from users:
13
+ # config.administrator_email = 'your@email.addr'
14
+
15
+ # Admin username and password to use when accessing /admin pages
16
+ # config.admin_username = 'admin'
17
+ # config.admin_password = 'kitties!'
18
+
19
+ # API key for Meetup.com, get your own from: http://www.meetup.com/meetup_api/key/
20
+ # config.meetup_api_key = '<your meetup API key>'
21
+
22
+ # Search engine to use for searching events.
23
+ # Values: :sql, :sunspot. Defaults to :sql.
24
+ # config.search_engine = :sql
25
+
26
+ # Set the iCalendar SEQUENCE, which should be increased each time an event
27
+ # is updated. If an admin needs to forcefully increment the SEQUENCE for all
28
+ # events, they can set this icalendar_sequence_offset value to something
29
+ # greater than 0.
30
+ # config.icalendar_sequence_offset = 0
31
+
32
+ # Configure a mapping provider
33
+ # Stamen's terrain tiles will be used by default.
34
+ # Map marker color
35
+ # Values: red, darkred, orange, green, darkgreen, blue, purple, darkpuple, cadetblue
36
+ # config.mapping_marker_color = 'green'
37
+
38
+ # A Google Maps API key is required to use Google's geocoding service
39
+ # as well as to display maps using their API.
40
+ # Get one at: https://developers.google.com/maps/documentation/javascript/tutorial#api_key
41
+ # config.mapping_google_maps_api_key = '<your google maps v3 API key>'
42
+
43
+ # The tile provider to use when rendering maps with Leaflet.
44
+ # One of: leaflet, stamen, mapbox, google
45
+ # config.mapping_provider = 'stamen'
46
+
47
+ # The tiles to use for the map, see the docs for individual Leaflet plugins.
48
+ # config.mapping_tiles = 'terrain'
49
+
50
+ # Other mapping examples:
51
+ #
52
+ # Stamen
53
+ # (available tiles: terrain, toner, watercolor)
54
+ # config.mapping_provider = 'stamen'
55
+ # config.mapping_tiles = 'watercolor'
56
+ #
57
+ # MapBox Streets (use a map from your own account)
58
+ # config.mapping_provider = 'mapbox'
59
+ # config.mapping_tiles = 'examples.map-9ijuk24y'
60
+ #
61
+ # Google Maps
62
+ # config.mapping_provider = 'google'
63
+ # config.mapping_tiles = 'ROADMAP'
64
+ #
65
+ # OpenStreetMap
66
+ # config.mapping_provider = 'leaflet'
67
+ # config.mapping_tiles = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'
68
+ #
69
+ # Esri
70
+ # (available tiles: Gray, Streets, Oceans, Topographic)
71
+ # config.mapping_provider = 'esri'
72
+ # config.mapping_tiles = 'Gray'
73
+
74
+ # Map to display on /venues page:
75
+ # config.venues_map_options = {
76
+ # # Zoom magnification level:
77
+ # zoom: 12,
78
+ # # Center of the map, in latitude and longitude.
79
+ # # If no center is specified, the map will zoom to fit all markers.
80
+ # center: [45.518493, -122.660737]
81
+ # }
82
+
83
+ # Patterns for detecting spam events and venues
84
+ # config.blacklist_patterns = [
85
+ # /\b(online|overseas).+(drugstore|pharmacy)\b/,
86
+ # /\bcialis\b/,
87
+ # ]
88
+
89
+ end
@@ -0,0 +1,106 @@
1
+ require 'geokit'
2
+
3
+ # This is the order in which the geocoders are called in a failover scenario
4
+ # If you only want to use a single geocoder, put a single symbol in the array.
5
+ #
6
+ # Be aware that there are Terms of Use restrictions on how you can use the
7
+ # various geocoders. Make sure you read up on relevant Terms of Use for each
8
+ # geocoder you are going to use.
9
+
10
+ Geokit::Geocoders::provider_order = [:google]
11
+
12
+ # These defaults are used in Geokit::Mappable.distance_to and in acts_as_mappable
13
+ Geokit::default_units = :miles
14
+ Geokit::default_formula = :sphere
15
+
16
+ # This is your Google Maps geocoder keys (all optional).
17
+ # See http://www.google.com/apis/maps/signup.html
18
+ # and http://www.google.com/apis/maps/documentation/#Geocoding_Examples
19
+ #
20
+ # Geokit::Geocoders::GoogleGeocoder.client_id = ''
21
+ # Geokit::Geocoders::GoogleGeocoder.cryptographic_key = ''
22
+ # Geokit::Geocoders::GoogleGeocoder.channel = ''
23
+
24
+ # You can also use the free API key instead of signed requests
25
+ # See https://developers.google.com/maps/documentation/geocoding/#api_key
26
+ # Geokit::Geocoders::GoogleGeocoder.api_key = ''
27
+ #
28
+ # CALAGATOR:
29
+ # We populate this with the API key set for Google Maps in 01_calagator.rb by default
30
+ Geokit::Geocoders::GoogleGeocoder.api_key = Calagator.mapping_google_maps_api_key
31
+
32
+ # You can also set multiple API KEYS for different domains that may be directed to this same application.
33
+ # The domain from which the current user is being directed will automatically be updated for Geokit via
34
+ # the GeocoderControl class, which gets it's begin filter mixed into the ActionController.
35
+ # You define these keys with a Hash as follows:
36
+ #
37
+ # Geokit::Geocoders::google = { 'rubyonrails.org' => 'RUBY_ON_RAILS_API_KEY', 'ruby-docs.org' => 'RUBY_DOCS_API_KEY' }
38
+
39
+ # This is your yahoo application key for the Yahoo Geocoder.
40
+ # See http://developer.yahoo.com/faq/index.html#appid
41
+ # and http://developer.yahoo.com/maps/rest/V1/geocode.html
42
+ #
43
+ # Geokit::Geocoders::YahooGeocoder.key = 'REPLACE_WITH_YOUR_YAHOO_KEY'
44
+ # Geokit::Geocoders::YahooGeocoder.secret = 'REPLACE_WITH_YOUR_YAHOO_SECRET'
45
+
46
+ # This is your username and password for geocoder.us.
47
+ # To use the free service, the value can be set to nil or false. For
48
+ # usage tied to an account, the value should be set to username:password.
49
+ # See http://geocoder.us
50
+ # and http://geocoder.us/user/signup
51
+ #
52
+ # Geokit::Geocoders::UsGeocoder.key = 'username:password'
53
+
54
+ # This is your authorization key for geocoder.ca.
55
+ # To use the free service, the value can be set to nil or false. For
56
+ # usage tied to an account, set the value to the key obtained from
57
+ # Geocoder.ca.
58
+ # See http://geocoder.ca
59
+ # and http://geocoder.ca/?register=1
60
+ #
61
+ # Geokit::Geocoders::CaGeocoder.key = 'KEY'
62
+
63
+ # This is your username key for geonames.
64
+ # To use this service either free or premium, you must register a key.
65
+ # See http://www.geonames.org
66
+ #
67
+ # Geokit::Geocoders::GeonamesGeocoder.key = 'KEY'
68
+
69
+ # Most other geocoders need either no setup or a key
70
+ # Geokit::Geocoders::BingGeocoder.key = ''
71
+ # Geokit::Geocoders::MapQuestGeocoder.key = ''
72
+ # Geokit::Geocoders::YandexGeocoder.key = ''
73
+ # Geokit::Geocoders::MapboxGeocoder.key = 'ACCESS_TOKEN'
74
+ # Geokit::Geocoders::OpencageGeocoder.key = 'some_api_key'
75
+
76
+ # Geonames has a free service and a premium service, each using a different URL
77
+ # GeonamesGeocoder.premium = true will use http://ws.geonames.net (premium)
78
+ # GeonamesGeocoder.premium = false will use http://api.geonames.org (free)
79
+ # Geokit::Geocoders::GeonamesGeocoder.premium = false
80
+
81
+ # The IP provider order. Valid symbols are :ip,:geo_plugin.
82
+ # As before, make sure you read up on relevant Terms of Use for each.
83
+ # Geokit::Geocoders::ip_provider_order = [:external,:geo_plugin,:ip]
84
+
85
+ # Disable HTTPS globally. This option can also be set on individual
86
+ # geocoder classes.
87
+ # Geokit::Geocoders::secure = false
88
+
89
+ # Control verification of the server certificate for geocoders using HTTPS
90
+ # Geokit::Geocoders::ssl_verify_mode = OpenSSL::SSL::VERIFY_(PEER/NONE)
91
+ #
92
+ # Setting this to VERIFY_NONE may be needed on systems that don't have
93
+ # a complete or up to date root certificate store. Only applies to
94
+ # the Net::HTTP adapter.
95
+
96
+ # This is the timeout value in seconds to be used for calls to the geocoder web
97
+ # services. For no timeout at all, comment out the setting. The timeout unit
98
+ # is in seconds.
99
+ Geokit::Geocoders::request_timeout = 3
100
+
101
+ # This setting can be used if web service calls must be routed through a proxy.
102
+ # These setting can be nil if not needed, otherwise, a valid URI must be
103
+ # filled in at a minimum. If the proxy requires authentication, the username
104
+ # and password can be provided as well.
105
+ #
106
+ # Geokit::Geocoders::proxy = 'https://user:password@host:port'