boojs 0.0.22 → 0.0.24

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: 6dea0c6f4cc466136e76bcada6ee875cc69a1dd4
4
- data.tar.gz: 2e530628b013b658438394f6095f8bd8743328d8
3
+ metadata.gz: 22292038de6abe37edfa7087617f08fc71557e58
4
+ data.tar.gz: 7054387faa3a784c8731a9bcbee3d5c143fa25a2
5
5
  SHA512:
6
- metadata.gz: 96eebd28382f15c0ed8ae039a75559f50930b9a1ebadac85a0250838c5d89e364fee9b4acbb76e736f26c4f51a9e1d65cd02741e22fc395c012a55622eaf380d
7
- data.tar.gz: 14a93d6203887085182558eda5a97795119c289634e26b130a9ac1fad4557157e27f978a780c039344172a906eb9c4a2a3e9eda89c280c80a200dffd49a43dba
6
+ metadata.gz: 0a0edf7bb74c3acc88c0671350fd948106fc41068f68060cc44600306f74d5b87f5957fd519112e5697ebfe3919cdf330f740f6aba9b4d177cc004fa5b2a8da3
7
+ data.tar.gz: 1ecf4beff8b3712e12fc5bd07d803b274ebbe5cbb0f6d0f0ac128a2c45815e129153c48e2c5e3e5b2b2380cc1f1eabffea063ff8e5758de3c72742ef50839d2a
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ![boojs: A unix tool to execute headless browser javascript](https://raw.githubusercontent.com/sotownsend/boojs/master/logo.png)
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/BooJS.svg)](http://badge.fury.io/rb/boojs)
3
+ [![Gem Version](https://badge.fury.io/rb/boojs.svg)](http://badge.fury.io/rb/boojs)
4
4
  [![Build Status](https://travis-ci.org/sotownsend/BooJS.svg?branch=master)](https://travis-ci.org/sotownsend/boojs)
5
5
  [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/sotownsend/BooJS/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
6
6
  [![License](http://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/sotownsend/BooJS/blob/master/LICENSE)
@@ -60,6 +60,9 @@ Verify that a file contains no javascript runtime initialization errors
60
60
  0
61
61
  ```
62
62
 
63
+ #### Additional notes
64
+ * Calling `booPing()` will immediately return `"pong"` to `stdout`. You may use this to know when boo has started up fully.
65
+
63
66
  ## Requirements
64
67
 
65
68
  - Ruby 2.1 or Higher
data/lib/boojs/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module BooJS
2
- VERSION = '0.0.22'
2
+ VERSION = '0.0.24'
3
3
  end
data/lib/boojs.rb CHANGED
@@ -87,6 +87,10 @@ module BooJS
87
87
  system.stderr.writeLine("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%");
88
88
  phantom.exit(1);
89
89
  }
90
+
91
+ function booPing() {
92
+ console.log("pong");
93
+ }
90
94
  }
91
95
 
92
96
  #Any code the user wanted
data/spec/ping_spec.rb ADDED
@@ -0,0 +1,22 @@
1
+ RSpec.describe "ping" do
2
+ it "writes pong" do
3
+ begin
4
+ begin
5
+ Timeout.timeout(8) do
6
+ IO.popen "ruby -Ilib ./bin/boojs", "r+" do |p|
7
+ begin
8
+ p.puts "booPing()"
9
+ @res = p.readline.strip
10
+ ensure
11
+ Process.kill 9, p.pid
12
+ end
13
+ end
14
+ end
15
+ rescue
16
+ end
17
+
18
+ expect(@res).to eq("pong")
19
+ ensure
20
+ end
21
+ end
22
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boojs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.22
4
+ version: 0.0.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - seo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-23 00:00:00.000000000 Z
11
+ date: 2015-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -143,6 +143,7 @@ files:
143
143
  - logo.png
144
144
  - spec/cli_spec.rb
145
145
  - spec/helpers.rb
146
+ - spec/ping_spec.rb
146
147
  - spec/sample_spec.rb
147
148
  - spec/samples/jquery_ajax.js
148
149
  - spec/samples/set_a_stdin.js
@@ -176,6 +177,7 @@ summary: A boring javascript application framework
176
177
  test_files:
177
178
  - spec/cli_spec.rb
178
179
  - spec/helpers.rb
180
+ - spec/ping_spec.rb
179
181
  - spec/sample_spec.rb
180
182
  - spec/samples/jquery_ajax.js
181
183
  - spec/samples/set_a_stdin.js