cocoapods-open 0.0.5 → 0.0.6
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/README.md +8 -3
- data/lib/open_pod_bay/version.rb +1 -1
- data/lib/pod/command/open.rb +20 -2
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97aa5f4158d32cb86d4c0cef57e643ed175295e2
|
4
|
+
data.tar.gz: 17f0859ffef745170402f6e2efa7735e9f4c79cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 822bee3e6b55994b4488782ee8256dc3d81f0755de5fd8844bdcc375aedb405d54c2d371971c91044a429e1077e0e1d4f45ed0c923d53ceb9bc0a562d2fd1537
|
7
|
+
data.tar.gz: 6a4cce4b1d431938f401dcf65745e761fa5e2b7fa13a780d6e3320081ee71486b031c47af2a194812b62000ffdc1d7d9365dca087a21a34010e59e28fc197917
|
data/README.md
CHANGED
@@ -15,10 +15,14 @@ Install the gem:
|
|
15
15
|
|
16
16
|
## Usage
|
17
17
|
|
18
|
-
Open the workspace
|
18
|
+
Open the workspace in Xcode
|
19
19
|
|
20
20
|
pod open
|
21
21
|
|
22
|
+
Open the workspace in AppCode
|
23
|
+
|
24
|
+
pod open -a
|
25
|
+
|
22
26
|
Install pods and then open the workspace (`pod install && pod open`)
|
23
27
|
|
24
28
|
pod reinstall
|
@@ -33,8 +37,9 @@ If you are happy with this gem, follow me on Github
|
|
33
37
|
|
34
38
|
## Contributors
|
35
39
|
|
36
|
-
* Sam Soffes
|
37
|
-
* Mark Rickert
|
40
|
+
* Sam Soffes (@soffes) : Quote workspace file name (fixes #1!)
|
41
|
+
* Mark Rickert (@markrickert) : `reinstall` command
|
42
|
+
* Victor Ilyukevich (@yas375) : `open -a` option
|
38
43
|
|
39
44
|
## Contributing
|
40
45
|
|
data/lib/open_pod_bay/version.rb
CHANGED
data/lib/pod/command/open.rb
CHANGED
@@ -5,10 +5,12 @@ module Pod
|
|
5
5
|
self.summary = 'Open the workspace'
|
6
6
|
self.description = <<-DESC
|
7
7
|
Opens the workspace in xcode. If no workspace found in the current directory,
|
8
|
-
looks up until it finds one.
|
8
|
+
looks up until it finds one. Pass `-a` flag if you want to open in AppCode.
|
9
9
|
DESC
|
10
|
+
self.arguments = '[-a]'
|
10
11
|
|
11
12
|
def initialize(argv)
|
13
|
+
@use_appcode = (argv.shift_argument == '-a')
|
12
14
|
@workspace = find_workspace_in(Pathname.pwd)
|
13
15
|
super
|
14
16
|
end
|
@@ -16,10 +18,17 @@ module Pod
|
|
16
18
|
def validate!
|
17
19
|
super
|
18
20
|
raise Informative, "No xcode workspace found" unless @workspace
|
21
|
+
if @use_appcode
|
22
|
+
raise Informative, "Can't find `#{appcode_executable}` command line launcher. Have you created it? 'AppCode->Tools->Create Command line launcher'" unless appcode_available?
|
23
|
+
end
|
19
24
|
end
|
20
25
|
|
21
26
|
def run
|
22
|
-
|
27
|
+
if @use_appcode
|
28
|
+
`#{appcode_executable} "#{@workspace}"`
|
29
|
+
else
|
30
|
+
`open "#{@workspace}"`
|
31
|
+
end
|
23
32
|
end
|
24
33
|
|
25
34
|
private
|
@@ -31,6 +40,15 @@ module Pod
|
|
31
40
|
def find_workspace_in_parent(path)
|
32
41
|
find_workspace_in(path.parent) unless path.root?
|
33
42
|
end
|
43
|
+
|
44
|
+
def appcode_available?
|
45
|
+
`which #{appcode_executable}`
|
46
|
+
$?.exitstatus == 0
|
47
|
+
end
|
48
|
+
|
49
|
+
def appcode_executable
|
50
|
+
'appcode'
|
51
|
+
end
|
34
52
|
end
|
35
53
|
end
|
36
54
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-open
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Les Hill
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -81,4 +81,3 @@ signing_key:
|
|
81
81
|
specification_version: 4
|
82
82
|
summary: Open a pod’s workspace
|
83
83
|
test_files: []
|
84
|
-
has_rdoc:
|