simple_javascript_testing 0.0.2 → 0.0.3

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: c3e838ca53ffb71687ba2d933629ad78a010903b
4
- data.tar.gz: 78aa12131e54f5953838627822b19edb04b2ae0b
3
+ metadata.gz: 35ce285f684371f303456c73f2646a46d244cf15
4
+ data.tar.gz: 862f64dab962ca84b955d0c2e08e2bf9a3b1d7a7
5
5
  SHA512:
6
- metadata.gz: 2ab122b739c6734b38fe24a961334e340a082653e824b93f59cdf50bb68fd605763d9e4feac117b21ebaa00c5999072755c69e628c352f3a6c54e82a088eb7f8
7
- data.tar.gz: ec6ca2a2a269d210a35931185f7666ffb67078124c1bb341bd48ad36b47e1227200e0c035312c921598ed1c892ec03d0b98fa79e877be9b2b1f48101613f8dcf
6
+ metadata.gz: 1b9855c6e332397017de35bf9eb17882695d133f0dbd82a4a125d751e7daa403ab273b30850f49613a4dd2af59e325f4d88a4cd9ab1c3b9b2377b27fecd3b973
7
+ data.tar.gz: bd9251f3c8e1faf8190da20c5f7fa8d75ca7a2e9c51806ad1f04b36a94794f5e5af7d365d57654b95fb81d68e366b1a8876a2530c6853446a0fe199e587dd0a8
@@ -1,4 +1,5 @@
1
1
  require 'fileutils'
2
+ require 'mkmf'
2
3
  require 'render_anywhere'
3
4
 
4
5
  class AnyClass
@@ -47,6 +48,11 @@ module SimpleJavascriptTesting
47
48
  File.write("test/html/#{template}.html", html)
48
49
  thing = "#{File.expand_path('html', 'test')}/#{template}"
49
50
  thing2 = "#{File.expand_path('javascript', 'test')}/#{template}"
50
- system "phantomjs #{thing2}.js #{thing}.html"
51
+ binary = if find_executable 'phantomjs'
52
+ "phantomjs"
53
+ else
54
+ "node_modules/simple_javascript_testing/node_modules/phantomjs/lib/phantom/bin/phantomjs"
55
+ end
56
+ system "#{binary} #{thing2}.js #{thing}.html"
51
57
  end
52
58
  end
data/package.json CHANGED
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "name": "simple_javascript_testing",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "simple javascript testing for rails",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
8
8
  },
9
+ "dependencies" : {
10
+ "phantomjs": "latest"
11
+ },
9
12
  "repository": {
10
13
  "type": "git",
11
14
  "url": "https://github.com/towski/simple_javascript_testing.git"
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'simple_javascript_testing'
3
- s.version = '0.0.2'
3
+ s.version = '0.0.3'
4
4
  s.date = '2014-10-31'
5
5
  s.summary = "Simple Javascript Testing"
6
6
  s.description = "simple javascript testing for rails with phantomjs"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_javascript_testing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - towski