cocoapods-packager-ext 0.0.1

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 4ad62a8dc160d64ead487a2e59e5e6b33e9bff943165b7df7da198273bd83d43
4
+ data.tar.gz: 0cf4177159dd6951e02adb9092189138bf1c17eec1fc0566a80305dc23ca8378
5
+ SHA512:
6
+ metadata.gz: d3b645f21df405b9424be74ff9e0328d3d022f71acf549bbe848ad1f06d7cc725ba34d0e480f6708826238e5cae49c79137605d78812d14a3c10f5168d7d01b1
7
+ data.tar.gz: c984f25781bd3a773d5533a767af2f6698d51caee4251e1c866ab89d36544ad1c625904560f7301efb0f483752ac20bd4d909def476b1c4e62c2fca52fdda520
@@ -0,0 +1,3 @@
1
+ .DS_Store
2
+ pkg
3
+ .idea/
data/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in cocoapods-packager-ext.gemspec
4
+ gemspec
5
+
6
+ group :development do
7
+ gem 'cocoapods'
8
+
9
+ gem 'mocha'
10
+ gem 'bacon'
11
+ gem 'mocha-on-bacon'
12
+ gem 'prettybacon'
13
+ gem 'cocoapods-packager'
14
+ end
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2020 kyle.zhou <1065517719@qq.com>
2
+
3
+ MIT License
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.
@@ -0,0 +1,11 @@
1
+ # cocoapods-packager-ext
2
+
3
+ A description of cocoapods-packager-ext.
4
+
5
+ ## Installation
6
+
7
+ $ gem install cocoapods-packager-ext
8
+
9
+ ## Usage
10
+
11
+ $ pod spec ext POD_NAME
@@ -0,0 +1,13 @@
1
+ require 'bundler/gem_tasks'
2
+
3
+ def specs(dir)
4
+ FileList["spec/#{dir}/*_spec.rb"].shuffle.join(' ')
5
+ end
6
+
7
+ desc 'Runs all the specs'
8
+ task :specs do
9
+ sh "bundle exec bacon #{specs('**')}"
10
+ end
11
+
12
+ task :default => :specs
13
+
@@ -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-packager-ext/gem_version.rb'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'cocoapods-packager-ext'
8
+ spec.version = CocoapodsPackagerExt::VERSION
9
+ spec.authors = ['kyle.zhou']
10
+ spec.email = ['kyle.zhou@qq.com']
11
+ spec.description = %q{A short description of cocoapods-packager-ext.}
12
+ spec.summary = %q{A longer description of cocoapods-packager-ext.}
13
+ spec.homepage = 'https://github.com/EXAMPLE/cocoapods-packager-ext'
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'
23
+ end
@@ -0,0 +1 @@
1
+ require 'cocoapods-packager-ext/gem_version'
@@ -0,0 +1 @@
1
+ require 'cocoapods-packager-ext/command/ext'
@@ -0,0 +1,73 @@
1
+ module Pod
2
+ class Command
3
+ # This is an example of a cocoapods plugin adding a top-level subcommand
4
+ # to the 'pod' command.
5
+ #
6
+ # You can also create subcommands of existing or new commands. Say you
7
+ # wanted to add a subcommand to `list` to show newly deprecated pods,
8
+ # (e.g. `pod list deprecated`), there are a few things that would need
9
+ # to change.
10
+ #
11
+ # - move this file to `lib/pod/command/list/deprecated.rb` and update
12
+ # the class to exist in the the Pod::Command::List namespace
13
+ # - change this class to extend from `List` instead of `Command`. This
14
+ # tells the plugin system that it is a subcommand of `list`.
15
+ # - edit `lib/cocoapods_plugins.rb` to require this file
16
+ #
17
+ # @todo Create a PR to add your plugin to CocoaPods/cocoapods.org
18
+ # in the `plugins.json` file, once your plugin is released.
19
+ #
20
+ class Package
21
+ class << self
22
+ alias options_t options
23
+ def options
24
+ o = options_t
25
+ o.push(['--all-deps','add all-depends'])
26
+ end
27
+
28
+ end
29
+
30
+ alias initialize_t initialize
31
+ def initialize(argv)
32
+ @all_deps = argv.flag?('all-deps',false)
33
+ initialize_t argv
34
+ end
35
+
36
+
37
+ alias perform_build_t perform_build
38
+ def perform_build(platform, static_sandbox, dynamic_sandbox)
39
+ if @all_deps
40
+ static_sandbox_root = config.sandbox_root.to_s
41
+
42
+ if @dynamic
43
+ static_sandbox_root = "#{static_sandbox_root}/#{static_sandbox.root.to_s.split('/').last}"
44
+ dynamic_sandbox_root = "#{config.sandbox_root}/#{dynamic_sandbox.root.to_s.split('/').last}"
45
+ end
46
+
47
+ builder = Pod::Builder.new(
48
+ @source_dir,
49
+ static_sandbox_root,
50
+ dynamic_sandbox_root,
51
+ static_sandbox.public_headers.root,
52
+ @spec,
53
+ @embedded,
54
+ @mangle,
55
+ @dynamic,
56
+ @config,
57
+ @bundle_identifier,
58
+ @exclude_deps,
59
+ @all_deps
60
+ )
61
+
62
+ builder.build(platform, @library)
63
+
64
+ return unless @embedded
65
+ builder.link_embedded_resources
66
+ else
67
+ perform_build_t(platform,static_sandbox,dynamic_sandbox)
68
+ end
69
+ end
70
+
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,3 @@
1
+ module CocoapodsPackagerExt
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,2 @@
1
+ require 'cocoapods-packager-ext/command'
2
+ require 'cocoapods-packager-ext/ext/builder.rb'
@@ -0,0 +1,11 @@
1
+ require File.expand_path('../../spec_helper', __FILE__)
2
+ module Pod
3
+ describe Command::Ext do
4
+ describe 'CLAide' do
5
+ it 'registers it self' do
6
+ Command.parse(%w{ ext }).should.be.instance_of Command::Ext
7
+ end
8
+ end
9
+ end
10
+ end
11
+
@@ -0,0 +1,50 @@
1
+ require 'pathname'
2
+ ROOT = Pathname.new(File.expand_path('../../', __FILE__))
3
+ $:.unshift((ROOT + 'lib').to_s)
4
+ $:.unshift((ROOT + 'spec').to_s)
5
+
6
+ require 'bundler/setup'
7
+ require 'bacon'
8
+ require 'mocha-on-bacon'
9
+ require 'pretty_bacon'
10
+ require 'pathname'
11
+ require 'cocoapods'
12
+
13
+ Mocha::Configuration.prevent(:stubbing_non_existent_method)
14
+
15
+ require 'cocoapods_plugin'
16
+
17
+ #-----------------------------------------------------------------------------#
18
+
19
+ module Pod
20
+
21
+ # Disable the wrapping so the output is deterministic in the tests.
22
+ #
23
+ UI.disable_wrap = true
24
+
25
+ # Redirects the messages to an internal store.
26
+ #
27
+ module UI
28
+ @output = ''
29
+ @warnings = ''
30
+
31
+ class << self
32
+ attr_accessor :output
33
+ attr_accessor :warnings
34
+
35
+ def puts(message = '')
36
+ @output << "#{message}\n"
37
+ end
38
+
39
+ def warn(message = '', actions = [])
40
+ @warnings << "#{message}\n"
41
+ end
42
+
43
+ def print(message)
44
+ @output << message
45
+ end
46
+ end
47
+ end
48
+ end
49
+
50
+ #-----------------------------------------------------------------------------#
metadata ADDED
@@ -0,0 +1,86 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cocoapods-packager-ext
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - kyle.zhou
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-11-17 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: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: A short description of cocoapods-packager-ext.
42
+ email:
43
+ - kyle.zhou@qq.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ".gitignore"
49
+ - Gemfile
50
+ - LICENSE.txt
51
+ - README.md
52
+ - Rakefile
53
+ - cocoapods-packager-ext.gemspec
54
+ - lib/cocoapods-packager-ext.rb
55
+ - lib/cocoapods-packager-ext/command.rb
56
+ - lib/cocoapods-packager-ext/command/ext.rb
57
+ - lib/cocoapods-packager-ext/gem_version.rb
58
+ - lib/cocoapods_plugin.rb
59
+ - spec/command/ext_spec.rb
60
+ - spec/spec_helper.rb
61
+ homepage: https://github.com/EXAMPLE/cocoapods-packager-ext
62
+ licenses:
63
+ - MIT
64
+ metadata: {}
65
+ post_install_message:
66
+ rdoc_options: []
67
+ require_paths:
68
+ - lib
69
+ required_ruby_version: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
74
+ required_rubygems_version: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
79
+ requirements: []
80
+ rubygems_version: 3.0.8
81
+ signing_key:
82
+ specification_version: 4
83
+ summary: A longer description of cocoapods-packager-ext.
84
+ test_files:
85
+ - spec/command/ext_spec.rb
86
+ - spec/spec_helper.rb