cocoapods-playgrounds 1.1.0 → 1.2.0

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
  SHA1:
3
- metadata.gz: 62abe6d9dadba9c2c9da2016bb929f090164bdf3
4
- data.tar.gz: 89a8d28aa56d7268b664e3f37667b9df3198d584
3
+ metadata.gz: 3f5673764f827a2a21cf5a6fe544b1d4252fcadc
4
+ data.tar.gz: 11e36382f5ac1dffd67c26ec9017e2863ca19050
5
5
  SHA512:
6
- metadata.gz: 872e93d6370c92db81c63c13534e34d4babe6734e456f931ba68d027c40a07d6ed77884fcd3e93347cba4495fcf21992c6466b730532e0bf61a324ea3d96349e
7
- data.tar.gz: 40ee2c758f2cbb108cfeeba66c181bc16508e1cfe6d9b2c634d303039452feeeab51e017283ab836bfc1bf469b20cb5247c1016a5318b00c6f10b9c8aafd1d92
6
+ metadata.gz: 52647563ac67b36ff1b9887fa3e47141d812c459fd3f6dbf4528c6ec83c4d86fb1ef3ea869137aa7b1ea49e6c0d5812392d73bf9cf55354e00b7a3044c7b27e7
7
+ data.tar.gz: a8ba409eb1837835a42248f99500b6f77564fda35f71007003bad6906346eb9999cb9740bb97bd413522e54db4aafe0457dd1c1f9b8d506d05dc9378d1987867
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocoapods-playgrounds (1.0.0)
4
+ cocoapods-playgrounds (1.2.0)
5
5
  cocoapods (~> 1.0.0)
6
6
 
7
7
  GEM
@@ -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
@@ -1,3 +1,3 @@
1
1
  module CocoapodsPlaygrounds
2
- VERSION = '1.1.0'.freeze
2
+ VERSION = '1.2.0'.freeze
3
3
  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.1.0
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-26 00:00:00.000000000 Z
11
+ date: 2016-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods