Skip to content

Commit bc4df9e

Browse files
committed
adminos setup
1 parent c875251 commit bc4df9e

File tree

194 files changed

+12052
-230
lines changed

Some content is hidden

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

194 files changed

+12052
-230
lines changed

.babelrc

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"presets": [
3+
["env", {
4+
"modules": false,
5+
"targets": {
6+
"browsers": "> 1%",
7+
"uglify": true
8+
},
9+
"useBuiltIns": true
10+
}]
11+
],
12+
13+
"plugins": [
14+
"syntax-dynamic-import",
15+
"transform-object-rest-spread",
16+
["transform-class-properties", { "spec": true }]
17+
]
18+
}

.editorconfig

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# http://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
indent_style = space
8+
indent_size = 2
9+
end_of_line = lf
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true
12+
13+
[*.md]
14+
trim_trailing_whitespace = false

.env.staging

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
POSTAL_HOST='Please fill POSTAL_HOST in `.env.staging.local`'
2+
POSTAL_KEY='Please fill POSTAL_KEY in `.env.staging.local`'

.gitignore

+16
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,19 @@
2525

2626
# Ignore master key for decrypting credentials and more.
2727
/config/master.key
28+
/.bundle
29+
/config/application.yml
30+
/config/database.yml
31+
/log/*.log
32+
/log/*.pid
33+
/public/assets/*
34+
/public/system/*
35+
/tmp
36+
/db/*.sql.bz2
37+
.env
38+
spec/examples.txt
39+
/public/packs
40+
/public/packs-test
41+
/node_modules
42+
yarn-debug.log*
43+
.yarn-integrity

.gitlab-ci.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
variables:
2+
RAILS_ENV: test
3+
4+
before_script:
5+
- rvm install $(cat .ruby-version)
6+
- rvm use $(cat .ruby-version)
7+
- gem install bundler --no-ri --no-rdoc
8+
- bundle config build.pg --with-pg-config=/usr/pgsql-9.4/bin/pg_config
9+
- bin/setup
10+
11+
cache:
12+
untracked: true
13+
paths:
14+
- node_modules
15+
16+
deploy to staging:
17+
stage: deploy
18+
script:
19+
- eval $(ssh-agent -s)
20+
- ssh-add <(echo -e "$SSH_STAGING_KEY")
21+
- bin/cap staging deploy
22+
only:
23+
refs: [develop]
24+
when: manual
25+
environment:
26+
name: staging
27+
url: http://staging.example.test
28+
29+
deploy to production:
30+
stage: deploy
31+
script:
32+
- eval $(ssh-agent -s)
33+
- ssh-add <(echo -e "$SSH_PRODUCTION_KEY")
34+
- bin/cap production deploy
35+
only:
36+
refs: [master]
37+
when: manual
38+
environment:
39+
name: production
40+
url: http://example.test
41+
audit:
42+
script: bin/rake bundle:audit
43+
spec:
44+
script: bin/rake spec
45+
artifacts:
46+
paths:
47+
- coverage/
48+
- spec/examples.txt
49+
lint:
50+
script: bin/rubocop
51+
allow_failure: true

.postcssrc.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
plugins:
2+
postcss-import: {}
3+
postcss-cssnext: {}

.rspec

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--require spec_helper

.rubocop.yml

+118
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
inherit_from: .rubocop_todo.yml
2+
3+
AllCops:
4+
TargetRubyVersion: 2.5
5+
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
6+
# to ignore them, so only the ones explicitly set in this file are enabled.
7+
DisabledByDefault: true
8+
Exclude:
9+
- vendor
10+
11+
# Prefer &&/|| over and/or.
12+
Style/AndOr:
13+
Enabled: true
14+
15+
# Do not use braces for hash literals when they are the last argument of a
16+
# method call.
17+
Style/BracesAroundHashParameters:
18+
Enabled: true
19+
20+
# Align `when` with `case`.
21+
Layout/CaseIndentation:
22+
Enabled: true
23+
24+
# Align comments with method definitions.
25+
Layout/CommentIndentation:
26+
Enabled: true
27+
28+
# No extra empty lines.
29+
Layout/EmptyLines:
30+
Enabled: true
31+
32+
# In a regular class definition, no empty lines around the body.
33+
Layout/EmptyLinesAroundClassBody:
34+
Enabled: true
35+
36+
# In a regular method definition, no empty lines around the body.
37+
Layout/EmptyLinesAroundMethodBody:
38+
Enabled: true
39+
40+
# In a regular module definition, no empty lines around the body.
41+
Layout/EmptyLinesAroundModuleBody:
42+
Enabled: true
43+
44+
# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
45+
Style/HashSyntax:
46+
Enabled: true
47+
48+
# Method definitions after `private` or `protected` isolated calls need one
49+
# extra level of indentation.
50+
Layout/IndentationConsistency:
51+
Enabled: true
52+
53+
# Two spaces, no tabs (for indentation).
54+
Layout/IndentationWidth:
55+
Enabled: true
56+
57+
Layout/SpaceAfterColon:
58+
Enabled: true
59+
60+
Layout/SpaceAfterComma:
61+
Enabled: true
62+
63+
Layout/SpaceAroundEqualsInParameterDefault:
64+
Enabled: true
65+
66+
Layout/SpaceAroundKeyword:
67+
Enabled: true
68+
69+
Layout/SpaceAroundOperators:
70+
Enabled: true
71+
72+
Layout/SpaceBeforeFirstArg:
73+
Enabled: true
74+
75+
# Defining a method with parameters needs parentheses.
76+
Style/MethodDefParentheses:
77+
Enabled: true
78+
79+
# Use `foo {}` not `foo{}`.
80+
Layout/SpaceBeforeBlockBraces:
81+
Enabled: true
82+
83+
# Use `foo { bar }` not `foo {bar}`.
84+
Layout/SpaceInsideBlockBraces:
85+
Enabled: true
86+
87+
# Use `{ a: 1 }` not `{a:1}`.
88+
Layout/SpaceInsideHashLiteralBraces:
89+
Enabled: true
90+
91+
Layout/SpaceInsideParens:
92+
Enabled: true
93+
94+
# Detect hard tabs, no hard tabs.
95+
Layout/Tab:
96+
Enabled: true
97+
98+
# Blank lines should not have any spaces.
99+
Layout/TrailingBlankLines:
100+
Enabled: true
101+
102+
# No trailing whitespace.
103+
Layout/TrailingWhitespace:
104+
Enabled: true
105+
106+
# Use quotes for string literals when they are enough.
107+
Style/UnneededPercentQ:
108+
Enabled: true
109+
110+
# Align `end` with the matching keyword or starting expression except for
111+
# assignments, where it should be aligned with the LHS.
112+
Layout/EndAlignment:
113+
Enabled: true
114+
EnforcedStyleAlignWith: variable
115+
116+
# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
117+
Lint/RequireParentheses:
118+
Enabled: true

.rubocop_todo.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This configuration was generated by
2+
# `rubocop --auto-gen-config`
3+
# on 2019-01-09 18:05:55 +0300 using RuboCop version 0.62.0.
4+
# The point is for the user to remove these configuration records
5+
# one by one as the offenses are removed from the code base.
6+
# Note that changes in the inspected code, or installation of new
7+
# versions of RuboCop, may require this file to be generated again.
8+
9+
# Offense count: 4
10+
# Cop supports --auto-correct.
11+
Layout/CommentIndentation:
12+
Exclude:
13+
- 'Gemfile'
14+
- 'config/initializers/content_security_policy.rb'
15+
- 'spec/spec_helper.rb'
16+
17+
# Offense count: 1
18+
# Cop supports --auto-correct.
19+
Layout/EmptyLines:
20+
Exclude:
21+
- 'Gemfile'
22+
23+
# Offense count: 1
24+
# Cop supports --auto-correct.
25+
# Configuration parameters: EnforcedStyle.
26+
# SupportedStyles: final_newline, final_blank_line
27+
Layout/TrailingBlankLines:
28+
Exclude:
29+
- 'Gemfile'

Capfile

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Load DSL and set up stages
2+
require 'capistrano/setup'
3+
4+
# Include default deployment tasks
5+
require 'capistrano/deploy'
6+
require 'capistrano/rvm'
7+
require 'capistrano/bundler'
8+
require 'capistrano/rails'
9+
require 'capistrano3/unicorn'
10+
require 'capistrano-db-tasks'
11+
12+
# Loads custom tasks from `lib/capistrano/tasks' if you have any defined.
13+
Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r }
14+
Dir.glob('lib/capistrano/**/*.rb').each { |r| import r }

Gemfile

+47-1
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ ruby '2.5.1'
55

66
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
77
gem 'rails', '~> 5.2.2'
8+
# gem 'rails', '~> 5.2' # adminos conflict
89
# Use postgresql as the database for Active Record
910
gem 'pg', '>= 0.18', '< 2.0'
11+
# gem 'pg' # adminos conflict
1012
# Use Puma as the app server
1113
gem 'puma', '~> 3.11'
14+
# gem 'puma', '~> 3.7' # adminos conflict
1215
# Use SCSS for stylesheets
1316
gem 'sass-rails', '~> 5.0'
1417
# Use Uglifier as compressor for JavaScript assets
@@ -39,17 +42,60 @@ gem 'bootsnap', '>= 1.1.0', require: false
3942
group :development, :test do
4043
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
4144
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
45+
gem 'pry' # from adminos
46+
gem 'shoulda-matchers' # from adminos
47+
# gem 'shoulda-matchers' # adminos conflict
48+
gem 'bundler-audit' # from adminos
49+
gem 'database_cleaner' # from adminos
50+
gem 'factory_bot_rails' # from adminos
51+
gem 'faker' # from adminos
52+
gem 'minitest' # from adminos
53+
gem 'rspec-rails' # from adminos
4254
end
4355

4456
group :development do
4557
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
4658
gem 'web-console', '>= 3.3.0'
4759
gem 'listen', '>= 3.0.5', '< 3.2'
60+
# gem 'listen', '~> 3.0.5' # adminos conflict
4861
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
4962
gem 'spring'
50-
gem 'spring-watcher-listen', '~> 2.0.0'
63+
# gem 'spring-watcher-listen', '~> 2.0.0'
64+
gem 'capistrano', require: false # from adminos
65+
gem 'capistrano-bundler', require: false # from adminos
66+
gem 'capistrano-rails', require: false # from adminos
67+
gem 'capistrano-rvm', require: false # from adminos
68+
gem 'capistrano3-unicorn', require: false # from adminos
69+
gem 'guard' # from adminos
70+
gem 'guard-livereload', '~> 2.5', require: false # from adminos
5171
end
5272

5373

5474
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
5575
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
76+
77+
gem 'adminos', path: '../../github/adminos/'
78+
gem 'role_model' # from adminos
79+
gem 'webpacker', '~> 3.5' # from adminos
80+
gem 'actiontext', github: 'rails/actiontext', require: 'action_text', ref: 'cfe4674d3637c746cdb3c2b5131e2de498775529' # from adminos
81+
gem 'image_processing', '~> 1.2' # for Active Storage variants # from adminos
82+
group :production, :staging do
83+
gem 'unicorn' # from adminos
84+
end
85+
gem 'whenever', require: false # from adminos
86+
gem 'capistrano-db-tasks', require: false # from adminos
87+
gem 'sanitize' # from adminos
88+
gem 'mini_magick' # from adminos
89+
gem 'paper_trail' # from adminos
90+
gem 'postal-rails', '~> 1.0' # from adminos
91+
gem 'scoped_search' # from adminos
92+
gem 'omniauth' # from adminos
93+
gem 'omniauth-facebook' # from adminos
94+
gem 'omniauth-twitter' # from adminos
95+
gem 'omniauth-vkontakte' # from adminos
96+
gem 'axlsx', git: 'https://github.com/randym/axlsx.git' # from adminos
97+
gem 'spreadsheet_architect' # from adminos
98+
group :lint do
99+
gem 'rubocop' # from adminos
100+
end
101+
gem 'globalize' # from adminos

0 commit comments

Comments
 (0)