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 +4 -4
- data/lib/simple_javascript_testing.rb +7 -1
- data/package.json +4 -1
- data/simple_javascript_testing.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35ce285f684371f303456c73f2646a46d244cf15
|
4
|
+
data.tar.gz: 862f64dab962ca84b955d0c2e08e2bf9a3b1d7a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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.
|
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"
|