elm-compiler 0.2.1 → 0.3.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
  SHA1:
3
- metadata.gz: fd623879a5dc44e26f5b089cd71555e2d372e280
4
- data.tar.gz: 8937ab452b9f834746f68aee4db4872c8f99a736
3
+ metadata.gz: 6e604d6187008d8edbe57c58f5c50b0ae6a161e1
4
+ data.tar.gz: 8006d7cc87b27a3c96e996ad20ec09543f697ab1
5
5
  SHA512:
6
- metadata.gz: 53ebb4b0311735dad5ba9d5267c1dfb19bd4bb754bd3634a2a3d68ef0743e11bd416584ed65fb355f375a9f7f583a3712766e1509d49d187abff31d46987413a
7
- data.tar.gz: b1b670d091b6211d742f8a62bd23658e51147b1dd27b158b141737b90dbb5695ed83202b10cf189051c1c35ff9e0c6ec334fd16d5295fd5db468a08ba6f23cbe
6
+ metadata.gz: 02ae3eeeeaaf8531cd45aceaec1f3a3b114b34bbeea855df3630cac43c1d6443e0e447213a9a31416a09df857e8512640c70ea7e8ad399ee3aa7006cec8d2060
7
+ data.tar.gz: 3320a10a805fc847cf128a73c0e84a47b86aa3b0372474777ab0d5ff6b2c1682f5a1b30426463b61ac9517de8197781f91f301859f584d89013585aa103e9a5a
@@ -7,5 +7,5 @@ before_install:
7
7
  - gem install bundler -v 1.11.2
8
8
  install:
9
9
  - bundle install
10
- - npm install -g elm@0.17
10
+ - npm install -g elm
11
11
  - elm-package install --yes
@@ -8,8 +8,8 @@
8
8
  ],
9
9
  "exposed-modules": [],
10
10
  "dependencies": {
11
- "elm-lang/core": "4.0.0 <= v < 5.0.0",
12
- "elm-lang/html": "1.0.0 <= v < 2.0.0"
11
+ "elm-lang/core": "5.0.0 <= v < 6.0.0",
12
+ "elm-lang/html": "2.0.0 <= v < 3.0.0"
13
13
  },
14
- "elm-version": "0.17.0 <= v < 0.18.0"
14
+ "elm-version": "0.18.0 <= v < 0.19.0"
15
15
  }
@@ -5,13 +5,13 @@ require 'tempfile'
5
5
  module Elm
6
6
  class Compiler
7
7
  class << self
8
- def compile(elm_files, output_path: nil, elm_make_path: "elm-make")
8
+ def compile(elm_files, output_path: nil, elm_make_path: "elm-make", debug: false)
9
9
  fail ExecutableNotFound unless elm_executable_exists?(elm_make_path)
10
10
 
11
11
  if output_path
12
- elm_make(elm_make_path, elm_files, output_path)
12
+ elm_make(elm_make_path, elm_files, output_path, debug)
13
13
  else
14
- compile_to_string(elm_make_path, elm_files)
14
+ compile_to_string(elm_make_path, elm_files, debug)
15
15
  end
16
16
  end
17
17
 
@@ -23,15 +23,17 @@ module Elm
23
23
  false
24
24
  end
25
25
 
26
- def compile_to_string(elm_make_path, elm_files)
26
+ def compile_to_string(elm_make_path, elm_files, debug)
27
27
  Tempfile.open(['elm', '.js']) do |tempfile|
28
- elm_make(elm_make_path, elm_files, tempfile.path)
28
+ elm_make(elm_make_path, elm_files, tempfile.path, debug)
29
29
  return File.read tempfile.path
30
30
  end
31
31
  end
32
32
 
33
- def elm_make(elm_make_path, elm_files, output_path)
34
- Open3.popen3({"LANG" => "en_US.UTF8" }, elm_make_path, *elm_files, '--yes', '--output', output_path) do |_stdin, _stdout, stderr, wait_thr|
33
+ def elm_make(elm_make_path, elm_files, output_path, debug)
34
+ args = [{"LANG" => "en_US.UTF8" }, elm_make_path, *elm_files, '--yes', '--output', output_path]
35
+ args << "--debug" if debug
36
+ Open3.popen3(*args) do |_stdin, _stdout, stderr, wait_thr|
35
37
  fail CompileError, stderr.gets(nil) if wait_thr.value.exitstatus != 0
36
38
  end
37
39
  end
@@ -1,5 +1,5 @@
1
1
  module Elm
2
2
  class Compiler
3
- VERSION = '0.2.1'
3
+ VERSION = '0.3.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elm-compiler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank Bonetti
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-06-01 00:00:00.000000000 Z
11
+ date: 2017-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -111,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  version: '0'
112
112
  requirements: []
113
113
  rubyforge_project:
114
- rubygems_version: 2.4.5.1
114
+ rubygems_version: 2.5.1
115
115
  signing_key:
116
116
  specification_version: 4
117
117
  summary: Ruby wrapper for the Elm compiler