cocoapods-open 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 592e3d3541e18dbc4f2cc0f991e260b7969b059b
4
- data.tar.gz: f10159b1bce8a57a26cc0290880d6504c2722bf7
3
+ metadata.gz: 97aa5f4158d32cb86d4c0cef57e643ed175295e2
4
+ data.tar.gz: 17f0859ffef745170402f6e2efa7735e9f4c79cf
5
5
  SHA512:
6
- metadata.gz: ef6bb51d3f26a332d490c59b228c754f79a2fe094d4f361324ebc08ddd1519306c3f4f1fa5d2d5f63294fccb998a8690e739ca6fd4f3a2a67acb4e59b4ff3b9f
7
- data.tar.gz: a2dccb6e6ca5a18b371c1d1aca3718d113e741d868ede068bfd91f130bb2aca1c6418f56769ccdf6e474bea35f76a02551c1157a7a535b8755b65ea00398f91c
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 (@soffes) : Quote workspace file name (fixes #1!)
37
- * Mark Rickert (@markrickert) : `reinstall` command
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
 
@@ -1,3 +1,3 @@
1
1
  module OpenPodBay
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -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
- `open "#{@workspace}"`
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.5
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: 2013-12-03 00:00:00.000000000 Z
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: