system_browser 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +4 -0
- data/VERSION +1 -1
- data/lib/system_browser/client.rb +7 -0
- 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: f1ced922cd811036db806862d7bc097ad029b8ca
|
4
|
+
data.tar.gz: b9df9ad2c7acb0c13cf06fa19e98d3f088078010
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41f3ada003323e20198b82c4f6c59ca9ec1f51e92c00f4bf466ad7c6f565487482f7c2fb6da8537090eeeb41477134047945c11d39b2b1cece8e81f2d071c1bb
|
7
|
+
data.tar.gz: 4415a9bb3c1463f0aac5b2a130b1b5ba9292cba5d8b4a3f04f59ff727c539cd69db3bb85f4db3b29377d8c062427d06d39327696f8ad9b5fc03c94cc32682d15
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -15,6 +15,10 @@ _Make sure that you have the client installed_.
|
|
15
15
|
Examples
|
16
16
|
--------
|
17
17
|
|
18
|
+
The easiest way to play with System Browser is to start it from a REPL such as
|
19
|
+
[Pry](http://pryrepl.org/) or [IRB](https://github.com/ruby/ruby/blob/8754f619
|
20
|
+
d51a67fc4df255c189c8ff744433dd6e/lib/irb.rb).
|
21
|
+
|
18
22
|
### Basic example
|
19
23
|
|
20
24
|
```ruby
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
@@ -13,6 +13,8 @@ module SystemBrowser
|
|
13
13
|
# @return [SystemBrowser::Session]
|
14
14
|
attr_writer :session
|
15
15
|
|
16
|
+
ClientNotFoundError = Class.new(RuntimeError)
|
17
|
+
|
16
18
|
def initialize
|
17
19
|
@init_pid = nil
|
18
20
|
end
|
@@ -28,7 +30,12 @@ module SystemBrowser
|
|
28
30
|
# process that can be used to send signals to the client.
|
29
31
|
#
|
30
32
|
# @return [Integer] the process ID of the client application
|
33
|
+
# @raise [RuntimeError]
|
31
34
|
def start
|
35
|
+
unless system("which #{CLIENT_EXECUTABLE} > /dev/null 2>&1")
|
36
|
+
fail ClientNotFoundError, "executable '#{CLIENT_EXECUTABLE}' is not on your $PATH"
|
37
|
+
end
|
38
|
+
|
32
39
|
@init_pid = spawn(CLIENT_EXECUTABLE, pgroup: true)
|
33
40
|
Process.wait(@init_pid)
|
34
41
|
|