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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a327e613373ddd9ce65d00f6709939646690211e
4
- data.tar.gz: e2fa5ca9c87a732d6ec25579d2f90ef185f0d11b
3
+ metadata.gz: f1ced922cd811036db806862d7bc097ad029b8ca
4
+ data.tar.gz: b9df9ad2c7acb0c13cf06fa19e98d3f088078010
5
5
  SHA512:
6
- metadata.gz: 24af54e9b78af57ee3ec68a3b4f49d43cdfe2dbb956950476492578c025e57cc9f77208324e035d436d64a634a14a5b148553e8041581aff672882b02070a6d0
7
- data.tar.gz: 332ec858e408c9dd782d72f97ed3dcd43fbc4093ad3411c6cfe7419d27c856034f5e13f8f8439cd34f3077e6082cfb365dedcbc3e5c597adc45bb20318c39b3d
6
+ metadata.gz: 41f3ada003323e20198b82c4f6c59ca9ec1f51e92c00f4bf466ad7c6f565487482f7c2fb6da8537090eeeb41477134047945c11d39b2b1cece8e81f2d071c1bb
7
+ data.tar.gz: 4415a9bb3c1463f0aac5b2a130b1b5ba9292cba5d8b4a3f04f59ff727c539cd69db3bb85f4db3b29377d8c062427d06d39327696f8ad9b5fc03c94cc32682d15
@@ -1,6 +1,10 @@
1
1
  System Browser
2
2
  ==============
3
3
 
4
+ ### v0.1.1 (July 20, 2015)
5
+
6
+ * Raise an explicit error if System Browser Client is not installed
7
+
4
8
  ### v0.1.0 (July 20, 2015)
5
9
 
6
10
  * Initial release
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.0
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: system_browser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyrylo Silin