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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: be3ec4371cc506f218100e40f3da425fb356a2e6b78a6479d0f34a385b01a3d9
4
- data.tar.gz: a4516c1422f73b3252723cb16427dcfd7b76cff0aac8c461d450a2ca1fb15861
3
+ metadata.gz: 9eb497495356e9ccef7535951b68ebe1b5e239178341f7ce5b213701c41b70d3
4
+ data.tar.gz: 454b743a0653d8fd19dd08991c0a74196dd50b52a56d5120551da8eaa244fd51
5
5
  SHA512:
6
- metadata.gz: 64cf7862e325696dd9ee95f23b937a5342e4d3ed9fc9cfdbd981378738c45565d8b7bd4e399b7f4b7aff95d8cdb570a80b47564fb1721aef801fdc82205963cc
7
- data.tar.gz: 223baff17b63c3304c5c05843e831fe7a4bf3196b0bf7cde2fe5cb6ba13b0e3e3a024de56285b603fbccf8dd082916004afc5f3d857f2e01f2f8f9193b47b61b
6
+ metadata.gz: da67ddaec72662cecbee1fce88e15a854a220ce59996255f8328839acf5743d77150c0b48be073a55171768998f17c34653ab75a38a0600416f2bd4d5949a6b5
7
+ data.tar.gz: 2944888b12e7ed9f7fb202d667a4cad8dba9f8fa4a6a85e9a06e75227bace153ff7219fcce9d61112e6295c239fd55f0a4e17d77851e470613503073adcd67cb
@@ -0,0 +1,2 @@
1
+ 0.1.2
2
+ close and reopen workspace
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zpoder (0.1.0)
4
+ zpoder (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -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, "No xcode workspace found" unless @workspace
19
+ raise Informative, 'No xcode workspace found' unless @workspace
19
20
  end
20
21
 
21
22
  def run
22
- ascript = <<-STR.strip_heredoc
23
- tell application "Xcode"
24
- set docs to (document of every window)
25
- repeat with doc in docs
26
- if class of doc is workspace document then
27
- set docPath to path of doc
28
- if docPath begins with "#{@workspace}" then
29
- log docPath
30
- return
31
- end if
32
- end if
33
- end repeat
34
- end tell
35
- STR
36
- # puts ascript
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
- # `open "#{@workspace}"`
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)
@@ -1,3 +1,3 @@
1
1
  module Zpoder
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -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{Write a short summary, because RubyGems requires one.}
13
- spec.description = %q{ Write a longer description or delete this line.}
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
- # spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
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.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: " Write a longer description or delete this line."
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: Write a short summary, because RubyGems requires one.
102
+ summary: cocoapods plugin include reopen workspace etc.
101
103
  test_files: []