cocoapods-packing-cubes 0.1.1 → 0.2.0

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
  SHA256:
3
- metadata.gz: 2049ce9f2aed4ed34fd3bf6038bcc8e280357c603db499f3bb48810d52aba372
4
- data.tar.gz: d5ab345534507599ea76bc6a6b829338003bd279f711703e78d7ccd7b37e0b4f
3
+ metadata.gz: ef6e4802dc5a9c6a4dc05b9a3ae063be59b3a8e61738d97da97b13462f7b7893
4
+ data.tar.gz: 73980c7c5a5e5f2ab0b5f015b37966c071056fec25937d5da043cca6bfaa8304
5
5
  SHA512:
6
- metadata.gz: 68f1b29bc6379809b9d0f77245927cb04effe3b6e039bcd5904901710d790da3ab6e384bd20f3f54d238553cf57ec2ea0c0c3e119677326e8a3db22fa4a5f956
7
- data.tar.gz: 73c232da76e31a31fca6bf588f76ba2cc3a8eafaaf954b9abf116f36c05e5644fdfb027cedfd9e8869f9692ef5e949e334788d1cdfc74bbe9f9923fe62844e44
6
+ metadata.gz: be490650b38e592becc59e7b858bb1a311a08b9db04782152282e47d2b3920ca072827419bbf749a6432f9746622413d75d07da2333cd82f08e7b5d4ffe66fa0
7
+ data.tar.gz: 18263c3bf2b02e95b070588e438617c7a2d175be61f43aa3f27abea66f2edc647ad1a703fc30c768280e4f34915fbc6bc8ce43d3f11e0f841ad3af6d27b3cfe2
@@ -19,6 +19,19 @@ module CocoaPodsPackingCubes
19
19
  end
20
20
  end
21
21
 
22
+ attr_reader :linkage, :packaging
23
+ protected :linkage, :packaging
24
+
25
+ def ==(other)
26
+ linkage == other.linkage &&
27
+ packaging == other.packaging
28
+ end
29
+ alias eql? ==
30
+
31
+ def hash
32
+ linkage.hash ^ packaging.hash
33
+ end
34
+
22
35
  %i[static dynamic].each_with_index do |linkage, index|
23
36
  define_method("#{linkage}?") { linkage == @linkage }
24
37
  %i[library framework].each do |packaging|
@@ -40,13 +53,15 @@ module CocoaPodsPackingCubes
40
53
 
41
54
  def initialize(*)
42
55
  super
56
+
43
57
  compute_packing_cube_override_type
58
+ compute_packing_cube_override_defines_module
44
59
  end
45
60
 
46
61
  def packing_cube
47
62
  @packing_cube ||= podfile.plugins.fetch('cocoapods-packing-cubes', {}).fetch(pod_name, {})
48
63
  rescue
49
- raise ::Pod::Informative, 'The cocoapods-packing-cubes plugin requires a hash of option.'
64
+ raise ::Pod::Informative, 'The cocoapods-packing-cubes plugin requires a hash of options.'
50
65
  end
51
66
 
52
67
  def compute_packing_cube_override_type
@@ -60,6 +75,11 @@ module CocoaPodsPackingCubes
60
75
  @type = ::CocoaPodsPackingCubes::Type.new(linkage: linkage, packaging: packaging)
61
76
  end
62
77
 
78
+ def compute_packing_cube_override_defines_module
79
+ return unless packing_cube.key?('defines_module')
80
+ @defines_module = packing_cube['defines_module']
81
+ end
82
+
63
83
  def static_framework?
64
84
  type.static_framework?
65
85
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-packing-cubes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Giddins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-31 00:00:00.000000000 Z
11
+ date: 2018-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -67,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
67
  version: '0'
68
68
  requirements: []
69
69
  rubyforge_project:
70
- rubygems_version: 2.7.7
70
+ rubygems_version: 2.7.6
71
71
  signing_key:
72
72
  specification_version: 4
73
73
  summary: A CocoaPods plugin that allows customizing how individual pods are packaged