@snyk/gemfile 1.1.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/gemfile.js +8 -0
- package/package.json +11 -1
- package/.travis.yml +0 -21
- package/test/Gemfile.json +0 -1478
- package/test/Gemfile.lock +0 -366
- package/test/Gemfile2.json +0 -304
- package/test/Gemfile2.lock +0 -82
- package/test/gemfile.test.js +0 -168
package/gemfile.js
CHANGED
|
@@ -8,6 +8,7 @@ const GEMFILE_DEFAULT_LOCATION = path.resolve(process.cwd(), 'Gemfile.lock');
|
|
|
8
8
|
const WHITESPACE = /^(\s*)/;
|
|
9
9
|
const GEMFILE_KEY_VALUE = /^\s*([^:(]*)\s*\:*\s*(.*)/;
|
|
10
10
|
const ORIGINS = ['GEM', 'GIT', 'PATH'];
|
|
11
|
+
const RUBY = /^ruby\s(.*)/;
|
|
11
12
|
|
|
12
13
|
module.exports = {
|
|
13
14
|
interpret,
|
|
@@ -126,8 +127,15 @@ function interpret(string, extractMeta) {
|
|
|
126
127
|
gemfile['BUNDLED WITH'] = Object.keys(gemfile['BUNDLED WITH'])[0];
|
|
127
128
|
}
|
|
128
129
|
|
|
130
|
+
if (gemfile['RUBY VERSION']) {
|
|
131
|
+
const rawVersion= Object.keys(gemfile['RUBY VERSION'])[0];
|
|
132
|
+
const version = RUBY.exec(rawVersion)[1];
|
|
133
|
+
gemfile['RUBY VERSION'] = version;
|
|
134
|
+
}
|
|
135
|
+
|
|
129
136
|
if (extractMeta) {
|
|
130
137
|
gemfileMeta.bundledWith = gemfile['BUNDLED WITH'];
|
|
138
|
+
gemfileMeta.rubyVersion = gemfile['RUBY VERSION'];
|
|
131
139
|
gemfileMeta.platforms = gemfile['PLATFORMS'];
|
|
132
140
|
gemfileMeta.dependencies = gemfile['DEPENDENCIES'];
|
|
133
141
|
gemfileMeta.specs = Object.keys(gemfile)
|
package/package.json
CHANGED
|
@@ -9,6 +9,16 @@
|
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "https://github.com/snyk/gemfile.git"
|
|
11
11
|
},
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public"
|
|
14
|
+
},
|
|
15
|
+
"homepage": "https://github.com/snyk/gemfile#readme",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/snyk/gemfile/issues"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"gemfile.js"
|
|
21
|
+
],
|
|
12
22
|
"keywords": [
|
|
13
23
|
"Gemfile",
|
|
14
24
|
"Gemfile.lock",
|
|
@@ -28,5 +38,5 @@
|
|
|
28
38
|
"engines": {
|
|
29
39
|
"node": ">= 4.2.4"
|
|
30
40
|
},
|
|
31
|
-
"version": "1.
|
|
41
|
+
"version": "1.3.0"
|
|
32
42
|
}
|
package/.travis.yml
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
language: node_js
|
|
2
|
-
cache: npm
|
|
3
|
-
notifications:
|
|
4
|
-
email: false
|
|
5
|
-
node_js:
|
|
6
|
-
- "10"
|
|
7
|
-
- "8"
|
|
8
|
-
- "6"
|
|
9
|
-
- "4"
|
|
10
|
-
script:
|
|
11
|
-
- npm test
|
|
12
|
-
jobs:
|
|
13
|
-
include:
|
|
14
|
-
- stage: npm release
|
|
15
|
-
node_js: "10"
|
|
16
|
-
script: skip
|
|
17
|
-
after_success:
|
|
18
|
-
- npx semantic-release
|
|
19
|
-
branches:
|
|
20
|
-
only:
|
|
21
|
-
- master
|