bonnie_bundler 2.2.5 → 3.0.0

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: 73fb66a28d5fd842de1a34b699f8c7f2a2bf0e73f384c69c72714b9aaecf608b
4
- data.tar.gz: 40d84a8e2ebc92eb0cac9492fbf13a4c883d5275ca3f1a7f6f36e35af3979e90
3
+ metadata.gz: 327ca5f0f9c6e8b7d15aec442443fcf5cf74162967fc814a8edd80e2804dacf9
4
+ data.tar.gz: 0f8b190e0a145f8b188b1d0d707c17a5fdbcaefac8573c7244e825a5f2d80a51
5
5
  SHA512:
6
- metadata.gz: 5be05ce7481e06afd9ca223b27ea4276823dc1fe05efea78820577d1743b886643eecfbf3baf4923637cdbdc2885d76d118545d0e1692a8d1a25573cdf549e9e
7
- data.tar.gz: 90d9f1fe7edf0e397febdfcfa47cb99e9adca9ecc35c28d6ab560578fc5fa8e344a797fb7f1c2c7e417402d7579dfc1c3786b903f58570ba016dcb828791d9c7
6
+ metadata.gz: c94fc587d3a98914a9f9dd7cbb71025b9b56c1cd563f92f17b048f2e03286206890ff80609cdabd24a226d6086a63e6d4e849908f51a7d5afda8b8d5980cd3d3
7
+ data.tar.gz: 33ded10c16749888bb8658e6a4bdb5f8b30d48317f98779377d19a516a30c1aecfd02b6d4be4c9d8ef34ba1493bf76c21acf33d05f637645f5c75ed326c95863
@@ -0,0 +1,268 @@
1
+ title = "gitleaks config"
2
+
3
+ [[rules]]
4
+ description = "AWS Manager ID"
5
+ regex = '''(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}'''
6
+ tags = ["key", "AWS"]
7
+
8
+ [[rules]]
9
+ description = "AWS cred file info"
10
+ regex = '''(?i)(aws_access_key_id|aws_secret_access_key)(.{0,20})?=.[0-9a-zA-Z\/+]{20,40}'''
11
+ tags = ["AWS"]
12
+
13
+ [[rules]]
14
+ description = "AWS Secret Key"
15
+ regex = '''(?i)aws(.{0,20})?(?-i)['\"][0-9a-zA-Z\/+]{40}['\"]'''
16
+ tags = ["key", "AWS"]
17
+
18
+ [[rules]]
19
+ description = "AWS MWS key"
20
+ regex = '''amzn\.mws\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'''
21
+ tags = ["key", "AWS", "MWS"]
22
+
23
+ [[rules]]
24
+ description = "Facebook Secret Key"
25
+ regex = '''(?i)(facebook|fb)(.{0,20})?(?-i)['\"][0-9a-f]{32}['\"]'''
26
+ tags = ["key", "Facebook"]
27
+
28
+ [[rules]]
29
+ description = "Facebook Client ID"
30
+ regex = '''(?i)(facebook|fb)(.{0,20})?['\"][0-9]{13,17}['\"]'''
31
+ tags = ["key", "Facebook"]
32
+
33
+ [[rules]]
34
+ description = "Twitter Secret Key"
35
+ regex = '''(?i)twitter(.{0,20})?['\"][0-9a-z]{35,44}['\"]'''
36
+ tags = ["key", "Twitter"]
37
+
38
+ [[rules]]
39
+ description = "Twitter Client ID"
40
+ regex = '''(?i)twitter(.{0,20})?['\"][0-9a-z]{18,25}['\"]'''
41
+ tags = ["client", "Twitter"]
42
+
43
+ [[rules]]
44
+ description = "Github"
45
+ regex = '''(?i)github(.{0,20})?(?-i)['\"][0-9a-zA-Z]{35,40}['\"]'''
46
+ tags = ["key", "Github"]
47
+
48
+ [[rules]]
49
+ description = "LinkedIn Client ID"
50
+ regex = '''(?i)linkedin(.{0,20})?(?-i)['\"][0-9a-z]{12}['\"]'''
51
+ tags = ["client", "LinkedIn"]
52
+
53
+ [[rules]]
54
+ description = "LinkedIn Secret Key"
55
+ regex = '''(?i)linkedin(.{0,20})?['\"][0-9a-z]{16}['\"]'''
56
+ tags = ["secret", "LinkedIn"]
57
+
58
+ [[rules]]
59
+ description = "Slack"
60
+ regex = '''xox[baprs]-([0-9a-zA-Z]{10,48})?'''
61
+ tags = ["key", "Slack"]
62
+
63
+ [[rules]]
64
+ description = "EC"
65
+ regex = '''-----BEGIN EC PRIVATE KEY-----'''
66
+ tags = ["key", "EC"]
67
+
68
+
69
+ [[rules]]
70
+ description = "Google API key"
71
+ regex = '''AIza[0-9A-Za-z\\-_]{35}'''
72
+ tags = ["key", "Google"]
73
+
74
+
75
+ [[rules]]
76
+ description = "Heroku API key"
77
+ regex = '''(?i)heroku(.{0,20})?['"][0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}['"]'''
78
+ tags = ["key", "Heroku"]
79
+
80
+ [[rules]]
81
+ description = "MailChimp API key"
82
+ regex = '''(?i)(mailchimp|mc)(.{0,20})?['"][0-9a-f]{32}-us[0-9]{1,2}['"]'''
83
+ tags = ["key", "Mailchimp"]
84
+
85
+ [[rules]]
86
+ description = "Mailgun API key"
87
+ regex = '''(?i)(mailgun|mg)(.{0,20})?['"][0-9a-z]{32}['"]'''
88
+ tags = ["key", "Mailgun"]
89
+
90
+ [[rules]]
91
+ description = "PayPal Braintree access token"
92
+ regex = '''access_token\$production\$[0-9a-z]{16}\$[0-9a-f]{32}'''
93
+ tags = ["key", "Paypal"]
94
+
95
+ [[rules]]
96
+ description = "Picatic API key"
97
+ regex = '''sk_live_[0-9a-z]{32}'''
98
+ tags = ["key", "Picatic"]
99
+
100
+ [[rules]]
101
+ description = "Slack Webhook"
102
+ regex = '''https://hooks.slack.com/services/T[a-zA-Z0-9_]{8}/B[a-zA-Z0-9_]{8}/[a-zA-Z0-9_]{24}'''
103
+ tags = ["key", "slack"]
104
+
105
+ [[rules]]
106
+ description = "Stripe API key"
107
+ regex = '''(?i)stripe(.{0,20})?['\"][sk|rk]_live_[0-9a-zA-Z]{24}'''
108
+ tags = ["key", "Stripe"]
109
+
110
+ [[rules]]
111
+ description = "Square access token"
112
+ regex = '''sq0atp-[0-9A-Za-z\-_]{22}'''
113
+ tags = ["key", "square"]
114
+
115
+ [[rules]]
116
+ description = "Square OAuth secret"
117
+ regex = '''sq0csp-[0-9A-Za-z\\-_]{43}'''
118
+ tags = ["key", "square"]
119
+
120
+ [[rules]]
121
+ description = "Twilio API key"
122
+ regex = '''(?i)twilio(.{0,20})?['\"][0-9a-f]{32}['\"]'''
123
+ tags = ["key", "twilio"]
124
+
125
+ [[rules]]
126
+ description = "Env Var"
127
+ regex = '''(?i)(apikey|secret|key|api|password|pass|pw|host)=[0-9a-zA-Z-_.{}]{4,120}'''
128
+
129
+ [[rules.whitelist]]
130
+ regex='''Key\='''
131
+ description = "Reference to repo for sonarqube"
132
+ file = '''(?i)jenkinsfile'''
133
+
134
+ [[rules.whitelist]]
135
+ regex='''config.s3.aws_secret_access_key'''
136
+ description = "variable placeholder"
137
+ file = '''s3_connector.py'''
138
+
139
+ [[rules.whitelist]]
140
+ regex='''key=os\.path\.dirname'''
141
+ description = "env var whitelist"
142
+
143
+ [[rules.whitelist]]
144
+ regex='''.*os\.getenv.*|.*key=os\.environ\.get'''
145
+
146
+
147
+ [[rules.whitelist]]
148
+ regex='''.*(?i)(s3secretkey|ENV_VAR|test_token|test\/key|testkey|Bearer|key.pem|key-specification|hadoop.*|Key=None|HOST=minio|KEY=S3AccessKey|api_url(),data.*|key=_file_mmset_sort_key)'''
149
+ #[[rules]]
150
+ # description = "Port"
151
+ # regex = '''(?i)port(.{0,4})?[0-9]{1,10}'''
152
+ # [[rules.whitelist]]
153
+ # regex = '''(?i)port '''
154
+ # description = "ignore export "
155
+
156
+
157
+
158
+ #[[rules]]
159
+ # description = "Email"
160
+ # regex = '''[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}'''
161
+ # tags = ["email"]
162
+ # [[rules.whitelist]]
163
+ # file = '''(?i)bashrc'''
164
+ # description = "ignore bashrc emails"
165
+
166
+
167
+ [[rules]]
168
+ description = "Generic Credential"
169
+ regex = '''(?i)(dbpasswd|dbuser|dbname|dbhost|api_key|apikey|secret|key|api|password|user|guid|hostname|pw|auth)(.{0,20})?['|"]([0-9a-zA-Z-_\/+!{}/=]{4,120})['|"]'''
170
+ tags = ["key", "API", "generic"]
171
+ # ignore leaks with specific identifiers like slack and aws
172
+ [[rules.whitelist]]
173
+ regex = '''xox[baprs]-([0-9a-zA-Z]{10,48})'''
174
+ description = "ignore slack"
175
+ [[rules.whitelist]]
176
+ description = "MailChimp API key"
177
+ regex = '''(?i)(.{0,20})?['"][0-9a-f]{32}-us[0-9]{1,2}['"]'''
178
+ [[rules.whitelist]]
179
+ description = "AWS Manager ID"
180
+ regex = '''(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}'''
181
+ [[rules.whitelist]]
182
+ regex='''(dns_secret_key|dns_access_key)'''
183
+ description = "Ignore credstash secrets in Terraform files"
184
+
185
+ [[rules.whitelist]]
186
+ regex='''(linkKey)'''
187
+ description = "Ignore references to linkkey in scala files"
188
+ file = '''(?i)\.scala'''
189
+
190
+ [[rules.whitelist]]
191
+ regex='''(linkNum)'''
192
+ description = "Ignore references to linknum is input.json. Not sensitive"
193
+ file = '''(?i)input\.json'''
194
+
195
+ [[rules.whitelist]]
196
+ regex='''(link_key)'''
197
+ description = "Ignore references to this in json files. Not sensitive"
198
+ file = '''(?i)\.json'''
199
+
200
+ [[rules.whitelist]]
201
+ regex='''keys \"position\", \"category\"'''
202
+ description = "Config information, not sensitive"
203
+ file = '''(cost_attribution_rules_from_xlsx.pyi|codes_to_config.py)'''
204
+
205
+ [[rules.whitelist]]
206
+ regex='''(json_name)'''
207
+ description = "google protoobuf descriptor"
208
+ file = '''(protos/google/protobuf/descriptor.proto)'''
209
+ [[rules.whitelist]]
210
+ regex='''KEY \=.*'''
211
+ description = "Delta deleter script, can ignore"
212
+ file = '''(claims-api-submitter/deletion/delta_deleter.py)'''
213
+
214
+ [[rules.whitelist]]
215
+ regex = '''secret=os.getenv\(\"AWS_SECRET_ACCESS_KEY\"'''
216
+ description = "claims deleter key reference"
217
+ file = '''claims-api-submitter/tests/integration_tests/test_claims_api_deleter.py'''
218
+
219
+ [[rules.whitelist]]
220
+ regex = '''key\": \"testkey\"'''
221
+
222
+ [[rules.whitelist]]
223
+ regex='''.*os\.getenv.*'''
224
+
225
+ [[rules.whitelist]]
226
+ regex='''.*(?i)(s3secretkey|ENV_VAR|test_token|test_cookie|test\/key|testkey|Bearer|helper|max_user_ip|keywords|randomly|sslcert|disable|none|\"api_token\"|dry_run_url|API_TOKEN = \"submissions?_api_token\"|KEY_ID = \"AWS_ACCESS_KEY_ID\".*|key=None|api\(\"test\"|api_url()|key prefix|GET response|bad_format|key=_file_mmset_sort_key|KEYS = \[.*|no_submission_key|)'''
227
+
228
+ [[rules.whitelist]]
229
+ regex='''.*(?i)(user=\"hadoop\"|key=None)'''
230
+
231
+
232
+ [[rules]]
233
+ description = "High Entropy"
234
+ regex = '''[0-9a-zA-Z-_!{}/=]{4,120}'''
235
+ fileNameRegex = '''(?i)(dump.sql|high-entropy-misc.txt)$'''
236
+ tags = ["entropy"]
237
+ [[rules.Entropies]]
238
+ Min = "4.3"
239
+ Max = "7.0"
240
+ [[rules.whitelist]]
241
+ description = "ignore public ssh key and pems"
242
+ file = '''(pem|ppk|env)$'''
243
+ path = '''(.*)?ssh'''
244
+
245
+
246
+ [[rules]]
247
+ description = "Potential bash var"
248
+ regex='''(?i)(=)([0-9a-zA-Z-_!{}=]{4,120})'''
249
+ tags = ["key", "bash", "API", "generic"]
250
+ [[rules.Entropies]]
251
+ Min = "3.5"
252
+ Max = "4.5"
253
+ Group = "1"
254
+
255
+ [[rules]]
256
+ description = "WP-Config"
257
+ regex='''define(.{0,20})?(DB_CHARSET|NONCE_SALT|LOGGED_IN_SALT|AUTH_SALT|NONCE_KEY|DB_HOST|DB_PASSWORD|AUTH_KEY|SECURE_AUTH_KEY|LOGGED_IN_KEY|DB_NAME|DB_USER)(.{0,20})?['|"].{10,120}['|"]'''
258
+ tags = ["key", "API", "generic"]
259
+
260
+ [[rules]]
261
+ description = "Files with keys and credentials"
262
+ fileNameRegex = '''(?i)(id_rsa|passwd|id_rsa.pub|pgpass|pem|key|shadow)'''
263
+
264
+ [whitelist]
265
+ description = "image whitelists"
266
+ files = ['''(.*?)(jpg|gif|doc|pdf|bin|CMS31v4_SimpleXML.xml|CMS31v4.xml|vsac_auth_bad_credentials.yml|swagger_generator.rb|sonar.properties|sonar-project.properties|build.sbt|sonar-project-benelevel-eligibility-filter.properties)$''']
267
+
268
+
@@ -0,0 +1,31 @@
1
+ name: Github Secret Scanner
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ build:
7
+
8
+ runs-on: ubuntu-latest
9
+ timeout-minutes: 5
10
+ env:
11
+ REPO: https://github.com/projecttacoma/bonnie_bundler
12
+ REMOTE_EXCLUDES_URL: https://raw.githubusercontent.com/projecttacoma/bonnie_bundler/master/.github/gitleaks.toml
13
+ GITLEAKS_VERSION: v4.3.0
14
+ steps:
15
+ - name: Execute Gitleaks
16
+ run: |
17
+ #wget ${REMOTE_EXCLUDES_URL} -O gitleaks.toml
18
+ curl -H 'Authorization: token ${{ secrets.ACCESS_TOKEN_GITLEAKS }}' ${REMOTE_EXCLUDES_URL} -o gitleaks.toml
19
+ wget https://github.com/zricethezav/gitleaks/releases/download/${GITLEAKS_VERSION}/gitleaks-linux-amd64 -O gitleaks
20
+ chmod +x gitleaks
21
+ echo ${GITHUB_SHA}
22
+ echo "gitleaks --repo=${REPO} -v --pretty --redact --commit=${GITHUB_SHA} --config=gitleaks.toml"
23
+ ./gitleaks --repo=${REPO} -v --pretty --redact --commit=${GITHUB_SHA} --config=gitleaks.toml --access-token=${{ secrets.ACCESS_TOKEN_GITLEAKS }}
24
+ - name: Slack notification
25
+ if: failure()
26
+ env:
27
+ SLACK_WEBHOOK_GITLEAKS: ${{ secrets.SLACK_WEBHOOK_GITLEAKS }}
28
+ uses: Ilshidur/action-slack@master
29
+ with:
30
+ args: 'Potential Secrets found in: https://github.com/{{ GITHUB_REPOSITORY }}/commit/{{ GITHUB_SHA }} Link to build with full gitleaks output: https://github.com/{{ GITHUB_REPOSITORY }}/commit/{{ GITHUB_SHA }}/checks'
31
+
@@ -1,9 +1,9 @@
1
1
  language: ruby
2
2
  rvm:
3
- - "2.3.7"
3
+ - "2.3.8"
4
4
  services: mongodb
5
5
  script:
6
- - bundle exec bundle-audit check --update
6
+ - bundle exec bundle-audit check --update --ignore CVE-2020-5267 CVE-2020-8166 CVE-2020-8164 CVE-2020-15169 CVE-2020-8163 CVE-2020-8167 CVE-2020-8165 CVE-2020-8184 CVE-2020-8161 CVE-2020-10663 CVE-2019-15587 CVE-2020-7595 CVE-2019-13117 CVE-2019-16782 CVE-2020-8130 CVE-2019-16892
7
7
  - bundle exec rake
8
8
  notifications:
9
9
  email:
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  source "https://rubygems.org"
2
2
  gemspec
3
3
 
4
- gem 'health-data-standards', :git => 'https://github.com/projectcypress/health-data-standards.git', :branch => 'master_bonnie'
4
+ # gem 'health-data-standards', :git => 'https://github.com/projectcypress/health-data-standards.git', :branch => 'master_bonnie'
5
5
  # gem 'quality-measure-engine', :git => 'https://github.com/projectcypress/quality-measure-engine.git', :branch => 'master'
6
6
  # gem 'hqmf2js', :git => 'https://github.com/projecttacoma/hqmf2js.git', :branch => 'master'
7
7
  # gem 'hquery-patient-api', :git => 'https://github.com/projecttacoma/patientapi.git', :branch => 'master'
@@ -1,29 +1,7 @@
1
- GIT
2
- remote: https://github.com/projectcypress/health-data-standards.git
3
- revision: 58975d21251e60050b66c5c8ed3acb146d909392
4
- branch: master_bonnie
5
- specs:
6
- health-data-standards (4.3.5)
7
- activesupport (~> 4.2.11)
8
- builder (~> 3.1)
9
- erubis (~> 2.7.0)
10
- highline (~> 1.7.0)
11
- log4r (~> 1.1.10)
12
- memoist (~> 0.9.1)
13
- mongo (~> 2.4.3)
14
- mongoid (~> 5.0.0)
15
- mongoid-tree (~> 2.0.0)
16
- nokogiri (~> 1.10.3)
17
- protected_attributes (~> 1.0.5)
18
- rest-client (~> 2.0.1)
19
- rubyzip (~> 1.2.1)
20
- uuid (~> 2.3.7)
21
- zip-zip (~> 0.3)
22
-
23
1
  PATH
24
2
  remote: .
25
3
  specs:
26
- bonnie_bundler (2.2.5)
4
+ bonnie_bundler (3.0.0)
27
5
  diffy (~> 3.0.0)
28
6
  health-data-standards (~> 4.3.2)
29
7
  hqmf2js (~> 1.4)
@@ -31,7 +9,7 @@ PATH
31
9
  mongoid (~> 5.0)
32
10
  quality-measure-engine (~> 3.2)
33
11
  rails (>= 4.2, < 6.0)
34
- roo (~> 1.13)
12
+ roo (~> 2.7)
35
13
  rubyzip (~> 1.2, >= 1.2.1)
36
14
  simplexml_parser (~> 1.0)
37
15
  zip-zip (~> 0.3)
@@ -73,16 +51,16 @@ GEM
73
51
  minitest (~> 5.1)
74
52
  thread_safe (~> 0.3, >= 0.3.4)
75
53
  tzinfo (~> 1.1)
76
- addressable (2.6.0)
54
+ addressable (2.5.2)
77
55
  public_suffix (>= 2.0.2, < 4.0)
78
56
  arel (6.0.4)
79
- awesome_print (1.8.0)
57
+ awesome_print (1.2.0)
80
58
  bson (4.4.2)
81
59
  builder (3.2.3)
82
- bundler-audit (0.6.1)
83
- bundler (>= 1.2.0, < 3)
60
+ bundler-audit (0.6.0)
61
+ bundler (~> 1.2)
84
62
  thor (~> 0.18)
85
- coderay (1.1.2)
63
+ coderay (1.1.0)
86
64
  coffee-script (2.4.1)
87
65
  coffee-script-source
88
66
  execjs
@@ -93,19 +71,35 @@ GEM
93
71
  crass (1.0.4)
94
72
  delayed_job (4.1.5)
95
73
  activesupport (>= 3.0, < 5.3)
96
- delayed_job_mongoid (2.3.1)
74
+ delayed_job_mongoid (2.3.0)
97
75
  delayed_job (>= 3.0, < 5)
98
- mongoid (>= 3.0, < 8)
76
+ mongoid (>= 3.0, < 7)
99
77
  mongoid-compatibility (>= 0.4.0)
100
78
  diffy (3.0.7)
101
- docile (1.3.1)
79
+ docile (1.1.3)
102
80
  domain_name (0.5.20180417)
103
81
  unf (>= 0.0.5, < 1.0.0)
104
82
  erubis (2.7.0)
105
83
  execjs (2.7.0)
106
84
  globalid (0.4.2)
107
85
  activesupport (>= 4.2.0)
108
- hashdiff (0.3.9)
86
+ hashdiff (0.3.6)
87
+ health-data-standards (4.3.5)
88
+ activesupport (~> 4.2.11)
89
+ builder (~> 3.1)
90
+ erubis (~> 2.7.0)
91
+ highline (~> 1.7.0)
92
+ log4r (~> 1.1.10)
93
+ memoist (~> 0.9.1)
94
+ mongo (~> 2.4.3)
95
+ mongoid (~> 5.0.0)
96
+ mongoid-tree (~> 2.0.0)
97
+ nokogiri (~> 1.10.3)
98
+ protected_attributes (~> 1.0.5)
99
+ rest-client (~> 2.0.1)
100
+ rubyzip (~> 1.2.1)
101
+ uuid (~> 2.3.7)
102
+ zip-zip (~> 0.3)
109
103
  highline (1.7.10)
110
104
  hike (1.2.3)
111
105
  hqmf2js (1.4.0)
@@ -123,7 +117,7 @@ GEM
123
117
  domain_name (~> 0.5)
124
118
  i18n (0.9.5)
125
119
  concurrent-ruby (~> 1.0)
126
- json (2.2.0)
120
+ json (2.1.0)
127
121
  libv8 (3.16.14.19)
128
122
  log4r (1.1.10)
129
123
  loofah (2.2.3)
@@ -134,7 +128,7 @@ GEM
134
128
  mail (2.7.1)
135
129
  mini_mime (>= 0.1.1)
136
130
  memoist (0.9.3)
137
- method_source (0.9.2)
131
+ method_source (0.8.2)
138
132
  mime-types (3.2.2)
139
133
  mime-types-data (~> 3.2015)
140
134
  mime-types-data (3.2019.0331)
@@ -143,10 +137,10 @@ GEM
143
137
  minitest (5.11.3)
144
138
  mongo (2.4.3)
145
139
  bson (>= 4.2.1, < 5.0.0)
146
- mongoid (5.2.1)
140
+ mongoid (5.0.2)
147
141
  activemodel (~> 4.0)
148
- mongo (>= 2.4.1, < 3.0.0)
149
- origin (~> 2.3)
142
+ mongo (~> 2.1)
143
+ origin (~> 2.1)
150
144
  tzinfo (>= 0.3.37)
151
145
  mongoid-compatibility (0.5.1)
152
146
  activesupport
@@ -155,17 +149,18 @@ GEM
155
149
  mongoid (>= 4.0, < 6.0)
156
150
  multi_json (1.13.1)
157
151
  netrc (0.11.0)
158
- nokogiri (1.10.3)
152
+ nokogiri (1.10.4)
159
153
  mini_portile2 (~> 2.4.0)
160
154
  origin (2.3.1)
161
155
  protected_attributes (1.0.9)
162
156
  activemodel (>= 4.0.1, < 5.0)
163
- pry (0.12.2)
164
- coderay (~> 1.1.0)
165
- method_source (~> 0.9.0)
166
- pry-nav (0.3.0)
167
- pry (>= 0.9.10, < 0.13.0)
168
- public_suffix (3.0.3)
157
+ pry (0.9.12.6)
158
+ coderay (~> 1.0)
159
+ method_source (~> 0.8)
160
+ slop (~> 3.4)
161
+ pry-nav (0.2.3)
162
+ pry (~> 0.9.10)
163
+ public_suffix (3.0.0)
169
164
  quality-measure-engine (3.2.0)
170
165
  delayed_job_mongoid (~> 2.2)
171
166
  mongoid (~> 5.0)
@@ -198,29 +193,26 @@ GEM
198
193
  activesupport (= 4.2.11.1)
199
194
  rake (>= 0.8.7)
200
195
  thor (>= 0.18.1, < 2.0)
201
- rake (12.3.2)
196
+ rake (12.0.0)
202
197
  ref (2.0.0)
203
198
  rest-client (2.0.2)
204
199
  http-cookie (>= 1.0.2, < 2.0)
205
200
  mime-types (>= 1.16, < 4.0)
206
201
  netrc (~> 0.8)
207
- roo (1.13.2)
208
- nokogiri
209
- rubyzip
210
- spreadsheet (> 0.6.4)
211
- ruby-ole (1.2.12.2)
202
+ roo (2.8.2)
203
+ nokogiri (~> 1)
204
+ rubyzip (>= 1.2.1, < 2.0.0)
212
205
  rubyzip (1.2.2)
213
- safe_yaml (1.0.5)
214
- simplecov (0.16.1)
215
- docile (~> 1.1)
216
- json (>= 1.8, < 3)
217
- simplecov-html (~> 0.10.0)
218
- simplecov-html (0.10.2)
206
+ safe_yaml (1.0.4)
207
+ simplecov (0.8.2)
208
+ docile (~> 1.1.0)
209
+ multi_json
210
+ simplecov-html (~> 0.8.0)
211
+ simplecov-html (0.8.0)
219
212
  simplexml_parser (1.0.1)
220
213
  health-data-standards (~> 4.0)
221
214
  tilt (~> 1.4)
222
- spreadsheet (1.2.3)
223
- ruby-ole (>= 1.0)
215
+ slop (3.5.0)
224
216
  sprockets (2.12.5)
225
217
  hike (~> 1.2)
226
218
  multi_json (~> 1.0)
@@ -247,8 +239,8 @@ GEM
247
239
  unf_ext (0.0.7.6)
248
240
  uuid (2.3.9)
249
241
  macaddr (~> 1.0)
250
- vcr (4.0.0)
251
- webmock (3.5.1)
242
+ vcr (3.0.3)
243
+ webmock (3.0.1)
252
244
  addressable (>= 2.3.6)
253
245
  crack (>= 0.3.2)
254
246
  hashdiff
@@ -262,7 +254,6 @@ DEPENDENCIES
262
254
  awesome_print
263
255
  bonnie_bundler!
264
256
  bundler-audit
265
- health-data-standards!
266
257
  minitest (~> 5.0)
267
258
  pry
268
259
  pry-nav
@@ -272,4 +263,4 @@ DEPENDENCIES
272
263
  webmock
273
264
 
274
265
  BUNDLED WITH
275
- 1.17.3
266
+ 1.17.1
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
data/README.md CHANGED
@@ -2,3 +2,15 @@ bonnie_bundler
2
2
  ==============
3
3
 
4
4
  Gem for creating and managing bonnie bundles
5
+
6
+ ## License
7
+
8
+ Copyright 2014 The MITRE Corporation
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
11
+
12
+ ```
13
+ http://www.apache.org/licenses/LICENSE-2.0
14
+ ```
15
+
16
+ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
7
7
  s.email = "pophealth-talk@googlegroups.com"
8
8
  s.homepage = "http://github.com/projecttacoma/bonnie_bundler"
9
9
  s.authors = ["The MITRE Corporation"]
10
- s.version = '2.2.5'
10
+ s.version = '3.0.0'
11
11
  s.license = 'Apache-2.0'
12
12
 
13
13
  s.add_dependency 'health-data-standards', '~> 4.3.2'
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
23
23
  s.add_dependency 'diffy', '~> 3.0.0'
24
24
 
25
25
  # needed for parsing value sets (we need to use roo rather than rubyxl because the value sets are in xls rather than xlsx)
26
- s.add_dependency 'roo', '~> 1.13'
26
+ s.add_dependency 'roo', '~> 2.7'
27
27
 
28
28
  s.files = s.files = `git ls-files`.split("\n")
29
29
  end
@@ -1,8 +1,8 @@
1
1
  module Measures
2
- class ValueSetException < Exception
2
+ class ValueSetException < StandardError
3
3
  end
4
- class HQMFException < Exception
4
+ class HQMFException < StandardError
5
5
  end
6
- class MeasureLoadingException < Exception
6
+ class MeasureLoadingException < StandardError
7
7
  end
8
- end
8
+ end
@@ -8,7 +8,7 @@ module Util
8
8
  class VSACError < StandardError
9
9
  end
10
10
 
11
- # Error represnting a not found response from the API. Includes OID for reporting to user.
11
+ # Error representing a not found response from the API. Includes OID for reporting to user.
12
12
  class VSNotFoundError < VSACError
13
13
  attr_reader :oid
14
14
  def initialize(oid)
@@ -17,7 +17,7 @@ module Util
17
17
  end
18
18
  end
19
19
 
20
- # Error represnting a program not found response from the API.
20
+ # Error representing a program not found response from the API.
21
21
  class VSACProgramNotFoundError < VSACError
22
22
  attr_reader :oid
23
23
  def initialize(program)
@@ -25,7 +25,7 @@ module Util
25
25
  end
26
26
  end
27
27
 
28
- # Error represnting a response from the API that had no concepts.
28
+ # Error representing a response from the API that had no concepts.
29
29
  class VSEmptyError < VSACError
30
30
  attr_reader :oid
31
31
  def initialize(oid)
@@ -44,14 +44,14 @@ module Util
44
44
  # Raised when the user credentials were invalid.
45
45
  class VSACInvalidCredentialsError < VSACError
46
46
  def initialize
47
- super('VSAC ULMS credentials are invalid.')
47
+ super('VSAC UMLS credentials are invalid.')
48
48
  end
49
49
  end
50
50
 
51
51
  # Raised when a call requiring auth is attempted when no ticket_granting_ticket or credentials were provided.
52
52
  class VSACNoCredentialsError < VSACError
53
53
  def initialize
54
- super('VSAC ULMS credentials were not provided.')
54
+ super('VSAC UMLS credentials were not provided.')
55
55
  end
56
56
  end
57
57
 
@@ -92,7 +92,7 @@ module Util
92
92
  end
93
93
 
94
94
  # if a ticket_granting_ticket was passed in, check it and raise errors if found
95
- # username and password will be ignored
95
+ # VSAC API Key will be ignored
96
96
  if !options[:ticket_granting_ticket].nil?
97
97
  provided_ticket_granting_ticket = options[:ticket_granting_ticket]
98
98
  if provided_ticket_granting_ticket[:ticket].nil? || provided_ticket_granting_ticket[:expires].nil?
@@ -108,9 +108,9 @@ module Util
108
108
  @ticket_granting_ticket = { ticket: provided_ticket_granting_ticket[:ticket],
109
109
  expires: provided_ticket_granting_ticket[:expires] }
110
110
 
111
- # if username and password were provided use them to get a ticket granting ticket
112
- elsif !options[:username].nil? && !options[:password].nil?
113
- @ticket_granting_ticket = get_ticket_granting_ticket(options[:username], options[:password])
111
+ # if api key was provided use it to get a ticket granting ticket
112
+ elsif !options[:api_key].nil?
113
+ @ticket_granting_ticket = get_ticket_granting_ticket(options[:api_key])
114
114
  end
115
115
  end
116
116
 
@@ -153,7 +153,7 @@ module Util
153
153
  # Gets the details for a program. This may be used without credentials.
154
154
  #
155
155
  # Optional parameter program is the program to request from the API. If it is not provided it will look for
156
- # a :program in the config passed in during construction. If there is no :program in the config it will use
156
+ # a :program in the config passed in during construction. If there is no :program in the config it will use
157
157
  # the DEFAULT_PROGRAM constant for the program.
158
158
  #
159
159
  # Returns the JSON parsed response for program details.
@@ -180,7 +180,7 @@ module Util
180
180
  # }
181
181
  #
182
182
  # Optional parameter program is the program to request from the API. If it is not provided it will look for
183
- # a :program in the config passed in during construction. If there is no :program in the config it will use
183
+ # a :program in the config passed in during construction. If there is no :program in the config it will use
184
184
  # the DEFAULT_PROGRAM constant for the program.
185
185
  #
186
186
  # Returns the name of the latest profile for the given program.
@@ -288,9 +288,9 @@ module Util
288
288
  end
289
289
  end
290
290
 
291
- def get_ticket_granting_ticket(username, password)
291
+ def get_ticket_granting_ticket(api_key)
292
292
  begin
293
- ticket = RestClient.post("#{@config[:auth_url]}/Ticket", username: username, password: password)
293
+ ticket = RestClient.post("#{@config[:auth_url]}/Ticket", apikey: api_key)
294
294
  return { ticket: String.new(ticket), expires: Time.now + 8.hours }
295
295
  rescue RestClient::Unauthorized
296
296
  raise VSACInvalidCredentialsError.new
@@ -0,0 +1,9 @@
1
+ NOTICE
2
+ ======
3
+ This (software/technical data) was produced for the U. S. Government under Contract Number HHSM-500-2012-00008I, and is subject to Federal Acquisition Regulation Clause 52.227-14, Rights in Data-General.
4
+
5
+ No other use other than that granted to the U. S. Government, or to those acting on behalf of the U. S. Government under that Clause is authorized without the express written permission of The MITRE Corporation.
6
+
7
+ To the extent necessary MITRE hereby grants express written permission to use, reproduce, distribute, modify, and otherwise leverage this software to the extent permitted by the Apache 2.0 license.
8
+
9
+ For further information, please contact The MITRE Corporation, Contracts Management Office, 7515 Colshire Drive, McLean, VA 22102-7539, (703) 983-6000.
@@ -23,7 +23,7 @@ def dump_db
23
23
  end
24
24
 
25
25
  def get_ticket_granting_ticket
26
- api = Util::VSAC::VSACAPI.new(config: APP_CONFIG['vsac'], username: ENV['VSAC_USERNAME'], password: ENV['VSAC_PASSWORD'])
26
+ api = Util::VSAC::VSACAPI.new(config: APP_CONFIG['vsac'], api_key: ENV['VSAC_API_KEY'])
27
27
  return api.ticket_granting_ticket
28
28
  end
29
29
 
@@ -4,10 +4,10 @@ require 'vcr_setup.rb'
4
4
  # Tests that ensure VSAC authentication related situations are handled
5
5
  class VSACAPIAuthTest < ActiveSupport::TestCase
6
6
 
7
- test 'valid username and password provided' do
7
+ test 'valid api_key provided' do
8
8
  VCR.use_cassette("vsac_auth_good_credentials") do
9
9
  assert_nothing_raised do
10
- api = Util::VSAC::VSACAPI.new(config: APP_CONFIG['vsac'], username: ENV['VSAC_USERNAME'], password: ENV['VSAC_PASSWORD'])
10
+ api = Util::VSAC::VSACAPI.new(config: APP_CONFIG['vsac'], api_key: ENV['VSAC_API_KEY'])
11
11
  assert_not_nil api.ticket_granting_ticket
12
12
  assert_not_nil api.ticket_granting_ticket[:ticket]
13
13
  assert_not_nil api.ticket_granting_ticket[:expires]
@@ -15,42 +15,18 @@ class VSACAPIAuthTest < ActiveSupport::TestCase
15
15
  end
16
16
  end
17
17
 
18
- test 'invalid username and password provided' do
18
+ test 'invalid api_key provided' do
19
19
  VCR.use_cassette("vsac_auth_bad_credentials") do
20
20
  assert_raise Util::VSAC::VSACInvalidCredentialsError do
21
- api = Util::VSAC::VSACAPI.new(config: APP_CONFIG['vsac'], username: 'baduser', password: 'badpass')
21
+ api = Util::VSAC::VSACAPI.new(config: APP_CONFIG['vsac'], api_key: 'badapikey')
22
22
  end
23
23
  end
24
24
  end
25
25
 
26
- test 'empty username and password provided' do
26
+ test 'empty api_key provided' do
27
27
  api = nil
28
28
  assert_nothing_raised do
29
- api = Util::VSAC::VSACAPI.new(config: APP_CONFIG['vsac'], username: nil, password: nil)
30
- end
31
-
32
- # now attempt to get a valueset
33
- assert_raise Util::VSAC::VSACNoCredentialsError do
34
- api.get_valueset('2.16.840.1.113762.1.4.1')
35
- end
36
- end
37
-
38
- test 'provided username but no password' do
39
- api = nil
40
- assert_nothing_raised do
41
- api = Util::VSAC::VSACAPI.new(config: APP_CONFIG['vsac'], username: "vsacuser")
42
- end
43
-
44
- # now attempt to get a valueset
45
- assert_raise Util::VSAC::VSACNoCredentialsError do
46
- api.get_valueset('2.16.840.1.113762.1.4.1')
47
- end
48
- end
49
-
50
- test 'provided password but no username' do
51
- api = nil
52
- assert_nothing_raised do
53
- api = Util::VSAC::VSACAPI.new(config: APP_CONFIG['vsac'], username: "vsacuser")
29
+ api = Util::VSAC::VSACAPI.new(config: APP_CONFIG['vsac'], api_key: nil)
54
30
  end
55
31
 
56
32
  # now attempt to get a valueset
@@ -62,7 +38,7 @@ class VSACAPIAuthTest < ActiveSupport::TestCase
62
38
  test 'valid ticket_granting_ticket provided and used' do
63
39
  VCR.use_cassette("vsac_auth_good_credentials_and_simple_call") do
64
40
  # first get a ticket_granting_ticket
65
- api = Util::VSAC::VSACAPI.new(config: APP_CONFIG['vsac'], username: ENV['VSAC_USERNAME'], password: ENV['VSAC_PASSWORD'])
41
+ api = Util::VSAC::VSACAPI.new(config: APP_CONFIG['vsac'], api_key: ENV['VSAC_API_KEY'])
66
42
  assert_not_nil api.ticket_granting_ticket
67
43
 
68
44
  reused_ticket_granting_ticket = {
@@ -18,7 +18,7 @@ class VSACApiTest < ActiveSupport::TestCase
18
18
 
19
19
  test 'get_valueset with version' do
20
20
  VCR.use_cassette("vsac_vs_version") do
21
- api = Util::VSAC::VSACAPI.new(config: APP_CONFIG['vsac'], username: ENV['VSAC_USERNAME'], password: ENV['VSAC_PASSWORD'])
21
+ api = Util::VSAC::VSACAPI.new(config: APP_CONFIG['vsac'], api_key: ENV['VSAC_API_KEY'])
22
22
  vs = api.get_valueset("2.16.840.1.113883.3.600.1.1834", version: "MU2 EP Update 2014-07-01")
23
23
  assert_not_nil vs
24
24
  doc = Nokogiri::XML(vs)
@@ -28,7 +28,7 @@ class VSACApiTest < ActiveSupport::TestCase
28
28
 
29
29
  test 'get_valuest with include_draft no profile' do
30
30
  VCR.use_cassette("vsac_vs_include_draft_no_profile") do
31
- api = Util::VSAC::VSACAPI.new(config: APP_CONFIG['vsac'], username: ENV['VSAC_USERNAME'], password: ENV['VSAC_PASSWORD'])
31
+ api = Util::VSAC::VSACAPI.new(config: APP_CONFIG['vsac'], api_key: ENV['VSAC_API_KEY'])
32
32
  assert_raise Util::VSAC::VSACArgumentError do
33
33
  api.get_valueset("2.16.840.1.113883.3.600.1.1834", include_draft: true)
34
34
  end
@@ -37,7 +37,7 @@ class VSACApiTest < ActiveSupport::TestCase
37
37
 
38
38
  test 'get_valueset with include_draft specified profile' do
39
39
  VCR.use_cassette("vsac_vs_include_draft_with_profile") do
40
- api = Util::VSAC::VSACAPI.new(config: APP_CONFIG['vsac'], username: ENV['VSAC_USERNAME'], password: ENV['VSAC_PASSWORD'])
40
+ api = Util::VSAC::VSACAPI.new(config: APP_CONFIG['vsac'], api_key: ENV['VSAC_API_KEY'])
41
41
  vs = api.get_valueset("2.16.840.1.113762.1.4.1", include_draft: true, profile: "eCQM Update 2018-05-04")
42
42
  assert_not_nil vs
43
43
  doc = Nokogiri::XML(vs)
@@ -47,7 +47,7 @@ class VSACApiTest < ActiveSupport::TestCase
47
47
 
48
48
  test 'get_valueset no options' do
49
49
  VCR.use_cassette("vsac_vs_no_options") do
50
- api = Util::VSAC::VSACAPI.new(config: APP_CONFIG['vsac'], username: ENV['VSAC_USERNAME'], password: ENV['VSAC_PASSWORD'])
50
+ api = Util::VSAC::VSACAPI.new(config: APP_CONFIG['vsac'], api_key: ENV['VSAC_API_KEY'])
51
51
  vs = api.get_valueset("2.16.840.1.113762.1.4.1")
52
52
  assert_not_nil vs
53
53
  doc = Nokogiri::XML(vs)
@@ -57,7 +57,7 @@ class VSACApiTest < ActiveSupport::TestCase
57
57
 
58
58
  test 'get_valueset not found' do
59
59
  VCR.use_cassette("vsac_vs_not_found") do
60
- api = Util::VSAC::VSACAPI.new(config: APP_CONFIG['vsac'], username: ENV['VSAC_USERNAME'], password: ENV['VSAC_PASSWORD'])
60
+ api = Util::VSAC::VSACAPI.new(config: APP_CONFIG['vsac'], api_key: ENV['VSAC_API_KEY'])
61
61
  assert_raise Util::VSAC::VSNotFoundError do
62
62
  api.get_valueset("bad.oid")
63
63
  end
@@ -66,7 +66,7 @@ class VSACApiTest < ActiveSupport::TestCase
66
66
 
67
67
  test 'get_valueset with release' do
68
68
  VCR.use_cassette("vsac_vs_release") do
69
- api = Util::VSAC::VSACAPI.new(config: APP_CONFIG['vsac'], username: ENV['VSAC_USERNAME'], password: ENV['VSAC_PASSWORD'])
69
+ api = Util::VSAC::VSACAPI.new(config: APP_CONFIG['vsac'], api_key: ENV['VSAC_API_KEY'])
70
70
  vs = api.get_valueset("2.16.840.1.113762.1.4.1", release: "MU2 EP Update 2014-05-30")
71
71
  assert_not_nil vs
72
72
  doc = Nokogiri::XML(vs)
@@ -5,16 +5,14 @@ VCR.configure do |c|
5
5
  # This is where the various cassettes will be recorded to
6
6
  c.cassette_library_dir = 'test/fixtures/vcr_cassettes'
7
7
  c.hook_into :webmock
8
-
8
+
9
9
  # To avoid storing plain text VSAC credentials or requiring the VSAC credentials
10
- # be provided at every run of the rake tests, provide the VSAC_USERNAME and VSAC_PASSWORD
10
+ # be provided at every run of the rake tests, provide the VSAC_API_KEY
11
11
  # whenever you need to record a cassette that requires valid credentials
12
- ENV['VSAC_USERNAME'] = "vcrtest" unless ENV['VSAC_USERNAME']
13
- ENV['VSAC_PASSWORD'] = "vcrpass" unless ENV['VSAC_PASSWORD']
12
+ ENV['VSAC_API_KEY'] = "vcrpass" unless ENV['VSAC_API_KEY']
14
13
 
15
14
  # Ensure plain text passwords do not show up during logging
16
- c.filter_sensitive_data('<VSAC_USERNAME>') {ENV['VSAC_USERNAME']}
17
- c.filter_sensitive_data('<VSAC_PASSWORD>') {URI.escape(ENV['VSAC_PASSWORD'])}
15
+ c.filter_sensitive_data('<VSAC_API_KEY>') {URI.escape(ENV['VSAC_API_KEY'])}
18
16
  c.default_cassette_options = {record: :once }
19
17
 
20
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bonnie_bundler
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.5
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The MITRE Corporation
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-15 00:00:00.000000000 Z
11
+ date: 2020-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: health-data-standards
@@ -168,14 +168,14 @@ dependencies:
168
168
  requirements:
169
169
  - - "~>"
170
170
  - !ruby/object:Gem::Version
171
- version: '1.13'
171
+ version: '2.7'
172
172
  type: :runtime
173
173
  prerelease: false
174
174
  version_requirements: !ruby/object:Gem::Requirement
175
175
  requirements:
176
176
  - - "~>"
177
177
  - !ruby/object:Gem::Version
178
- version: '1.13'
178
+ version: '2.7'
179
179
  description: A Gem for creating and managing bonnie bundles
180
180
  email: pophealth-talk@googlegroups.com
181
181
  executables: []
@@ -184,10 +184,13 @@ extra_rdoc_files: []
184
184
  files:
185
185
  - ".github/CONTRIBUTING.md"
186
186
  - ".github/PULL_REQUEST_TEMPLATE.md"
187
+ - ".github/gitleaks.toml"
188
+ - ".github/workflows/main.yml"
187
189
  - ".gitignore"
188
190
  - ".travis.yml"
189
191
  - Gemfile
190
192
  - Gemfile.lock
193
+ - LICENSE.txt
191
194
  - README.md
192
195
  - Rakefile
193
196
  - bonnie-bundler.gemspec
@@ -209,6 +212,7 @@ files:
209
212
  - lib/models/cql_measure.rb
210
213
  - lib/models/measure.rb
211
214
  - lib/util/vsac_api.rb
215
+ - notice.md
212
216
  - test/fixtures/BCS_v5_0_Artifacts.zip
213
217
  - test/fixtures/CMS134v6.zip
214
218
  - test/fixtures/CMS158_v5_4_Artifacts.zip
@@ -286,7 +290,7 @@ homepage: http://github.com/projecttacoma/bonnie_bundler
286
290
  licenses:
287
291
  - Apache-2.0
288
292
  metadata: {}
289
- post_install_message:
293
+ post_install_message:
290
294
  rdoc_options: []
291
295
  require_paths:
292
296
  - lib
@@ -301,9 +305,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
301
305
  - !ruby/object:Gem::Version
302
306
  version: '0'
303
307
  requirements: []
304
- rubyforge_project:
305
- rubygems_version: 2.7.8
306
- signing_key:
308
+ rubygems_version: 3.0.8
309
+ signing_key:
307
310
  specification_version: 4
308
311
  summary: A Gem for creating and managing bonnie bundles
309
312
  test_files: []