cocoapods-try-release-fix 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -1
- data/cocoapods-try-release-fix.gemspec +21 -0
- data/lib/cocoapods_try.rb +1 -1
- data/lib/pod/command/try.rb +12 -3
- data/spec/command/try_spec.rb +20 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7276b8fe8e6b0d203c1ea4caaa630a723062b2ca
|
4
|
+
data.tar.gz: 598d5fb692e421071b03e1bb8fcf626754f76456
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 784bead28bd534c72936ef41360f7687b0c883591628b84a8507327ba21a9ebab5e5a4f3fe794ab6d1a449103bc1c44716dbaf2c803a4a997822bb9d16a16385
|
7
|
+
data.tar.gz: c279283f96b29a63a1ea49d35eac617ffb9a2b073f9fbc3b133eb2616d8093ff15f016fb82ba53d86e9ceff0dc6c51e9115277d6df9f8c0146f31b6710502a54
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
1
|
# Cocoapods::Try Changelog
|
2
2
|
|
3
|
-
##
|
3
|
+
## 0.1.2
|
4
|
+
|
5
|
+
* Prefer workspaces over projects. - [kylef](https://github.com/kylef)
|
6
|
+
* Open workspaces uf available. - [kylef](https://github.com/kylef)
|
7
|
+
* Don't consider workspaces in bundles. - [alloy](https://github.com/alloy)
|
8
|
+
* Typo fixes. - [markltownsend](https://github.com/markltownsend)
|
9
|
+
|
10
|
+
## 0.1.0
|
11
|
+
|
12
|
+
* Initial implementation - [fabiopelosin](https://github.com/fabiopelosin)
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'cocoapods_try.rb'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "cocoapods-try-release-fix"
|
8
|
+
spec.version = CocoapodsTry::VERSION
|
9
|
+
spec.authors = ["Fabio Pelosin"]
|
10
|
+
spec.summary = %q{CocoaPods plugin which allows to quickly try the demo project of a Pod.}
|
11
|
+
spec.homepage = "https://github.com/cocoapods/cocoapods-try"
|
12
|
+
spec.license = "MIT"
|
13
|
+
|
14
|
+
spec.files = `git ls-files`.split($/)
|
15
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
16
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
17
|
+
spec.require_paths = ["lib"]
|
18
|
+
|
19
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
20
|
+
spec.add_development_dependency "rake"
|
21
|
+
end
|
data/lib/cocoapods_try.rb
CHANGED
data/lib/pod/command/try.rb
CHANGED
@@ -7,7 +7,7 @@ module Pod
|
|
7
7
|
self.summary = "Try a Pod!"
|
8
8
|
|
9
9
|
self.description = <<-DESC
|
10
|
-
|
10
|
+
Downloads the Pod with the given NAME and opens its project.
|
11
11
|
DESC
|
12
12
|
|
13
13
|
self.arguments = 'NAME'
|
@@ -94,7 +94,11 @@ module Pod
|
|
94
94
|
#
|
95
95
|
def pick_demo_project(dir)
|
96
96
|
glob_match = Dir.glob("#{dir}/**/*.xc{odeproj,workspace}")
|
97
|
-
glob_match = glob_match.reject
|
97
|
+
glob_match = glob_match.reject do |p|
|
98
|
+
p.include?('Pods.xcodeproj') || \
|
99
|
+
p.end_with?('.xcodeproj/project.xcworkspace') || \
|
100
|
+
(p.end_with?('.xcodeproj') && glob_match.include?(p.chomp(File.extname(p.to_s)) + '.xcworkspace'))
|
101
|
+
end
|
98
102
|
|
99
103
|
if glob_match.count == 0
|
100
104
|
raise Informative, "Unable to find any project in the source files" \
|
@@ -134,7 +138,12 @@ module Pod
|
|
134
138
|
perform_cocoapods_installation
|
135
139
|
|
136
140
|
podfile = Pod::Podfile.from_file(podfile_path)
|
137
|
-
|
141
|
+
|
142
|
+
if podfile.workspace_path
|
143
|
+
File.expand_path(podfile.workspace_path)
|
144
|
+
else
|
145
|
+
proj.chomp(File.extname(proj.to_s)) + '.xcworkspace'
|
146
|
+
end
|
138
147
|
end
|
139
148
|
else
|
140
149
|
proj
|
data/spec/command/try_spec.rb
CHANGED
@@ -98,6 +98,18 @@ module Pod
|
|
98
98
|
path = @sut.pick_demo_project(stub(:cleanpath => ''))
|
99
99
|
path.should == 'Project Demo.xcworkspace'
|
100
100
|
end
|
101
|
+
|
102
|
+
it "should not show workspaces inside a project" do
|
103
|
+
Dir.stubs(:glob).returns(['Project Demo.xcodeproj', 'Project Demo.xcodeproj/project.xcworkspace'])
|
104
|
+
path = @sut.pick_demo_project(stub(:cleanpath => ''))
|
105
|
+
path.should == 'Project Demo.xcodeproj'
|
106
|
+
end
|
107
|
+
|
108
|
+
it "should prefer workspaces over projects with the same name" do
|
109
|
+
Dir.stubs(:glob).returns(['Project Demo.xcodeproj', 'Project Demo.xcworkspace'])
|
110
|
+
path = @sut.pick_demo_project(stub(:cleanpath => ''))
|
111
|
+
path.should == 'Project Demo.xcworkspace'
|
112
|
+
end
|
101
113
|
end
|
102
114
|
|
103
115
|
describe "#install_podfile" do
|
@@ -116,6 +128,14 @@ module Pod
|
|
116
128
|
path = @sut.install_podfile(proj)
|
117
129
|
path.should == "/tmp/Project.xcworkspace"
|
118
130
|
end
|
131
|
+
|
132
|
+
it "returns the default workspace if one is not set" do
|
133
|
+
Pathname.any_instance.stubs(:exist?).returns(true)
|
134
|
+
proj = "/tmp/Project.xcodeproj"
|
135
|
+
Podfile.stubs(:from_file).returns(stub(:workspace_path => nil))
|
136
|
+
path = @sut.install_podfile(proj)
|
137
|
+
path.should == "/tmp/Project.xcworkspace"
|
138
|
+
end
|
119
139
|
end
|
120
140
|
end
|
121
141
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-try-release-fix
|
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
|
- Fabio Pelosin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -51,6 +51,7 @@ files:
|
|
51
51
|
- LICENSE
|
52
52
|
- README.md
|
53
53
|
- Rakefile
|
54
|
+
- cocoapods-try-release-fix.gemspec
|
54
55
|
- cocoapods-try.gemspec
|
55
56
|
- lib/cocoapods_plugin.rb
|
56
57
|
- lib/cocoapods_try.rb
|
@@ -77,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
77
78
|
version: '0'
|
78
79
|
requirements: []
|
79
80
|
rubyforge_project:
|
80
|
-
rubygems_version: 2.0.
|
81
|
+
rubygems_version: 2.0.6
|
81
82
|
signing_key:
|
82
83
|
specification_version: 4
|
83
84
|
summary: CocoaPods plugin which allows to quickly try the demo project of a Pod.
|