cocoapods-playgrounds 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/cocoapods-playgrounds/command/playgrounds.rb +15 -2
- data/lib/cocoapods-playgrounds/gem_version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f5673764f827a2a21cf5a6fe544b1d4252fcadc
|
4
|
+
data.tar.gz: 11e36382f5ac1dffd67c26ec9017e2863ca19050
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52647563ac67b36ff1b9887fa3e47141d812c459fd3f6dbf4528c6ec83c4d86fb1ef3ea869137aa7b1ea49e6c0d5812392d73bf9cf55354e00b7a3044c7b27e7
|
7
|
+
data.tar.gz: a8ba409eb1837835a42248f99500b6f77564fda35f71007003bad6906346eb9999cb9740bb97bd413522e54db4aafe0457dd1c1f9b8d506d05dc9378d1987867
|
data/Gemfile.lock
CHANGED
@@ -1,6 +1,10 @@
|
|
1
|
+
require 'xcodeproj'
|
2
|
+
|
1
3
|
module Pod
|
2
4
|
class Command
|
3
5
|
class Playgrounds < Command
|
6
|
+
DEFAULT_PLATFORM_NAME = :ios
|
7
|
+
|
4
8
|
self.summary = 'Generates a Swift Playground for any Pod.'
|
5
9
|
|
6
10
|
self.description = <<-DESC
|
@@ -11,14 +15,23 @@ module Pod
|
|
11
15
|
|
12
16
|
def self.options
|
13
17
|
[
|
14
|
-
['--no-install', 'Skip running `pod install`']
|
18
|
+
['--no-install', 'Skip running `pod install`'],
|
19
|
+
['--platform', "Platform to generate for (default: #{DEFAULT_PLATFORM_NAME})"],
|
20
|
+
['--platform_version', 'Platform version to generate for ' \
|
21
|
+
"(default: #{default_version_for_platform(DEFAULT_PLATFORM_NAME)})"]
|
15
22
|
]
|
16
23
|
end
|
17
24
|
|
25
|
+
def self.default_version_for_platform(platform)
|
26
|
+
Xcodeproj::Constants.const_get("LAST_KNOWN_#{platform.upcase}_SDK")
|
27
|
+
end
|
28
|
+
|
18
29
|
def initialize(argv)
|
19
30
|
arg = argv.shift_argument
|
20
31
|
@names = arg.split(',') if arg
|
21
32
|
@install = argv.flag?('install', true)
|
33
|
+
@platform = argv.option('platform', DEFAULT_PLATFORM_NAME).to_sym
|
34
|
+
@platform_version = argv.option('platform_version', Playgrounds.default_version_for_platform(@platform))
|
22
35
|
super
|
23
36
|
end
|
24
37
|
|
@@ -29,7 +42,7 @@ module Pod
|
|
29
42
|
|
30
43
|
def run
|
31
44
|
# TODO: Pass platform and deployment target from configuration
|
32
|
-
generator = WorkspaceGenerator.new(@names)
|
45
|
+
generator = WorkspaceGenerator.new(@names, :cocoapods, @platform, @platform_version)
|
33
46
|
generator.generate(@install)
|
34
47
|
end
|
35
48
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-playgrounds
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Boris Bügling
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocoapods
|