From 8e6c0eac3f2ecda1234e527677403a2ddad7e750 Mon Sep 17 00:00:00 2001 From: Nouran Mahmoud Date: Sat, 7 Jun 2014 00:44:53 +0000 Subject: [PATCH] Initial commit --- .bundle/config | 4 + .gitignore | 30 ++ .rbricks/config | 1 + Gemfile | 43 ++ Gemfile.lock | 147 ++++++ README.rdoc | 28 ++ Rakefile | 6 + app/assets/images/.keep | 0 app/assets/images/favicon.ico | Bin 0 -> 1406 bytes app/assets/images/icon.png | Bin 0 -> 796 bytes app/assets/javascripts/application.js | 17 + app/assets/javascripts/map/gmap.js | 157 +++++++ app/assets/stylesheets/application.css.scss | 7 + .../framework_and_overrides.css.scss | 427 ++++++++++++++++++ app/controllers/application_controller.rb | 5 + app/controllers/concerns/.keep | 0 app/controllers/pages_controller.rb | 6 + app/helpers/application_helper.rb | 7 + app/mailers/.keep | 0 app/models/.keep | 0 app/models/concerns/.keep | 0 app/views/layouts/_footer.html.erb | 17 + app/views/layouts/_messages.html.erb | 9 + app/views/layouts/_navigation.html.erb | 18 + app/views/layouts/_navigation_links.html.erb | 1 + app/views/layouts/application.html.erb | 42 ++ app/views/pages/home.html.erb | 6 + bin/bundle | 3 + bin/rails | 4 + bin/rake | 4 + config.ru | 4 + config/application.rb | 30 ++ config/boot.rb | 4 + config/database.yml | 25 + config/environment.rb | 5 + config/environments/development.rb | 41 ++ config/environments/production.rb | 95 ++++ config/environments/test.rb | 51 +++ config/initializers/backtrace_silencers.rb | 7 + config/initializers/date_format.rb | 27 ++ .../initializers/filter_parameter_logging.rb | 4 + config/initializers/friendly_id.rb | 88 ++++ config/initializers/inflections.rb | 16 + config/initializers/kaminari_config.rb | 10 + config/initializers/mime_types.rb | 5 + config/initializers/secret_token.rb | 25 + config/initializers/session_store.rb | 3 + config/initializers/wrap_parameters.rb | 14 + config/locales/en.yml | 23 + config/routes.rb | 6 + ...20131103142222_create_friendly_id_slugs.rb | 15 + db/schema.rb | 29 ++ db/seeds.rb | 0 lib/assets/.keep | 0 lib/tasks/.keep | 0 public/404.html | 58 +++ public/422.html | 58 +++ public/500.html | 57 +++ public/favicon.ico | 0 public/robots.txt | 5 + test/controllers/.keep | 0 test/fixtures/.keep | 0 test/helpers/.keep | 0 test/integration/.keep | 0 test/mailers/.keep | 0 test/models/.keep | 0 test/test_helper.rb | 15 + vendor/assets/javascripts/.keep | 0 vendor/assets/stylesheets/.keep | 0 69 files changed, 1709 insertions(+) create mode 100644 .bundle/config create mode 100644 .gitignore create mode 100644 .rbricks/config create mode 100644 Gemfile create mode 100644 Gemfile.lock create mode 100644 README.rdoc create mode 100644 Rakefile create mode 100644 app/assets/images/.keep create mode 100644 app/assets/images/favicon.ico create mode 100644 app/assets/images/icon.png create mode 100644 app/assets/javascripts/application.js create mode 100644 app/assets/javascripts/map/gmap.js create mode 100644 app/assets/stylesheets/application.css.scss create mode 100644 app/assets/stylesheets/framework_and_overrides.css.scss create mode 100644 app/controllers/application_controller.rb create mode 100644 app/controllers/concerns/.keep create mode 100644 app/controllers/pages_controller.rb create mode 100644 app/helpers/application_helper.rb create mode 100644 app/mailers/.keep create mode 100644 app/models/.keep create mode 100644 app/models/concerns/.keep create mode 100644 app/views/layouts/_footer.html.erb create mode 100644 app/views/layouts/_messages.html.erb create mode 100644 app/views/layouts/_navigation.html.erb create mode 100644 app/views/layouts/_navigation_links.html.erb create mode 100644 app/views/layouts/application.html.erb create mode 100644 app/views/pages/home.html.erb create mode 100755 bin/bundle create mode 100755 bin/rails create mode 100755 bin/rake create mode 100644 config.ru create mode 100644 config/application.rb create mode 100644 config/boot.rb create mode 100644 config/database.yml create mode 100644 config/environment.rb create mode 100644 config/environments/development.rb create mode 100644 config/environments/production.rb create mode 100644 config/environments/test.rb create mode 100644 config/initializers/backtrace_silencers.rb create mode 100644 config/initializers/date_format.rb create mode 100644 config/initializers/filter_parameter_logging.rb create mode 100644 config/initializers/friendly_id.rb create mode 100644 config/initializers/inflections.rb create mode 100644 config/initializers/kaminari_config.rb create mode 100644 config/initializers/mime_types.rb create mode 100644 config/initializers/secret_token.rb create mode 100644 config/initializers/session_store.rb create mode 100644 config/initializers/wrap_parameters.rb create mode 100644 config/locales/en.yml create mode 100644 config/routes.rb create mode 100644 db/migrate/20131103142222_create_friendly_id_slugs.rb create mode 100644 db/schema.rb create mode 100644 db/seeds.rb create mode 100644 lib/assets/.keep create mode 100644 lib/tasks/.keep create mode 100644 public/404.html create mode 100644 public/422.html create mode 100644 public/500.html create mode 100644 public/favicon.ico create mode 100644 public/robots.txt create mode 100644 test/controllers/.keep create mode 100644 test/fixtures/.keep create mode 100644 test/helpers/.keep create mode 100644 test/integration/.keep create mode 100644 test/mailers/.keep create mode 100644 test/models/.keep create mode 100644 test/test_helper.rb create mode 100644 vendor/assets/javascripts/.keep create mode 100644 vendor/assets/stylesheets/.keep diff --git a/.bundle/config b/.bundle/config new file mode 100644 index 0000000..9b53d6e --- /dev/null +++ b/.bundle/config @@ -0,0 +1,4 @@ +--- +BUNDLE_PATH: vendor/bundle +BUNDLE_WITHOUT: production +BUNDLE_DISABLE_SHARED_GEMS: '1' diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fdfcc8e --- /dev/null +++ b/.gitignore @@ -0,0 +1,30 @@ +# generated by RailsBricks + +# Don't ignore bundler config! +# Useful when git cloning an app and not wanting +# the gems to be installed globally. +# Can be uncommented if really necessary. +# /.bundle + +# Ignore the bundle directory itself. +/vendor/bundle + +# Ignore the default SQLite database. +/db/*.sqlite3 +/db/*.sqlite3-journal + +# Ignore all logfiles and tempfiles. +/log/*.log +/tmp + +# Ignore other unneeded files. +doc/ +*.swp +*~ +.project +.DS_Store +.idea + +# Ignore application configuration +/config/application.yml +.secret diff --git a/.rbricks/config b/.rbricks/config new file mode 100644 index 0000000..5d93d3e --- /dev/null +++ b/.rbricks/config @@ -0,0 +1 @@ +{"ruby_version":"2.0.0","gem_command":"gem","rake_command":"rake","ruby_version_manager":"rvm","app_path":"GoogleMapsTut","app_name":"GoogleMapsTut","set_production":true,"hosting":"heroku","domain_name":"gmapstut","authentication":"none","confirmable":false,"test_users":null,"set_emails":false,"email_sender":"","email_domain":"","smtp_server":"","smtp_port":0,"smtp_username":"","test_framework":"default","ui":"bootstrap3","git_local":true,"git_remote":true,"git_remote_url":"git@github.com:NouranMahmoud/GoogleMapTut.git","create":true,"smtp_password":"******"} \ No newline at end of file diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..bdae2ef --- /dev/null +++ b/Gemfile @@ -0,0 +1,43 @@ +source 'http://rubygems.org' +ruby '2.1.1' +gem 'rails', '4.0.4' +gem 'sass-rails', '~> 4.0.1' +gem 'uglifier', '~> 2.4.0' +gem 'coffee-rails', '~> 4.0.1' +gem 'jquery-rails', '~> 3.0.4' +gem 'turbolinks', '~> 2.1.0' +gem 'jbuilder', '~> 1.5.3' +gem 'bcrypt', '~> 3.1.2' + +group :doc do + gem 'sdoc', require: false +end + +# development gems +group :development, :test do + gem 'sqlite3', '~> 1.3.8' # dev & test database + gem 'figaro', '~> 0.7.0' # env variables +end + +# Paging +gem 'kaminari', '~> 0.15.0' + +# Slugs and friendly id's +gem 'friendly_id', '~> 5.0.2' + +# font-awesome +gem 'font-awesome-sass', '~> 4.0.2' + +# production gems for heroku +group :production do + gem 'pg' + gem 'rails_12factor' +end + + +# Bootstrap 3 +group :development, :test do + gem 'rails_layout', '~> 0.5.11' # Bootstrap 3 layout generator +end + +gem 'bootstrap-sass', '~> 3.0.3.0' diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..df22b1f --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,147 @@ +GEM + remote: http://rubygems.org/ + specs: + actionmailer (4.0.4) + actionpack (= 4.0.4) + mail (~> 2.5.4) + actionpack (4.0.4) + activesupport (= 4.0.4) + builder (~> 3.1.0) + erubis (~> 2.7.0) + rack (~> 1.5.2) + rack-test (~> 0.6.2) + activemodel (4.0.4) + activesupport (= 4.0.4) + builder (~> 3.1.0) + activerecord (4.0.4) + activemodel (= 4.0.4) + activerecord-deprecated_finders (~> 1.0.2) + activesupport (= 4.0.4) + arel (~> 4.0.0) + activerecord-deprecated_finders (1.0.3) + activesupport (4.0.4) + i18n (~> 0.6, >= 0.6.9) + minitest (~> 4.2) + multi_json (~> 1.3) + thread_safe (~> 0.1) + tzinfo (~> 0.3.37) + arel (4.0.2) + bcrypt (3.1.7) + bootstrap-sass (3.0.3.0) + sass (~> 3.2) + builder (3.1.4) + coffee-rails (4.0.1) + coffee-script (>= 2.2.0) + railties (>= 4.0.0, < 5.0) + coffee-script (2.2.0) + coffee-script-source + execjs + coffee-script-source (1.7.0) + erubis (2.7.0) + execjs (2.1.0) + figaro (0.7.0) + bundler (~> 1.0) + rails (>= 3, < 5) + font-awesome-sass (4.0.3.2) + sass (~> 3.2) + friendly_id (5.0.4) + activerecord (>= 4.0.0) + hike (1.2.3) + i18n (0.6.9) + jbuilder (1.5.3) + activesupport (>= 3.0.0) + multi_json (>= 1.2.0) + jquery-rails (3.0.4) + railties (>= 3.0, < 5.0) + thor (>= 0.14, < 2.0) + json (1.8.1) + kaminari (0.15.1) + actionpack (>= 3.0.0) + activesupport (>= 3.0.0) + mail (2.5.4) + mime-types (~> 1.16) + treetop (~> 1.4.8) + mime-types (1.25.1) + minitest (4.7.5) + multi_json (1.10.1) + pg (0.17.1) + polyglot (0.3.5) + rack (1.5.2) + rack-test (0.6.2) + rack (>= 1.0) + rails (4.0.4) + actionmailer (= 4.0.4) + actionpack (= 4.0.4) + activerecord (= 4.0.4) + activesupport (= 4.0.4) + bundler (>= 1.3.0, < 2.0) + railties (= 4.0.4) + sprockets-rails (~> 2.0.0) + rails_12factor (0.0.2) + rails_serve_static_assets + rails_stdout_logging + rails_layout (0.5.11) + rails_serve_static_assets (0.0.2) + rails_stdout_logging (0.0.3) + railties (4.0.4) + actionpack (= 4.0.4) + activesupport (= 4.0.4) + rake (>= 0.8.7) + thor (>= 0.18.1, < 2.0) + rake (10.3.2) + rdoc (4.1.1) + json (~> 1.4) + sass (3.2.19) + sass-rails (4.0.3) + railties (>= 4.0.0, < 5.0) + sass (~> 3.2.0) + sprockets (~> 2.8, <= 2.11.0) + sprockets-rails (~> 2.0) + sdoc (0.4.0) + json (~> 1.8) + rdoc (~> 4.0, < 5.0) + sprockets (2.11.0) + hike (~> 1.2) + multi_json (~> 1.0) + rack (~> 1.0) + tilt (~> 1.1, != 1.3.0) + sprockets-rails (2.0.1) + actionpack (>= 3.0) + activesupport (>= 3.0) + sprockets (~> 2.8) + sqlite3 (1.3.9) + thor (0.19.1) + thread_safe (0.3.4) + tilt (1.4.1) + treetop (1.4.15) + polyglot + polyglot (>= 0.3.1) + turbolinks (2.1.0) + coffee-rails + tzinfo (0.3.39) + uglifier (2.4.0) + execjs (>= 0.3.0) + json (>= 1.8.0) + +PLATFORMS + ruby + +DEPENDENCIES + bcrypt (~> 3.1.2) + bootstrap-sass (~> 3.0.3.0) + coffee-rails (~> 4.0.1) + figaro (~> 0.7.0) + font-awesome-sass (~> 4.0.2) + friendly_id (~> 5.0.2) + jbuilder (~> 1.5.3) + jquery-rails (~> 3.0.4) + kaminari (~> 0.15.0) + pg + rails (= 4.0.4) + rails_12factor + rails_layout (~> 0.5.11) + sass-rails (~> 4.0.1) + sdoc + sqlite3 (~> 1.3.8) + turbolinks (~> 2.1.0) + uglifier (~> 2.4.0) diff --git a/README.rdoc b/README.rdoc new file mode 100644 index 0000000..dd4e97e --- /dev/null +++ b/README.rdoc @@ -0,0 +1,28 @@ +== README + +This README would normally document whatever steps are necessary to get the +application up and running. + +Things you may want to cover: + +* Ruby version + +* System dependencies + +* Configuration + +* Database creation + +* Database initialization + +* How to run the test suite + +* Services (job queues, cache servers, search engines, etc.) + +* Deployment instructions + +* ... + + +Please feel free to use a different markup language if you do not plan to run +rake doc:app. diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..90110c4 --- /dev/null +++ b/Rakefile @@ -0,0 +1,6 @@ +# Add your own tasks in files placed in lib/tasks ending in .rake, +# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. + +require File.expand_path('../config/application', __FILE__) + +GoogleMapsTut::Application.load_tasks diff --git a/app/assets/images/.keep b/app/assets/images/.keep new file mode 100644 index 0000000..e69de29 diff --git a/app/assets/images/favicon.ico b/app/assets/images/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..6e8c9168da017b24d8b4abd0115ae24965f4ecc9 GIT binary patch literal 1406 zcmeH^v5^8X3`Hf|(ylEBM8t#?axGj7H*`QsNDH(;3$#EBv_K2+C1&SlNy(V~JI~U$ zYE<5dBp#Yh-Yr*-{hqRyJzzac zYp5eg_?CNDv=~ZmUQcSJv#91V`eAL#g1u}wuScVXhKxU*{D1$b$7wMr9X@$PCVB!B C`4Bh& literal 0 HcmV?d00001 diff --git a/app/assets/images/icon.png b/app/assets/images/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..e17f787219f7b9a2f25447448310871435c2602c GIT binary patch literal 796 zcmV+%1LOROP)03ZNXvV(#E000SaNLh0L01FcU01FcV0GgZ_0007~ zNklo?LTQ9OfTbR2AE+30~qUttwnWk7vo{Zm;e(t5Wtv6wGa!Oc@QMRM44FwQH&`U z(g8<-oi1{KhGbek8T_XJBPzl>#?|<+uLx zT%+F{cxO&Kygi@`kl;U`X@`Fbve}p9z2-Z*I-mh0h6#D#oV4|1$0*30q$a5pE8*m0y40PVvc^+ zJ6pK{h4eds-EM#D^?JW1lgS;U0O^x4v8k$dp+?Vp_1e3tZ$J)*qfjgsB@p?1K5{yp z6#?=reKICCVr!^)F8DOv&NBVXb!J-LD3M5P`~7}Nbp>5Ob)VRXEwV5TAN}yDR=`21 z5@2cxtX6B8b}T{NO;{)tc1xwwo*>VvH(|YF_?pQx>mZLlWyi2qA(~g`N7bAjn&E-{156)=dtKG<|)j?$mg awzhpZPR$Cya9h{_0000 Basics +$navbar-default-color: #777777; +$navbar-default-bg: #f8f8f8; +$navbar-default-border: darken($navbar-default-bg, 7%); +// -> Links +$navbar-default-link-color: #777777; +$navbar-default-link-hover-color: #333333; +$navbar-default-link-hover-bg: $navbar-default-bg; +$navbar-default-link-active-color: #555555; +$navbar-default-link-active-bg: darken($navbar-default-bg, 7%); +$navbar-default-link-disabled-color: #cccccc; +$navbar-default-link-disabled-bg:$navbar-default-bg; +// -> Brand +$navbar-default-brand-color: $navbar-default-link-color; +$navbar-default-brand-hover-color: darken($navbar-default-brand-color, 10%); +$navbar-default-brand-hover-bg: $navbar-default-bg; +// -> Toggle +$navbar-default-toggle-hover-bg: #dddddd; +$navbar-default-toggle-icon-bar-bg: #cccccc; +$navbar-default-toggle-border-color: #dddddd; + +// Navbar: Inverted navbar +// -> Basics +$navbar-inverse-color: #eeeeee; +$navbar-inverse-bg: #222222; +$navbar-inverse-border: darken($navbar-inverse-bg, 7%); +// -> Links +$navbar-inverse-link-color: #eeeeee; +$navbar-inverse-link-hover-color: #ffffff; +$navbar-inverse-link-hover-bg: $navbar-inverse-bg; +$navbar-inverse-link-active-color: #ffffff; +$navbar-inverse-link-active-bg: darken($navbar-inverse-bg, 7%); +$navbar-inverse-link-disabled-color: #444444; +$navbar-inverse-link-disabled-bg:$navbar-inverse-bg; +// -> Brand +$navbar-inverse-brand-color: $navbar-inverse-link-color; +$navbar-inverse-brand-hover-color: #ffffff; +$navbar-inverse-brand-hover-bg: $navbar-inverse-bg; +// -> Toggle +$navbar-inverse-toggle-hover-bg: #333333; +$navbar-inverse-toggle-icon-bar-bg: #ffffff; +$navbar-inverse-toggle-border-color: #333333; + +// Nav: Default nav +// -> Common values +$nav-link-padding: 10px 15px; +$nav-link-hover-bg: #eeeeee; +$nav-disabled-link-color: #cccccc; +$nav-disabled-link-hover-color: #cccccc; +$nav-open-link-hover-color: #ffffff; +$nav-open-caret-border-color: #ffffff; +// -> Pills +$nav-pills-active-link-hover-color: #ffffff; +$nav-pills-active-link-hover-bg: $component-active-bg; +// -> Tabs +$nav-tabs-border-color: #dddddd; +$nav-tabs-link-hover-border-color: #eeeeee; +$nav-tabs-active-link-hover-color: #bbbbbb; +$nav-tabs-active-link-hover-bg: $body-bg; +$nav-tabs-active-link-hover-border-color: #dddddd; +$nav-tabs-justified-link-border-color: #dddddd; +$nav-tabs-justified-active-link-border-color: $body-bg; + +// Tables +// -> Default padding for s and s +$table-cell-padding: 8px; +// -> Default padding cells in .table-condensed +$table-condensed-cell-padding: 5px; +// -> Default background color used for all tables. +$table-bg: $body-bg; +// -> Background color used for .table-striped. +$table-bg-accent: #f9f9f9; +// -> Background color used for .table-hover. +$table-bg-hover: #f5f5f5; +// -> Border color for table and cell borders. +$table-border-color: #dddddd; + +// Forms +// -> Inputs +$input-color: $text-color; // Text color for s +$input-bg: #ffffff; // background color +$input-border: #cccccc; // border color +$input-border-radius: $border-radius-base; // border radius +$input-color-placeholder: #eeeeee; // Placeholder text color +// -> Input states +$input-border-focus: #66afe9; // Border color for inputs on focus +$input-bg-disabled: #dddddd; // background color +// -> Input sizes +$input-height-base: 38px; // Default .form-control height +$input-height-large: 46px; // Large .form-control height +$input-height-small: 28px; // Small .form-control height +// -> Legend +$legend-color: #aaaaaa; +$legend-border-color: #e5e5e5; +// -> Input groups +$input-group-addon-bg: #cccccc; // Background color for textual input addons +$input-group-addon-border-color: $input-border; // Border color for textual input addons + +// Dropdowns +// -> Dropdown menu +$dropdown-bg: #ffffff; // Dropdown menu background color +$dropdown-border: #373737; // Dropdown menu border color +$dropdown-fallback-border: #cccccc; // Dropdown menu border color for IE8 +$dropdown-caret-color: #dddddd; // Indicator arrow for showing an element has a dropdown +$dropdown-divider-bg: #e5e5e5; // Dropdown divider top border color +$dropdown-header-color: #dddddd; // Text color for headers within dropdown menus +// -> Dropdown items +$dropdown-link-color: $text-color; // Dropdown text color +$dropdown-link-hover-color: darken($dropdown-link-color,5%); // Hovered dropdown menu entry text color +$dropdown-link-hover-bg: #f5f5f5; // Hovered dropdown menu entry text color +$dropdown-link-active-color: $component-active-color; // Active dropdown menu entry text color +$dropdown-link-active-bg: $component-active-bg; // Active dropdown menu entry background color +$dropdown-link-disabled-color: #dddddd; // Disabled dropdown menu entry background color + +// Panels and wells +// -> Common panel styles +$panel-bg: #ffffff; +$panel-inner-border: #dddddd; // Border color for elements within panels +$panel-border-radius: $border-radius-base; +$panel-footer-bg: #f5f5f5; +// -> Contextual panel colors +// --> Default +$panel-default-text: #373737; +$panel-default-border: #dddddd; +$panel-default-heading-bg: #f5f5f5; +// --> Primary +$panel-primary-text: #ffffff; +$panel-primary-border: $brand-primary; +$panel-primary-heading-bg: $brand-primary; +// --> Success +$panel-success-text: $state-success-text; +$panel-success-border: $state-success-border; +$panel-success-heading-bg: $state-success-bg; +// --> Info +$panel-info-text: $state-info-text; +$panel-info-border: $state-info-border; +$panel-info-heading-bg: $state-info-bg; +// --> Warning +$panel-warning-text: $state-warning-text; +$panel-warning-border: $state-warning-border; +$panel-warning-heading-bg: $state-warning-bg; +// --> Danger +$panel-danger-text: $state-danger-text; +$panel-danger-border: $state-danger-border; +$panel-danger-heading-bg: $state-danger-bg; +// -> Wells +$well-bg: #f5f5f5; + +// Jumbotron +$jumbotron-padding: 30px; +$jumbotron-bg: #cccccc; +$jumbotron-font-size: ceil($font-size-base * 1.5); +$jumbotron-color: $text-color; +$jumbotron-heading-color: $headings-color; + +// Carousel +$carousel-text-shadow: 0px 1px 2px #373737; +$carousel-control-color: #ffffff; +$carousel-caption-color: #ffffff; +$carousel-indicator-border-color: #ffffff; +$carousel-indicator-active-bg: #ffffff; + +// Labels +$label-color: #ffffff; // Default label text color +$label-link-hover-color: #ffffff; // Default text color of a linked label +$label-default-bg: #cccccc; // Default label background color +$label-primary-bg: $brand-primary; // Primary label background color +$label-success-bg: $brand-success; // Success label background color +$label-info-bg: $brand-info; // Info label background color +$label-warning-bg: $brand-warning; // Warning label background color +$label-danger-bg: $brand-danger; // Danger label background color + +// Close button +$close-font-weight: bold; +$close-color: #000000; +$close-text-shadow: 0px 1px 0px #ffffff; + +// Type +$text-muted: #cccccc; // Text muted color +$abbr-border-color: #cccccc; // Abbreviations and acronyms border color +$headings-small-color: #cccccc; // Headings small color +$blockquote-small-color: #cccccc; // Blockquote small color +$blockquote-border-color: #eeeeee; // Blockquote border color +$page-header-border-color: #eeeeee; // Page header border color + +// Other +$hr-border: #cccccc; // Horizontal line color +$component-offset-horizontal: 180px; // Horizontal offset for forms and lists + +//*********************************************************** + +@import "bootstrap"; +@import "font-awesome"; + +//*********************************************************** +// TESTING CLASSES +.shigh{ + background-color: yellow; +} +.shigh2{ + background-color: red; +} +.shigh3{ + background-color: blue; +} +//*********************************************************** + +//*********************************************************** +// APPLICATION-WIDE +html,body{ + height: 100%; +} + +#wrap{ + min-height: 100%; + padding-bottom: 120px; +} + +img{ + @extend .img-responsive; +} +//*********************************************************** + +//*********************************************************** +// FLASH MESSAGES +.alert{ + margin-top: -4px; +} +//*********************************************************** + +//*********************************************************** +// NAVBAR +.navbar-brand { + font-size: inherit; +} +//*********************************************************** + +//*********************************************************** +// ERRORS +#error_explanation{ + color: $brand-danger; + ul{ + margin-left: 8px; + padding-left: 8px; + } + + h2{ + display:none; + } +} + +.error-text{ + color: $brand-danger; +} + +.field_with_errors{ + .form-control{ + border: 1px solid $brand-danger; + } + label{ + color: $brand-danger; + } +} +//*********************************************************** + +//*********************************************************** +// FOOTER +#footer{ + background-color: $navbar-inverse-bg; + color: $navbar-inverse-color; + height: 100px; + margin-top: -100px; + letter-spacing: 1px; + + .footer-first-row{ + padding-top: 20px; + } +} +//*********************************************************** + #map-container { height: 400px; border-radius: 16px 16px; border-color: #fff; border-style: solid; box-shadow: 2px 2px 10px #B1B1B1; border-width: 7px; } + + #map-canvas { height: 384px; width: 100%; } + + /* Bootstrap Css Map Fix*/ +#map-container #map-canvas img { + max-width: none; +} +/* Bootstrap Css Map Fix*/ +#map-container #map-canvas label { + width: auto; display:inline; +} \ No newline at end of file diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb new file mode 100644 index 0000000..d83690e --- /dev/null +++ b/app/controllers/application_controller.rb @@ -0,0 +1,5 @@ +class ApplicationController < ActionController::Base + # Prevent CSRF attacks by raising an exception. + # For APIs, you may want to use :null_session instead. + protect_from_forgery with: :exception +end diff --git a/app/controllers/concerns/.keep b/app/controllers/concerns/.keep new file mode 100644 index 0000000..e69de29 diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb new file mode 100644 index 0000000..5d02044 --- /dev/null +++ b/app/controllers/pages_controller.rb @@ -0,0 +1,6 @@ +class PagesController < ApplicationController + + def home + end + +end \ No newline at end of file diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb new file mode 100644 index 0000000..be7789e --- /dev/null +++ b/app/helpers/application_helper.rb @@ -0,0 +1,7 @@ +module ApplicationHelper + def title(value) + unless value.nil? + @title = "#{value} | GoogleMapsTut" + end + end +end diff --git a/app/mailers/.keep b/app/mailers/.keep new file mode 100644 index 0000000..e69de29 diff --git a/app/models/.keep b/app/models/.keep new file mode 100644 index 0000000..e69de29 diff --git a/app/models/concerns/.keep b/app/models/concerns/.keep new file mode 100644 index 0000000..e69de29 diff --git a/app/views/layouts/_footer.html.erb b/app/views/layouts/_footer.html.erb new file mode 100644 index 0000000..42469c5 --- /dev/null +++ b/app/views/layouts/_footer.html.erb @@ -0,0 +1,17 @@ + \ No newline at end of file diff --git a/app/views/layouts/_messages.html.erb b/app/views/layouts/_messages.html.erb new file mode 100644 index 0000000..05ea988 --- /dev/null +++ b/app/views/layouts/_messages.html.erb @@ -0,0 +1,9 @@ +<%# Rails flash messages styled for Bootstrap 3.0 %> +<% flash.each do |name, msg| %> + <% if msg.is_a?(String) %> +
"> + + <%= content_tag :div, msg, :id => "flash_#{name}" %> +
+ <% end %> +<% end %> diff --git a/app/views/layouts/_navigation.html.erb b/app/views/layouts/_navigation.html.erb new file mode 100644 index 0000000..20c4f42 --- /dev/null +++ b/app/views/layouts/_navigation.html.erb @@ -0,0 +1,18 @@ + diff --git a/app/views/layouts/_navigation_links.html.erb b/app/views/layouts/_navigation_links.html.erb new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/app/views/layouts/_navigation_links.html.erb @@ -0,0 +1 @@ + diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb new file mode 100644 index 0000000..ff1b26f --- /dev/null +++ b/app/views/layouts/application.html.erb @@ -0,0 +1,42 @@ + + + + + + <%= @title || "GoogleMapsTut" %> + <%= favicon_link_tag 'favicon.ico' %> + + <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %> + <%= javascript_include_tag "application", "data-turbolinks-track" => true %> + <%= csrf_meta_tags %> + + +
+
+ <%= render 'layouts/navigation' %> +
+ +
+ +
+
+ <%= render 'layouts/messages' %> +
+
+ +
+
+ <%= yield %> +
+
+ +
+
+ + <%= render 'layouts/footer' %> + + + diff --git a/app/views/pages/home.html.erb b/app/views/pages/home.html.erb new file mode 100644 index 0000000..37a7b46 --- /dev/null +++ b/app/views/pages/home.html.erb @@ -0,0 +1,6 @@ +<% title("Home Page") %> +

Google Maps Tut

+
+
+
+
\ No newline at end of file diff --git a/bin/bundle b/bin/bundle new file mode 100755 index 0000000..66e9889 --- /dev/null +++ b/bin/bundle @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) +load Gem.bin_path('bundler', 'bundle') diff --git a/bin/rails b/bin/rails new file mode 100755 index 0000000..728cd85 --- /dev/null +++ b/bin/rails @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby +APP_PATH = File.expand_path('../../config/application', __FILE__) +require_relative '../config/boot' +require 'rails/commands' diff --git a/bin/rake b/bin/rake new file mode 100755 index 0000000..1724048 --- /dev/null +++ b/bin/rake @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby +require_relative '../config/boot' +require 'rake' +Rake.application.run diff --git a/config.ru b/config.ru new file mode 100644 index 0000000..5bc2a61 --- /dev/null +++ b/config.ru @@ -0,0 +1,4 @@ +# This file is used by Rack-based servers to start the application. + +require ::File.expand_path('../config/environment', __FILE__) +run Rails.application diff --git a/config/application.rb b/config/application.rb new file mode 100644 index 0000000..2d46a9b --- /dev/null +++ b/config/application.rb @@ -0,0 +1,30 @@ +require File.expand_path('../boot', __FILE__) + +require 'rails/all' + +# Require the gems listed in Gemfile, including any gems +# you've limited to :test, :development, or :production. +Bundler.require(:default, Rails.env) + +module GoogleMapsTut + class Application < Rails::Application + # Settings in config/environments/* take precedence over those specified here. + # Application configuration should go into files in config/initializers + # -- all .rb files in that directory are automatically loaded. + + # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. + # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. + # config.time_zone = 'Central Time (US & Canada)' + + # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. + # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] + # config.i18n.default_locale = :de + + # turn off warnings triggered by friendly_id + I18n.enforce_available_locales = false + + # Test framework + # RAILSBRICKS_TEST_FRAMEWORK + + end +end diff --git a/config/boot.rb b/config/boot.rb new file mode 100644 index 0000000..3596736 --- /dev/null +++ b/config/boot.rb @@ -0,0 +1,4 @@ +# Set up gems listed in the Gemfile. +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) + +require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) diff --git a/config/database.yml b/config/database.yml new file mode 100644 index 0000000..51a4dd4 --- /dev/null +++ b/config/database.yml @@ -0,0 +1,25 @@ +# SQLite version 3.x +# gem install sqlite3 +# +# Ensure the SQLite 3 gem is defined in your Gemfile +# gem 'sqlite3' +development: + adapter: sqlite3 + database: db/development.sqlite3 + pool: 5 + timeout: 5000 + +# Warning: The database defined as "test" will be erased and +# re-generated from your development database when you run "rake". +# Do not set this db to the same as development or production. +test: + adapter: sqlite3 + database: db/test.sqlite3 + pool: 5 + timeout: 5000 + +production: + adapter: sqlite3 + database: db/production.sqlite3 + pool: 5 + timeout: 5000 diff --git a/config/environment.rb b/config/environment.rb new file mode 100644 index 0000000..e888d98 --- /dev/null +++ b/config/environment.rb @@ -0,0 +1,5 @@ +# Load the Rails application. +require File.expand_path('../application', __FILE__) + +# Initialize the Rails application. +GoogleMapsTut::Application.initialize! diff --git a/config/environments/development.rb b/config/environments/development.rb new file mode 100644 index 0000000..4b419e9 --- /dev/null +++ b/config/environments/development.rb @@ -0,0 +1,41 @@ +GoogleMapsTut::Application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # In the development environment your application's code is reloaded on + # every request. This slows down response time but is perfect for development + # since you don't have to restart the web server when you make code changes. + config.cache_classes = false + + # Do not eager load code on boot. + config.eager_load = false + + # Show full error reports and disable caching. + config.consider_all_requests_local = true + config.action_controller.perform_caching = false + + # Print deprecation notices to the Rails logger. + config.active_support.deprecation = :log + + # Raise an error on page load if there are pending migrations + config.active_record.migration_error = :page_load + + # Debug mode disables concatenation and preprocessing of assets. + # This option may cause significant delays in view rendering with a large + # number of complex assets. + config.assets.debug = true + + # Mailer + config.action_mailer.raise_delivery_errors = true + config.action_mailer.default_url_options = { :host => 'localhost:3000' } + config.action_mailer.delivery_method = :smtp + config.action_mailer.smtp_settings = { + address: ENV["SMTP_SERVER"], + openssl_verify_mode: OpenSSL::SSL::VERIFY_NONE, + port: ENV["SMTP_PORT"], + domain: ENV["MAILER_DOMAIN"], + authentication: "plain", + enable_starttls_auto: true, + user_name: ENV["SMTP_USER"], + password: ENV["SMTP_PWD"] + } +end diff --git a/config/environments/production.rb b/config/environments/production.rb new file mode 100644 index 0000000..5dde9b4 --- /dev/null +++ b/config/environments/production.rb @@ -0,0 +1,95 @@ +GoogleMapsTut::Application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # Code is not reloaded between requests. + config.cache_classes = true + + # Eager load code on boot. This eager loads most of Rails and + # your application in memory, allowing both thread web servers + # and those relying on copy on write to perform better. + # Rake tasks automatically ignore this option for performance. + config.eager_load = true + + # Full error reports are disabled and caching is turned on. + config.consider_all_requests_local = false + config.action_controller.perform_caching = true + + # Enable Rack::Cache to put a simple HTTP cache in front of your application + # Add `rack-cache` to your Gemfile before enabling this. + # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid. + # config.action_dispatch.rack_cache = true + + # Disable Rails's static asset server (Apache or nginx will already do this). + config.serve_static_assets = false + + # Compress JavaScripts and CSS. + config.assets.js_compressor = :uglifier + config.assets.css_compressor = :sass + + # Do not fallback to assets pipeline if a precompiled asset is missed. + config.assets.compile = false + + # Generate digests for assets URLs. + config.assets.digest = true + + # Version of your assets, change this if you want to expire all your assets. + config.assets.version = '1.0' + + # Specifies the header that your server uses for sending files. + # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache + # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx + + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. + # config.force_ssl = true + + # Set to :debug to see everything in the log. + config.log_level = :info + + # Prepend all log lines with the following tags. + # config.log_tags = [ :subdomain, :uuid ] + + # Use a different logger for distributed setups. + # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) + + # Use a different cache store in production. + # config.cache_store = :mem_cache_store + + # Enable serving of images, stylesheets, and JavaScripts from an asset server. + # config.action_controller.asset_host = "http://assets.example.com" + + # Precompile additional assets. + # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. + # config.assets.precompile += %w( search.js ) + + # Ignore bad email addresses and do not raise email delivery errors. + # Set this to true and configure the email server for immediate delivery to raise delivery errors. + # config.action_mailer.raise_delivery_errors = false + + # Enable locale fallbacks for I18n (makes lookups for any locale fall back to + # the I18n.default_locale when a translation can not be found). + config.i18n.fallbacks = true + + # Send deprecation notices to registered listeners. + config.active_support.deprecation = :notify + + # Disable automatic flushing of the log to improve performance. + # config.autoflush_log = false + + # Use default logging formatter so that PID and timestamp are not suppressed. + config.log_formatter = ::Logger::Formatter.new + + # Mailer + config.action_mailer.raise_delivery_errors = false + config.action_mailer.default_url_options = { :host => ENV["DOMAIN"] } + config.action_mailer.delivery_method = :smtp + config.action_mailer.smtp_settings = { + address: ENV["SMTP_SERVER"], + openssl_verify_mode: OpenSSL::SSL::VERIFY_NONE, + port: ENV["SMTP_PORT"], + domain: ENV["MAILER_DOMAIN"], + authentication: "plain", + enable_starttls_auto: true, + user_name: ENV["SMTP_USER"], + password: ENV["SMTP_PWD"] + } +end diff --git a/config/environments/test.rb b/config/environments/test.rb new file mode 100644 index 0000000..5a9e756 --- /dev/null +++ b/config/environments/test.rb @@ -0,0 +1,51 @@ +GoogleMapsTut::Application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # The test environment is used exclusively to run your application's + # test suite. You never need to work with it otherwise. Remember that + # your test database is "scratch space" for the test suite and is wiped + # and recreated between test runs. Don't rely on the data there! + config.cache_classes = true + + # Do not eager load code on boot. This avoids loading your whole application + # just for the purpose of running a single test. If you are using a tool that + # preloads Rails for running tests, you may have to set it to true. + config.eager_load = false + + # Configure static asset server for tests with Cache-Control for performance. + config.serve_static_assets = true + config.static_cache_control = "public, max-age=3600" + + # Show full error reports and disable caching. + config.consider_all_requests_local = true + config.action_controller.perform_caching = false + + # Raise exceptions instead of rendering exception templates. + config.action_dispatch.show_exceptions = false + + # Disable request forgery protection in test environment. + config.action_controller.allow_forgery_protection = false + + # Tell Action Mailer not to deliver emails to the real world. + # The :test delivery method accumulates sent emails in the + # ActionMailer::Base.deliveries array. + config.action_mailer.delivery_method = :test + + # Print deprecation notices to the stderr. + config.active_support.deprecation = :stderr + + # Mailer + config.action_mailer.raise_delivery_errors = true + config.action_mailer.default_url_options = { :host => 'localhost:3000' } + config.action_mailer.delivery_method = :smtp + config.action_mailer.smtp_settings = { + address: ENV["SMTP_SERVER"], + openssl_verify_mode: OpenSSL::SSL::VERIFY_NONE, + port: ENV["SMTP_PORT"], + domain: ENV["MAILER_DOMAIN"], + authentication: "plain", + enable_starttls_auto: true, + user_name: ENV["SMTP_USER"], + password: ENV["SMTP_PWD"] + } +end diff --git a/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb new file mode 100644 index 0000000..59385cd --- /dev/null +++ b/config/initializers/backtrace_silencers.rb @@ -0,0 +1,7 @@ +# Be sure to restart your server when you modify this file. + +# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. +# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } + +# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. +# Rails.backtrace_cleaner.remove_silencers! diff --git a/config/initializers/date_format.rb b/config/initializers/date_format.rb new file mode 100644 index 0000000..fd9af84 --- /dev/null +++ b/config/initializers/date_format.rb @@ -0,0 +1,27 @@ +# Date +# ---------------------------- +#Date::DATE_FORMATS[:default] = "%Y-%m-%d" # 2013-11-03 +Date::DATE_FORMATS[:default] = "%B %e, %Y" # November 3, 2013 +#Date::DATE_FORMATS[:default] = "%e %b %Y" # 3 Nov 2013 +#Date::DATE_FORMATS[:default] = "%Y%m%d" # 20131103 +#Date::DATE_FORMATS[:default] = "%e %b" # 3 Nov +#Date::DATE_FORMATS[:default] = "" # custom + +# DateTime +# ---------------------------- +#DateTime::DATE_FORMATS[:default] = "%Y-%m-%d" # 2013-11-03 14:22:18 +DateTime::DATE_FORMATS[:default] = "%B %e, %Y" # November 3, 2013 14:22 +#DateTime::DATE_FORMATS[:default] = "%e %b %Y" # Sun, 3 Nov 2013 14:22:18 -0700 +#DateTime::DATE_FORMATS[:default] = "%Y%m%d" # 20131103142218 +#DateTime::DATE_FORMATS[:default] = "%e %b" # 3 Nov 14:22 +#DateTime::DATE_FORMATS[:default] = "" # custom + +# Time +# ---------------------------- +#Time::DATE_FORMATS[:default] = "%Y-%m-%d %H:%M:%S" # 2013-11-03 14:22:18 +#Time::DATE_FORMATS[:default] = "%B %d, %Y %H:%M" # November 3, 2013 14:22 +#Time::DATE_FORMATS[:default] = "%a, %d %b %Y %H:%M:%S %z" # Sun, 3 Nov 2013 14:22:18 -0700 +#Time::DATE_FORMATS[:default] = "%d %b %H:%M" # 3 Nov 14:22 +#Time::DATE_FORMATS[:default] = "%Y%m%d%H%M%S" # 20131103142218 +Time::DATE_FORMATS[:default] = "%H:%M" # 14:22 +#Time::DATE_FORMATS[:default] = "" # custom \ No newline at end of file diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb new file mode 100644 index 0000000..4a994e1 --- /dev/null +++ b/config/initializers/filter_parameter_logging.rb @@ -0,0 +1,4 @@ +# Be sure to restart your server when you modify this file. + +# Configure sensitive parameters which will be filtered from the log file. +Rails.application.config.filter_parameters += [:password] diff --git a/config/initializers/friendly_id.rb b/config/initializers/friendly_id.rb new file mode 100644 index 0000000..1463d34 --- /dev/null +++ b/config/initializers/friendly_id.rb @@ -0,0 +1,88 @@ +# FriendlyId Global Configuration +# +# Use this to set up shared configuration options for your entire application. +# Any of the configuration options shown here can also be applied to single +# models by passing arguments to the `friendly_id` class method or defining +# methods in your model. +# +# To learn more, check out the guide: +# +# http://norman.github.io/friendly_id/file.Guide.html + +FriendlyId.defaults do |config| + # ## Reserved Words + # + # Some words could conflict with Rails's routes when used as slugs, or are + # undesirable to allow as slugs. Edit this list as needed for your app. + config.use :reserved + + config.reserved_words = %w(new edit index session login logout users admin + stylesheets assets javascripts images) + + # ## Friendly Finders + # + # Uncomment this to use friendly finders in all models. By default, if + # you wish to find a record by its friendly id, you must do: + # + # MyModel.friendly.find('foo') + # + # If you uncomment this, you can do: + # + # MyModel.find('foo') + # + # This is significantly more convenient but may not be appropriate for + # all applications, so you must explicity opt-in to this behavior. You can + # always also configure it on a per-model basis if you prefer. + # + # Something else to consider is that using the :finders addon boosts + # performance because it will avoid Rails-internal code that makes runtime + # calls to `Module.extend`. + # + # config.use :finders + # + # ## Slugs + # + # Most applications will use the :slugged module everywhere. If you wish + # to do so, uncomment the following line. + # + # config.use :slugged + # + # By default, FriendlyId's :slugged addon expects the slug column to be named + # 'slug', but you can change it if you wish. + # + # config.slug_column = 'slug' + # + # When FriendlyId can not generate a unique ID from your base method, it appends + # a UUID, separated by a single dash. You can configure the character used as the + # separator. If you're upgrading from FriendlyId 4, you may wish to replace this + # with two dashes. + # + # config.sequence_separator = '-' + # + # ## Tips and Tricks + # + # ### Controlling when slugs are generated + # + # As of FriendlyId 5.0, new slugs are generated only when the slug field is + # nil, but you if you're using a column as your base method can change this + # behavior by overriding the `should_generate_new_friendly_id` method that + # FriendlyId adds to your model. The change below makes FriendlyId 5.0 behave + # more like 4.0. + # + # config.use Module.new { + # def should_generate_new_friendly_id? + # slug.blank? || _changed? + # end + # } + # + # FriendlyId uses Rails's `parameterize` method to generate slugs, but for + # languages that don't use the Roman alphabet, that's not usually suffient. Here + # we use the Babosa library to transliterate Russian Cyrillic slugs to ASCII. If + # you use this, don't forget to add "babosa" to your Gemfile. + # + # config.use Module.new { + # def normalize_friendly_id(text) + # text.to_slug.normalize! :transliterations => [:russian, :latin] + # end + # } +end diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb new file mode 100644 index 0000000..ac033bf --- /dev/null +++ b/config/initializers/inflections.rb @@ -0,0 +1,16 @@ +# Be sure to restart your server when you modify this file. + +# Add new inflection rules using the following format. Inflections +# are locale specific, and you may define rules for as many different +# locales as you wish. All of these examples are active by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.plural /^(ox)$/i, '\1en' +# inflect.singular /^(ox)en/i, '\1' +# inflect.irregular 'person', 'people' +# inflect.uncountable %w( fish sheep ) +# end + +# These inflection rules are supported but not enabled by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.acronym 'RESTful' +# end diff --git a/config/initializers/kaminari_config.rb b/config/initializers/kaminari_config.rb new file mode 100644 index 0000000..b1d87b0 --- /dev/null +++ b/config/initializers/kaminari_config.rb @@ -0,0 +1,10 @@ +Kaminari.configure do |config| + # config.default_per_page = 25 + # config.max_per_page = nil + # config.window = 4 + # config.outer_window = 0 + # config.left = 0 + # config.right = 0 + # config.page_method_name = :page + # config.param_name = :page +end diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb new file mode 100644 index 0000000..72aca7e --- /dev/null +++ b/config/initializers/mime_types.rb @@ -0,0 +1,5 @@ +# Be sure to restart your server when you modify this file. + +# Add new mime types for use in respond_to blocks: +# Mime::Type.register "text/richtext", :rtf +# Mime::Type.register_alias "text/html", :iphone diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb new file mode 100644 index 0000000..b75516c --- /dev/null +++ b/config/initializers/secret_token.rb @@ -0,0 +1,25 @@ +# Be sure to restart your server when you modify this file. + +# Your secret key is used for verifying the integrity of signed cookies. +# If you change this key, all old signed cookies will become invalid! + +# Make sure the secret is at least 30 characters and all random, +# no regular words or you'll be exposed to dictionary attacks. +# You can use `rake secret` to generate a secure secret key. + +# Make sure your secret_key_base is kept private +# if you're sharing your code publicly. +def secure_token + token_file = Rails.root.join('.secret') + if File.exist?(token_file) + # Use the existing token. + File.read(token_file).chomp + else + # Generate a new token and store it in token_file. + token = SecureRandom.hex(64) + File.write(token_file, token) + token + end +end + +GoogleMapsTut::Application.config.secret_key_base = secure_token diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb new file mode 100644 index 0000000..993f4ef --- /dev/null +++ b/config/initializers/session_store.rb @@ -0,0 +1,3 @@ +# Be sure to restart your server when you modify this file. + +GoogleMapsTut::Application.config.session_store :cookie_store, key: '_rbricksgen_session' diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb new file mode 100644 index 0000000..33725e9 --- /dev/null +++ b/config/initializers/wrap_parameters.rb @@ -0,0 +1,14 @@ +# Be sure to restart your server when you modify this file. + +# This file contains settings for ActionController::ParamsWrapper which +# is enabled by default. + +# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. +ActiveSupport.on_load(:action_controller) do + wrap_parameters format: [:json] if respond_to?(:wrap_parameters) +end + +# To enable root element in JSON for ActiveRecord objects. +# ActiveSupport.on_load(:active_record) do +# self.include_root_in_json = true +# end diff --git a/config/locales/en.yml b/config/locales/en.yml new file mode 100644 index 0000000..0653957 --- /dev/null +++ b/config/locales/en.yml @@ -0,0 +1,23 @@ +# Files in the config/locales directory are used for internationalization +# and are automatically loaded by Rails. If you want to use locales other +# than English, add the necessary files in this directory. +# +# To use the locales, use `I18n.t`: +# +# I18n.t 'hello' +# +# In views, this is aliased to just `t`: +# +# <%= t('hello') %> +# +# To use a different locale, set it with `I18n.locale`: +# +# I18n.locale = :es +# +# This would use the information in config/locales/es.yml. +# +# To learn more, please read the Rails Internationalization guide +# available at http://guides.rubyonrails.org/i18n.html. + +en: + hello: "Hello world" diff --git a/config/routes.rb b/config/routes.rb new file mode 100644 index 0000000..df3ddf7 --- /dev/null +++ b/config/routes.rb @@ -0,0 +1,6 @@ +GoogleMapsTut::Application.routes.draw do + + root "pages#home" + + get "/home", to: "pages#home", as: "home" +end diff --git a/db/migrate/20131103142222_create_friendly_id_slugs.rb b/db/migrate/20131103142222_create_friendly_id_slugs.rb new file mode 100644 index 0000000..770f626 --- /dev/null +++ b/db/migrate/20131103142222_create_friendly_id_slugs.rb @@ -0,0 +1,15 @@ +class CreateFriendlyIdSlugs < ActiveRecord::Migration + def change + create_table :friendly_id_slugs do |t| + t.string :slug, :null => false + t.integer :sluggable_id, :null => false + t.string :sluggable_type, :limit => 50 + t.string :scope + t.datetime :created_at + end + add_index :friendly_id_slugs, :sluggable_id + add_index :friendly_id_slugs, [:slug, :sluggable_type] + add_index :friendly_id_slugs, [:slug, :sluggable_type, :scope], :unique => true + add_index :friendly_id_slugs, :sluggable_type + end +end diff --git a/db/schema.rb b/db/schema.rb new file mode 100644 index 0000000..b0ab183 --- /dev/null +++ b/db/schema.rb @@ -0,0 +1,29 @@ +# encoding: UTF-8 +# This file is auto-generated from the current state of the database. Instead +# of editing this file, please use the migrations feature of Active Record to +# incrementally modify your database, and then regenerate this schema definition. +# +# Note that this schema.rb definition is the authoritative source for your +# database schema. If you need to create the application database on another +# system, you should be using db:schema:load, not running all the migrations +# from scratch. The latter is a flawed and unsustainable approach (the more migrations +# you'll amass, the slower it'll run and the greater likelihood for issues). +# +# It's strongly recommended that you check this file into your version control system. + +ActiveRecord::Schema.define(version: 20131103142222) do + + create_table "friendly_id_slugs", force: true do |t| + t.string "slug", null: false + t.integer "sluggable_id", null: false + t.string "sluggable_type", limit: 50 + t.string "scope" + t.datetime "created_at" + end + + add_index "friendly_id_slugs", ["slug", "sluggable_type", "scope"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope", unique: true + add_index "friendly_id_slugs", ["slug", "sluggable_type"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type" + add_index "friendly_id_slugs", ["sluggable_id"], name: "index_friendly_id_slugs_on_sluggable_id" + add_index "friendly_id_slugs", ["sluggable_type"], name: "index_friendly_id_slugs_on_sluggable_type" + +end diff --git a/db/seeds.rb b/db/seeds.rb new file mode 100644 index 0000000..e69de29 diff --git a/lib/assets/.keep b/lib/assets/.keep new file mode 100644 index 0000000..e69de29 diff --git a/lib/tasks/.keep b/lib/tasks/.keep new file mode 100644 index 0000000..e69de29 diff --git a/public/404.html b/public/404.html new file mode 100644 index 0000000..a0daa0c --- /dev/null +++ b/public/404.html @@ -0,0 +1,58 @@ + + + + The page you were looking for doesn't exist (404) + + + + + +
+

The page you were looking for doesn't exist.

+

You may have mistyped the address or the page may have moved.

+
+

If you are the application owner check the logs for more information.

+ + diff --git a/public/422.html b/public/422.html new file mode 100644 index 0000000..fbb4b84 --- /dev/null +++ b/public/422.html @@ -0,0 +1,58 @@ + + + + The change you wanted was rejected (422) + + + + + +
+

The change you wanted was rejected.

+

Maybe you tried to change something you didn't have access to.

+
+

If you are the application owner check the logs for more information.

+ + diff --git a/public/500.html b/public/500.html new file mode 100644 index 0000000..e9052d3 --- /dev/null +++ b/public/500.html @@ -0,0 +1,57 @@ + + + + We're sorry, but something went wrong (500) + + + + + +
+

We're sorry, but something went wrong.

+
+

If you are the application owner check the logs for more information.

+ + diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..e69de29 diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..1a3a5e4 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,5 @@ +# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file +# +# To ban all spiders from the entire site uncomment the next two lines: +# User-agent: * +# Disallow: / diff --git a/test/controllers/.keep b/test/controllers/.keep new file mode 100644 index 0000000..e69de29 diff --git a/test/fixtures/.keep b/test/fixtures/.keep new file mode 100644 index 0000000..e69de29 diff --git a/test/helpers/.keep b/test/helpers/.keep new file mode 100644 index 0000000..e69de29 diff --git a/test/integration/.keep b/test/integration/.keep new file mode 100644 index 0000000..e69de29 diff --git a/test/mailers/.keep b/test/mailers/.keep new file mode 100644 index 0000000..e69de29 diff --git a/test/models/.keep b/test/models/.keep new file mode 100644 index 0000000..e69de29 diff --git a/test/test_helper.rb b/test/test_helper.rb new file mode 100644 index 0000000..bc7e05d --- /dev/null +++ b/test/test_helper.rb @@ -0,0 +1,15 @@ +ENV["RAILS_ENV"] ||= "test" +require File.expand_path('../../config/environment', __FILE__) +require 'rails/test_help' + +class ActiveSupport::TestCase + ActiveRecord::Migration.check_pending! + + # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. + # + # Note: You'll currently still have to declare fixtures explicitly in integration tests + # -- they do not yet inherit this setting + fixtures :all + + # Add more helper methods to be used by all tests here... +end diff --git a/vendor/assets/javascripts/.keep b/vendor/assets/javascripts/.keep new file mode 100644 index 0000000..e69de29 diff --git a/vendor/assets/stylesheets/.keep b/vendor/assets/stylesheets/.keep new file mode 100644 index 0000000..e69de29