-
Notifications
You must be signed in to change notification settings - Fork 9
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
Showing
30 changed files
with
477 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ | |
*.bundle/install.log | ||
Gemfile.lock | ||
tmp/ | ||
.DS_Store | ||
.DS_Store | ||
.pronto.yml |
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,8 @@ | ||
all: | ||
exclude: | ||
- 'spec/**/*' | ||
bitbucket: | ||
slug: 'lab2023corp/cybele' | ||
username: 'username' | ||
password: 'password' | ||
max_warnings: 150 |
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,34 @@ | ||
# frozen_string_literal: true | ||
|
||
module Cybele | ||
module Helpers | ||
module Docker | ||
def setup_docker_development_env | ||
# Create docker files | ||
template 'docker/docker-compose.yml.erb', | ||
'docker-compose.yml', | ||
force: true | ||
template 'docker/Dockerfile.erb', | ||
'Dockerfile', | ||
force: true | ||
template 'docker/start-app.sh.erb', | ||
'bin/start-app.sh', | ||
force: true | ||
template 'docker/start-sidekiq.sh.erb', | ||
'bin/start-sidekiq.sh', | ||
force: true | ||
|
||
docker_dotenv_files | ||
end | ||
|
||
private | ||
|
||
def docker_dotenv_files | ||
append_file('env.sample', template_content('docker/docker_env_sample.erb')) | ||
%w[local staging production].each do |env| | ||
append_file(".env.#{env}", template_content("docker/docker_env_#{env}.erb")) | ||
end | ||
end | ||
end | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# frozen_string_literal: true | ||
|
||
module Cybele | ||
module Helpers | ||
module Pronto | ||
def configure_pronto | ||
# Create pronto files | ||
template 'pronto/example.pronto.yml.erb', | ||
'example.pronto.yml', | ||
force: true | ||
template 'pronto/example.pronto.yml.erb', | ||
'.pronto.yml', | ||
force: true | ||
template 'pronto/.rubocop.yml.erb', | ||
'.rubocop.yml', | ||
force: true | ||
template 'pronto/rubo.erb', | ||
'bin/rubo', | ||
force: true | ||
run 'chmod +x bin/rubo' | ||
|
||
# Ignore secret information file | ||
append_file('.gitignore', '.pronto.yml') | ||
end | ||
end | ||
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
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,26 @@ | ||
# frozen_string_literal: true | ||
|
||
module ForceSSLTestHelper | ||
def force_ssl | ||
ssl_test | ||
environment_test | ||
end | ||
|
||
private | ||
|
||
def ssl_test | ||
config_staging_file = content('config/environments/staging.rb') | ||
expect(config_staging_file).to match('config.force_ssl') | ||
|
||
config_production_file = content('config/environments/staging.rb') | ||
expect(config_production_file).to match('config.force_ssl') | ||
end | ||
|
||
def environment_test | ||
env_staging_file = content('.env.staging') | ||
expect(env_staging_file).to match('RAILS_FORCE_SSL=') | ||
|
||
env_production_file = content('.env.production') | ||
expect(env_production_file).to match('RAILS_FORCE_SSL=') | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# frozen_string_literal: true | ||
|
||
module ProntoTestHelpers | ||
def pronto_test | ||
file_exist_test | ||
file_content_test | ||
gitignore_test | ||
end | ||
|
||
private | ||
|
||
def file_exist_test | ||
gemfile_file = content('Gemfile') | ||
expect(gemfile_file).to match("gem 'pronto'") | ||
expect(gemfile_file).to match("gem 'pronto-flay'") | ||
expect(gemfile_file).to match("gem 'pronto-rubocop'") | ||
end | ||
|
||
def file_content_test # rubocop:disable Metrics/AbcSize | ||
expect(File).to exist(file_project_path('example.pronto.yml')) | ||
expect(File).to exist(file_project_path('.pronto.yml')) | ||
expect(File).to exist(file_project_path('.rubocop.yml')) | ||
expect(File).to exist(file_project_path('bin/rubo')) | ||
end | ||
|
||
def gitignore_test | ||
gemfile_file = content('.gitignore') | ||
expect(gemfile_file).to match('.pronto.yml') | ||
end | ||
end |
Oops, something went wrong.