magicka 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +7 -0
  2. data/.circleci/config.yml +71 -0
  3. data/.gitignore +12 -0
  4. data/.rspec +1 -0
  5. data/.rubocop.yml +46 -0
  6. data/.rubocop_todo.yml +0 -0
  7. data/Dockerfile +21 -0
  8. data/Gemfile +5 -0
  9. data/LICENSE +21 -0
  10. data/README.md +33 -0
  11. data/Rakefile +12 -0
  12. data/config/check_specs.yml +2 -0
  13. data/config/rubycritc.rb +12 -0
  14. data/config/yardstick.rb +13 -0
  15. data/config/yardstick.yml +33 -0
  16. data/docker-compose.yml +23 -0
  17. data/lib/magicka/version.rb +5 -0
  18. data/lib/magicka.rb +7 -0
  19. data/magicka.gemspec +49 -0
  20. data/magicka.jpg +0 -0
  21. data/spec/dummy/.ruby-version +1 -0
  22. data/spec/dummy/Rakefile +9 -0
  23. data/spec/dummy/app/assets/config/manifest.js +3 -0
  24. data/spec/dummy/app/assets/images/.keep +0 -0
  25. data/spec/dummy/app/assets/javascripts/application.js +15 -0
  26. data/spec/dummy/app/assets/javascripts/cable.js +13 -0
  27. data/spec/dummy/app/assets/javascripts/channels/.keep +0 -0
  28. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  29. data/spec/dummy/app/channels/application_cable/channel.rb +6 -0
  30. data/spec/dummy/app/channels/application_cable/connection.rb +6 -0
  31. data/spec/dummy/app/controllers/application_controller.rb +4 -0
  32. data/spec/dummy/app/controllers/concerns/.keep +0 -0
  33. data/spec/dummy/app/helpers/application_helper.rb +4 -0
  34. data/spec/dummy/app/jobs/application_job.rb +4 -0
  35. data/spec/dummy/app/mailers/application_mailer.rb +6 -0
  36. data/spec/dummy/app/models/application_record.rb +5 -0
  37. data/spec/dummy/app/models/concerns/.keep +0 -0
  38. data/spec/dummy/app/views/layouts/application.html.erb +15 -0
  39. data/spec/dummy/app/views/layouts/mailer.html.erb +13 -0
  40. data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
  41. data/spec/dummy/bin/bundle +5 -0
  42. data/spec/dummy/bin/rails +6 -0
  43. data/spec/dummy/bin/rake +6 -0
  44. data/spec/dummy/bin/setup +40 -0
  45. data/spec/dummy/bin/update +35 -0
  46. data/spec/dummy/bin/yarn +11 -0
  47. data/spec/dummy/config/application.rb +34 -0
  48. data/spec/dummy/config/boot.rb +7 -0
  49. data/spec/dummy/config/cable.yml +10 -0
  50. data/spec/dummy/config/database.yml +25 -0
  51. data/spec/dummy/config/environment.rb +7 -0
  52. data/spec/dummy/config/environments/development.rb +65 -0
  53. data/spec/dummy/config/environments/production.rb +108 -0
  54. data/spec/dummy/config/environments/test.rb +49 -0
  55. data/spec/dummy/config/initializers/application_controller_renderer.rb +10 -0
  56. data/spec/dummy/config/initializers/assets.rb +16 -0
  57. data/spec/dummy/config/initializers/backtrace_silencers.rb +13 -0
  58. data/spec/dummy/config/initializers/content_security_policy.rb +28 -0
  59. data/spec/dummy/config/initializers/cookies_serializer.rb +7 -0
  60. data/spec/dummy/config/initializers/filter_parameter_logging.rb +6 -0
  61. data/spec/dummy/config/initializers/inflections.rb +18 -0
  62. data/spec/dummy/config/initializers/mime_types.rb +6 -0
  63. data/spec/dummy/config/initializers/wrap_parameters.rb +17 -0
  64. data/spec/dummy/config/locales/en.yml +33 -0
  65. data/spec/dummy/config/puma.rb +37 -0
  66. data/spec/dummy/config/routes.rb +4 -0
  67. data/spec/dummy/config/spring.rb +8 -0
  68. data/spec/dummy/config/storage.yml +34 -0
  69. data/spec/dummy/config.ru +7 -0
  70. data/spec/dummy/db/schema.rb +5 -0
  71. data/spec/dummy/lib/assets/.keep +0 -0
  72. data/spec/dummy/package.json +5 -0
  73. data/spec/dummy/public/404.html +67 -0
  74. data/spec/dummy/public/422.html +67 -0
  75. data/spec/dummy/public/500.html +66 -0
  76. data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
  77. data/spec/dummy/public/apple-touch-icon.png +0 -0
  78. data/spec/dummy/public/favicon.ico +0 -0
  79. data/spec/dummy/storage/.keep +0 -0
  80. data/spec/integration/readme/.keep +0 -0
  81. data/spec/integration/yard/.keep +0 -0
  82. data/spec/lib/magicka_spec.rb +8 -0
  83. data/spec/spec_helper.rb +37 -0
  84. data/spec/support/models/.keep +0 -0
  85. data/spec/support/shared_examples/.keep +0 -0
  86. metadata +491 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 6013fd94f8df1865e13bd0f17ddfd37b9605fb6cb72eebb14d7fa6a4761f48fd
4
+ data.tar.gz: 4ae9c53984064068371fc060aaf178a34f772940908619d4937fc4bf6345a345
5
+ SHA512:
6
+ metadata.gz: 2bdddadc15edd651be2484b29072e04b3b717d1cd45741996a3426a069bb5e6980fd42bf34d2d813b675d392d96f1aab278a87484f82488a7255bb4414ee350e
7
+ data.tar.gz: '0783b6e54e90f43e71cf6d361ee34b9ae3bb4179f87b48f96e1a47c47ae72a2e4e8fa92d2e0f5870b2649905208e1bfa3fc6efbca7e24e40b260efdc3f05c7cc'
@@ -0,0 +1,71 @@
1
+ version: 2
2
+ workflows:
3
+ version: 2
4
+ test-and-build:
5
+ jobs:
6
+ - test:
7
+ filters:
8
+ tags:
9
+ only: /.*/
10
+ - build-and-release:
11
+ requires: [test]
12
+ filters:
13
+ tags:
14
+ only: /\d+\.\d+\.\d+/
15
+ branches:
16
+ only:
17
+ - master
18
+ jobs:
19
+ test:
20
+ docker:
21
+ - image: darthjee/circleci_rails_gems:0.5.4
22
+ environment:
23
+ PROJECT: magicka
24
+ steps:
25
+ - checkout
26
+ - run:
27
+ name: Prepare Coverage Test Report
28
+ command: cc-test-reporter before-build
29
+ - run:
30
+ name: Bundle Install
31
+ command: bundle install
32
+ - run:
33
+ name: RSpec
34
+ command: bundle exec rspec
35
+ - run:
36
+ name: Rubocop
37
+ command: rubocop
38
+ - run:
39
+ name: Coverage Test Report
40
+ command: cc-test-reporter after-build --exit-code $?
41
+ - run:
42
+ name: Yardstick coverage check
43
+ command: bundle exec rake verify_measurements
44
+ - run:
45
+ name: Check version documentation
46
+ command: check_readme.sh
47
+ - run:
48
+ name: Rubycritcs check
49
+ command: rubycritic.sh
50
+ - run:
51
+ name: Check unit tests
52
+ command: check_specs
53
+ build-and-release:
54
+ docker:
55
+ - image: darthjee/circleci_rails_gems:0.5.4
56
+ environment:
57
+ PROJECT: magicka
58
+ steps:
59
+ - checkout
60
+ - run:
61
+ name: Bundle Install
62
+ command: bundle install
63
+ - run:
64
+ name: Signin
65
+ command: build_gem.sh signin
66
+ - run:
67
+ name: Build Gem
68
+ command: build_gem.sh build
69
+ - run:
70
+ name: Push Gem
71
+ command: build_gem.sh push
data/.gitignore ADDED
@@ -0,0 +1,12 @@
1
+ coverages
2
+ pkg
3
+ Gemfile.lock
4
+ coverage
5
+ doc
6
+ .yardoc/
7
+ measurement/
8
+ **/*.swp
9
+ rubycritic/
10
+ spec/dummy/log/*
11
+ spec/dummy/tmp/*
12
+ spec/dummy/db/*.sqlite3
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
data/.rubocop.yml ADDED
@@ -0,0 +1,46 @@
1
+ require: rubocop-rspec
2
+ inherit_from: .rubocop_todo.yml
3
+
4
+ AllCops:
5
+ TargetRubyVersion: 2.5
6
+
7
+ Metrics/BlockLength:
8
+ Exclude:
9
+ - 'spec/**/*_spec.rb'
10
+ - 'spec/support/**/*.rb'
11
+ - '*.gemspec'
12
+
13
+ Lint/AmbiguousBlockAssociation:
14
+ Exclude:
15
+ - 'spec/**/*_spec.rb'
16
+
17
+ RSpec/AlignLeftLetBrace:
18
+ Enabled: true
19
+
20
+ RSpec/DescribedClass:
21
+ Exclude:
22
+ - 'spec/integration/yard/**/*_spec.rb'
23
+
24
+ RSpec/ExampleLength:
25
+ Exclude:
26
+ - 'spec/integration/yard/**/*_spec.rb'
27
+ - 'spec/integration/readme/**/*_spec.rb'
28
+
29
+ RSpec/MultipleExpectations:
30
+ Exclude:
31
+ - 'spec/integration/yard/**/*_spec.rb'
32
+ - 'spec/integration/readme/**/*_spec.rb'
33
+
34
+ RSpec/NestedGroups:
35
+ Max: 4
36
+ Exclude:
37
+ - 'spec/integration/yard/**/*.rb'
38
+
39
+ Style/HashEachMethods:
40
+ Enabled: true
41
+
42
+ Style/HashTransformKeys:
43
+ Enabled: true
44
+
45
+ Style/HashTransformValues:
46
+ Enabled: true
data/.rubocop_todo.yml ADDED
File without changes
data/Dockerfile ADDED
@@ -0,0 +1,21 @@
1
+ FROM darthjee/scripts:0.1.8 as scripts
2
+
3
+ FROM darthjee/rails_gems:0.5.4 as base
4
+
5
+ COPY --chown=app:app ./ /home/app/app/
6
+
7
+ ######################################
8
+
9
+ FROM base as builder
10
+
11
+ COPY --chown=app:app --from=scripts /home/scripts/builder/bundle_builder.sh /usr/local/sbin/bundle_builder.sh
12
+
13
+ ENV HOME_DIR /home/app
14
+ RUN bundle_builder.sh
15
+
16
+ #######################
17
+ #FINAL IMAGE
18
+ FROM base
19
+
20
+ COPY --chown=app:app --from=builder /home/app/bundle/ /usr/local/bundle/
21
+ RUN bundle install
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Favini
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,33 @@
1
+ Jace
2
+ ====
3
+ [![Code Climate](https://codeclimate.com/github/darthjee/magicka/badges/gpa.svg)](https://codeclimate.com/github/darthjee/magicka)
4
+ [![Test Coverage](https://codeclimate.com/github/darthjee/magicka/badges/coverage.svg)](https://codeclimate.com/github/darthjee/magicka/coverage)
5
+ [![Issue Count](https://codeclimate.com/github/darthjee/magicka/badges/issue_count.svg)](https://codeclimate.com/github/darthjee/magicka)
6
+ [![Gem Version](https://badge.fury.io/rb/magicka.svg)](https://badge.fury.io/rb/magicka)
7
+ [![Codacy Badge](https://api.codacy.com/project/badge/Grade/9836de08612e46b889c7978be2b72a14)](https://www.codacy.com/manual/darthjee/magicka?utm_source=github.com&utm_medium=referral&utm_content=darthjee/magicka&utm_campaign=Badge_Grade)
8
+ [![Inline docs](http://inch-ci.org/github/darthjee/magicka.svg?branch=master)](http://inch-ci.org/github/darthjee/magicka)
9
+
10
+ ![magicka](https://raw.githubusercontent.com/darthjee/magicka/master/magicka.jpg)
11
+
12
+ Yard Documentation
13
+ -------------------
14
+ [https://www.rubydoc.info/gems/magicka/0.0.1](https://www.rubydoc.info/gems/magicka/0.0.1)
15
+
16
+ Installation
17
+ ---------------
18
+
19
+ - Install it
20
+
21
+ ```ruby
22
+ gem install magicka
23
+ ```
24
+
25
+ - Or add Magicka to your `Gemfile` and `bundle install`:
26
+
27
+ ```ruby
28
+ gem 'magicka'
29
+ ```
30
+
31
+ ```bash
32
+ bundle install magicka
33
+ ```
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
5
+ require 'yardstick/rake/measurement'
6
+ require './config/yardstick'
7
+ require './config/rubycritc'
8
+
9
+ RSpec::Core::RakeTask.new
10
+
11
+ task default: :spec
12
+ task test: :spec
@@ -0,0 +1,2 @@
1
+ ignore:
2
+ - lib/magicka/version.rb
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rubycritic/rake_task'
4
+
5
+ RubyCritic::RakeTask.new do |task|
6
+ options = %w[
7
+ --path rubycritic/
8
+ --no-browser
9
+ ]
10
+ task.options = options.join(' ')
11
+ task.paths = %w[lib]
12
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'yardstick/rake/measurement'
4
+ require 'yardstick/rake/verify'
5
+ require 'yaml'
6
+
7
+ options = YAML.load_file('config/yardstick.yml')
8
+
9
+ Yardstick::Rake::Measurement.new(:yardstick_measure, options) do |measurement|
10
+ measurement.output = 'measurement/report.txt'
11
+ end
12
+
13
+ Yardstick::Rake::Verify.new(:verify_measurements, options)
@@ -0,0 +1,33 @@
1
+ threshold: 100
2
+ require_exact_threshold: false
3
+ rules:
4
+ ApiTag::Presence:
5
+ enabled: true
6
+ exclude: []
7
+ ApiTag::Inclusion:
8
+ enabled: true
9
+ exclude: []
10
+ ApiTag::ProtectedMethod:
11
+ enabled: true
12
+ exclude: []
13
+ ApiTag::PrivateMethod:
14
+ enabled: true
15
+ exclude: []
16
+ ExampleTag:
17
+ enabled: true
18
+ exclude: []
19
+ ReturnTag:
20
+ enabled: true
21
+ exclude: []
22
+ Summary::Presence:
23
+ enabled: true
24
+ exclude: []
25
+ Summary::Length:
26
+ enabled: true
27
+ exclude: []
28
+ Summary::Delimiter:
29
+ enabled: true
30
+ exclude: []
31
+ Summary::SingleLine:
32
+ enabled: true
33
+ exclude: []
@@ -0,0 +1,23 @@
1
+ version: '3'
2
+ services:
3
+ base: &base
4
+ image: magicka
5
+ working_dir: /home/app/app
6
+ volumes:
7
+ - .:/home/app/app
8
+
9
+ base_build:
10
+ <<: *base
11
+ build: .
12
+ command: echo done
13
+
14
+ magicka:
15
+ <<: *base
16
+ container_name: magicka
17
+ depends_on: [base_build]
18
+ command: /bin/bash -c 'rspec'
19
+
20
+ test_all:
21
+ <<: *base
22
+ depends_on: [base_build]
23
+ command: /bin/bash -c 'rspec && yard && rake yardstick_measure && rake verify_measurements'
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Magicka
4
+ VERSION = '0.0.1'
5
+ end
data/lib/magicka.rb ADDED
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ # @api public
4
+ # @author darthjee
5
+ class Magicka
6
+ autoload :VERSION, 'magicka/version'
7
+ end
data/magicka.gemspec ADDED
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require 'magicka/version'
6
+
7
+ Gem::Specification.new do |gem|
8
+ gem.name = 'magicka'
9
+ gem.version = Magicka::VERSION
10
+ gem.authors = ['DarthJee']
11
+ gem.email = ['darthjee@gmail.com']
12
+ gem.homepage = 'https://github.com/darthjee/magicka'
13
+ gem.description = 'Gem for easy form templating'
14
+ gem.summary = gem.description
15
+ gem.required_ruby_version = '>= 2.5.0'
16
+
17
+ gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
18
+ gem.executables = gem.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
+ gem.test_files = gem.files.grep(%r{^(test|gem|features)/})
20
+ gem.require_paths = ['lib']
21
+
22
+ gem.add_runtime_dependency 'activesupport', '~> 5.2.4.2'
23
+ gem.add_runtime_dependency 'sinclair', '>= 1.6.6'
24
+
25
+ gem.add_development_dependency 'actionpack', '5.2.4.2'
26
+ gem.add_development_dependency 'activerecord', '5.2.4.2'
27
+ gem.add_development_dependency 'bundler', '1.16.1'
28
+ gem.add_development_dependency 'factory_bot', '5.2.0'
29
+ gem.add_development_dependency 'nokogiri', '1.10.9'
30
+ gem.add_development_dependency 'pry', '0.12.2'
31
+ gem.add_development_dependency 'pry-nav', '0.3.0'
32
+ gem.add_development_dependency 'rails', '5.2.4.2'
33
+ gem.add_development_dependency 'rails-controller-testing', '1.0.4'
34
+ gem.add_development_dependency 'rake', '13.0.1'
35
+ gem.add_development_dependency 'reek', '5.6.0'
36
+ gem.add_development_dependency 'rspec', '3.9.0'
37
+ gem.add_development_dependency 'rspec-core', '3.9.1'
38
+ gem.add_development_dependency 'rspec-expectations', '3.9.1'
39
+ gem.add_development_dependency 'rspec-mocks', '3.9.1'
40
+ gem.add_development_dependency 'rspec-rails', '3.9.0'
41
+ gem.add_development_dependency 'rspec-support', '3.9.2'
42
+ gem.add_development_dependency 'rubocop', '0.80.1'
43
+ gem.add_development_dependency 'rubocop-rspec', '1.38.1'
44
+ gem.add_development_dependency 'rubycritic', '4.4.1'
45
+ gem.add_development_dependency 'simplecov', '0.17.1'
46
+ gem.add_development_dependency 'sqlite3', '1.4.2'
47
+ gem.add_development_dependency 'yard', '0.9.24'
48
+ gem.add_development_dependency 'yardstick', '0.9.9'
49
+ end
data/magicka.jpg ADDED
Binary file
@@ -0,0 +1 @@
1
+ ruby-2.5.0
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
4
+ # for example lib/tasks/capistrano.rake, and they
5
+ # will automatically be available to Rake.
6
+
7
+ require_relative 'config/application'
8
+
9
+ Rails.application.load_tasks
@@ -0,0 +1,3 @@
1
+ //= link_tree ../images
2
+ //= link_directory ../javascripts .js
3
+ //= link_directory ../stylesheets .css
File without changes
@@ -0,0 +1,15 @@
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 rails-ujs
14
+ //= require activestorage
15
+ //= 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
+ */
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ApplicationCable
4
+ class Channel < ActionCable::Channel::Base
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ApplicationCable
4
+ class Connection < ActionCable::Connection::Base
5
+ end
6
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class ApplicationController < ActionController::Base
4
+ end
File without changes
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ApplicationHelper
4
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class ApplicationJob < ActiveJob::Base
4
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ class ApplicationMailer < ActionMailer::Base
4
+ default from: 'from@example.com'
5
+ layout 'mailer'
6
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class ApplicationRecord < ActiveRecord::Base
4
+ self.abstract_class = true
5
+ end
File without changes
@@ -0,0 +1,15 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= csrf_meta_tags %>
6
+ <%= csp_meta_tag %>
7
+
8
+ <%= stylesheet_link_tag 'application', media: 'all' %>
9
+ <%= javascript_include_tag 'application' %>
10
+ </head>
11
+
12
+ <body>
13
+ <%= yield %>
14
+ </body>
15
+ </html>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <style>
6
+ /* Email styles need to be inline */
7
+ </style>
8
+ </head>
9
+
10
+ <body>
11
+ <%= yield %>
12
+ </body>
13
+ </html>
@@ -0,0 +1 @@
1
+ <%= yield %>
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
5
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ APP_PATH = File.expand_path('../config/application', __dir__)
5
+ require_relative '../config/boot'
6
+ require 'rails/commands'
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require_relative '../config/boot'
5
+ require 'rake'
6
+ Rake.application.run
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'fileutils'
5
+ # rubocop:disable Style/MixinUsage
6
+ include FileUtils
7
+ # rubocop:enable Style/MixinUsage
8
+
9
+ # path to your application root.
10
+ APP_ROOT = File.expand_path('..', __dir__)
11
+
12
+ def system!(*args)
13
+ system(*args) || abort("\n== Command #{args} failed ==")
14
+ end
15
+
16
+ chdir APP_ROOT do
17
+ # This script is a starting point to setup your application.
18
+ # Add necessary setup steps to this file.
19
+
20
+ puts '== Installing dependencies =='
21
+ system! 'gem install bundler --conservative'
22
+ system('bundle check') || system!('bundle install')
23
+
24
+ # Install JavaScript dependencies if using Yarn
25
+ # system('bin/yarn')
26
+
27
+ # puts "\n== Copying sample files =="
28
+ # unless File.exist?('config/database.yml')
29
+ # cp 'config/database.yml.sample', 'config/database.yml'
30
+ # end
31
+
32
+ puts "\n== Preparing database =="
33
+ system! 'bin/rails db:setup'
34
+
35
+ puts "\n== Removing old logs and tempfiles =="
36
+ system! 'bin/rails log:clear tmp:clear'
37
+
38
+ puts "\n== Restarting application server =="
39
+ system! 'bin/rails restart'
40
+ end