cocoapods-generate 1.1.1 → 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/VERSION +1 -1
- data/lib/cocoapods/generate/configuration.rb +34 -0
- data/lib/cocoapods/generate/podfile_generator.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35db1cd62af064c53a195412974b4a053569388c8682557093088d2a22af56cb
|
4
|
+
data.tar.gz: 159f3e9e8258682bcd42592194bed3ca7ee95db66cabfe0dcc2a4ebf6945dcb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4036f2d71ecd321cc62449a2ec3f00c77e3bb29dbb89d16bafa20c1f8a74a1ac1810bbd99ffd43dceafbde806d7c80fe2a1477b38dcb021b9a1dbd9772dbce0
|
7
|
+
data.tar.gz: 4d1ee2f06a1a65e93469c926c675a42385b9f5bb887f31103e07d570ef2032850cbf25dc660a3bda4cb10a519f4ebb5b679ef5e52a9b9f42b5545bf162536de4
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.2.0
|
@@ -81,6 +81,33 @@ module Pod
|
|
81
81
|
end
|
82
82
|
private_constant :ArrayOf
|
83
83
|
|
84
|
+
# @visibility private
|
85
|
+
#
|
86
|
+
# Implements `===` to do type checking against a hash.
|
87
|
+
#
|
88
|
+
class HashOf
|
89
|
+
attr_reader :key_types, :value_types
|
90
|
+
|
91
|
+
def initialize(keys:, values:)
|
92
|
+
@key_types = keys
|
93
|
+
@value_types = values
|
94
|
+
end
|
95
|
+
|
96
|
+
def to_s
|
97
|
+
"Hash<#{key_types.join('|')} => #{value_types.join('|')}}>"
|
98
|
+
end
|
99
|
+
|
100
|
+
# @return [Boolean] whether the given object is a hash with elements all of the given types
|
101
|
+
#
|
102
|
+
def ===(other)
|
103
|
+
other.is_a?(Hash) && other.all? do |key, value|
|
104
|
+
key_types.any? { |t| t === key } &&
|
105
|
+
value_types.any? { |t| t === value }
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
private_constant :HashOf
|
110
|
+
|
84
111
|
coerce_to_bool = lambda do |value|
|
85
112
|
if value.is_a?(String)
|
86
113
|
value =
|
@@ -108,6 +135,13 @@ module Pod
|
|
108
135
|
option :podfile_path, [String, Pathname], 'pod_config.podfile_path', 'Path to podfile to use', 'PATH', ->(path) { 'file does not exist' unless path.file? }, coerce_to_pathname
|
109
136
|
option :podfile, [Podfile], 'Podfile.from_file(podfile_path) if (podfile_path && File.file?(File.expand_path(podfile_path)))'
|
110
137
|
option :use_podfile, BOOLEAN, '!!podfile', 'Whether restrictions should be copied from the podfile', nil, nil, coerce_to_bool
|
138
|
+
option :use_podfile_plugins, BOOLEAN, 'use_podfile', 'Whether plugins should be copied from the podfile', nil, nil, coerce_to_bool
|
139
|
+
option :podfile_plugins, HashOf.new(keys: [String], values: [NilClass, HashOf.new(keys: [String], values: [String, Hash, Array])]),
|
140
|
+
'(use_podfile && podfile) ? podfile.plugins : {}',
|
141
|
+
nil,
|
142
|
+
nil,
|
143
|
+
nil,
|
144
|
+
->(hash) { Hash[hash] }
|
111
145
|
|
112
146
|
option :lockfile, [Pod::Lockfile], 'pod_config.lockfile', nil
|
113
147
|
option :use_lockfile, BOOLEAN, '!!lockfile', 'Whether the lockfile should be used to discover transitive dependencies', nil, nil, coerce_to_bool
|
@@ -42,6 +42,10 @@ module Pod
|
|
42
42
|
share_schemes_for_development_pods: generator.configuration.share_schemes_for_development_pods?,
|
43
43
|
warn_for_multiple_pod_sources: generator.configuration.warn_for_multiple_pod_sources?
|
44
44
|
|
45
|
+
generator.configuration.podfile_plugins.each do |name, options|
|
46
|
+
plugin(*[name, options].compact)
|
47
|
+
end
|
48
|
+
|
45
49
|
use_frameworks!(generator.configuration.use_frameworks?)
|
46
50
|
|
47
51
|
# Explicitly set sources
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-generate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Giddins
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-10-
|
11
|
+
date: 2018-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|