frails 0.8.1 → 0.8.2
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/frails/version.rb +1 -1
- data/package.json +1 -1
- data/package/config.js +14 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a93cf0d24b2623de0992aac2576ee6644a6619b7ef19215fe9bb064c20420bcb
|
4
|
+
data.tar.gz: e7763d77d31ff21d4dd636a399e5877354eab31c09bf2a74354661afd8d18599
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be38da133a5c64aeb15315341a14c267b8cf8c6af32097b3f01ab52341e7156854ed26c75ff231ce313b52753b8d53729014c20816e7909cebff28522ca1c805
|
7
|
+
data.tar.gz: 475867a9abb8594a0649cc9f770994f8b9c6b7530b6044e816d64445a7fb5c3e542598366c0ae922474c6a421a2042b9646db5fad82a1c4c9452c25c6d393138
|
data/Gemfile.lock
CHANGED
data/lib/frails/version.rb
CHANGED
data/package.json
CHANGED
data/package/config.js
CHANGED
@@ -1,7 +1,10 @@
|
|
1
1
|
const spawnSync = require("child_process").spawnSync;
|
2
2
|
const path = require("path");
|
3
3
|
|
4
|
-
const
|
4
|
+
const ioDelimiter = "__FRAILS_RAILS_RUNNER_DELIMETER__";
|
5
|
+
const configFromRails = railsRun(
|
6
|
+
`puts "${ioDelimiter}#{Frails.config_as_json}${ioDelimiter}"`
|
7
|
+
);
|
5
8
|
const rootPath = process.cwd();
|
6
9
|
|
7
10
|
module.exports = {
|
@@ -20,10 +23,18 @@ function railsRun(argument) {
|
|
20
23
|
const result = spawnSync("./bin/rails", ["runner", argument]);
|
21
24
|
|
22
25
|
if (result.status === 0) {
|
23
|
-
|
26
|
+
// Output is delimited to filter out unwanted warnings or other output
|
27
|
+
// that we don't want in our files.
|
28
|
+
const sourceRegex = new RegExp(ioDelimiter + "([\\s\\S]+)" + ioDelimiter);
|
29
|
+
const matches = result.stdout.toString().match(sourceRegex);
|
30
|
+
if (matches) {
|
31
|
+
return JSON.parse(matches[1]);
|
32
|
+
} else {
|
33
|
+
throw "Rails runner failed having been unable to parse the output.";
|
34
|
+
}
|
24
35
|
} else if (result.signal !== null) {
|
25
36
|
throw `Rails runner was terminated with signal: ${result.signal}`;
|
26
37
|
} else {
|
27
|
-
throw `Rails runner failed with '${result.
|
38
|
+
throw `Rails runner failed with '${result.stderr.toString()}'.`;
|
28
39
|
}
|
29
40
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: frails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joel Moss
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|