jasmine-rails 0.5.0 → 0.5.1

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: 339815a911c1d5d3fdcdd0511764242d86cd8c90
4
- data.tar.gz: f05e9405029133096f98263b75a2be56ac0353a2
3
+ metadata.gz: 3f6b63ced5a6870dffb4f378a4220a816180e18b
4
+ data.tar.gz: 59ae4feb8178a6bc3b4a224ecfaaf47cab6802a6
5
5
  SHA512:
6
- metadata.gz: 8bf18be65fac776ce1367cf2c8b87d3c7c11dc08100d79111a12a66a6b0919cea01377a6e5081f041cf9a659e3f6495138588cc276b25fa7825215a0a581db02
7
- data.tar.gz: be53a46065f51dc716d40fb832e018d5b999a431509e484f59b8c81636b91cc6f2cc2ffca6dcbda71585c9633d6edab3f31dcbf20a14deba66d4c78dd8c1004c
6
+ metadata.gz: d665f29c9d7009f328fb928efc925bf3106f59eb5be64761223efb987d3812d0dd3d2d60be83a0a1e071711ca5646f1a35373df10679fd2ade6da6a33292dced
7
+ data.tar.gz: 4127e9dddfe68d1eb6deb8ba2d11885c24a1b4e072df144afb52130b5e0d7c358f898dfe75e1b0aa2ff1f7819f1e2f126a075497d30e4ea40b54ea4a7fd9a5f7
data/README.md CHANGED
@@ -64,6 +64,11 @@ helpers:
64
64
  # relative path from spec_dir
65
65
  spec_files:
66
66
  - "**/*[Ss]pec.{js,coffee}"
67
+
68
+ # path to directory of temporary files
69
+ # (spec runner and asset cache)
70
+ # defaults to spec/tmp
71
+ tmp_dir: "spec/tmp"
67
72
  ```
68
73
 
69
74
  ## Asset Pipeline Support
data/lib/jasmine-rails.rb CHANGED
@@ -23,6 +23,11 @@ module JasmineRails
23
23
  Rails.root.join(path)
24
24
  end
25
25
 
26
+ def tmp_dir
27
+ path = jasmine_config['tmp_dir'] || 'spec/tmp'
28
+ Rails.root.join(path)
29
+ end
30
+
26
31
  # returns list of all files to be included into the jasmine testsuite
27
32
  # includes:
28
33
  # * application src_files
@@ -115,6 +120,11 @@ module JasmineRails
115
120
  # relative path from spec_dir
116
121
  spec_files:
117
122
  - "**/*[Ss]pec.{js,coffee}"
123
+
124
+ # path to directory of temporary files
125
+ # (spec runner and asset cache)
126
+ # defaults to spec/tmp
127
+ tmp_dir: "spec/tmp"
118
128
  YAML
119
129
  end
120
130
 
@@ -21,7 +21,7 @@ module JasmineRails
21
21
  source = source.to_s
22
22
  return source if source.starts_with?('/')
23
23
  content = Rails.application.assets[source].to_s
24
- source_path = Rails.root.join('spec/tmp/assets').join(source)
24
+ source_path = JasmineRails.tmp_dir.join('assets').join(source)
25
25
 
26
26
  FileUtils.mkdir_p File.dirname(source_path)
27
27
  Rails.logger.debug "Compiling #{source} to #{source_path}"
@@ -9,7 +9,7 @@ module JasmineRails
9
9
  override_rails_config do
10
10
  include_offline_asset_paths_helper
11
11
  html = get_spec_runner(spec_filter)
12
- runner_path = Rails.root.join('spec/tmp/runner.html')
12
+ runner_path = JasmineRails.tmp_dir.join('runner.html')
13
13
  File.open(runner_path, 'w') {|f| f << html.gsub('/assets', './assets')}
14
14
 
15
15
  phantomjs_runner_path = File.join(File.dirname(__FILE__), '..', 'assets', 'javascripts', 'jasmine-runner.js')
@@ -1,3 +1,3 @@
1
1
  module JasmineRails
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jasmine-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Searls
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-11-25 00:00:00.000000000 Z
13
+ date: 2013-12-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails