webconsole 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 70395a2c52eb177d5822716aac4e2abfeec7e95f
4
- data.tar.gz: aec4858a911a98087d24565ae96a0eb737e3589d
3
+ metadata.gz: afd0a24eb6fda7723529ec96cf18bd1be0dd72db
4
+ data.tar.gz: 795c7022fbd7dec8531ca4ad3f137f664c413fa0
5
5
  SHA512:
6
- metadata.gz: 35ae7c659a3f1eba971b886723cc4c470311111f259660e539ff26b2872919f3c1908688e78e7029e47a11c8ff3615d0b705e04f87a11ec62c20025234d3b266
7
- data.tar.gz: 5ca14d43ea863d47b7e02abc0e016a8e158c45d938a95c3ce3ee09c7c9ff209a4e6675a754df85be6634e630433b0f06aa38485e11e096c719a65f00f50adf71
6
+ metadata.gz: dfe762135c639a4b5d2f3c0d671a44bbf72d7fa8646d39af4720ed83e9cd3bf6dc424b083bce9d10bf7013938fcf2090c7d509a712382de1f6aa5bc85ff7baf6
7
+ data.tar.gz: 39c68d84507b2b8e1e427cc1aa1469897de5918a1d06c6da812b0c57c6dc074a87feb0498a06012f1309c7fb355671633be305cac887c7c206893bea4ab6b285
@@ -4,4 +4,6 @@ module WebConsole
4
4
  require_relative "webconsole/lib/controller"
5
5
  require_relative "webconsole/lib/view"
6
6
  require_relative "webconsole/lib/module"
7
- end
7
+ end
8
+
9
+ WebConsole::application_exists || abort("The Web Console application is not installed.")
@@ -5,6 +5,17 @@ module WebConsole
5
5
  self.run_applescript(LOAD_PLUGIN_SCRIPT, [path])
6
6
  end
7
7
 
8
+ EXISTS_SCRIPT = File.join(APPLESCRIPT_DIRECTORY, "exists.scpt")
9
+ def self.application_exists
10
+ result = self.run_applescript(EXISTS_SCRIPT)
11
+ result.chomp!
12
+ if result == "true"
13
+ return true
14
+ else
15
+ return false
16
+ end
17
+ end
18
+
8
19
  RUN_PLUGIN_SCRIPT = File.join(APPLESCRIPT_DIRECTORY, "run_plugin.scpt")
9
20
  def self.run_plugin(name, directory = nil, arguments = nil)
10
21
  parameters = [name]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webconsole
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
  - Roben Kleene
@@ -18,6 +18,7 @@ extra_rdoc_files: []
18
18
  files:
19
19
  - lib/applescript/close_window.scpt
20
20
  - lib/applescript/do_javascript.scpt
21
+ - lib/applescript/exists.scpt
21
22
  - lib/applescript/load_html.scpt
22
23
  - lib/applescript/load_html_with_base_url.scpt
23
24
  - lib/applescript/load_plugin.scpt