zpoder 0.1.1 → 0.1.2
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/CHANGELOG.md +2 -0
- data/Gemfile.lock +1 -1
- data/lib/pod/command/reopen.rb +20 -19
- data/lib/zpoder/version.rb +1 -1
- data/zpoder.gemspec +3 -5
- metadata +5 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9eb497495356e9ccef7535951b68ebe1b5e239178341f7ce5b213701c41b70d3
|
|
4
|
+
data.tar.gz: 454b743a0653d8fd19dd08991c0a74196dd50b52a56d5120551da8eaa244fd51
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: da67ddaec72662cecbee1fce88e15a854a220ce59996255f8328839acf5743d77150c0b48be073a55171768998f17c34653ab75a38a0600416f2bd4d5949a6b5
|
|
7
|
+
data.tar.gz: 2944888b12e7ed9f7fb202d667a4cad8dba9f8fa4a6a85e9a06e75227bace153ff7219fcce9d61112e6295c239fd55f0a4e17d77851e470613503073adcd67cb
|
data/CHANGELOG.md
ADDED
data/Gemfile.lock
CHANGED
data/lib/pod/command/reopen.rb
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module Pod
|
|
2
4
|
class Command
|
|
3
5
|
class Reopen < Command
|
|
4
|
-
|
|
5
6
|
self.summary = 'Reopen the workspace'
|
|
6
7
|
self.description = <<-DESC
|
|
7
8
|
Close and opens the workspace in Xcode. If no workspace found in the current directory,
|
|
@@ -15,33 +16,33 @@ module Pod
|
|
|
15
16
|
|
|
16
17
|
def validate!
|
|
17
18
|
super
|
|
18
|
-
raise Informative,
|
|
19
|
+
raise Informative, 'No xcode workspace found' unless @workspace
|
|
19
20
|
end
|
|
20
21
|
|
|
21
22
|
def run
|
|
22
|
-
ascript =
|
|
23
|
-
tell application "Xcode"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
|
|
23
|
+
ascript = <<~STR.strip_heredoc
|
|
24
|
+
tell application "Xcode"
|
|
25
|
+
set docs to (document of every window)
|
|
26
|
+
repeat with doc in docs
|
|
27
|
+
if class of doc is workspace document then
|
|
28
|
+
set docPath to path of doc
|
|
29
|
+
if docPath begins with "#{@workspace}" then
|
|
30
|
+
log docPath
|
|
31
|
+
close doc
|
|
32
|
+
return
|
|
33
|
+
end if
|
|
34
|
+
end if
|
|
35
|
+
end repeat
|
|
36
|
+
end tell
|
|
37
|
+
STR
|
|
37
38
|
`osascript -e '#{ascript}'`
|
|
38
|
-
|
|
39
|
+
`open "#{@workspace}"`
|
|
39
40
|
end
|
|
40
41
|
|
|
41
42
|
private
|
|
42
43
|
|
|
43
44
|
def find_workspace_in(path)
|
|
44
|
-
path.children.find {|fn| fn.extname == '.xcworkspace'} || find_workspace_in_example(path)
|
|
45
|
+
path.children.find { |fn| fn.extname == '.xcworkspace' } || find_workspace_in_example(path)
|
|
45
46
|
end
|
|
46
47
|
|
|
47
48
|
def find_workspace_in_example(path)
|
data/lib/zpoder/version.rb
CHANGED
data/zpoder.gemspec
CHANGED
|
@@ -9,19 +9,17 @@ Gem::Specification.new do |spec|
|
|
|
9
9
|
spec.authors = ["dacaiguoguo"]
|
|
10
10
|
spec.email = ["dacaiguoguo@163.com"]
|
|
11
11
|
|
|
12
|
-
spec.summary = %q{
|
|
13
|
-
spec.description = %q{
|
|
12
|
+
spec.summary = %q{cocoapods plugin include reopen workspace etc.}
|
|
13
|
+
spec.description = %q{cocoapods plugin include reopen workspace etc. close and reopen workspace}
|
|
14
14
|
spec.homepage = "https://github.com/dacaiguoguo/zpoder"
|
|
15
15
|
spec.license = "MIT"
|
|
16
16
|
|
|
17
17
|
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
|
18
18
|
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
|
19
19
|
if spec.respond_to?(:metadata)
|
|
20
|
-
# spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
|
|
21
|
-
|
|
22
20
|
spec.metadata["homepage_uri"] = spec.homepage
|
|
23
21
|
spec.metadata["source_code_uri"] = "https://github.com/dacaiguoguo/zpoder.git"
|
|
24
|
-
|
|
22
|
+
spec.metadata["changelog_uri"] = "https://github.com/dacaiguoguo/zpoder/blob/master/CHANGELOG.md"
|
|
25
23
|
else
|
|
26
24
|
raise "RubyGems 2.0 or newer is required to protect against " \
|
|
27
25
|
"public gem pushes."
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zpoder
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- dacaiguoguo
|
|
@@ -52,7 +52,7 @@ dependencies:
|
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '3.0'
|
|
55
|
-
description:
|
|
55
|
+
description: cocoapods plugin include reopen workspace etc. close and reopen workspace
|
|
56
56
|
email:
|
|
57
57
|
- dacaiguoguo@163.com
|
|
58
58
|
executables: []
|
|
@@ -62,6 +62,7 @@ files:
|
|
|
62
62
|
- ".gitignore"
|
|
63
63
|
- ".rspec"
|
|
64
64
|
- ".travis.yml"
|
|
65
|
+
- CHANGELOG.md
|
|
65
66
|
- Example/ToOpen.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
|
|
66
67
|
- Gemfile
|
|
67
68
|
- Gemfile.lock
|
|
@@ -79,6 +80,7 @@ licenses:
|
|
|
79
80
|
metadata:
|
|
80
81
|
homepage_uri: https://github.com/dacaiguoguo/zpoder
|
|
81
82
|
source_code_uri: https://github.com/dacaiguoguo/zpoder.git
|
|
83
|
+
changelog_uri: https://github.com/dacaiguoguo/zpoder/blob/master/CHANGELOG.md
|
|
82
84
|
post_install_message:
|
|
83
85
|
rdoc_options: []
|
|
84
86
|
require_paths:
|
|
@@ -97,5 +99,5 @@ requirements: []
|
|
|
97
99
|
rubygems_version: 3.0.6
|
|
98
100
|
signing_key:
|
|
99
101
|
specification_version: 4
|
|
100
|
-
summary:
|
|
102
|
+
summary: cocoapods plugin include reopen workspace etc.
|
|
101
103
|
test_files: []
|