cocoapods-xzumbrella 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: 07fe6b2c38d90a50bf8aa7ac195fbc4f4e8a26c4cc21001baf66b24730a74713
4
+ data.tar.gz: d8ecbbcfc4ad17ffe58e94870c8820fea1f0fee231e76f481dfb1b9164d5e757
5
+ SHA512:
6
+ metadata.gz: b1e4ce32f64e76f01e50ffd8764122606982b515358e17ebfafab221a89bd1027ce6e6724db398b0b4e4fa1244e8cd4eee19c59d1a631e7febf05bba4656aad7
7
+ data.tar.gz: 4082fac17fc011286cfcd4502fc8bcd99a1fbe13a288fbc8dd070601907f3d04ea747e9915735d49ed038d9656a95368d47fff50192b125955bc425171c1a904
@@ -0,0 +1,3 @@
1
+ .DS_Store
2
+ pkg
3
+ .idea/
data/Gemfile ADDED
@@ -0,0 +1,13 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in cocoapods-xzumbrella.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
+ end
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2020 liushuhua <liushuhua@xiaozhu.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-xzumbrella
2
+
3
+ A description of cocoapods-xzumbrella.
4
+
5
+ ## Installation
6
+
7
+ $ gem install cocoapods-xzumbrella
8
+
9
+ ## Usage
10
+
11
+ $ pod spec xzumbrella 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-xzumbrella/gem_version.rb'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'cocoapods-xzumbrella'
8
+ spec.version = CocoapodsXzumbrella::VERSION
9
+ spec.authors = ['liushuhua']
10
+ spec.email = ['liushuhua@xiaozhu.com']
11
+ spec.description = %q{A short description of cocoapods-xzumbrella.}
12
+ spec.summary = %q{A longer description of cocoapods-xzumbrella.}
13
+ spec.homepage = 'https://github.com/EXAMPLE/cocoapods-xzumbrella'
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-xzumbrella/gem_version'
@@ -0,0 +1,3 @@
1
+ module CocoapodsXzumbrella
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,36 @@
1
+ module Pod
2
+ module Generator
3
+ class ModuleMap
4
+ def generate
5
+ # target.file_accessors.each {|file| puts"#{target.product_module_name} fileaccessor --> #{file.spec.name}"}
6
+ # currenttarget = target.file_accessors.select {|acces| acces.spec.name == target.product_module_name}
7
+ # puts "plugin target #{target} #{target.product_module_name} #{target.product_name}"
8
+ # if !currenttarget.empty?
9
+ # puts "my custom modulemap dsl inspect #{currenttarget[0].spec_consumer.umbrellaheader}}"
10
+ # end
11
+ # if target.product_module_name == 'XZAddress'
12
+ # target.file_accessors.each {|file| puts "fileaccessor --> #{file.spec.name} #{file.spec_consumer.umbrellaheader}"}
13
+ # headers[0].path = 'xindi.h'
14
+ # end
15
+
16
+ umbrella_target = target.file_accessors.select {|file| file.spec_consumer.umbrellaheader && !file.spec_consumer.umbrellaheader.empty?}
17
+ if umbrella_target && !umbrella_target.empty?
18
+ headers.map do |header|
19
+ if header.umbrella && header.umbrella
20
+ header.path = umbrella_target[0].spec_consumer.umbrellaheader
21
+ end
22
+ end
23
+ end
24
+ puts "plugin gernerate headers --> #{headers[0].path} -->#{headers[0].umbrella}"
25
+ <<-MODULE_MAP.strip_heredoc
26
+ #{module_specifier_prefix}module #{target.product_module_name}#{module_declaration_attributes} {
27
+ #{headers.join("\n ")}
28
+
29
+ export *
30
+ module * { export * }
31
+ }
32
+ MODULE_MAP
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,12 @@
1
+ module Pod
2
+ class Specification
3
+ module DSL
4
+ module RootAttributesAccessors
5
+ def umbrellaheader
6
+ attributes_hash['umbrellaheader']
7
+ end
8
+ end
9
+ end
10
+ end
11
+
12
+ end
@@ -0,0 +1,7 @@
1
+ module Pod
2
+ class Specification
3
+ class Consumer
4
+ spec_attr_accessor :umbrellaheader
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,14 @@
1
+ module Pod
2
+ class Specification
3
+ module DSL
4
+ puts "plugin dsl excute"
5
+ attribute :umbrellaheader,
6
+ :root_only => true
7
+
8
+ def umbrellaheader=(args)
9
+ attributes_hash['umbrellaheader'] = args
10
+ end
11
+ end
12
+ end
13
+ end
14
+
@@ -0,0 +1,4 @@
1
+ require 'cocoapods-xzumbrella/xzspecificationdsl'
2
+ require 'cocoapods-xzumbrella/xzspecificationconsumer'
3
+ require 'cocoapods-xzumbrella/xzspecificationattri'
4
+ require 'cocoapods-xzumbrella/xzmodule'
@@ -0,0 +1,12 @@
1
+ require File.expand_path('../../spec_helper', __FILE__)
2
+
3
+ module Pod
4
+ describe Command::Xzumbrella do
5
+ describe 'CLAide' do
6
+ it 'registers it self' do
7
+ Command.parse(%w{ xzumbrella }).should.be.instance_of Command::Xzumbrella
8
+ end
9
+ end
10
+ end
11
+ end
12
+
@@ -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,88 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cocoapods-xzumbrella
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - liushuhua
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-01-08 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-xzumbrella.
42
+ email:
43
+ - liushuhua@xiaozhu.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-xzumbrella.gemspec
54
+ - lib/cocoapods-xzumbrella.rb
55
+ - lib/cocoapods-xzumbrella/gem_version.rb
56
+ - lib/cocoapods-xzumbrella/xzmodule.rb
57
+ - lib/cocoapods-xzumbrella/xzspecificationattri.rb
58
+ - lib/cocoapods-xzumbrella/xzspecificationconsumer.rb
59
+ - lib/cocoapods-xzumbrella/xzspecificationdsl.rb
60
+ - lib/cocoapods_plugin.rb
61
+ - spec/command/xzumbrella_spec.rb
62
+ - spec/spec_helper.rb
63
+ homepage: https://github.com/EXAMPLE/cocoapods-xzumbrella
64
+ licenses:
65
+ - MIT
66
+ metadata: {}
67
+ post_install_message:
68
+ rdoc_options: []
69
+ require_paths:
70
+ - lib
71
+ required_ruby_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ required_rubygems_version: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
81
+ requirements: []
82
+ rubygems_version: 3.0.6
83
+ signing_key:
84
+ specification_version: 4
85
+ summary: A longer description of cocoapods-xzumbrella.
86
+ test_files:
87
+ - spec/command/xzumbrella_spec.rb
88
+ - spec/spec_helper.rb