-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bdeb352
commit a1e8cdf
Showing
19 changed files
with
123 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
plugins: | ||
- remark-preset-lint-recommended |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ rules: | |
- tab | ||
|
||
max-line-length: | ||
- 80 | ||
- 100 | ||
- ignorePattern: /// https?:/// | ||
|
||
at-rule-no-unknown: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,3 @@ parserOptions: | |
## Libs: | ||
# google: true | ||
# Cccombo: true | ||
|
||
rules: | ||
no-var: | ||
- error |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
> 1% | ||
not IE 11 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative '../application' | ||
|
||
config = <%= @short_module_name %>::Application.config | ||
|
||
class << config | ||
private | ||
|
||
def find_config_file(filename, required:) | ||
file_path = nil | ||
|
||
loop do | ||
file_path = super | ||
break | ||
rescue Flame::Errors::ConfigFileNotFoundError => e | ||
puts e.message | ||
|
||
next if ask_to_check_config_files | ||
|
||
required ? abort : break | ||
end | ||
|
||
file_path | ||
end | ||
|
||
def ask_to_check_config_files | ||
highline.choose do |menu| | ||
menu.layout = :one_line | ||
|
||
menu.prompt = 'Do you want to check config files? ' | ||
|
||
menu.choice(:yes) do | ||
system 'toys config check' | ||
true | ||
end | ||
|
||
menu.choice(:no) { false } | ||
end | ||
end | ||
|
||
def highline | ||
@highline ||= begin | ||
require 'highline' | ||
HighLine.new | ||
end | ||
end | ||
end | ||
|
||
using GorillaPatch::Inflections | ||
|
||
config.instance_exec do | ||
self[:root_dir] = File.realpath "#{__dir__}/.." | ||
|
||
self[:pids_dir] = "#{self[:tmp_dir]}/pids" | ||
|
||
self[:stdout_file] = "#{self[:log_dir]}/out" | ||
self[:stderr_file] = "#{self[:log_dir]}/err" | ||
|
||
%i[session site].each do |config_name| | ||
load_yaml config_name, required: true | ||
end | ||
|
||
%w[Server Sentry R18n Mail Sequel Shrine].each do |processor_name| | ||
require_relative "processors/#{processor_name.underscore}" | ||
<%= @short_module_name %>::Config::Processors.const_get(processor_name).new self | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module <%= @module_name %> | ||
::<%= @short_module_name %> = ::<%= @module_name %> | ||
|
||
APP_DIRS = [ | ||
'lib', | ||
'config', | ||
'models', | ||
# 'policies', | ||
'helpers', | ||
'mailers', | ||
# 'actions', | ||
'forms', | ||
# 'view_objects', | ||
'controllers' | ||
].freeze | ||
end |
Oops, something went wrong.