-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from customink/coding-bunny/cleanup
[DevOps] Rubygems Standards
- Loading branch information
Showing
13 changed files
with
137 additions
and
18 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 |
---|---|---|
@@ -0,0 +1,69 @@ | ||
--- | ||
# --------------------------------------------------------------------------------------------------------------------- | ||
# CircleCI Snippets | ||
# | ||
# Reusable snippets are defined below this section. These are yaml fragments that can injected into the standard | ||
# CircleCI configuration, reducing the complexity of the entire block. | ||
# --------------------------------------------------------------------------------------------------------------------- | ||
docker_image: &docker_image | ||
image: 916869144969.dkr.ecr.us-east-1.amazonaws.com/customink/base-ruby:2.7-v4.0 | ||
aws_auth: | ||
aws_access_key_id: ${PRODUCTION_AWS_ACCESS_KEY_ID} | ||
aws_secret_access_key: ${PRODUCTION_AWS_SECRET_ACCESS_KEY} | ||
|
||
# --------------------------------------------------------------------------------------------------------------------- | ||
# CircleCI Commands Configuration | ||
# | ||
# Commands are re-usable steps that can be shared across jobs. For example the installation of gems using bundler or | ||
# waiting on a database connection. By defining them inside the commands section, they can be invoked as any standard | ||
# command on the system, but will already be preconfigured. This allows us to keep the jobs definition small and clean | ||
# --------------------------------------------------------------------------------------------------------------------- | ||
version: 2.1 | ||
commands: | ||
bundle_install: | ||
description: "Performs the bundler installation, relying on the CircleCI cache for performance" | ||
steps: | ||
- restore_cache: | ||
keys: | ||
- bundler-cache-{{ checksum "is_it_up.gemspec" }} | ||
- run: | ||
name: "Bundle Install" | ||
command: bundle install --path=.bundle | ||
- save_cache: | ||
key: bundler-cache-{{ checksum "is_it_up.gemspec" }} | ||
paths: | ||
- .bundle | ||
minitest: | ||
description: "Runs Minitest with the correct configuration so it runs in parallel and is configured for CircleCI" | ||
steps: | ||
- run: | ||
name: "Minitest Test Suite" | ||
command: bundle exec rake | ||
# --------------------------------------------------------------------------------------------------------------------- | ||
# CircleCI Job Configuration | ||
# | ||
# This section defines all the available jobs that can be executed inside a Workflow. | ||
# Think of a Job as a batch of tasks that need to be performed to setup the environment and perform a specific task | ||
# such as running RSpec, uploading the test results to CodeClimate etc. | ||
# --------------------------------------------------------------------------------------------------------------------- | ||
jobs: | ||
tests: | ||
working_directory: ~/is_it_up | ||
docker: | ||
- <<: *docker_image | ||
environment: | ||
RAILS_ENV: test | ||
steps: | ||
- checkout | ||
- bundle_install | ||
- minitest | ||
- store_test_results: | ||
path: test/reports | ||
- store_artifacts: | ||
path: coverage | ||
workflows: | ||
version: 2.1 | ||
build-and-test: | ||
jobs: | ||
- tests: | ||
context: customink |
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 |
---|---|---|
|
@@ -11,7 +11,7 @@ doc/ | |
lib/bundler/man | ||
pkg | ||
rdoc | ||
spec/reports | ||
test/tmp | ||
test/version_tmp | ||
test/reports | ||
tmp |
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,9 @@ | ||
# IsItUp Changelog | ||
|
||
## 0.0.3 | ||
- Added `bin/console` for local testing | ||
- Added `bin/setup` for easier installation | ||
- Decoupled the gemspec from bundler and git | ||
- Applied Rubygem standards | ||
- Removed minitest deprecation warnings | ||
- Used `autoload` for configuring the gem |
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,14 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require 'bundler/setup' | ||
require 'is_it_up' | ||
|
||
# You can add fixtures and/or initialization code here to make experimenting | ||
# with your gem easier. You can also use a different console, if you like. | ||
|
||
# (If you use this, don't forget to add pry to your Gemfile!) | ||
# require "pry" | ||
# Pry.start | ||
|
||
require 'irb' | ||
::IRB.start(__FILE__) |
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 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
IFS=$'\n\t' | ||
set -vx | ||
|
||
bundle install | ||
|
||
# Do any other automated setup that you need to do here |
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,6 @@ | ||
#!/usr/bin/env sh | ||
set -e | ||
|
||
echo "== Running tests ==" | ||
|
||
bundle exec rake test |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
require "rack" | ||
require "is_it_up/version" | ||
require "is_it_up/middleware" | ||
require 'is_it_up/railtie' if defined?(Rails::Railtie) | ||
|
||
module IsItUp | ||
autoload :VERSION, "is_it_up/version" | ||
autoload :Middleware, "is_it_up/middleware" | ||
autoload :railtie, "is_it_up/railtie" if defined?(Rails::Railtie) | ||
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module IsItUp | ||
VERSION = "0.0.2" | ||
VERSION = "0.0.3" | ||
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