Skip to content

Commit 7897478

Browse files
committed
Take 1 converting from Sinatra to Rails
0 parents  commit 7897478

Some content is hidden

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

83 files changed

+1867
-0
lines changed

.env.example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Rename this file .env.local
2+
# Add account settings and API keys here specific to the install machine.
3+
DATABASE_HOST=localhost
4+
DATABASE_NAME_PREFIX=ld4l
5+
DATABASE_RAILS_USER=CHANGEME
6+
DATABASE_RAILS_USER_PW=CHANGEME

.gitignore

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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 vendor/cache
11+
/vendor/cache
12+
/vendor/bundle
13+
14+
# Ignore the default SQLite database.
15+
/db/*.sqlite3
16+
/db/*.sqlite3-journal
17+
18+
# Ignore all logfiles and tempfiles.
19+
/log/*
20+
/tmp/*
21+
!/log/.keep
22+
!/tmp/.keep
23+
24+
# Ignore Byebug command history file.
25+
.byebug_history
26+
27+
# Ignore local environmental variables
28+
.env
29+
.env.*
30+
!.env.example
31+
32+
# Ignore all logfiles and tempfiles.
33+
/log/*
34+
/tmp/*
35+
!/log/.keep
36+
!/tmp/.keep
37+
rails.log
38+
39+
# ignore OS generated files
40+
.DS_Store
41+
.DS_Store?
42+
._*
43+
44+
# Ignore developer environment and IDE files
45+
.ruby-gemset
46+
.idea
47+
48+
# ignore debugging
49+
.byebug_history
50+
51+
# ignore local coverage
52+
coverage
53+
54+
# ignore rubocop reports
55+
reports
56+
57+
# ignore persisting example file
58+
/spec/examples.txt

Gemfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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+
# Rails app default gems
9+
gem 'rails', '~> 5.0.2'
10+
gem 'sqlite3'
11+
gem 'puma', '~> 3.0'
12+
gem 'sass-rails', '~> 5.0'
13+
gem 'uglifier', '>= 1.3.0'
14+
gem 'coffee-rails', '~> 4.2'
15+
gem 'jquery-rails'
16+
gem 'turbolinks', '~> 5'
17+
gem 'jbuilder', '~> 2.5'
18+
19+
group :development, :test do
20+
gem 'byebug', platform: :mri
21+
end
22+
23+
group :development do
24+
gem 'web-console', '>= 3.3.0'
25+
gem 'listen', '~> 3.0.5'
26+
gem 'spring'
27+
gem 'spring-watcher-listen', '~> 2.0.0'
28+
end
29+
30+
# gems added beyond Rails app default gems
31+
gem 'dotenv-deployment'
32+
gem 'dotenv-rails', '2.1.0'

Gemfile.lock

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

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: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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, vendor/assets/javascripts,
5+
// or any plugin's 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 jquery_ujs
15+
//= require turbolinks
16+
//= require_tree .

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);

0 commit comments

Comments
 (0)