friendly_ghost 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +10 -0
- data/README.md +1 -1
- data/friendly_ghost.gemspec +1 -0
- data/lib/friendly_ghost/runner.rb +6 -1
- data/lib/friendly_ghost/version.rb +1 -1
- data/spec/friendly_ghost/runner_spec.rb +9 -2
- data/spec/support/{json.js → json_1.js} +1 -5
- data/spec/support/{fail.js → json_2.js} +1 -5
- metadata +21 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec91afa6f760873582af43d9aac2046073621011
|
4
|
+
data.tar.gz: 2010865484d2485252e67be3a75623f4e4cfd2ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea25b32deb12786f1dabbb6865f22a74d3f5ed4b2ee69b001421b2decd28c3ee277743d0a46578c6d2c3e7dba8e5bfdca8d74ec4c5acef8d8503390d661ccab0
|
7
|
+
data.tar.gz: 9569d1170bc6520f28d7a26e3b0a1dbf6fd5daa14621faa5c0609c858bfa7bc7a41fba5562b3ab15de353b11b6cf53f04abe819bf66967f36613e8448ec14642
|
data/.travis.yml
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
language: ruby
|
2
|
+
rvm:
|
3
|
+
- 2.0.0
|
4
|
+
- 1.9.3
|
5
|
+
- jruby-19mode
|
6
|
+
- rbx-19mode
|
7
|
+
before_script:
|
8
|
+
- "export PHANTOMJS_EXECUTABLE='phantomjs --local-to-remote-url-access=yes --ignore-ssl-errors=yes'"
|
9
|
+
- git clone git://github.com/n1k0/casperjs.git
|
10
|
+
- "export PATH=./casperjs/bin:$PATH"
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# (casper, the) friendly_ghost
|
1
|
+
# (casper, the) friendly_ghost [![Build Status](https://travis-ci.org/ezkl/friendly_ghost.png)](https://travis-ci.org/ezkl/friendly_ghost)
|
2
2
|
## Overview
|
3
3
|
A simplistic, opinionated Ruby runner for [CasperJS](http://casperjs.org)
|
4
4
|
projects. Designed to hand JSON from the last line of STDOUT back to the user.
|
data/friendly_ghost.gemspec
CHANGED
@@ -21,8 +21,13 @@ module FriendlyGhost
|
|
21
21
|
@result
|
22
22
|
end
|
23
23
|
|
24
|
+
def raw_output
|
25
|
+
@process.out
|
26
|
+
end
|
27
|
+
|
24
28
|
def parse_result
|
25
|
-
|
29
|
+
json_line = @process.out.split(/\n/).select { |line| line =~ /\{/ }
|
30
|
+
output = json_line.first.strip
|
26
31
|
MultiJson.load(output)
|
27
32
|
end
|
28
33
|
end
|
@@ -14,7 +14,7 @@ module FriendlyGhost
|
|
14
14
|
let(:response) { runner.command arguments }
|
15
15
|
|
16
16
|
context 'success' do
|
17
|
-
let(:arguments) { 'test spec/support/
|
17
|
+
let(:arguments) { 'test spec/support/json_1.js' }
|
18
18
|
|
19
19
|
it 'should return the status' do
|
20
20
|
response['status'].should be_true
|
@@ -26,7 +26,7 @@ module FriendlyGhost
|
|
26
26
|
end
|
27
27
|
|
28
28
|
context 'failure' do
|
29
|
-
let(:arguments) { 'test spec/support/
|
29
|
+
let(:arguments) { 'test spec/support/json_2.js' }
|
30
30
|
|
31
31
|
it 'should return the status' do
|
32
32
|
response['status'].should be_false
|
@@ -37,5 +37,12 @@ module FriendlyGhost
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
end
|
40
|
+
|
41
|
+
describe '#raw_output' do
|
42
|
+
it 'should return the raw log output' do
|
43
|
+
runner.command('test spec/support/json_1.js')
|
44
|
+
runner.raw_output.split(/\n/).size.should >= 2
|
45
|
+
end
|
46
|
+
end
|
40
47
|
end
|
41
48
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: friendly_ghost
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ezekiel Templin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-04-
|
11
|
+
date: 2013-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: posix-spawn
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 1.7.2
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: casperjs
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.0.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.0.0
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: rake
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -75,6 +89,7 @@ extra_rdoc_files: []
|
|
75
89
|
files:
|
76
90
|
- .gitignore
|
77
91
|
- .rspec
|
92
|
+
- .travis.yml
|
78
93
|
- Gemfile
|
79
94
|
- Guardfile
|
80
95
|
- README.md
|
@@ -85,8 +100,8 @@ files:
|
|
85
100
|
- lib/friendly_ghost/version.rb
|
86
101
|
- spec/friendly_ghost/runner_spec.rb
|
87
102
|
- spec/spec_helper.rb
|
88
|
-
- spec/support/
|
89
|
-
- spec/support/
|
103
|
+
- spec/support/json_1.js
|
104
|
+
- spec/support/json_2.js
|
90
105
|
homepage: https://github.com/ezkl/friendly_ghost
|
91
106
|
licenses:
|
92
107
|
- MIT
|
@@ -114,6 +129,6 @@ summary: Ruby runner for CasperJS
|
|
114
129
|
test_files:
|
115
130
|
- spec/friendly_ghost/runner_spec.rb
|
116
131
|
- spec/spec_helper.rb
|
117
|
-
- spec/support/
|
118
|
-
- spec/support/
|
132
|
+
- spec/support/json_1.js
|
133
|
+
- spec/support/json_2.js
|
119
134
|
has_rdoc:
|