Skip to content

Commit c56ee34

Browse files
committed
086
0 parents  commit c56ee34

File tree

100 files changed

+1856
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+1856
-0
lines changed

.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
2+
#
3+
# If you find yourself ignoring temporary files generated by your text editor
4+
# or operating system, you probably want to add a global ignore instead:
5+
# git config --global core.excludesfile '~/.gitignore_global'
6+
7+
# Ignore bundler config.
8+
/.bundle
9+
10+
# Ignore the default SQLite database.
11+
/db/*.sqlite3
12+
/db/*.sqlite3-journal
13+
14+
# Ignore all logfiles and tempfiles.
15+
/log/*
16+
/tmp/*
17+
!/log/.keep
18+
!/tmp/.keep
19+
20+
/node_modules
21+
/yarn-error.log
22+
23+
.byebug_history

Gemfile

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
source 'https://rubygems.org'
2+
3+
git_source(:github) do |repo_name|
4+
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
5+
"https://github.com/#{repo_name}.git"
6+
end
7+
8+
9+
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
10+
gem 'rails', '~> 5.1.1'
11+
# Use sqlite3 as the database for Active Record
12+
gem 'sqlite3'
13+
# Use Puma as the app server
14+
gem 'puma', '~> 3.7'
15+
# Use SCSS for stylesheets
16+
gem 'sass-rails', '~> 5.0'
17+
# Use Uglifier as compressor for JavaScript assets
18+
gem 'uglifier', '>= 1.3.0'
19+
# See https://github.com/rails/execjs#readme for more supported runtimes
20+
# gem 'therubyracer', platforms: :ruby
21+
22+
# Use CoffeeScript for .coffee assets and views
23+
gem 'coffee-rails', '~> 4.2'
24+
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
25+
gem 'turbolinks', '~> 5'
26+
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
27+
gem 'jbuilder', '~> 2.5'
28+
# Use Redis adapter to run Action Cable in production
29+
# gem 'redis', '~> 3.0'
30+
# Use ActiveModel has_secure_password
31+
# gem 'bcrypt', '~> 3.1.7'
32+
33+
# Use Capistrano for deployment
34+
# gem 'capistrano-rails', group: :development
35+
36+
group :development, :test do
37+
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
38+
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
39+
# Adds support for Capybara system testing and selenium driver
40+
gem 'capybara', '~> 2.13'
41+
gem 'selenium-webdriver'
42+
end
43+
44+
group :development do
45+
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
46+
gem 'web-console', '>= 3.3.0'
47+
gem 'listen', '>= 3.0.5', '< 3.2'
48+
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
49+
gem 'spring'
50+
gem 'spring-watcher-listen', '~> 2.0.0'
51+
end
52+
53+
source 'https://rails-assets.org' do
54+
gem 'rails-assets-jquery'
55+
end
56+
57+
gem 'faker'

Gemfile.lock

Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
remote: https://rails-assets.org/
4+
specs:
5+
actioncable (5.1.1)
6+
actionpack (= 5.1.1)
7+
nio4r (~> 2.0)
8+
websocket-driver (~> 0.6.1)
9+
actionmailer (5.1.1)
10+
actionpack (= 5.1.1)
11+
actionview (= 5.1.1)
12+
activejob (= 5.1.1)
13+
mail (~> 2.5, >= 2.5.4)
14+
rails-dom-testing (~> 2.0)
15+
actionpack (5.1.1)
16+
actionview (= 5.1.1)
17+
activesupport (= 5.1.1)
18+
rack (~> 2.0)
19+
rack-test (~> 0.6.3)
20+
rails-dom-testing (~> 2.0)
21+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
22+
actionview (5.1.1)
23+
activesupport (= 5.1.1)
24+
builder (~> 3.1)
25+
erubi (~> 1.4)
26+
rails-dom-testing (~> 2.0)
27+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
28+
activejob (5.1.1)
29+
activesupport (= 5.1.1)
30+
globalid (>= 0.3.6)
31+
activemodel (5.1.1)
32+
activesupport (= 5.1.1)
33+
activerecord (5.1.1)
34+
activemodel (= 5.1.1)
35+
activesupport (= 5.1.1)
36+
arel (~> 8.0)
37+
activesupport (5.1.1)
38+
concurrent-ruby (~> 1.0, >= 1.0.2)
39+
i18n (~> 0.7)
40+
minitest (~> 5.1)
41+
tzinfo (~> 1.1)
42+
addressable (2.5.1)
43+
public_suffix (~> 2.0, >= 2.0.2)
44+
arel (8.0.0)
45+
bindex (0.5.0)
46+
builder (3.2.3)
47+
byebug (9.0.6)
48+
capybara (2.14.3)
49+
addressable
50+
mime-types (>= 1.16)
51+
nokogiri (>= 1.3.3)
52+
rack (>= 1.0.0)
53+
rack-test (>= 0.5.4)
54+
xpath (~> 2.0)
55+
childprocess (0.7.0)
56+
ffi (~> 1.0, >= 1.0.11)
57+
coffee-rails (4.2.2)
58+
coffee-script (>= 2.2.0)
59+
railties (>= 4.0.0)
60+
coffee-script (2.4.1)
61+
coffee-script-source
62+
execjs
63+
coffee-script-source (1.12.2)
64+
concurrent-ruby (1.0.5)
65+
erubi (1.6.0)
66+
execjs (2.7.0)
67+
faker (1.7.3)
68+
i18n (~> 0.5)
69+
ffi (1.9.18)
70+
globalid (0.4.0)
71+
activesupport (>= 4.2.0)
72+
i18n (0.8.4)
73+
jbuilder (2.7.0)
74+
activesupport (>= 4.2.0)
75+
multi_json (>= 1.2)
76+
listen (3.1.5)
77+
rb-fsevent (~> 0.9, >= 0.9.4)
78+
rb-inotify (~> 0.9, >= 0.9.7)
79+
ruby_dep (~> 1.2)
80+
loofah (2.0.3)
81+
nokogiri (>= 1.5.9)
82+
mail (2.6.6)
83+
mime-types (>= 1.16, < 4)
84+
method_source (0.8.2)
85+
mime-types (3.1)
86+
mime-types-data (~> 3.2015)
87+
mime-types-data (3.2016.0521)
88+
mini_portile2 (2.2.0)
89+
minitest (5.10.2)
90+
multi_json (1.12.1)
91+
nio4r (2.1.0)
92+
nokogiri (1.8.0)
93+
mini_portile2 (~> 2.2.0)
94+
public_suffix (2.0.5)
95+
puma (3.9.1)
96+
rack (2.0.3)
97+
rack-test (0.6.3)
98+
rack (>= 1.0)
99+
rails (5.1.1)
100+
actioncable (= 5.1.1)
101+
actionmailer (= 5.1.1)
102+
actionpack (= 5.1.1)
103+
actionview (= 5.1.1)
104+
activejob (= 5.1.1)
105+
activemodel (= 5.1.1)
106+
activerecord (= 5.1.1)
107+
activesupport (= 5.1.1)
108+
bundler (>= 1.3.0, < 2.0)
109+
railties (= 5.1.1)
110+
sprockets-rails (>= 2.0.0)
111+
rails-assets-jquery (3.2.1)
112+
rails-dom-testing (2.0.3)
113+
activesupport (>= 4.2.0)
114+
nokogiri (>= 1.6)
115+
rails-html-sanitizer (1.0.3)
116+
loofah (~> 2.0)
117+
railties (5.1.1)
118+
actionpack (= 5.1.1)
119+
activesupport (= 5.1.1)
120+
method_source
121+
rake (>= 0.8.7)
122+
thor (>= 0.18.1, < 2.0)
123+
rake (12.0.0)
124+
rb-fsevent (0.9.8)
125+
rb-inotify (0.9.10)
126+
ffi (>= 0.5.0, < 2)
127+
ruby_dep (1.5.0)
128+
rubyzip (1.2.1)
129+
sass (3.4.24)
130+
sass-rails (5.0.6)
131+
railties (>= 4.0.0, < 6)
132+
sass (~> 3.1)
133+
sprockets (>= 2.8, < 4.0)
134+
sprockets-rails (>= 2.0, < 4.0)
135+
tilt (>= 1.1, < 3)
136+
selenium-webdriver (3.4.3)
137+
childprocess (~> 0.5)
138+
rubyzip (~> 1.0)
139+
spring (2.0.2)
140+
activesupport (>= 4.2)
141+
spring-watcher-listen (2.0.1)
142+
listen (>= 2.7, < 4.0)
143+
spring (>= 1.2, < 3.0)
144+
sprockets (3.7.1)
145+
concurrent-ruby (~> 1.0)
146+
rack (> 1, < 3)
147+
sprockets-rails (3.2.0)
148+
actionpack (>= 4.0)
149+
activesupport (>= 4.0)
150+
sprockets (>= 3.0.0)
151+
sqlite3 (1.3.13)
152+
thor (0.19.4)
153+
thread_safe (0.3.6)
154+
tilt (2.0.7)
155+
turbolinks (5.0.1)
156+
turbolinks-source (~> 5)
157+
turbolinks-source (5.0.3)
158+
tzinfo (1.2.3)
159+
thread_safe (~> 0.1)
160+
uglifier (3.2.0)
161+
execjs (>= 0.3.0, < 3)
162+
web-console (3.5.1)
163+
actionview (>= 5.0)
164+
activemodel (>= 5.0)
165+
bindex (>= 0.4.0)
166+
railties (>= 5.0)
167+
websocket-driver (0.6.5)
168+
websocket-extensions (>= 0.1.0)
169+
websocket-extensions (0.1.2)
170+
xpath (2.1.0)
171+
nokogiri (~> 1.3)
172+
173+
PLATFORMS
174+
ruby
175+
176+
DEPENDENCIES
177+
byebug
178+
capybara (~> 2.13)
179+
coffee-rails (~> 4.2)
180+
faker
181+
jbuilder (~> 2.5)
182+
listen (>= 3.0.5, < 3.2)
183+
puma (~> 3.7)
184+
rails (~> 5.1.1)
185+
rails-assets-jquery!
186+
sass-rails (~> 5.0)
187+
selenium-webdriver
188+
spring
189+
spring-watcher-listen (~> 2.0.0)
190+
sqlite3
191+
turbolinks (~> 5)
192+
uglifier (>= 1.3.0)
193+
web-console (>= 3.3.0)
194+
195+
BUNDLED WITH
196+
1.15.1

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# README
2+
3+
This README would normally document whatever steps are necessary to get the
4+
application up and running.
5+
6+
Things you may want to cover:
7+
8+
* Ruby version
9+
10+
* System dependencies
11+
12+
* Configuration
13+
14+
* Database creation
15+
16+
* Database initialization
17+
18+
* How to run the test suite
19+
20+
* Services (job queues, cache servers, search engines, etc.)
21+
22+
* Deployment instructions
23+
24+
* ...

Rakefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Add your own tasks in files placed in lib/tasks ending in .rake,
2+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3+
4+
require_relative 'config/application'
5+
6+
Rails.application.load_tasks

app/assets/config/manifest.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
//= link_tree ../images
2+
//= link_directory ../javascripts .js
3+
//= link_directory ../stylesheets .css

app/assets/images/.keep

Whitespace-only changes.

app/assets/javascripts/application.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// This is a manifest file that'll be compiled into application.js, which will include all the files
2+
// listed below.
3+
//
4+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's
5+
// vendor/assets/javascripts directory can be referenced here using a relative path.
6+
//
7+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8+
// compiled file. JavaScript code in this file should be added after the last require_* statement.
9+
//
10+
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11+
// about supported directives.
12+
//
13+
//= require jquery
14+
//= require rails-ujs
15+
//= require turbolinks
16+
//= require_tree .
17+
18+
$(document).on('turbolinks:load', function(){
19+
if ($('#map').length > 0){
20+
// Google Maps Javascript API
21+
var google_map = $('meta[name=google_maps]').attr("content");
22+
$.getScript(`https://maps.googleapis.com/maps/api/js?key=${google_map}&callback=initMap`);
23+
}
24+
})

app/assets/javascripts/cable.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Action Cable provides the framework to deal with WebSockets in Rails.
2+
// You can generate new channels where WebSocket features live using the `rails generate channel` command.
3+
//
4+
//= require action_cable
5+
//= require_self
6+
//= require_tree ./channels
7+
8+
(function() {
9+
this.App || (this.App = {});
10+
11+
App.cable = ActionCable.createConsumer();
12+
13+
}).call(this);

app/assets/javascripts/channels/.keep

Whitespace-only changes.

app/assets/javascripts/stores.coffee

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
@initMap = ->
2+
center =
3+
lat: 0
4+
lng: 0
5+
6+
map = new (google.maps.Map) $('#map')[0],
7+
zoom: 2
8+
center: center
9+
10+
infowindow = new (google.maps.InfoWindow)
11+
12+
$.getJSON '/stores.json', (jsonData) ->
13+
$.each jsonData, (key, data) ->
14+
latLng = new (google.maps.LatLng)(data.lat, data.lng)
15+
marker = new (google.maps.Marker)
16+
position: latLng
17+
map: map
18+
title: data.title
19+
google.maps.event.addListener marker, 'click', ->
20+
infowindow.setOptions
21+
content: data.content
22+
maxWidth: 300
23+
infowindow.open map, marker

0 commit comments

Comments
 (0)