bunchcli 1.1.10.pre → 1.1.11.pre
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 +4 -4
- data/lib/bunch/bunchCLI.rb +1 -1
- data/lib/bunch/url_generator.rb +10 -2
- data/lib/bunch/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 70d3422a46d0fcef92ba107d45988048e87861e7c43850804ae8f694fc68073a
|
|
4
|
+
data.tar.gz: d0e9a81d6681c68440171064ee6b43890848ae3a598fe5824ac4d879a57de8e2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ae5f34bb75d84b59e86ed3646a30f5ef86d90ff7e6cf91fac65a31bbc9d505d8b0944c61e2d4f3445504893639f7591ed0b9dc31a2aa17cf7392a0c7585e9663
|
|
7
|
+
data.tar.gz: 27a8b4693967cc09fd11036caa1162454a393907fff8036f6c8decb4ec47759d758dbc8e59201a797c6978df9d9e066d08e0d085edadfe1cc73adc1b37e0ba39
|
data/lib/bunch/bunchCLI.rb
CHANGED
|
@@ -153,7 +153,7 @@ EOF
|
|
|
153
153
|
launch_if_needed
|
|
154
154
|
# get front app
|
|
155
155
|
front_app = %x{osascript -e 'tell application "System Events" to return name of first application process whose frontmost is true'}.strip
|
|
156
|
-
bid = bundle_id(front_app)
|
|
156
|
+
bid = bundle_id(front_app) rescue false
|
|
157
157
|
@success = bid if (bid)
|
|
158
158
|
|
|
159
159
|
if @url_method == 'raw'
|
data/lib/bunch/url_generator.rb
CHANGED
|
@@ -15,9 +15,17 @@ end
|
|
|
15
15
|
module Util
|
|
16
16
|
def bundle_id(app)
|
|
17
17
|
shortname = app.sub(/\.app$/, '')
|
|
18
|
-
apps = `mdfind -onlyin /Applications -onlyin /Applications/Setapp -onlyin /Applications/Utilities -onlyin ~/Applications -onlyin /Developer/Applications 'kMDItemKind==Application'`
|
|
18
|
+
apps = `mdfind -onlyin /Applications -onlyin /Applications/Setapp -onlyin /Applications/Utilities -onlyin ~/Applications -onlyin /Developer/Applications -onlyin /System/Applications 'kMDItemKind==Application'`
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
return false if !apps || apps.strip.length == 0
|
|
21
|
+
|
|
22
|
+
foundapps = apps.split(/\n/).select! { |line| line.chomp =~ /#{shortname}\.app$/i }
|
|
23
|
+
|
|
24
|
+
if foundapps.length > 0
|
|
25
|
+
foundapp = foundapps[0]
|
|
26
|
+
else
|
|
27
|
+
return false
|
|
28
|
+
end
|
|
21
29
|
|
|
22
30
|
if foundapp
|
|
23
31
|
bid = `mdls -name kMDItemCFBundleIdentifier -r "#{foundapp}"`.chomp
|
data/lib/bunch/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bunchcli
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.11.pre
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brett Terpstra
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-05-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description:
|
|
14
14
|
email:
|
|
@@ -52,7 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
52
52
|
- !ruby/object:Gem::Version
|
|
53
53
|
version: 1.3.1
|
|
54
54
|
requirements: []
|
|
55
|
-
rubygems_version: 3.2.
|
|
55
|
+
rubygems_version: 3.2.16
|
|
56
56
|
signing_key:
|
|
57
57
|
specification_version: 4
|
|
58
58
|
summary: A CLI for use with Bunch.app (macOS)
|