attorney 0.0.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Rakefile +19 -3
- data/app/assets/config/attorney_manifest.js +2 -0
- data/app/assets/javascripts/attorney/application.js +16 -0
- data/app/assets/javascripts/attorney/form_errors.js +13 -0
- data/app/assets/javascripts/attorney/rich_editor.js +19 -0
- data/app/assets/stylesheets/attorney/application.css +16 -0
- data/app/controllers/attorney/admin/documents_controller.rb +49 -0
- data/app/controllers/attorney/application_controller.rb +5 -0
- data/app/controllers/attorney/documents_controller.rb +11 -0
- data/app/helpers/attorney/application_helper.rb +13 -0
- data/app/helpers/attorney/documents_helper.rb +11 -0
- data/app/jobs/attorney/application_job.rb +4 -0
- data/app/mailers/attorney/application_mailer.rb +6 -0
- data/app/models/attorney/application_record.rb +5 -0
- data/app/models/attorney/document.rb +19 -0
- data/app/views/attorney/admin/documents/_form.html.erb +49 -0
- data/app/views/attorney/admin/documents/edit.html.erb +3 -0
- data/app/views/attorney/admin/documents/index.html.erb +37 -0
- data/app/views/attorney/admin/documents/new.html.erb +3 -0
- data/app/views/attorney/admin/documents/show.html.erb +13 -0
- data/app/views/attorney/documents/show.html.erb +1 -0
- data/app/views/layouts/attorney/application.html.erb +25 -0
- data/config/routes.rb +9 -0
- data/db/migrate/20180205173208_create_attorney_documents.rb +13 -0
- data/lib/attorney.rb +12 -2
- data/lib/attorney/engine.rb +14 -0
- data/lib/attorney/version.rb +1 -1
- data/lib/tasks/attorney_tasks.rake +4 -0
- data/spec/controllers/attorney/admin/documents_controller_spec.rb +130 -0
- data/spec/controllers/attorney/documents_controller_spec.rb +26 -0
- data/spec/features/attorney/admin/documents_spec.rb +87 -0
- data/spec/features/attorney/documents_spec.rb +19 -0
- data/spec/helpers/documents_helper_spec.rb +21 -0
- data/spec/lib/attorney_spec.rb +6 -0
- data/spec/models/attorney/document_spec.rb +28 -0
- data/spec/rails_helper.rb +109 -0
- data/spec/spec_helper.rb +96 -0
- data/spec/support/capybara.rb +1 -0
- data/spec/support/dummy/rails5_0/Rakefile +6 -0
- data/spec/support/dummy/rails5_0/app/assets/config/manifest.js +5 -0
- data/spec/support/dummy/rails5_0/app/assets/images/.keep +0 -0
- data/spec/support/dummy/rails5_0/app/assets/javascripts/application.js +13 -0
- data/spec/support/dummy/rails5_0/app/assets/javascripts/cable.js +13 -0
- data/spec/support/dummy/rails5_0/app/assets/javascripts/channels/.keep +0 -0
- data/spec/support/dummy/rails5_0/app/assets/stylesheets/application.css +15 -0
- data/spec/support/dummy/rails5_0/app/channels/application_cable/channel.rb +4 -0
- data/spec/support/dummy/rails5_0/app/channels/application_cable/connection.rb +4 -0
- data/spec/support/dummy/rails5_0/app/controllers/application_controller.rb +3 -0
- data/spec/support/dummy/rails5_0/app/controllers/concerns/.keep +0 -0
- data/spec/support/dummy/rails5_0/app/helpers/application_helper.rb +2 -0
- data/spec/support/dummy/rails5_0/app/jobs/application_job.rb +2 -0
- data/spec/support/dummy/rails5_0/app/mailers/application_mailer.rb +4 -0
- data/spec/support/dummy/rails5_0/app/models/application_record.rb +3 -0
- data/spec/support/dummy/rails5_0/app/models/concerns/.keep +0 -0
- data/spec/support/dummy/rails5_0/app/views/layouts/application.html.erb +15 -0
- data/spec/support/dummy/rails5_0/app/views/layouts/mailer.html.erb +13 -0
- data/spec/support/dummy/rails5_0/app/views/layouts/mailer.text.erb +1 -0
- data/spec/support/dummy/rails5_0/bin/bundle +3 -0
- data/spec/support/dummy/rails5_0/bin/rails +4 -0
- data/spec/support/dummy/rails5_0/bin/rake +4 -0
- data/spec/support/dummy/rails5_0/bin/setup +34 -0
- data/spec/support/dummy/rails5_0/bin/update +29 -0
- data/spec/support/dummy/rails5_0/config.ru +5 -0
- data/spec/support/dummy/rails5_0/config/application.rb +15 -0
- data/spec/support/dummy/rails5_0/config/boot.rb +5 -0
- data/spec/support/dummy/rails5_0/config/cable.yml +9 -0
- data/spec/support/dummy/rails5_0/config/database.yml +25 -0
- data/spec/support/dummy/rails5_0/config/environment.rb +5 -0
- data/spec/support/dummy/rails5_0/config/environments/development.rb +54 -0
- data/spec/support/dummy/rails5_0/config/environments/production.rb +86 -0
- data/spec/support/dummy/rails5_0/config/environments/test.rb +42 -0
- data/spec/support/dummy/rails5_0/config/initializers/application_controller_renderer.rb +8 -0
- data/spec/support/dummy/rails5_0/config/initializers/assets.rb +11 -0
- data/spec/support/dummy/rails5_0/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/support/dummy/rails5_0/config/initializers/cookies_serializer.rb +5 -0
- data/spec/support/dummy/rails5_0/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/support/dummy/rails5_0/config/initializers/inflections.rb +16 -0
- data/spec/support/dummy/rails5_0/config/initializers/mime_types.rb +4 -0
- data/spec/support/dummy/rails5_0/config/initializers/new_framework_defaults.rb +26 -0
- data/spec/support/dummy/rails5_0/config/initializers/session_store.rb +3 -0
- data/spec/support/dummy/rails5_0/config/initializers/wrap_parameters.rb +14 -0
- data/spec/support/dummy/rails5_0/config/locales/en.yml +23 -0
- data/spec/support/dummy/rails5_0/config/puma.rb +47 -0
- data/spec/support/dummy/rails5_0/config/routes.rb +3 -0
- data/spec/support/dummy/rails5_0/config/secrets.yml +22 -0
- data/spec/support/dummy/rails5_0/config/spring.rb +6 -0
- data/spec/support/dummy/rails5_0/db/schema.rb +24 -0
- data/spec/support/dummy/rails5_0/lib/assets/.keep +0 -0
- data/spec/support/dummy/rails5_0/log/.keep +0 -0
- data/spec/support/dummy/rails5_0/public/404.html +67 -0
- data/spec/support/dummy/rails5_0/public/422.html +67 -0
- data/spec/support/dummy/rails5_0/public/500.html +66 -0
- data/spec/support/dummy/rails5_0/public/apple-touch-icon-precomposed.png +0 -0
- data/spec/support/dummy/rails5_0/public/apple-touch-icon.png +0 -0
- data/spec/support/dummy/rails5_0/public/favicon.ico +0 -0
- data/spec/support/dummy/rails5_1/Rakefile +6 -0
- data/spec/support/dummy/rails5_1/app/assets/config/manifest.js +5 -0
- data/spec/support/dummy/rails5_1/app/assets/images/.keep +0 -0
- data/spec/support/dummy/rails5_1/app/assets/javascripts/application.js +13 -0
- data/spec/support/dummy/rails5_1/app/assets/javascripts/cable.js +13 -0
- data/spec/support/dummy/rails5_1/app/assets/javascripts/channels/.keep +0 -0
- data/spec/support/dummy/rails5_1/app/assets/stylesheets/application.css +15 -0
- data/spec/support/dummy/rails5_1/app/channels/application_cable/channel.rb +4 -0
- data/spec/support/dummy/rails5_1/app/channels/application_cable/connection.rb +4 -0
- data/spec/support/dummy/rails5_1/app/controllers/application_controller.rb +4 -0
- data/spec/support/dummy/rails5_1/app/controllers/concerns/.keep +0 -0
- data/spec/support/dummy/rails5_1/app/helpers/application_helper.rb +2 -0
- data/spec/support/dummy/rails5_1/app/jobs/application_job.rb +2 -0
- data/spec/support/dummy/rails5_1/app/mailers/application_mailer.rb +4 -0
- data/spec/support/dummy/rails5_1/app/models/application_record.rb +3 -0
- data/spec/support/dummy/rails5_1/app/models/concerns/.keep +0 -0
- data/spec/support/dummy/rails5_1/app/views/layouts/mailer.html.erb +13 -0
- data/spec/support/dummy/rails5_1/app/views/layouts/mailer.text.erb +1 -0
- data/spec/support/dummy/rails5_1/app/views/layouts/main.html.erb +15 -0
- data/spec/support/dummy/rails5_1/bin/bundle +3 -0
- data/spec/support/dummy/rails5_1/bin/rails +4 -0
- data/spec/support/dummy/rails5_1/bin/rake +4 -0
- data/spec/support/dummy/rails5_1/bin/setup +38 -0
- data/spec/support/dummy/rails5_1/bin/update +29 -0
- data/spec/support/dummy/rails5_1/bin/yarn +11 -0
- data/spec/support/dummy/rails5_1/config.ru +5 -0
- data/spec/support/dummy/rails5_1/config/application.rb +18 -0
- data/spec/support/dummy/rails5_1/config/boot.rb +5 -0
- data/spec/support/dummy/rails5_1/config/cable.yml +10 -0
- data/spec/support/dummy/rails5_1/config/database.yml +25 -0
- data/spec/support/dummy/rails5_1/config/environment.rb +5 -0
- data/spec/support/dummy/rails5_1/config/environments/development.rb +54 -0
- data/spec/support/dummy/rails5_1/config/environments/production.rb +91 -0
- data/spec/support/dummy/rails5_1/config/environments/test.rb +42 -0
- data/spec/support/dummy/rails5_1/config/initializers/application_controller_renderer.rb +8 -0
- data/spec/support/dummy/rails5_1/config/initializers/assets.rb +14 -0
- data/spec/support/dummy/rails5_1/config/initializers/attorney.rb +1 -0
- data/spec/support/dummy/rails5_1/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/support/dummy/rails5_1/config/initializers/cookies_serializer.rb +5 -0
- data/spec/support/dummy/rails5_1/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/support/dummy/rails5_1/config/initializers/inflections.rb +16 -0
- data/spec/support/dummy/rails5_1/config/initializers/mime_types.rb +4 -0
- data/spec/support/dummy/rails5_1/config/initializers/wrap_parameters.rb +14 -0
- data/spec/support/dummy/rails5_1/config/locales/en.yml +33 -0
- data/spec/support/dummy/rails5_1/config/puma.rb +56 -0
- data/spec/support/dummy/rails5_1/config/routes.rb +3 -0
- data/spec/support/dummy/rails5_1/config/secrets.yml +32 -0
- data/spec/support/dummy/rails5_1/config/spring.rb +6 -0
- data/spec/support/dummy/rails5_1/db/schema.rb +24 -0
- data/spec/support/dummy/rails5_1/lib/assets/.keep +0 -0
- data/spec/support/dummy/rails5_1/log/.keep +0 -0
- data/spec/support/dummy/rails5_1/package.json +5 -0
- data/spec/support/dummy/rails5_1/public/404.html +67 -0
- data/spec/support/dummy/rails5_1/public/422.html +67 -0
- data/spec/support/dummy/rails5_1/public/500.html +66 -0
- data/spec/support/dummy/rails5_1/public/apple-touch-icon-precomposed.png +0 -0
- data/spec/support/dummy/rails5_1/public/apple-touch-icon.png +0 -0
- data/spec/support/dummy/rails5_1/public/favicon.ico +0 -0
- data/spec/support/helpers/auth.rb +12 -0
- data/spec/support/shoulda_matchers.rb +8 -0
- data/vendor/assets/javascripts/attorney/bootstrap.bundle.min.js +7 -0
- data/vendor/assets/stylesheets/attorney/bootstrap.min.css +7 -0
- metadata +401 -28
- data/.gitignore +0 -13
- data/.rspec +0 -3
- data/.travis.yml +0 -5
- data/Gemfile +0 -6
- data/LICENSE.txt +0 -21
- data/README.md +0 -39
- data/attorney.gemspec +0 -25
- data/bin/console +0 -14
- data/bin/setup +0 -8
@@ -0,0 +1,67 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
.rails-default-error-page {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
.rails-default-error-page div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
.rails-default-error-page div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
.rails-default-error-page h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
.rails-default-error-page div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
|
+
</head>
|
56
|
+
|
57
|
+
<body class="rails-default-error-page">
|
58
|
+
<!-- This file lives in public/422.html -->
|
59
|
+
<div class="dialog">
|
60
|
+
<div>
|
61
|
+
<h1>The change you wanted was rejected.</h1>
|
62
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
63
|
+
</div>
|
64
|
+
<p>If you are the application owner check the logs for more information.</p>
|
65
|
+
</div>
|
66
|
+
</body>
|
67
|
+
</html>
|
@@ -0,0 +1,66 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
.rails-default-error-page {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
.rails-default-error-page div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
.rails-default-error-page div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
.rails-default-error-page h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
.rails-default-error-page div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
|
+
</head>
|
56
|
+
|
57
|
+
<body class="rails-default-error-page">
|
58
|
+
<!-- This file lives in public/500.html -->
|
59
|
+
<div class="dialog">
|
60
|
+
<div>
|
61
|
+
<h1>We're sorry, but something went wrong.</h1>
|
62
|
+
</div>
|
63
|
+
<p>If you are the application owner check the logs for more information.</p>
|
64
|
+
</div>
|
65
|
+
</body>
|
66
|
+
</html>
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,13 @@
|
|
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_tree .
|
@@ -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);
|
File without changes
|
@@ -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
|
+
*/
|
File without changes
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= yield %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Dummy</title>
|
5
|
+
<%= csrf_meta_tags %>
|
6
|
+
|
7
|
+
<%= stylesheet_link_tag 'application', media: 'all' %>
|
8
|
+
<%= javascript_include_tag 'application' %>
|
9
|
+
</head>
|
10
|
+
|
11
|
+
<body>
|
12
|
+
<%= "Rails #{Rails.version} layout" %>
|
13
|
+
<%= yield %>
|
14
|
+
</body>
|
15
|
+
</html>
|
@@ -0,0 +1,38 @@
|
|
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
|
+
# Install JavaScript dependencies if using Yarn
|
22
|
+
# system('bin/yarn')
|
23
|
+
|
24
|
+
|
25
|
+
# puts "\n== Copying sample files =="
|
26
|
+
# unless File.exist?('config/database.yml')
|
27
|
+
# cp 'config/database.yml.sample', 'config/database.yml'
|
28
|
+
# end
|
29
|
+
|
30
|
+
puts "\n== Preparing database =="
|
31
|
+
system! 'bin/rails db:setup'
|
32
|
+
|
33
|
+
puts "\n== Removing old logs and tempfiles =="
|
34
|
+
system! 'bin/rails log:clear tmp:clear'
|
35
|
+
|
36
|
+
puts "\n== Restarting application server =="
|
37
|
+
system! 'bin/rails restart'
|
38
|
+
end
|
@@ -0,0 +1,29 @@
|
|
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 way to update your development environment automatically.
|
15
|
+
# Add necessary update 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== Updating database =="
|
22
|
+
system! 'bin/rails db:migrate'
|
23
|
+
|
24
|
+
puts "\n== Removing old logs and tempfiles =="
|
25
|
+
system! 'bin/rails log:clear tmp:clear'
|
26
|
+
|
27
|
+
puts "\n== Restarting application server =="
|
28
|
+
system! 'bin/rails restart'
|
29
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
VENDOR_PATH = File.expand_path('..', __dir__)
|
3
|
+
Dir.chdir(VENDOR_PATH) do
|
4
|
+
begin
|
5
|
+
exec "yarnpkg #{ARGV.join(" ")}"
|
6
|
+
rescue Errno::ENOENT
|
7
|
+
$stderr.puts "Yarn executable was not detected in the system."
|
8
|
+
$stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
|
9
|
+
exit 1
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require_relative 'boot'
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
Bundler.require(*Rails.groups)
|
6
|
+
require "attorney"
|
7
|
+
|
8
|
+
module Dummy
|
9
|
+
class Application < Rails::Application
|
10
|
+
# Initialize configuration defaults for originally generated Rails version.
|
11
|
+
config.load_defaults 5.1
|
12
|
+
|
13
|
+
# Settings in config/environments/* take precedence over those specified here.
|
14
|
+
# Application configuration should go into files in config/initializers
|
15
|
+
# -- all .rb files in that directory are automatically loaded.
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3
|
3
|
+
#
|
4
|
+
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
+
# gem 'sqlite3'
|
6
|
+
#
|
7
|
+
default: &default
|
8
|
+
adapter: sqlite3
|
9
|
+
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
10
|
+
timeout: 5000
|
11
|
+
|
12
|
+
development:
|
13
|
+
<<: *default
|
14
|
+
database: db/development.sqlite3
|
15
|
+
|
16
|
+
# Warning: The database defined as "test" will be erased and
|
17
|
+
# re-generated from your development database when you run "rake".
|
18
|
+
# Do not set this db to the same as development or production.
|
19
|
+
test:
|
20
|
+
<<: *default
|
21
|
+
database: db/test.sqlite3
|
22
|
+
|
23
|
+
production:
|
24
|
+
<<: *default
|
25
|
+
database: db/production.sqlite3
|