Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #266 from onc-healthit/development
Browse files Browse the repository at this point in the history
Version 2.4
  • Loading branch information
radamson committed Jul 31, 2019
2 parents d321878 + 16db2d2 commit 151a396
Show file tree
Hide file tree
Showing 88 changed files with 5,757 additions and 1,763 deletions.
30 changes: 30 additions & 0 deletions .codeclimate.yml
@@ -0,0 +1,30 @@
version: "2" # required to adjust maintainability checks
exclude_patterns:
- "!**/test/"
checks:
argument-count:
enabled: true
complex-logic:
enabled: true
file-lines:
enabled: true
method-complexity:
enabled: true
method-count:
enabled: false
method-lines:
enabled: true
nested-control-flow:
enabled: true
return-statements:
enabled: false
similar-code:
enabled: false
identical-code:
enabled: true
plugins:
rubocop:
enabled: true
channel: rubocop-0-67
config:
file: .rubocop.yml
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -11,4 +11,5 @@ data/*
coverage
tmp/*
.vscode/*
resources/terminology/*
resources/terminology/*
.ruby-version
4 changes: 4 additions & 0 deletions .rubocop-windows.yml
@@ -0,0 +1,4 @@
inherit_from: .rubocop.yml

Layout/EndOfLine:
EnforcedStyle: crlf
22 changes: 22 additions & 0 deletions .rubocop.yml
Expand Up @@ -21,3 +21,25 @@ Metrics/LineLength:
Exclude:
- 'lib/app/modules/**/*'
- 'lib/app/helpers/browser_logic.rb'

# 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
34 changes: 0 additions & 34 deletions .rubocop_todo.yml
Expand Up @@ -32,49 +32,15 @@ Lint/UselessAssignment:
Exclude:
- 'lib/tasks/tasks.rake'

# Offense count: 150
Metrics/AbcSize:
Max: 176

# Offense count: 38
# Configuration parameters: CountComments, ExcludedMethods.
# ExcludedMethods: refine
Metrics/BlockLength:
Max: 388

# Offense count: 3
# Configuration parameters: CountBlocks.
Metrics/BlockNesting:
Max: 4

# Offense count: 60
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 594

# Offense count: 38
Metrics/CyclomaticComplexity:
Max: 33

# Offense count: 140
# Configuration parameters: CountComments, ExcludedMethods.
Metrics/MethodLength:
Max: 142

# Offense count: 1
# Configuration parameters: CountComments.
Metrics/ModuleLength:
Max: 199

# Offense count: 2
# Configuration parameters: CountKeywordArgs.
Metrics/ParameterLists:
Max: 10

# Offense count: 19
Metrics/PerceivedComplexity:
Max: 32

# Offense count: 33
Style/ClassVars:
Exclude:
Expand Down
15 changes: 11 additions & 4 deletions .travis.yml
Expand Up @@ -4,16 +4,23 @@ services:
rvm:
- 2.5
- 2.6
before_install:
- gem update --system
- gem install bundler
- docker-compose build
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- bundle exec rake
# For unknown reasons, the test-reporter fails when using docker if run in an
# after_script section
- ./cc-test-reporter after-build -t simplecov --exit-code $TRAVIS_TEST_RESULT
- docker-compose run ruby_server bundle exec rake
- bundle exec rubocop
notifications:
email:
recipients:
- inferno@groups.mitre.org
on_failure: change
before_install:
- gem update --system
- gem install bundler
- docker-compose build
2 changes: 1 addition & 1 deletion Dockerfile
Expand Up @@ -2,7 +2,7 @@ FROM ruby:2.5

# Install gems into a temporary directory
COPY Gemfile* ./
RUN bundle install
RUN gem install bundler && bundle install

# Expose the port
EXPOSE 4567
1 change: 1 addition & 0 deletions Gemfile
Expand Up @@ -12,6 +12,7 @@ gem 'fhir_client'
gem 'json-jwt'
gem 'kramdown'
gem 'pry'
gem 'pry-byebug'
gem 'rack-test'
gem 'rake'
gem 'rb-readline'
Expand Down
8 changes: 8 additions & 0 deletions Gemfile.lock
Expand Up @@ -22,6 +22,7 @@ GEM
bloomer (1.0.0)
bitarray
msgpack
byebug (11.0.1)
childprocess (1.0.1)
rake (< 13.0)
coderay (1.1.2)
Expand Down Expand Up @@ -152,6 +153,9 @@ GEM
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
pry-byebug (3.7.0)
byebug (~> 11.0)
pry (~> 0.10)
psych (3.1.0)
public_suffix (3.0.3)
rack (2.0.7)
Expand Down Expand Up @@ -233,6 +237,7 @@ DEPENDENCIES
json-jwt
kramdown
pry
pry-byebug
rack-test
rake
rb-readline
Expand All @@ -246,3 +251,6 @@ DEPENDENCIES
thin
time_difference
webmock

BUNDLED WITH
2.0.2
18 changes: 9 additions & 9 deletions README.md
@@ -1,6 +1,6 @@
<img src="https://github.com/siteadmin/inferno/blob/master/public/images/inferno_logo.png" width="300px" />
<img src="https://github.com/onc-healthit/inferno/blob/master/public/images/inferno_logo.png" width="300px" />

[![Build Status](https://travis-ci.org/siteadmin/inferno.svg?branch=master)](https://travis-ci.org/siteadmin/inferno)
[![Build Status](https://travis-ci.org/onc-healthit/inferno.svg?branch=master)](https://travis-ci.org/onc-healthit/inferno)

Inferno is an open source tool that tests whether patients can access their health data through a standard interface.
It makes HTTP(S) requests to test your server's conformance to authentication, authorization, and FHIR content standards and reports the results back to you.
Expand All @@ -9,7 +9,7 @@ This application creates test clients that exercise the range of requirements of

## Using Inferno

If you are new to FHIR or SMART-on-FHIR, you may want to review the [Inferno Quick Start Guide](https://github.com/siteadmin/inferno/wiki/Quick-Start-Guide).
If you are new to FHIR or SMART-on-FHIR, you may want to review the [Inferno Quick Start Guide](https://github.com/onc-healthit/inferno/wiki/Quick-Start-Guide).

## Installation and Deployment

Expand All @@ -18,14 +18,14 @@ If you are new to FHIR or SMART-on-FHIR, you may want to review the [Inferno Qui
Docker is the recommended installation method for Windows devices and can also be used on Linux and MacOS hosts.

1. Install [Docker](https://www.docker.com/) for the host platform as well as the [docker-compose](https://docs.docker.com/compose/install/) tool (which may be included in the distribution, as is the case for Windows and MacOS).
2. Download the [latest release of the `inferno` project](https://github.com/siteadmin/inferno/releases) to your local computer on a directory of your choice.
2. Download the [latest release of the `inferno` project](https://github.com/onc-healthit/inferno/releases) to your local computer on a directory of your choice.
3. Open a terminal in the directory where the project was downloaded (above).
4. Run the command `docker-compose up` to start the server. This will automatically build the Docker image and launch both the ruby server (using unicorn) and an NGINX web server.
5. Navigate to http://localhost:8080 to find the running application.

If the docker image gets out of sync with the underlying system, such as when new dependencies are added to the application, you need to run `docker-compose up --build` to rebuild the containers.

Check out the [Troubleshooting Documentation](https://github.com/siteadmin/inferno/wiki/Troubleshooting) for help.
Check out the [Troubleshooting Documentation](https://github.com/onc-healthit/inferno/wiki/Troubleshooting) for help.

### Native Installation

Expand All @@ -39,7 +39,7 @@ And run the following commands from the terminal:

```sh
# MacOS or Linux
git clone https://github.com/siteadmin/inferno
git clone https://github.com/onc-healthit/inferno
cd inferno
bundle install
bundle exec rackup
Expand All @@ -59,7 +59,7 @@ Inferno can also be deployed onto a server to test many different instances of t

Deployment on a remote server can be done by using a modified form of the Docker containers provided (see above) or by direct installation on the remote host.

Please see the file [deployment-configuration.md](https://github.com/siteadmin/inferno/blob/master/deployment-configuration.md) for details.
Please see the file [deployment-configuration.md](https://github.com/onc-healthit/inferno/blob/master/deployment-configuration.md) for details.

### Reference Implementation

Expand All @@ -82,7 +82,7 @@ bundle exec rake test
## Inspecting and Exporting Tests

Tests are written to be easily understood, even by those who aren't familiar with Ruby. They can be
viewed directly [in this repository](https://github.com/siteadmin/inferno/tree/master/lib/app/modules).
viewed directly [in this repository](https://github.com/onc-healthit/inferno/tree/master/lib/app/sequences).

Tests contain metadata that provide additional details and traceability to standards. The active tests and related metadata can be exported into CSV format and saved to a file named `testlist.csv` with the following command:

Expand Down Expand Up @@ -134,7 +134,7 @@ bundle exec rake inferno:generate_script[https://my-server.org/data,onc]
* The `confidential_client` field is a boolean and must be provided as `true` or `false`

## Using with Continuous Integration Systems
Instructions and examples are available in the [Continuous Integration Section of the Wiki](https://github.com/siteadmin/inferno/wiki/Using-with-Continuous-Integration-Systems).
Instructions and examples are available in the [Continuous Integration Section of the Wiki](https://github.com/onc-healthit/inferno/wiki/Using-with-Continuous-Integration-Systems).

## Contact Us
The Inferno development team can be reached by email at inferno@groups.mitre.org. Inferno also has a dedicated [HL7 FHIR chat channel](https://chat.fhir.org/#narrow/stream/153-inferno).
Expand Down
6 changes: 3 additions & 3 deletions config.yml
Expand Up @@ -57,20 +57,20 @@ presets:
inferno_uri: https://inferno.healthit.gov
client_id: vkPKDPcTIEMaw5Uf-DdUUtNMFMZaX0
client_secret: LS1nY3JFU3FDeEs0cWoxQWF6TVJFNU05RmZZNGZhZ2Vwb2JYWjdSWWJGakwwNTZ2Vng=
instructions: https://github.com/siteadmin/inferno/wiki/SITE-Preset-Instructions
instructions: https://github.com/onc-healthit/inferno/wiki/SITE-Preset-Instructions
site_test_healthit_gov:
name: SITE DSTU2 FHIR Sandbox
uri: https://fhir.sitenv.org/secure/fhir
module: onc
inferno_uri: https://infernotest.healthit.gov
client_id: TrToU5piE-dJ1g6PBG1elFV4r9KLmH
client_secret: ckFqb1ZhbmFMQS13WDE0c1dTLWxSdGRLSE8yUXpWNS1vSnd6azNrMmU3Y0JPdDRja3U=
instructions: https://github.com/siteadmin/inferno/wiki/SITE-Preset-Instructions
instructions: https://github.com/onc-healthit/inferno/wiki/SITE-Preset-Instructions
site_local:
name: SITE DSTU2 FHIR Sandbox
uri: https://fhir.sitenv.org/secure/fhir
module: onc
inferno_uri: http://localhost:4567
client_id: Yg0o6sJ8I8CfVVyHz1eA0m8jv6sXwe
client_secret: UDVrTXlna0NvcGRQZ1VhMkZaZzQ0R1FxVGdtTWxFMXVoT3pPd1VRMUN4MFVkV25Gejk=
instructions: https://github.com/siteadmin/inferno/wiki/SITE-Preset-Instructions
instructions: https://github.com/onc-healthit/inferno/wiki/SITE-Preset-Instructions
6 changes: 3 additions & 3 deletions deployment-configuration.md
Expand Up @@ -23,7 +23,7 @@ It is important to open port `80` for HTTP and port `22` for SSH if you need to
"Review and Launch" button, click next button until you get to the Security Groups option. Ensure 80 is accessible from anywhere and 22 is
available from an IP range from which you will connect. Below is an example:

![Security Groups Configuration](https://raw.githubusercontent.com/siteadmin/inferno/master/deployment-files/security-groups.png "Security Groups Configuration")
![Security Groups Configuration](https://raw.githubusercontent.com/onc-healthit/inferno/master/deployment-files/security-groups.png "Security Groups Configuration")

After this step is done, launch the instance. Obtain your instance's IP or host name from the AWS console. Point a web browser to the instance using the IP address or host name.

Expand Down Expand Up @@ -70,7 +70,7 @@ Now, issue the following commands to setup Inferno.
sudo apt-get install git ruby-bundler ruby-dev
sudo apt-get install sqlite3 libsqlite3-dev
sudo apt-get install build-essential patch zlib1g-dev liblzma-dev
git clone https://github.com/siteadmin/inferno.git
git clone https://github.com/onc-healthit/inferno.git
cd inferno
bundle install

Expand Down Expand Up @@ -183,7 +183,7 @@ This section describes how to setup the tool using Apache2 using Passenger.
sudo apt-get install apache2 git ruby-bundler ruby-dev
sudo apt-get install sqlite3 libsqlite3-dev
sudo apt-get install build-essential patch zlib1g-dev liblzma-dev
git clone https://github.com/siteadmin/inferno.git
git clone https://github.com/onc-healthit/inferno.git
cd inferno
bundle install

Expand Down

0 comments on commit 151a396

Please sign in to comment.