browserify-rails 0.7.3 → 0.7.4

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: 1a2c2fac84b40025981f93d92c55fcc97f51866c
4
- data.tar.gz: 9b8c378b03ef9ee69aa4844c8e3488964e7209a0
3
+ metadata.gz: 803ccbf56f752df266b181a3144237c1953760c4
4
+ data.tar.gz: de94a0184ede13f2314ef00e347c86b8c4dccf39
5
5
  SHA512:
6
- metadata.gz: 9b827dd045e8dc3b62a0067ba6883390015604f724a6ba4484c2aa4fc9809cd47aa77928d4b74c3c70e4841ad3f56944f16311febcf4d9ba520c62b40c3473d0
7
- data.tar.gz: a71d24d661d23de54cbdd8762ce364925095116fee74affbdcfc08f6248c8d5e3fd5768aa617d8aaf2f45bf2b2144c260e65412f82819c1555278afa2b3e7082
6
+ metadata.gz: 92b220fd503614f7ff964bcd6691777d4f052732cec99374ae19fd5310618baa520a5428309c7a1ffc5d5502cc564132bb3725e4d71a889f7cbf60828ab3e7aa
7
+ data.tar.gz: 2d8dd6bcd548af74734513f6929e74d49fb8e6c78034264d4208bbc18a3dd2416780971c5d4b6d0168702efe725b0c8687bf7d12f55412831f95671fb27dc594
@@ -4,8 +4,6 @@ require "tempfile"
4
4
 
5
5
  module BrowserifyRails
6
6
  class BrowserifyProcessor < Tilt::Template
7
- TMP_PATH = File.join("tmp/browserify-rails").freeze
8
-
9
7
  def prepare
10
8
  ensure_tmp_dir_exists!
11
9
  ensure_commands_exist!
@@ -29,6 +27,10 @@ module BrowserifyRails
29
27
  Rails.application.config.browserify_rails
30
28
  end
31
29
 
30
+ def tmp_path
31
+ @tmp_path ||= Rails.root.join("tmp", "browserify-rails").freeze
32
+ end
33
+
32
34
  def browserfy_cmd
33
35
  @browserfy_cmd ||= File.join(config.node_bin, "browserify").freeze
34
36
  end
@@ -38,7 +40,7 @@ module BrowserifyRails
38
40
  end
39
41
 
40
42
  def ensure_tmp_dir_exists!
41
- FileUtils.mkdir_p(rails_path(TMP_PATH))
43
+ FileUtils.mkdir_p(rails_path(tmp_path))
42
44
  end
43
45
 
44
46
  def ensure_commands_exist!
@@ -129,13 +131,13 @@ module BrowserifyRails
129
131
  # Browserifyinc uses a special cache file. We set up the path for it if
130
132
  # we're going to use browserifyinc.
131
133
  if uses_browserifyinc(force_browserifyinc)
132
- cache_file_path = rails_path(TMP_PATH, "browserifyinc-cache.json")
134
+ cache_file_path = rails_path(tmp_path, "browserifyinc-cache.json")
133
135
  command_options << " --cachefile=#{cache_file_path.inspect}"
134
136
  end
135
137
 
136
138
  # Create a temporary file for the output. Such file is necessary when
137
139
  # using browserifyinc, but we use it in all instances for consistency
138
- output_file = Tempfile.new("output", rails_path(TMP_PATH))
140
+ output_file = Tempfile.new("output", rails_path(tmp_path))
139
141
  command_options << " -o #{output_file.path.inspect}"
140
142
 
141
143
  # Compose the full command (using browserify or browserifyinc as necessary)
@@ -1,3 +1,3 @@
1
1
  module BrowserifyRails
2
- VERSION = "0.7.3"
2
+ VERSION = "0.7.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: browserify-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.3
4
+ version: 0.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henry Hsu, Cymen Vig
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-20 00:00:00.000000000 Z
11
+ date: 2015-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sprockets