simple_form_markdown_editor 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +2 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +126 -0
- data/README.md +111 -0
- data/Rakefile +1 -0
- data/app/controllers/simple_form_markdown_editor/previews_controller.rb +21 -0
- data/config/routes.rb +7 -0
- data/lib/assets/javascripts/simple_form_markdown_editor/simple_form_markdown_editor_buttons.js.coffee +135 -0
- data/lib/assets/javascripts/simple_form_markdown_editor/simple_form_markdown_editor_help.js.coffee +100 -0
- data/lib/assets/javascripts/simple_form_markdown_editor/simple_form_markdown_editor_tabs.js.coffee +84 -0
- data/lib/assets/javascripts/simple_form_markdown_editor.js +3 -0
- data/lib/assets/stylesheets/simple_form_markdown_editor/simple_form_markdown_editor.css.scss +275 -0
- data/lib/assets/stylesheets/simple_form_markdown_editor.css +3 -0
- data/lib/config/locales/simple_form_markdown_editor.en.yml +96 -0
- data/lib/simple_form_markdown_editor/configuration.rb +26 -0
- data/lib/simple_form_markdown_editor/engine.rb +4 -0
- data/lib/simple_form_markdown_editor/renderer.rb +50 -0
- data/lib/simple_form_markdown_editor/simple_form_markdown_editor.rb +183 -0
- data/lib/simple_form_markdown_editor/version.rb +3 -0
- data/lib/simple_form_markdown_editor.rb +21 -0
- data/simple_form_markdown_editor.gemspec +30 -0
- data/test/dummy/.gitignore +13 -0
- data/test/dummy/Gemfile +25 -0
- data/test/dummy/Gemfile.lock +195 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/images/.keep +0 -0
- data/test/dummy/app/assets/javascripts/application.js +4 -0
- data/test/dummy/app/assets/javascripts/editor_tests.coffee +3 -0
- data/test/dummy/app/assets/stylesheets/application.css +5 -0
- data/test/dummy/app/assets/stylesheets/editor_tests.scss +32 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/controllers/concerns/.keep +0 -0
- data/test/dummy/app/controllers/editor_tests_controller.rb +5 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/helpers/editor_tests_helper.rb +2 -0
- data/test/dummy/app/mailers/.keep +0 -0
- data/test/dummy/app/models/.keep +0 -0
- data/test/dummy/app/models/concerns/.keep +0 -0
- data/test/dummy/app/models/editor_test.rb +4 -0
- data/test/dummy/app/views/editor_tests/new.html.slim +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +8 -0
- data/test/dummy/bin/rake +8 -0
- data/test/dummy/bin/setup +29 -0
- data/test/dummy/bin/spring +15 -0
- data/test/dummy/config/application.rb +31 -0
- data/test/dummy/config/boot.rb +3 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +38 -0
- data/test/dummy/config/environments/production.rb +76 -0
- data/test/dummy/config/environments/test.rb +42 -0
- data/test/dummy/config/initializers/assets.rb +11 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/simple_form_markdown_editor.rb +5 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +9 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +5 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/seeds.rb +7 -0
- data/test/dummy/lib/assets/.keep +0 -0
- data/test/dummy/lib/tasks/.keep +0 -0
- data/test/dummy/log/.keep +0 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/public/robots.txt +5 -0
- data/test/dummy/test/controllers/.keep +0 -0
- data/test/dummy/test/controllers/editor_tests_controller_test.rb +7 -0
- data/test/dummy/test/fixtures/.keep +0 -0
- data/test/dummy/test/fixtures/editor_tests.yml +7 -0
- data/test/dummy/test/helpers/.keep +0 -0
- data/test/dummy/test/integration/.keep +0 -0
- data/test/dummy/test/mailers/.keep +0 -0
- data/test/dummy/test/models/.keep +0 -0
- data/test/dummy/test/models/editor_test_test.rb +7 -0
- data/test/dummy/test/test_helper.rb +7 -0
- data/test/dummy/vendor/assets/javascripts/.keep +0 -0
- data/test/dummy/vendor/assets/stylesheets/.keep +0 -0
- metadata +297 -0
@@ -0,0 +1,13 @@
|
|
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
|
+
!/log/.keep
|
13
|
+
/tmp
|
data/test/dummy/Gemfile
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
|
4
|
+
gem 'rails', '4.2.0'
|
5
|
+
gem 'sass-rails', '~> 5.0'
|
6
|
+
gem 'uglifier', '>= 1.3.0'
|
7
|
+
gem 'coffee-rails', '~> 4.1.0'
|
8
|
+
|
9
|
+
gem 'jquery-rails'
|
10
|
+
gem 'turbolinks'
|
11
|
+
gem 'jbuilder', '~> 2.0'
|
12
|
+
gem 'sdoc', '~> 0.4.0', group: :doc
|
13
|
+
|
14
|
+
gem 'slim'
|
15
|
+
|
16
|
+
gem 'mongoid'
|
17
|
+
|
18
|
+
gem 'simple_form_markdown_editor'
|
19
|
+
|
20
|
+
group :development, :test do
|
21
|
+
gem 'byebug'
|
22
|
+
gem 'web-console', '~> 2.0'
|
23
|
+
gem 'spring'
|
24
|
+
end
|
25
|
+
|
@@ -0,0 +1,195 @@
|
|
1
|
+
GIT
|
2
|
+
remote: git@github.com:tomasc/simple_form_markdown_editor.git
|
3
|
+
revision: 7c77f1c7e20e370426cb996e9447f8bd52165d15
|
4
|
+
branch: master
|
5
|
+
specs:
|
6
|
+
simple_form_markdown_editor (0.0.1)
|
7
|
+
rails (>= 4.2)
|
8
|
+
redcarpet
|
9
|
+
responders (~> 2.0)
|
10
|
+
simple_form (>= 3.0.2)
|
11
|
+
|
12
|
+
GEM
|
13
|
+
remote: https://rubygems.org/
|
14
|
+
specs:
|
15
|
+
actionmailer (4.2.0)
|
16
|
+
actionpack (= 4.2.0)
|
17
|
+
actionview (= 4.2.0)
|
18
|
+
activejob (= 4.2.0)
|
19
|
+
mail (~> 2.5, >= 2.5.4)
|
20
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
21
|
+
actionpack (4.2.0)
|
22
|
+
actionview (= 4.2.0)
|
23
|
+
activesupport (= 4.2.0)
|
24
|
+
rack (~> 1.6.0)
|
25
|
+
rack-test (~> 0.6.2)
|
26
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
27
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.1)
|
28
|
+
actionview (4.2.0)
|
29
|
+
activesupport (= 4.2.0)
|
30
|
+
builder (~> 3.1)
|
31
|
+
erubis (~> 2.7.0)
|
32
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
33
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.1)
|
34
|
+
activejob (4.2.0)
|
35
|
+
activesupport (= 4.2.0)
|
36
|
+
globalid (>= 0.3.0)
|
37
|
+
activemodel (4.2.0)
|
38
|
+
activesupport (= 4.2.0)
|
39
|
+
builder (~> 3.1)
|
40
|
+
activerecord (4.2.0)
|
41
|
+
activemodel (= 4.2.0)
|
42
|
+
activesupport (= 4.2.0)
|
43
|
+
arel (~> 6.0)
|
44
|
+
activesupport (4.2.0)
|
45
|
+
i18n (~> 0.7)
|
46
|
+
json (~> 1.7, >= 1.7.7)
|
47
|
+
minitest (~> 5.1)
|
48
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
49
|
+
tzinfo (~> 1.1)
|
50
|
+
arel (6.0.0)
|
51
|
+
binding_of_caller (0.7.2)
|
52
|
+
debug_inspector (>= 0.0.1)
|
53
|
+
bson (2.3.0)
|
54
|
+
builder (3.2.2)
|
55
|
+
byebug (4.0.2)
|
56
|
+
columnize (= 0.9.0)
|
57
|
+
coffee-rails (4.1.0)
|
58
|
+
coffee-script (>= 2.2.0)
|
59
|
+
railties (>= 4.0.0, < 5.0)
|
60
|
+
coffee-script (2.3.0)
|
61
|
+
coffee-script-source
|
62
|
+
execjs
|
63
|
+
coffee-script-source (1.9.1)
|
64
|
+
columnize (0.9.0)
|
65
|
+
connection_pool (2.1.2)
|
66
|
+
debug_inspector (0.0.2)
|
67
|
+
erubis (2.7.0)
|
68
|
+
execjs (2.4.0)
|
69
|
+
globalid (0.3.3)
|
70
|
+
activesupport (>= 4.1.0)
|
71
|
+
hike (1.2.3)
|
72
|
+
i18n (0.7.0)
|
73
|
+
jbuilder (2.2.11)
|
74
|
+
activesupport (>= 3.0.0, < 5)
|
75
|
+
multi_json (~> 1.2)
|
76
|
+
jquery-rails (4.0.3)
|
77
|
+
rails-dom-testing (~> 1.0)
|
78
|
+
railties (>= 4.2.0)
|
79
|
+
thor (>= 0.14, < 2.0)
|
80
|
+
json (1.8.2)
|
81
|
+
loofah (2.0.1)
|
82
|
+
nokogiri (>= 1.5.9)
|
83
|
+
mail (2.6.3)
|
84
|
+
mime-types (>= 1.16, < 3)
|
85
|
+
mime-types (2.4.3)
|
86
|
+
mini_portile (0.6.2)
|
87
|
+
minitest (5.5.1)
|
88
|
+
mongoid (4.0.2)
|
89
|
+
activemodel (~> 4.0)
|
90
|
+
moped (~> 2.0.0)
|
91
|
+
origin (~> 2.1)
|
92
|
+
tzinfo (>= 0.3.37)
|
93
|
+
moped (2.0.4)
|
94
|
+
bson (~> 2.2)
|
95
|
+
connection_pool (~> 2.0)
|
96
|
+
optionable (~> 0.2.0)
|
97
|
+
multi_json (1.11.0)
|
98
|
+
nokogiri (1.6.6.2)
|
99
|
+
mini_portile (~> 0.6.0)
|
100
|
+
optionable (0.2.0)
|
101
|
+
origin (2.1.1)
|
102
|
+
rack (1.6.0)
|
103
|
+
rack-test (0.6.3)
|
104
|
+
rack (>= 1.0)
|
105
|
+
rails (4.2.0)
|
106
|
+
actionmailer (= 4.2.0)
|
107
|
+
actionpack (= 4.2.0)
|
108
|
+
actionview (= 4.2.0)
|
109
|
+
activejob (= 4.2.0)
|
110
|
+
activemodel (= 4.2.0)
|
111
|
+
activerecord (= 4.2.0)
|
112
|
+
activesupport (= 4.2.0)
|
113
|
+
bundler (>= 1.3.0, < 2.0)
|
114
|
+
railties (= 4.2.0)
|
115
|
+
sprockets-rails
|
116
|
+
rails-deprecated_sanitizer (1.0.3)
|
117
|
+
activesupport (>= 4.2.0.alpha)
|
118
|
+
rails-dom-testing (1.0.6)
|
119
|
+
activesupport (>= 4.2.0.beta, < 5.0)
|
120
|
+
nokogiri (~> 1.6.0)
|
121
|
+
rails-deprecated_sanitizer (>= 1.0.1)
|
122
|
+
rails-html-sanitizer (1.0.2)
|
123
|
+
loofah (~> 2.0)
|
124
|
+
railties (4.2.0)
|
125
|
+
actionpack (= 4.2.0)
|
126
|
+
activesupport (= 4.2.0)
|
127
|
+
rake (>= 0.8.7)
|
128
|
+
thor (>= 0.18.1, < 2.0)
|
129
|
+
rake (10.4.2)
|
130
|
+
rdoc (4.2.0)
|
131
|
+
json (~> 1.4)
|
132
|
+
redcarpet (3.2.2)
|
133
|
+
responders (2.1.0)
|
134
|
+
railties (>= 4.2.0, < 5)
|
135
|
+
sass (3.4.13)
|
136
|
+
sass-rails (5.0.1)
|
137
|
+
railties (>= 4.0.0, < 5.0)
|
138
|
+
sass (~> 3.1)
|
139
|
+
sprockets (>= 2.8, < 4.0)
|
140
|
+
sprockets-rails (>= 2.0, < 4.0)
|
141
|
+
tilt (~> 1.1)
|
142
|
+
sdoc (0.4.1)
|
143
|
+
json (~> 1.7, >= 1.7.7)
|
144
|
+
rdoc (~> 4.0)
|
145
|
+
simple_form (3.1.0)
|
146
|
+
actionpack (~> 4.0)
|
147
|
+
activemodel (~> 4.0)
|
148
|
+
slim (3.0.3)
|
149
|
+
temple (~> 0.7.3)
|
150
|
+
tilt (>= 1.3.3, < 2.1)
|
151
|
+
spring (1.3.3)
|
152
|
+
sprockets (2.12.3)
|
153
|
+
hike (~> 1.2)
|
154
|
+
multi_json (~> 1.0)
|
155
|
+
rack (~> 1.0)
|
156
|
+
tilt (~> 1.1, != 1.3.0)
|
157
|
+
sprockets-rails (2.2.4)
|
158
|
+
actionpack (>= 3.0)
|
159
|
+
activesupport (>= 3.0)
|
160
|
+
sprockets (>= 2.8, < 4.0)
|
161
|
+
temple (0.7.5)
|
162
|
+
thor (0.19.1)
|
163
|
+
thread_safe (0.3.5)
|
164
|
+
tilt (1.4.1)
|
165
|
+
turbolinks (2.5.3)
|
166
|
+
coffee-rails
|
167
|
+
tzinfo (1.2.2)
|
168
|
+
thread_safe (~> 0.1)
|
169
|
+
uglifier (2.7.1)
|
170
|
+
execjs (>= 0.3.0)
|
171
|
+
json (>= 1.8.0)
|
172
|
+
web-console (2.1.2)
|
173
|
+
activemodel (>= 4.0)
|
174
|
+
binding_of_caller (>= 0.7.2)
|
175
|
+
railties (>= 4.0)
|
176
|
+
sprockets-rails (>= 2.0, < 4.0)
|
177
|
+
|
178
|
+
PLATFORMS
|
179
|
+
ruby
|
180
|
+
|
181
|
+
DEPENDENCIES
|
182
|
+
byebug
|
183
|
+
coffee-rails (~> 4.1.0)
|
184
|
+
jbuilder (~> 2.0)
|
185
|
+
jquery-rails
|
186
|
+
mongoid
|
187
|
+
rails (= 4.2.0)
|
188
|
+
sass-rails (~> 5.0)
|
189
|
+
sdoc (~> 0.4.0)
|
190
|
+
simple_form_markdown_editor!
|
191
|
+
slim
|
192
|
+
spring
|
193
|
+
turbolinks
|
194
|
+
uglifier (>= 1.3.0)
|
195
|
+
web-console (~> 2.0)
|
@@ -0,0 +1,28 @@
|
|
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
|
+
* ...
|
25
|
+
|
26
|
+
|
27
|
+
Please feel free to use a different markup language if you do not plan to run
|
28
|
+
<tt>rake doc:app</tt>.
|
data/test/dummy/Rakefile
ADDED
File without changes
|
@@ -0,0 +1,32 @@
|
|
1
|
+
body {
|
2
|
+
margin: 20px;
|
3
|
+
font-family: sans-serif;
|
4
|
+
}
|
5
|
+
|
6
|
+
|
7
|
+
div.input.markdown_editor {
|
8
|
+
|
9
|
+
label.markdown_editor {}
|
10
|
+
|
11
|
+
ul.commands {
|
12
|
+
li {
|
13
|
+
span {
|
14
|
+
border-radius: 2px 2px 0 0;
|
15
|
+
cursor: pointer;
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
20
|
+
div.editor {}
|
21
|
+
|
22
|
+
div.preview {
|
23
|
+
box-sizing: border-box;
|
24
|
+
padding: 10px;
|
25
|
+
|
26
|
+
h1, h2, h3, h4, h5, h6, p {
|
27
|
+
margin-top: 0;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
div.help {}
|
32
|
+
}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Dummy</title>
|
5
|
+
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
|
6
|
+
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
|
11
|
+
<%= yield %>
|
12
|
+
|
13
|
+
</body>
|
14
|
+
</html>
|
data/test/dummy/bin/rake
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'pathname'
|
3
|
+
|
4
|
+
# path to your application root.
|
5
|
+
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
6
|
+
|
7
|
+
Dir.chdir APP_ROOT do
|
8
|
+
# This script is a starting point to setup your application.
|
9
|
+
# Add necessary setup steps to this file:
|
10
|
+
|
11
|
+
puts "== Installing dependencies =="
|
12
|
+
system "gem install bundler --conservative"
|
13
|
+
system "bundle check || bundle install"
|
14
|
+
|
15
|
+
# puts "\n== Copying sample files =="
|
16
|
+
# unless File.exist?("config/database.yml")
|
17
|
+
# system "cp config/database.yml.sample config/database.yml"
|
18
|
+
# end
|
19
|
+
|
20
|
+
puts "\n== Preparing database =="
|
21
|
+
system "bin/rake db:setup"
|
22
|
+
|
23
|
+
puts "\n== Removing old logs and tempfiles =="
|
24
|
+
system "rm -f log/*"
|
25
|
+
system "rm -rf tmp/cache"
|
26
|
+
|
27
|
+
puts "\n== Restarting application server =="
|
28
|
+
system "touch tmp/restart.txt"
|
29
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# This file loads spring without using Bundler, in order to be fast.
|
4
|
+
# It gets overwritten when you run the `spring binstub` command.
|
5
|
+
|
6
|
+
unless defined?(Spring)
|
7
|
+
require "rubygems"
|
8
|
+
require "bundler"
|
9
|
+
|
10
|
+
if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m)
|
11
|
+
Gem.paths = { "GEM_PATH" => [Bundler.bundle_path.to_s, *Gem.path].uniq }
|
12
|
+
gem "spring", match[1]
|
13
|
+
require "spring/binstub"
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
# Pick the frameworks you want:
|
4
|
+
require "active_model/railtie"
|
5
|
+
require "active_job/railtie"
|
6
|
+
# require "active_record/railtie"
|
7
|
+
require "action_controller/railtie"
|
8
|
+
require "action_mailer/railtie"
|
9
|
+
require "action_view/railtie"
|
10
|
+
require "sprockets/railtie"
|
11
|
+
require "rails/test_unit/railtie"
|
12
|
+
|
13
|
+
# Require the gems listed in Gemfile, including any gems
|
14
|
+
# you've limited to :test, :development, or :production.
|
15
|
+
Bundler.require(*Rails.groups)
|
16
|
+
|
17
|
+
module Dummy
|
18
|
+
class Application < Rails::Application
|
19
|
+
# Settings in config/environments/* take precedence over those specified here.
|
20
|
+
# Application configuration should go into files in config/initializers
|
21
|
+
# -- all .rb files in that directory are automatically loaded.
|
22
|
+
|
23
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
24
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
25
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
26
|
+
|
27
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
28
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
29
|
+
# config.i18n.default_locale = :de
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# In the development environment your application's code is reloaded on
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
|
+
# since you don't have to restart the web server when you make code changes.
|
7
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
# Do not eager load code on boot.
|
10
|
+
config.eager_load = false
|
11
|
+
|
12
|
+
# Show full error reports and disable caching.
|
13
|
+
config.consider_all_requests_local = true
|
14
|
+
config.action_controller.perform_caching = false
|
15
|
+
|
16
|
+
# Don't care if the mailer can't send.
|
17
|
+
config.action_mailer.raise_delivery_errors = false
|
18
|
+
|
19
|
+
# Print deprecation notices to the Rails logger.
|
20
|
+
config.active_support.deprecation = :log
|
21
|
+
|
22
|
+
# Debug mode disables concatenation and preprocessing of assets.
|
23
|
+
# This option may cause significant delays in view rendering with a large
|
24
|
+
# number of complex assets.
|
25
|
+
config.assets.debug = true
|
26
|
+
|
27
|
+
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
28
|
+
# yet still be able to expire them through the digest params.
|
29
|
+
config.assets.digest = true
|
30
|
+
|
31
|
+
# Adds additional error checking when serving assets at runtime.
|
32
|
+
# Checks for improperly declared sprockets dependencies.
|
33
|
+
# Raises helpful error messages.
|
34
|
+
config.assets.raise_runtime_errors = true
|
35
|
+
|
36
|
+
# Raises error for missing translations
|
37
|
+
# config.action_view.raise_on_missing_translations = true
|
38
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# Code is not reloaded between requests.
|
5
|
+
config.cache_classes = true
|
6
|
+
|
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.
|
14
|
+
config.consider_all_requests_local = false
|
15
|
+
config.action_controller.perform_caching = true
|
16
|
+
|
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?
|
26
|
+
|
27
|
+
# Compress JavaScripts and CSS.
|
28
|
+
config.assets.js_compressor = :uglifier
|
29
|
+
# config.assets.css_compressor = :sass
|
30
|
+
|
31
|
+
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
32
|
+
config.assets.compile = false
|
33
|
+
|
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.
|
36
|
+
config.assets.digest = true
|
37
|
+
|
38
|
+
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
|
39
|
+
|
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
|
43
|
+
|
44
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
45
|
+
# config.force_ssl = true
|
46
|
+
|
47
|
+
# Use the lowest log level to ensure availability of diagnostic information
|
48
|
+
# when problems arise.
|
49
|
+
config.log_level = :debug
|
50
|
+
|
51
|
+
# Prepend all log lines with the following tags.
|
52
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
53
|
+
|
54
|
+
# Use a different logger for distributed setups.
|
55
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
56
|
+
|
57
|
+
# Use a different cache store in production.
|
58
|
+
# config.cache_store = :mem_cache_store
|
59
|
+
|
60
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
61
|
+
# config.action_controller.asset_host = 'http://assets.example.com'
|
62
|
+
|
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.
|
65
|
+
# config.action_mailer.raise_delivery_errors = false
|
66
|
+
|
67
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
68
|
+
# the I18n.default_locale when a translation cannot be found).
|
69
|
+
config.i18n.fallbacks = true
|
70
|
+
|
71
|
+
# Send deprecation notices to registered listeners.
|
72
|
+
config.active_support.deprecation = :notify
|
73
|
+
|
74
|
+
# Use default logging formatter so that PID and timestamp are not suppressed.
|
75
|
+
config.log_formatter = ::Logger::Formatter.new
|
76
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
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
|
14
|
+
|
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'
|
18
|
+
|
19
|
+
# Show full error reports and disable caching.
|
20
|
+
config.consider_all_requests_local = true
|
21
|
+
config.action_controller.perform_caching = false
|
22
|
+
|
23
|
+
# Raise exceptions instead of rendering exception templates.
|
24
|
+
config.action_dispatch.show_exceptions = false
|
25
|
+
|
26
|
+
# Disable request forgery protection in test environment.
|
27
|
+
config.action_controller.allow_forgery_protection = false
|
28
|
+
|
29
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
30
|
+
# The :test delivery method accumulates sent emails in the
|
31
|
+
# ActionMailer::Base.deliveries array.
|
32
|
+
config.action_mailer.delivery_method = :test
|
33
|
+
|
34
|
+
# Randomize the order test cases are executed.
|
35
|
+
config.active_support.test_order = :random
|
36
|
+
|
37
|
+
# Print deprecation notices to the stderr.
|
38
|
+
config.active_support.deprecation = :stderr
|
39
|
+
|
40
|
+
# Raises error for missing translations
|
41
|
+
# config.action_view.raise_on_missing_translations = true
|
42
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Version of your assets, change this if you want to expire all your assets.
|
4
|
+
Rails.application.config.assets.version = '1.0'
|
5
|
+
|
6
|
+
# Add additional assets to the asset load path
|
7
|
+
# Rails.application.config.assets.paths << Emoji.images_path
|
8
|
+
|
9
|
+
# Precompile additional assets.
|
10
|
+
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
11
|
+
# Rails.application.config.assets.precompile += %w( search.js )
|