cocoapods-packager-next 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +7 -0
  2. data/.coveralls.yml +1 -0
  3. data/.gitignore +4 -0
  4. data/.rubocop-cocoapods.yml +71 -0
  5. data/.rubocop.yml +38 -0
  6. data/.travis.yml +17 -0
  7. data/Gemfile +12 -0
  8. data/Gemfile.lock +129 -0
  9. data/LICENSE +22 -0
  10. data/README.md +39 -0
  11. data/Rakefile +29 -0
  12. data/cocoapods-packager-next.gemspec +22 -0
  13. data/lib/cocoapods-packager/builder.rb +334 -0
  14. data/lib/cocoapods-packager/framework.rb +66 -0
  15. data/lib/cocoapods-packager/mangle.rb +32 -0
  16. data/lib/cocoapods-packager/pod_utils.rb +250 -0
  17. data/lib/cocoapods-packager/spec_builder.rb +63 -0
  18. data/lib/cocoapods-packager/symbols.rb +42 -0
  19. data/lib/cocoapods-packager/user_interface/build_failed_report.rb +15 -0
  20. data/lib/cocoapods_packager.rb +5 -0
  21. data/lib/cocoapods_plugin.rb +8 -0
  22. data/lib/pod/command/package.rb +177 -0
  23. data/scripts/lstconst.sh +9 -0
  24. data/scripts/lstsym.sh +8 -0
  25. data/spec/command/error_spec.rb +81 -0
  26. data/spec/command/package_spec.rb +420 -0
  27. data/spec/command/subspecs_spec.rb +30 -0
  28. data/spec/fixtures/Archs.podspec +13 -0
  29. data/spec/fixtures/Builder.podspec +25 -0
  30. data/spec/fixtures/CPDColors.podspec +19 -0
  31. data/spec/fixtures/FH.podspec +18 -0
  32. data/spec/fixtures/KFData.podspec +73 -0
  33. data/spec/fixtures/LibraryConsumerDemo/.gitignore +22 -0
  34. data/spec/fixtures/LibraryConsumerDemo/LibraryConsumer/AppDelegate.h +17 -0
  35. data/spec/fixtures/LibraryConsumerDemo/LibraryConsumer/AppDelegate.m +27 -0
  36. data/spec/fixtures/LibraryConsumerDemo/LibraryConsumer/Info.plist +40 -0
  37. data/spec/fixtures/LibraryConsumerDemo/LibraryConsumer/main.m +16 -0
  38. data/spec/fixtures/LibraryConsumerDemo/LibraryConsumer.xcodeproj/project.pbxproj +311 -0
  39. data/spec/fixtures/LibraryConsumerDemo/LibraryConsumer.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  40. data/spec/fixtures/LibraryConsumerDemo/LibraryConsumer.xcodeproj/xcshareddata/xcschemes/LibraryConsumer.xcscheme +100 -0
  41. data/spec/fixtures/LibraryConsumerDemo/LibraryConsumer.xcworkspace/contents.xcworkspacedata +10 -0
  42. data/spec/fixtures/LibraryConsumerDemo/Podfile +5 -0
  43. data/spec/fixtures/LibraryDemo.podspec +14 -0
  44. data/spec/fixtures/LocalSources/LICENSE +0 -0
  45. data/spec/fixtures/LocalSources/LocalNikeKit.h +4 -0
  46. data/spec/fixtures/LocalSources/LocalNikeKit.m +9 -0
  47. data/spec/fixtures/LocalSources/LocalNikeKit.podspec +19 -0
  48. data/spec/fixtures/NikeKit.podspec +19 -0
  49. data/spec/fixtures/OpenSans.podspec +18 -0
  50. data/spec/fixtures/PackagerTest/.gitignore +21 -0
  51. data/spec/fixtures/PackagerTest/PackagerTest/CPDAppDelegate.h +15 -0
  52. data/spec/fixtures/PackagerTest/PackagerTest/CPDAppDelegate.m +49 -0
  53. data/spec/fixtures/PackagerTest/PackagerTest/Images.xcassets/AppIcon.appiconset/Contents.json +23 -0
  54. data/spec/fixtures/PackagerTest/PackagerTest/Images.xcassets/LaunchImage.launchimage/Contents.json +23 -0
  55. data/spec/fixtures/PackagerTest/PackagerTest/PackagerTest-Info.plist +38 -0
  56. data/spec/fixtures/PackagerTest/PackagerTest/PackagerTest-Prefix.pch +16 -0
  57. data/spec/fixtures/PackagerTest/PackagerTest/en.lproj/InfoPlist.strings +2 -0
  58. data/spec/fixtures/PackagerTest/PackagerTest/main.m +18 -0
  59. data/spec/fixtures/PackagerTest/PackagerTest.xcodeproj/project.pbxproj +507 -0
  60. data/spec/fixtures/PackagerTest/PackagerTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  61. data/spec/fixtures/PackagerTest/PackagerTest.xcodeproj/xcshareddata/xcschemes/PackagerTest.xcscheme +110 -0
  62. data/spec/fixtures/PackagerTest/PackagerTest.xcworkspace/contents.xcworkspacedata +1 -0
  63. data/spec/fixtures/PackagerTest/PackagerTestTests/PackagerTestTests-Info.plist +22 -0
  64. data/spec/fixtures/PackagerTest/PackagerTestTests/PackagerTestTests.m +34 -0
  65. data/spec/fixtures/PackagerTest/PackagerTestTests/en.lproj/InfoPlist.strings +2 -0
  66. data/spec/fixtures/PackagerTest/Podfile +10 -0
  67. data/spec/fixtures/PackagerTest/Podfile.lock +36 -0
  68. data/spec/fixtures/Weakly.podspec +13 -0
  69. data/spec/fixtures/a.podspec +19 -0
  70. data/spec/fixtures/foo-bar.podspec +19 -0
  71. data/spec/fixtures/layer-client-messaging-schema.podspec +13 -0
  72. data/spec/integration/project_spec.rb +70 -0
  73. data/spec/spec_helper.rb +79 -0
  74. data/spec/unit/pod/utils_spec.rb +58 -0
  75. data/spec/unit/specification/builder_spec.rb +62 -0
  76. data/spec/unit/specification/spec_builder_spec.rb +61 -0
  77. data/spec/unit/user_interface/build_failed_report_spec.rb +11 -0
  78. metadata +223 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: b39b25d09d8ddf9ab427081c92687a5b2533c850cb4b97b127285da621e96c63
4
+ data.tar.gz: 10ecd53da7141d845a141dbcb7478bf6a28b0249647a60c404f9fc4270f71da5
5
+ SHA512:
6
+ metadata.gz: 5c83e0cd890fb26d6459786d3c36393e6683434aced3f0459d1ecbc612f57c06d937158b6df842ddc28f3716275803bf074c121c493f3c21060d9d946556e6d6
7
+ data.tar.gz: d1a8da1698884374d4a0a164eb7399100b4825ac7a763363fab126b8ca8b3a7edb6c8ef5f209b8338d8ef190f00f725d7b3979dd394800a5d6f4ffe7ebf6ad60
data/.coveralls.yml ADDED
@@ -0,0 +1 @@
1
+ service_name: travis-ci
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ coverage
2
+ pkg
3
+ .DS_Store
4
+ .bundle/
@@ -0,0 +1,71 @@
1
+ AllCops:
2
+ Include:
3
+ - Rakefile
4
+ - Gemfile
5
+ - ./*.gemspec
6
+ Exclude:
7
+ - spec/fixtures/**/*
8
+ - vendor/**/*
9
+
10
+ # At the moment not ready to be used
11
+ # https://github.com/bbatsov/rubocop/issues/947
12
+ Documentation:
13
+ Enabled: false
14
+
15
+ #- CocoaPods -----------------------------------------------------------------#
16
+
17
+ # We adopted raise instead of fail.
18
+ SignalException:
19
+ EnforcedStyle: only_raise
20
+
21
+ # They are idiomatic
22
+ AssignmentInCondition:
23
+ Enabled: false
24
+
25
+ # Allow backticks
26
+ AsciiComments:
27
+ Enabled: false
28
+
29
+ # Indentation clarifies logic branches in implementations
30
+ IfUnlessModifier:
31
+ Enabled: false
32
+
33
+ # No enforced convention here.
34
+ SingleLineBlockParams:
35
+ Enabled: false
36
+
37
+ # We only add the comment when needed.
38
+ Encoding:
39
+ Enabled: false
40
+
41
+ #- CocoaPods support for Ruby 1.8.7 ------------------------------------------#
42
+
43
+ HashSyntax:
44
+ EnforcedStyle: hash_rockets
45
+
46
+ Lambda:
47
+ Enabled: false
48
+
49
+ DotPosition:
50
+ EnforcedStyle: trailing
51
+
52
+ #- CocoaPods specs -----------------------------------------------------------#
53
+
54
+ # Allow for `should.match /regexp/`.
55
+ AmbiguousRegexpLiteral:
56
+ Exclude:
57
+ - spec/**/*
58
+
59
+ # Allow `object.should == object` syntax.
60
+ Void:
61
+ Exclude:
62
+ - spec/**/*
63
+
64
+ ClassAndModuleChildren:
65
+ Exclude:
66
+ - spec/**/*
67
+
68
+ UselessComparison:
69
+ Exclude:
70
+ - spec/**/*
71
+
data/.rubocop.yml ADDED
@@ -0,0 +1,38 @@
1
+ inherit_from:
2
+ - .rubocop-cocoapods.yml
3
+
4
+ #- Core -----------------------------------------------------------------------
5
+
6
+ AllCops:
7
+ Exclude:
8
+ - spec/**/*
9
+ - spec/fixtures/**/*
10
+ - vendor/**/*
11
+
12
+ Style/Tab:
13
+ Enabled: false
14
+
15
+ LineLength:
16
+ Enabled: false
17
+
18
+ ClassLength:
19
+ Enabled: false
20
+
21
+ MethodLength:
22
+ Enabled: false
23
+
24
+ Metrics/AbcSize:
25
+ Enabled: false
26
+
27
+ Metrics/CyclomaticComplexity:
28
+ Enabled: false
29
+
30
+ Metrics/PerceivedComplexity:
31
+ Enabled: false
32
+
33
+ Metrics/ParameterLists:
34
+ Enabled: false
35
+
36
+ Style/SpecialGlobalVars:
37
+ EnforcedStyle: use_perl_names
38
+
data/.travis.yml ADDED
@@ -0,0 +1,17 @@
1
+ osx_image: xcode10.1
2
+ language: objective-c
3
+ cache: bundler
4
+
5
+ before_install:
6
+ - bundle install
7
+ - bundle exec pod repo update --silent
8
+
9
+ env:
10
+ - TASK=rubocop
11
+ - TASK="rake spec:unit"
12
+ - TASK="rake spec:integration"
13
+ - TASK="rake spec:command"
14
+
15
+ script:
16
+ - bundle exec $TASK
17
+
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development do
6
+ gem 'bacon'
7
+ gem 'mocha-on-bacon'
8
+ gem 'mocha'
9
+ gem 'prettybacon'
10
+ gem 'coveralls', :require => false
11
+ gem 'rubocop'
12
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,129 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ cocoapods-packager (1.5.0)
5
+ cocoapods (>= 1.7.3, < 2.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ CFPropertyList (3.0.0)
11
+ activesupport (4.2.11.1)
12
+ i18n (~> 0.7)
13
+ minitest (~> 5.1)
14
+ thread_safe (~> 0.3, >= 0.3.4)
15
+ tzinfo (~> 1.1)
16
+ ast (2.2.0)
17
+ atomos (0.1.3)
18
+ bacon (1.2.0)
19
+ claide (1.0.2)
20
+ cocoapods (1.7.3)
21
+ activesupport (>= 4.0.2, < 5)
22
+ claide (>= 1.0.2, < 2.0)
23
+ cocoapods-core (= 1.7.3)
24
+ cocoapods-deintegrate (>= 1.0.3, < 2.0)
25
+ cocoapods-downloader (>= 1.2.2, < 2.0)
26
+ cocoapods-plugins (>= 1.0.0, < 2.0)
27
+ cocoapods-search (>= 1.0.0, < 2.0)
28
+ cocoapods-stats (>= 1.0.0, < 2.0)
29
+ cocoapods-trunk (>= 1.3.1, < 2.0)
30
+ cocoapods-try (>= 1.1.0, < 2.0)
31
+ colored2 (~> 3.1)
32
+ escape (~> 0.0.4)
33
+ fourflusher (>= 2.3.0, < 3.0)
34
+ gh_inspector (~> 1.0)
35
+ molinillo (~> 0.6.6)
36
+ nap (~> 1.0)
37
+ ruby-macho (~> 1.4)
38
+ xcodeproj (>= 1.10.0, < 2.0)
39
+ cocoapods-core (1.7.3)
40
+ activesupport (>= 4.0.2, < 6)
41
+ fuzzy_match (~> 2.0.4)
42
+ nap (~> 1.0)
43
+ cocoapods-deintegrate (1.0.4)
44
+ cocoapods-downloader (1.2.2)
45
+ cocoapods-plugins (1.0.0)
46
+ nap
47
+ cocoapods-search (1.0.0)
48
+ cocoapods-stats (1.1.0)
49
+ cocoapods-trunk (1.3.1)
50
+ nap (>= 0.8, < 2.0)
51
+ netrc (~> 0.11)
52
+ cocoapods-try (1.1.0)
53
+ colored2 (3.1.2)
54
+ concurrent-ruby (1.1.5)
55
+ coveralls (0.8.21)
56
+ json (>= 1.8, < 3)
57
+ simplecov (~> 0.14.1)
58
+ term-ansicolor (~> 1.3)
59
+ thor (~> 0.19.4)
60
+ tins (~> 1.6)
61
+ docile (1.1.5)
62
+ escape (0.0.4)
63
+ fourflusher (2.3.1)
64
+ fuzzy_match (2.0.4)
65
+ gh_inspector (1.1.3)
66
+ i18n (0.9.5)
67
+ concurrent-ruby (~> 1.0)
68
+ json (2.1.0)
69
+ metaclass (0.0.4)
70
+ minitest (5.11.3)
71
+ mocha (1.2.1)
72
+ metaclass (~> 0.0.1)
73
+ mocha-on-bacon (0.2.3)
74
+ mocha (>= 0.13.0)
75
+ molinillo (0.6.6)
76
+ nanaimo (0.2.6)
77
+ nap (1.1.0)
78
+ netrc (0.11.0)
79
+ parser (2.3.0.6)
80
+ ast (~> 2.2)
81
+ powerpack (0.1.1)
82
+ prettybacon (0.0.2)
83
+ bacon (~> 1.2)
84
+ rainbow (2.1.0)
85
+ rake (10.5.0)
86
+ rubocop (0.37.2)
87
+ parser (>= 2.3.0.4, < 3.0)
88
+ powerpack (~> 0.1)
89
+ rainbow (>= 1.99.1, < 3.0)
90
+ ruby-progressbar (~> 1.7)
91
+ unicode-display_width (~> 0.3)
92
+ ruby-macho (1.4.0)
93
+ ruby-progressbar (1.7.5)
94
+ simplecov (0.14.1)
95
+ docile (~> 1.1.0)
96
+ json (>= 1.8, < 3)
97
+ simplecov-html (~> 0.10.0)
98
+ simplecov-html (0.10.2)
99
+ term-ansicolor (1.6.0)
100
+ tins (~> 1.0)
101
+ thor (0.19.4)
102
+ thread_safe (0.3.6)
103
+ tins (1.16.3)
104
+ tzinfo (1.2.5)
105
+ thread_safe (~> 0.1)
106
+ unicode-display_width (0.3.1)
107
+ xcodeproj (1.10.0)
108
+ CFPropertyList (>= 2.3.3, < 4.0)
109
+ atomos (~> 0.1.3)
110
+ claide (>= 1.0.2, < 2.0)
111
+ colored2 (~> 3.1)
112
+ nanaimo (~> 0.2.6)
113
+
114
+ PLATFORMS
115
+ ruby
116
+
117
+ DEPENDENCIES
118
+ bacon
119
+ bundler (~> 1.3)
120
+ cocoapods-packager!
121
+ coveralls
122
+ mocha
123
+ mocha-on-bacon
124
+ prettybacon
125
+ rake
126
+ rubocop
127
+
128
+ BUNDLED WITH
129
+ 1.16.2
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ This project is licensed under the MIT license.
2
+
3
+ Copyright (c) 2014 Kyle Fuller, Boris Bügling and CocoaPods Dev Team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # CocoaPods Packager
2
+
3
+ [![Gem Version](http://img.shields.io/gem/v/cocoapods-packager-next.svg?style=flat)](http://badge.fury.io/rb/cocoapods-packager-next)
4
+
5
+ CocoaPods plugin which allows you to generate a framework or static library from a podspec.
6
+
7
+ This plugin is for CocoaPods *developers*, who need to distribute their Pods not only via CocoaPods, but also as frameworks or static libraries for people who do not use Pods.
8
+
9
+ ## Why should I use Pods if I'm targeting developers who don't use Pods?
10
+
11
+ There are still a number of advantages to developing against a `podspec`, even if your public distribution is closed-source:
12
+
13
+ 1. You can easily use the Pod in-house in an open-source style. This makes step-by-step debugging and multi-project development a breeze.
14
+ 2. You can pull in third-party dependencies using CocoaPods. (CocoaPods Packager is even capable of mangling symbols to improve compatibility with any symbols that might appear in the integrating app.)
15
+ 3. You can declaratively specify build settings (e.g. frameworks, compiler flags) in your `podspec`. This is easier to maintain and replicate than build settings embedded in your Xcode project.
16
+
17
+ ## Installation
18
+
19
+ ```sh
20
+ $ gem install cocoapods-packager-next
21
+ ```
22
+
23
+ or add a line to your Gemfile:
24
+
25
+ ```ruby
26
+ gem "cocoapods-packager-next"
27
+ ```
28
+
29
+ then run `bundle install`.
30
+
31
+ This installs Packager as a CocoaPods plugin.
32
+
33
+ ## Usage
34
+
35
+ ```bash
36
+ $ pod package KFData.podspec
37
+ ```
38
+
39
+ See also `pod --help`.
data/Rakefile ADDED
@@ -0,0 +1,29 @@
1
+ require 'bundler/gem_tasks'
2
+
3
+ def specs(dir)
4
+ FileList["spec/#{dir}/*_spec.rb"].shuffle.join(' ')
5
+ end
6
+
7
+ namespace :spec do
8
+ desc 'Runs the unit specs'
9
+ task :unit do
10
+ sh "bundle exec bacon #{specs('unit/**')}"
11
+ end
12
+
13
+ desc 'Runs the integration specs'
14
+ task :integration do
15
+ sh "bundle exec bacon #{specs('integration/**')}"
16
+ end
17
+
18
+ desc 'Runs the command specs'
19
+ task :command do
20
+ sh "bundle exec bacon #{specs('command/**')}"
21
+ end
22
+
23
+ desc 'Runs all the specs'
24
+ task :all do
25
+ sh "bundle exec bacon #{specs('**')}"
26
+ end
27
+ end
28
+
29
+ task :default => 'spec:all'
@@ -0,0 +1,22 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'cocoapods_packager.rb'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'cocoapods-packager-next'
8
+ spec.version = Pod::Packager::VERSION
9
+ spec.authors = ['Kyle Fuller', 'Boris Bügling', 'Chenguang Wang']
10
+ spec.summary = 'A new version of cocoapods-packager, fix many adaptation issues with the new version of Xcode, CocoaPods plugin which allows you to generate a framework or static library from a podspec.'
11
+ spec.homepage = 'https://github.com/wwwcg/cocoapods-packager-next'
12
+ spec.license = 'MIT'
13
+ spec.files = `git ls-files`.split($/)
14
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
15
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
16
+ spec.require_paths = ["lib"]
17
+
18
+ spec.add_dependency "cocoapods", '>= 1.7.3', '< 2.0'
19
+
20
+ spec.add_development_dependency "bundler", "~> 1.3"
21
+ spec.add_development_dependency "rake"
22
+ end