cocoapods-chillax-swift 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6873c95e9545385a8c3c4f137649ec4ce4e260ce
4
+ data.tar.gz: b9a8f41fb8aad7f6f51e010b61071bbc6c0037a4
5
+ SHA512:
6
+ metadata.gz: bc145b978b0b35ffed309af702168c99b47f0e00e78090b7b5d4e5e6481efaf513bc0bfd1930dd78b19a3a1bae1fc608e0a859484251a1cd53c739bc99872f23
7
+ data.tar.gz: 55dfc2fb33ceacf629f439e424218951740420cddfff27ad2098fe85726c97231860291995d8bcda300fa40408f2b6101b9306a29798fd610883355f470c39ad
data/.gitignore ADDED
@@ -0,0 +1,34 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /test/tmp/
9
+ /test/version_tmp/
10
+ /tmp/
11
+
12
+ ## Specific to RubyMotion:
13
+ .dat*
14
+ .repl_history
15
+ build/
16
+
17
+ ## Documentation cache and generated files:
18
+ /.yardoc/
19
+ /_yardoc/
20
+ /doc/
21
+ /rdoc/
22
+
23
+ ## Environment normalisation:
24
+ /.bundle/
25
+ /lib/bundler/man/
26
+
27
+ # for a library or gem, you might want to ignore these files since the code is
28
+ # intended to run in multiple environments; otherwise, check them in:
29
+ # Gemfile.lock
30
+ # .ruby-version
31
+ # .ruby-gemset
32
+
33
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
34
+ .rvmrc
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in cocoapods-chillax-swift.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,17 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ cocoapods-chillax-swift (0.0.1)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ rake (10.4.2)
10
+
11
+ PLATFORMS
12
+ ruby
13
+
14
+ DEPENDENCIES
15
+ bundler (~> 1.3)
16
+ cocoapods-chillax-swift!
17
+ rake (~> 10.3)
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014 Ash Furrow
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
data/README.md ADDED
@@ -0,0 +1,4 @@
1
+ deoptimize
2
+ ==========
3
+
4
+ CocoaPods plugin for disabling compiler optimizations for specific pods
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require 'bundler/gem_tasks'
@@ -0,0 +1,23 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'cocoapods-chillax-swift.rb'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "cocoapods-chillax-swift"
8
+ spec.version = CocoaPodsChillaxSwift::VERSION
9
+ spec.authors = ["Ash Furrow"]
10
+ spec.email = ["ash@ashfurrow.com"]
11
+ spec.description = %q{A CocoaPods plugin to disable compiler optimizations on certain pods.}
12
+ spec.summary = %q{Given an opt-in whitelist of pod names, this plugin disbles compiler optimization on those pods' targets. This is useful while the Swift compiler is still segfaulting on certain libraries when optimizations are enabled, which they are by default.}
13
+ spec.homepage = "https://github.com/ashfurrow/cocoapods-chillax-swift"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.3"
22
+ spec.add_development_dependency "rake", "~> 10.3"
23
+ end
@@ -0,0 +1,3 @@
1
+ module CocoaPodsChillaxSwift
2
+ VERSION = "0.2.0"
3
+ end
@@ -0,0 +1 @@
1
+ require_relative 'plugin'
data/lib/installer.rb ADDED
@@ -0,0 +1,33 @@
1
+ module CocoaPodsChillaxSwift
2
+ class Installer
3
+ def initialize(sandbox_root, user_options)
4
+ @sandbox_root = sandbox_root
5
+ @options = user_options
6
+ end
7
+
8
+ def install!
9
+
10
+ Pod::UI.section 'Disabling select compiler optimizations' do
11
+
12
+ project = Xcodeproj::Project.open File.join(@sandbox_root, 'Pods.xcodeproj')
13
+
14
+ unoptimized_pod_names = @options["pods"]
15
+
16
+ targets = project.targets.select { |target|
17
+ unoptimized_pod_names.select { |pod_name|
18
+ target.display_name.end_with? pod_name
19
+ }.count > 0
20
+ }
21
+
22
+ targets.each do |target|
23
+ target.build_configurations.each do |config|
24
+ config.build_settings['SWIFT_OPTIMIZATION_LEVEL'] = '-Onone'
25
+ config.build_settings['GCC_OPTIMIZATION_LEVEL'] = '0'
26
+ end
27
+ end
28
+
29
+ project.save
30
+ end
31
+ end
32
+ end
33
+ end
data/lib/plugin.rb ADDED
@@ -0,0 +1,7 @@
1
+ module CocoaPodsChillaxSwift
2
+ Pod::HooksManager.register('cocoapods-chillax-swift', :post_install) do |context, user_options|
3
+ require_relative 'installer'
4
+
5
+ Installer.new(context.sandbox_root, user_options).install!
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,86 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cocoapods-chillax-swift
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.0
5
+ platform: ruby
6
+ authors:
7
+ - Ash Furrow
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-12-31 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.3'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.3'
41
+ description: A CocoaPods plugin to disable compiler optimizations on certain pods.
42
+ email:
43
+ - ash@ashfurrow.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ".gitignore"
49
+ - Gemfile
50
+ - Gemfile.lock
51
+ - LICENSE
52
+ - README.md
53
+ - Rakefile
54
+ - cocoapods-chillax-swift.gemspec
55
+ - lib/cocoapods-chillax-swift.rb
56
+ - lib/cocoapods_plugin.rb
57
+ - lib/installer.rb
58
+ - lib/plugin.rb
59
+ homepage: https://github.com/ashfurrow/cocoapods-chillax-swift
60
+ licenses:
61
+ - MIT
62
+ metadata: {}
63
+ post_install_message:
64
+ rdoc_options: []
65
+ require_paths:
66
+ - lib
67
+ required_ruby_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
72
+ required_rubygems_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ requirements: []
78
+ rubyforge_project:
79
+ rubygems_version: 2.2.2
80
+ signing_key:
81
+ specification_version: 4
82
+ summary: Given an opt-in whitelist of pod names, this plugin disbles compiler optimization
83
+ on those pods' targets. This is useful while the Swift compiler is still segfaulting
84
+ on certain libraries when optimizations are enabled, which they are by default.
85
+ test_files: []
86
+ has_rdoc: