redox-engine 1.0.0 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 818196fb8cf68914694855815e60bd81517468c5c0af6a864fb39438e7863f03
4
- data.tar.gz: 48ad217c0598c29a0e5d7c94fc3bb1e962df5eb27b76b39ee3ffbbd55dbd70ea
3
+ metadata.gz: dbf1723442626f96794b5ab2fc8ed408cde77aaf75696a03983a3a99424e7f7a
4
+ data.tar.gz: b1c7bf8bebbb5e7497b01ebd200b93acfe0ce5c7f303163cfacae837141f73e1
5
5
  SHA512:
6
- metadata.gz: 5a5d796e86561d1fd8a859a40f7da6cc696c32f97f73f9746d04b58bbab23788026cf8e10f13de4bbfdd0f1d2d2ab7478de45c6f809863d311458108d6aeb7fe
7
- data.tar.gz: c30704aa7bc1ecce4910792ff8090f5869848844360c4d6af541336fb4b0b1d3601ff49624fdc2ebb300bf6948eece4c56068b24238581fb42c2ebeab7a7b4f7
6
+ metadata.gz: d4ad4310d97ded5b77f6b6d15752b4553590bfcd6d868556006217d9ec435bba9eb424f14b55dbc1af8ddbac1e0cd4746ffdf924676b2a7a67b4ae8004fe1e74
7
+ data.tar.gz: d6007f25aa329618c18261c8e53ce30c553f6d6f88ee17f0303a1d154336d5c5e2b9c12240141414a8246ee41823e3e59ac81e1f27b8a09c60c2e6cbc06b7742
data/.gitignore CHANGED
@@ -12,3 +12,5 @@
12
12
  /test/vcr/
13
13
 
14
14
  *.gem
15
+
16
+ /doc/
@@ -30,4 +30,9 @@ Metrics/ClassLength:
30
30
 
31
31
  Style/RescueModifier:
32
32
  Exclude:
33
- - 'lib/core_ext/hash.rb'
33
+ - 'lib/core_ext/hash.rb'
34
+
35
+ Naming/FileName:
36
+ Exclude:
37
+ - 'lib/**/*'
38
+ - 'test/**/*'
@@ -4,7 +4,12 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
 
7
- ## [1.0.0] - 2018-04-04 - (Renamed 0.1.3)
7
+ ## [1.0.1] - 2018-04-04
8
+ - Refactor + linting
9
+ - Change to README
10
+
11
+ ## [1.0.0] - 2018-04-04
12
+ - (Renamed 0.1.3)
8
13
  - Change RedoxEngine::RedoxEngine to RedoxEngine::Client
9
14
  - Refactor Module to accept configuration
10
15
  - Refactor Client to pass Rubocop linting
data/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # RedoxEngine
2
- Ruby API wrapper for [RedoxEngine Engine](https://www.redoxengine.com)
2
+ Ruby API wrapper for [RedoxEngine](https://www.redoxengine.com)
3
3
 
4
4
  ## Installation
5
5
 
6
6
  Add this line to your application's Gemfile:
7
7
 
8
8
  ```ruby
9
- gem 'redox'
9
+ gem 'redox-engine'
10
10
  ```
11
11
 
12
12
  And then execute:
@@ -15,7 +15,7 @@ And then execute:
15
15
 
16
16
  Or install it yourself as:
17
17
 
18
- $ gem install redox
18
+ $ gem install redox-engine
19
19
 
20
20
  ## Usage
21
21
 
@@ -29,16 +29,21 @@ end
29
29
 
30
30
  ```ruby
31
31
  source = {
32
- Name: 'RedoxEngine Dev Tools',
33
- ID: ENV['REDOX_SRC_ID']
32
+ Name => Your Source Name,
33
+ ID => <REDOX_SRC_ID>
34
34
  }
35
35
 
36
- destinations = [
37
- {
38
- Name: 'RedoxEngine EMR',
39
- ID: ENV['REDOX_DEST_ID']
40
- }
41
- ]
36
+ destinations = {
37
+ PatientAdmin => {
38
+ Name => Destination Name,
39
+ ID => <REDOX_DEST_ID>
40
+ },
41
+ ClinicalSummary => {
42
+ Name => Destination Name,
43
+ ID => <REDOX_DEST_ID>
44
+ },
45
+ ...
46
+ }
42
47
 
43
48
  redox = RedoxEngine::Client.new(
44
49
  source: source,
@@ -77,6 +82,7 @@ c.access_token # => returns new token
77
82
  ```
78
83
 
79
84
  ## Testing
85
+
80
86
  To run the test suite, save the following in redox_keys.yml in the test/directory (already in the .gitignore for your convenience):
81
87
 
82
88
  ```yaml
@@ -28,7 +28,9 @@ module RedoxEngine
28
28
  def initialize(
29
29
  source:, destinations:, test_mode: true, token: nil, refresh_token: nil
30
30
  )
31
- raise APIKeyError if [RedoxEngine.api_key, RedoxEngine.secret].any?(&:nil?)
31
+ if [RedoxEngine.api_key, RedoxEngine.secret].any?(&:nil?)
32
+ raise APIKeyError
33
+ end
32
34
  @refresh_token = refresh_token
33
35
  @access_token = token || fetch_access_token
34
36
 
@@ -5,5 +5,16 @@ module RedoxEngine
5
5
  class TokenError < StandardError; end
6
6
 
7
7
  # raise this on RedoxEngine::Client.new without setting api_key/secret
8
- class APIKeyError < StandardError; end
8
+ class APIKeyError < StandardError
9
+ KEY_ERROR_MSG = "
10
+ Keys not found. Please set API Key/secret using RedoxEngine.configure:
11
+ RedoxEngine.configure do |redox|
12
+ redox.api_key = <API Key>
13
+ redox.secret = <Secret>
14
+ end
15
+ ".freeze
16
+ def initialize(message = nil)
17
+ super(message || KEY_ERROR_MSG)
18
+ end
19
+ end
9
20
  end
@@ -1,3 +1,3 @@
1
1
  module RedoxEngine
2
- VERSION = '1.0.0'.freeze
2
+ VERSION = '1.0.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redox-engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Clark (forked from)