Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Jammjammjamm committed Jun 7, 2024
0 parents commit 29d66f3
Show file tree
Hide file tree
Showing 183 changed files with 27,474 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.env.local
.env.*.local
.env.development
.env.test
Dockerfile
.gitignore

.byebug_history
**/.DS_Store
.vscode/*
.project
.settings/.jsdtscope
.settings/org.eclipse.wst.jsdt.ui.superType.container
.settings/org.eclipse.wst.jsdt.ui.superType.name
.idea

/coverage
/data
/.git
/.github
/log
/tmp
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
JS_HOST=""
RI_CRD_REQUEST_GENERATOR_URI="https://crd-test.davinci.hl7.org"
3 changes: 3 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FHIR_RESOURCE_VALIDATOR_URL=http://localhost/hl7validatorapi
INFERNO_HOST=http://localhost:4567
REDIS_URL=redis://localhost:6379/0
3 changes: 3 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
REDIS_URL=redis://redis:6379/0
INFERNO_HOST=http://localhost
FHIR_RESOURCE_VALIDATOR_URL=http://hl7_validator_service:3500
2 changes: 2 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CRD_FHIR_RESOURCE_VALIDATOR_URL=https://example.com/hl7validatorapi
ASYNC_JOBS=false
54 changes: 54 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Ruby

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.1.2']

steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

test:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.1.2']
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run tests
run: bundle exec rake

lint:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.1.2']
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Rubocop
run: bundle exec rubocop
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/data/*.db
/data/redis/**/*.rdb
/data/redis/**/*.aof
/data/redis/**/*.manifest
/tmp
.env.local
.env.*.local
**/.DS_Store
.vscode/*
.project
.settings/.jsdtscope
.settings/org.eclipse.wst.jsdt.ui.superType.container
.settings/org.eclipse.wst.jsdt.ui.superType.name
.idea

/coverage
/spec/examples.txt
/docs/yard
.yardoc
node_modules
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--require spec_helper
87 changes: 87 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
require:
- rubocop-rake
- rubocop-rspec

AllCops:
NewCops: enable
SuggestExtensions: false
TargetRubyVersion: 3.1
Exclude:
- 'Gemfile'
- 'vendor/**/*'

Layout/LineLength:
Max: 120

Layout/MultilineMethodCallIndentation:
EnforcedStyle: 'indented'

Style/Documentation:
Enabled: false

Style/FrozenStringLiteralComment:
Enabled: false

Style/NumericLiterals:
Enabled: false

Style/OpenStructUse:
Exclude:
- 'spec/**/*'

Style/SymbolArray:
Enabled: false

Style/WordArray:
Enabled: false

# Use code climate's metrics measurement rather than rubocop's
Metrics/AbcSize:
Enabled: false

Metrics/BlockLength:
Enabled: false

Metrics/ClassLength:
Enabled: false

Metrics/MethodLength:
Enabled: false

Metrics/ModuleLength:
Enabled: false

Metrics/PerceivedComplexity:
Enabled: false

Metrics/ParameterLists:
Enabled: false

RSpec/AnyInstance:
Enabled: false

RSpec/ExampleLength:
Enabled: false

RSpec/FilePath:
CustomTransform:
DaVinciCRDTestKit: davinci_crd_test_kit

RSpec/MultipleExpectations:
Enabled: false

RSpec/MultipleMemoizedHelpers:
Enabled: false

RSpec/NestedGroups:
Enabled: false

RSpec/NotToNot:
EnforcedStyle: to_not

RSpec/SpecFilePathFormat:
CustomTransform:
DaVinciCRDTestKit: davinci_crd_test_kit

Gemspec/RequireMFA:
Enabled: false
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.1.2
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ruby 3.1.2
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM ruby:3.1.2

ENV INSTALL_PATH=/opt/inferno/
ENV APP_ENV=production
RUN mkdir -p $INSTALL_PATH

WORKDIR $INSTALL_PATH

ADD *.gemspec $INSTALL_PATH
ADD Gemfile* $INSTALL_PATH
ADD lib/davinci_crd_test_kit/version.rb $INSTALL_PATH/lib/davinci_crd_test_kit/version.rb
RUN gem update --system
RUN gem install bundler
# The below RUN line is commented out for development purposes, because any change to the
# required gems will break the dockerfile build process.
# If you want to run in Deploy mode, just run `bundle install` locally to update
# Gemfile.lock, and uncomment the following line.
# RUN bundle config set --local deployment 'true'
RUN bundle install

ADD . $INSTALL_PATH

EXPOSE 4567
CMD ["bundle", "exec", "puma"]
21 changes: 21 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# frozen_string_literal: true

source "https://rubygems.org"

gemspec

group :development, :test do
gem 'debug'

gem "rubocop", "~> 1.56"
gem 'rubocop-rspec', require: false
gem "rubocop-rake", "~> 0.6.0"
end

group :test do
gem 'database_cleaner-sequel', '~> 1.8'
gem 'factory_bot', '~> 6.1'
gem 'rack-test'
gem 'rspec', '~> 3.10'
gem 'webmock', '~> 3.11'
end
Loading

0 comments on commit 29d66f3

Please sign in to comment.