Skip to content
This repository was archived by the owner on Jul 17, 2023. It is now read-only.

Commit d7c5b80

Browse files
committed
rails new -MOCT
0 parents  commit d7c5b80

Some content is hidden

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

59 files changed

+1019
-0
lines changed

.gitignore

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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 all logfiles and tempfiles.
11+
/log/*
12+
/tmp/*
13+
!/log/.keep
14+
!/tmp/.keep
15+
16+
# Ignore Byebug command history file.
17+
.byebug_history

.ruby-gemset

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fidor-api-demo

.ruby-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.3.3

Gemfile

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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.0.1'
11+
# Use Puma as the app server
12+
gem 'puma', '~> 3.0'
13+
# Use SCSS for stylesheets
14+
gem 'sass-rails', '~> 5.0'
15+
# Use Uglifier as compressor for JavaScript assets
16+
gem 'uglifier', '>= 1.3.0'
17+
# Use CoffeeScript for .coffee assets and views
18+
gem 'coffee-rails', '~> 4.2'
19+
# See https://github.com/rails/execjs#readme for more supported runtimes
20+
# gem 'therubyracer', platforms: :ruby
21+
22+
# Use jquery as the JavaScript library
23+
gem 'jquery-rails'
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 ActiveModel has_secure_password
29+
# gem 'bcrypt', '~> 3.1.7'
30+
31+
# Use Capistrano for deployment
32+
# gem 'capistrano-rails', group: :development
33+
34+
group :development, :test do
35+
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
36+
gem 'byebug', platform: :mri
37+
end
38+
39+
group :development do
40+
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
41+
gem 'web-console', '>= 3.3.0'
42+
gem 'listen', '~> 3.0.5'
43+
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
44+
gem 'spring'
45+
gem 'spring-watcher-listen', '~> 2.0.0'
46+
end
47+
48+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
49+
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

Gemfile.lock

+172
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
actioncable (5.0.1)
5+
actionpack (= 5.0.1)
6+
nio4r (~> 1.2)
7+
websocket-driver (~> 0.6.1)
8+
actionmailer (5.0.1)
9+
actionpack (= 5.0.1)
10+
actionview (= 5.0.1)
11+
activejob (= 5.0.1)
12+
mail (~> 2.5, >= 2.5.4)
13+
rails-dom-testing (~> 2.0)
14+
actionpack (5.0.1)
15+
actionview (= 5.0.1)
16+
activesupport (= 5.0.1)
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.1)
22+
activesupport (= 5.0.1)
23+
builder (~> 3.1)
24+
erubis (~> 2.7.0)
25+
rails-dom-testing (~> 2.0)
26+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
27+
activejob (5.0.1)
28+
activesupport (= 5.0.1)
29+
globalid (>= 0.3.6)
30+
activemodel (5.0.1)
31+
activesupport (= 5.0.1)
32+
activerecord (5.0.1)
33+
activemodel (= 5.0.1)
34+
activesupport (= 5.0.1)
35+
arel (~> 7.0)
36+
activesupport (5.0.1)
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+
builder (3.2.3)
43+
byebug (9.0.6)
44+
coffee-rails (4.2.1)
45+
coffee-script (>= 2.2.0)
46+
railties (>= 4.0.0, < 5.2.x)
47+
coffee-script (2.4.1)
48+
coffee-script-source
49+
execjs
50+
coffee-script-source (1.12.2)
51+
concurrent-ruby (1.0.4)
52+
debug_inspector (0.0.2)
53+
erubis (2.7.0)
54+
execjs (2.7.0)
55+
ffi (1.9.17)
56+
globalid (0.3.7)
57+
activesupport (>= 4.1.0)
58+
i18n (0.7.0)
59+
jbuilder (2.6.1)
60+
activesupport (>= 3.0.0, < 5.1)
61+
multi_json (~> 1.2)
62+
jquery-rails (4.2.2)
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.4)
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.1)
79+
multi_json (1.12.1)
80+
nio4r (1.2.1)
81+
nokogiri (1.7.0.1)
82+
mini_portile2 (~> 2.1.0)
83+
puma (3.7.0)
84+
rack (2.0.1)
85+
rack-test (0.6.3)
86+
rack (>= 1.0)
87+
rails (5.0.1)
88+
actioncable (= 5.0.1)
89+
actionmailer (= 5.0.1)
90+
actionpack (= 5.0.1)
91+
actionview (= 5.0.1)
92+
activejob (= 5.0.1)
93+
activemodel (= 5.0.1)
94+
activerecord (= 5.0.1)
95+
activesupport (= 5.0.1)
96+
bundler (>= 1.3.0, < 2.0)
97+
railties (= 5.0.1)
98+
sprockets-rails (>= 2.0.0)
99+
rails-dom-testing (2.0.2)
100+
activesupport (>= 4.2.0, < 6.0)
101+
nokogiri (~> 1.6)
102+
rails-html-sanitizer (1.0.3)
103+
loofah (~> 2.0)
104+
railties (5.0.1)
105+
actionpack (= 5.0.1)
106+
activesupport (= 5.0.1)
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.23)
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.1)
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+
thor (0.19.4)
134+
thread_safe (0.3.5)
135+
tilt (2.0.6)
136+
turbolinks (5.0.1)
137+
turbolinks-source (~> 5)
138+
turbolinks-source (5.0.0)
139+
tzinfo (1.2.2)
140+
thread_safe (~> 0.1)
141+
uglifier (3.0.4)
142+
execjs (>= 0.3.0, < 3)
143+
web-console (3.4.0)
144+
actionview (>= 5.0)
145+
activemodel (>= 5.0)
146+
debug_inspector
147+
railties (>= 5.0)
148+
websocket-driver (0.6.5)
149+
websocket-extensions (>= 0.1.0)
150+
websocket-extensions (0.1.2)
151+
152+
PLATFORMS
153+
ruby
154+
155+
DEPENDENCIES
156+
byebug
157+
coffee-rails (~> 4.2)
158+
jbuilder (~> 2.5)
159+
jquery-rails
160+
listen (~> 3.0.5)
161+
puma (~> 3.0)
162+
rails (~> 5.0.1)
163+
sass-rails (~> 5.0)
164+
spring
165+
spring-watcher-listen (~> 2.0.0)
166+
turbolinks (~> 5)
167+
tzinfo-data
168+
uglifier (>= 1.3.0)
169+
web-console (>= 3.3.0)
170+
171+
BUNDLED WITH
172+
1.13.7

README.md

+24
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

+6
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

+3
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

+16
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 .
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
* This is a manifest file that'll be compiled into application.css, which will include all the files
3+
* listed below.
4+
*
5+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6+
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7+
*
8+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
9+
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10+
* files in this directory. Styles in this file should be added after the last require_* statement.
11+
* It is generally better to create a new file per style scope.
12+
*
13+
*= require_tree .
14+
*= require_self
15+
*/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class ApplicationController < ActionController::Base
2+
protect_from_forgery with: :exception
3+
end

app/controllers/concerns/.keep

Whitespace-only changes.

app/helpers/application_helper.rb

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
module ApplicationHelper
2+
end

app/jobs/application_job.rb

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
class ApplicationJob < ActiveJob::Base
2+
end

app/models/concerns/.keep

Whitespace-only changes.
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>FidorApiDemo</title>
5+
<%= csrf_meta_tags %>
6+
7+
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
8+
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
9+
</head>
10+
11+
<body>
12+
<%= yield %>
13+
</body>
14+
</html>

bin/bundle

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env ruby
2+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3+
load Gem.bin_path('bundler', 'bundle')

bin/rails

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env ruby
2+
begin
3+
load File.expand_path('../spring', __FILE__)
4+
rescue LoadError => e
5+
raise unless e.message.include?('spring')
6+
end
7+
APP_PATH = File.expand_path('../config/application', __dir__)
8+
require_relative '../config/boot'
9+
require 'rails/commands'

bin/rake

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env ruby
2+
begin
3+
load File.expand_path('../spring', __FILE__)
4+
rescue LoadError => e
5+
raise unless e.message.include?('spring')
6+
end
7+
require_relative '../config/boot'
8+
require 'rake'
9+
Rake.application.run

bin/setup

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/usr/bin/env ruby
2+
require 'pathname'
3+
require 'fileutils'
4+
include FileUtils
5+
6+
# path to your application root.
7+
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
8+
9+
def system!(*args)
10+
system(*args) || abort("\n== Command #{args} failed ==")
11+
end
12+
13+
chdir APP_ROOT do
14+
# This script is a starting point to setup your application.
15+
# Add necessary setup steps to this file.
16+
17+
puts '== Installing dependencies =='
18+
system! 'gem install bundler --conservative'
19+
system('bundle check') || system!('bundle install')
20+
21+
# puts "\n== Copying sample files =="
22+
# unless File.exist?('config/database.yml')
23+
# cp 'config/database.yml.sample', 'config/database.yml'
24+
# end
25+
26+
puts "\n== Preparing database =="
27+
system! 'bin/rails db:setup'
28+
29+
puts "\n== Removing old logs and tempfiles =="
30+
system! 'bin/rails log:clear tmp:clear'
31+
32+
puts "\n== Restarting application server =="
33+
system! 'bin/rails restart'
34+
end

0 commit comments

Comments
 (0)