cocoapods-auto-modular-header 1.0.0

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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 871bc22a7b1979f82adc0902e358469a6d0bc725bfd08bc7619e57bde48cdc63
4
+ data.tar.gz: 0a7891e6ebb818867c69f0f068c6a80246e6016509917fbd63b48fc39985e140
5
+ SHA512:
6
+ metadata.gz: 3f8dd1195b72971dd7a9aee3ce9120d693a193e2ee195a103706c9db594d8b7b8881fcaa0705d01bbe36675797f5627e004ea6bb1c63c319259f358f5cf9859c
7
+ data.tar.gz: d74e2e32d3eda76efcf9e662b14ec4640f69152e39c1c466dee4c427eb53faa96afffeb7010853fffa3a4f461eb910cdc11980b88319b22559da19627314b23b
data/.gitignore ADDED
@@ -0,0 +1,119 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /spec/examples.txt
9
+ /test/tmp/
10
+ /test/version_tmp/
11
+ /tmp/
12
+ .idea/
13
+
14
+
15
+ # Used by dotenv library to load environment variables.
16
+ # .env
17
+
18
+ # Ignore Byebug command history file.
19
+ .byebug_history
20
+
21
+ ## Specific to RubyMotion:
22
+ .dat*
23
+ .repl_history
24
+ build/
25
+ *.bridgesupport
26
+ build-iPhoneOS/
27
+ build-iPhoneSimulator/
28
+
29
+ ## Specific to RubyMotion (use of CocoaPods):
30
+ #
31
+ # We recommend against adding the Pods directory to your .gitignore. However
32
+ # you should judge for yourself, the pros and cons are mentioned at:
33
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
34
+ #
35
+ # vendor/Pods/
36
+
37
+ ## Documentation cache and generated files:
38
+ /.yardoc/
39
+ /_yardoc/
40
+ /doc/
41
+ /rdoc/
42
+
43
+ ## Environment normalization:
44
+ /.bundle/
45
+ /vendor/bundle
46
+ /lib/bundler/man/
47
+
48
+ # for a library or gem, you might want to ignore these files since the code is
49
+ # intended to run in multiple environments; otherwise, check them in:
50
+ # Gemfile.lock
51
+ # .ruby-version
52
+ # .ruby-gemset
53
+
54
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
55
+ .rvmrc
56
+
57
+ # Used by RuboCop. Remote config files pulled in from inherit_from directive.
58
+ # .rubocop-https?--*
59
+
60
+ # Xcode
61
+ #
62
+ # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
63
+
64
+ ## Build generated
65
+ build/
66
+ DerivedData/
67
+
68
+ ## Various settings
69
+ *.pbxuser
70
+ !default.pbxuser
71
+ *.mode1v3
72
+ !default.mode1v3
73
+ *.mode2v3
74
+ !default.mode2v3
75
+ *.perspectivev3
76
+ !default.perspectivev3
77
+ xcuserdata/
78
+
79
+ ## Other
80
+ *.moved-aside
81
+ *.xcuserstate
82
+
83
+ ## Obj-C/Swift specific
84
+ *.hmap
85
+ *.ipa
86
+ *.dSYM.zip
87
+ *.dSYM
88
+
89
+ # CocoaPods
90
+ #
91
+ # We recommend against adding the Pods directory to your .gitignore. However
92
+ # you should judge for yourself, the pros and cons are mentioned at:
93
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
94
+ #
95
+ Pods/
96
+
97
+ # Carthage
98
+ #
99
+ # Add this line if you want to avoid checking in source code from Carthage dependencies.
100
+ # Carthage/Checkouts
101
+
102
+ Carthage/Build
103
+
104
+ # fastlane
105
+ #
106
+ # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
107
+ # screenshots whenever they are needed.
108
+ # For more information about the recommended setup visit:
109
+ # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
110
+
111
+ fastlane/report.xml
112
+ fastlane/screenshots
113
+
114
+ #Code Injection
115
+ #
116
+ # After new code Injection tools there's a generated folder /iOSInjectionProject
117
+ # https://github.com/johnno1962/injectionforxcode
118
+
119
+ iOSInjectionProject/
data/Gemfile ADDED
@@ -0,0 +1,13 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in cocoapods-auto-modular-header.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
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 1677
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.
data/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # cocoapods-auto-modular-header
2
+
3
+ A description of cocoapods-auto-modular-header.
4
+
5
+ cocoapods-auto-modular-header can automatically set swift-dependent libraries to modules
6
+
7
+ ## Usage
8
+
9
+ Write the following in Gemfile
10
+
11
+ gem 'cocoapods-auto-modular-header'
data/Rakefile ADDED
@@ -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-auto-modular-header/gem_version.rb'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'cocoapods-auto-modular-header'
8
+ spec.version = CocoapodsAutoModularHeader::VERSION
9
+ spec.authors = ['wosicuanqi']
10
+ spec.email = ['1677746430@qq.com']
11
+ spec.description = "auto set modular_headers"
12
+ spec.summary = "cocoapods-auto-modular-header can automatically set swift-dependent libraries to modules"
13
+ spec.homepage = 'https://github.com/EXAMPLE/cocoapods-auto-modular-header'
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,3 @@
1
+ module CocoapodsAutoModularHeader
2
+ VERSION = "1.0.0"
3
+ end
@@ -0,0 +1,24 @@
1
+ require 'cocoapods'
2
+ require_relative 'pod_target'
3
+
4
+ module Pod
5
+ class Installer
6
+ class Xcode
7
+ class TargetValidator
8
+
9
+ alias_method :origin_verify_swift_pods_have_module_dependencies, :verify_swift_pods_have_module_dependencies
10
+
11
+ def verify_swift_pods_have_module_dependencies
12
+ pod_targets.each do |pod_target|
13
+ next unless pod_target.uses_swift?
14
+ pod_target.dependent_targets.each do |dependent_target|
15
+ next if !dependent_target.should_build? || dependent_target.defines_module?
16
+ dependent_target.defines_module = true
17
+ end
18
+ end
19
+ origin_verify_swift_pods_have_module_dependencies
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,11 @@
1
+ # !/usr/bin/env ruby
2
+
3
+
4
+ module Pod
5
+ class PodTarget < Target
6
+
7
+ def defines_module=(value)
8
+ @defines_module = value
9
+ end
10
+ end
11
+ end
@@ -0,0 +1 @@
1
+ require 'cocoapods-auto-modular-header/gem_version'
@@ -0,0 +1,2 @@
1
+ require 'cocoapods-auto-modular-header/pod_installer'
2
+ require 'cocoapods-auto-modular-header/pod_target'
@@ -0,0 +1,12 @@
1
+ require File.expand_path('../../spec_helper', __FILE__)
2
+
3
+ module Pod
4
+ describe Command::Header do
5
+ describe 'CLAide' do
6
+ it 'registers it self' do
7
+ Command.parse(%w{ header }).should.be.instance_of Command::Header
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,87 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cocoapods-auto-modular-header
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - wosicuanqi
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2022-08-26 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: auto set modular_headers
42
+ email:
43
+ - 1677746430@qq.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ".gitignore"
49
+ - Gemfile
50
+ - LICENSE
51
+ - README.md
52
+ - Rakefile
53
+ - cocoapods-auto-modular-header.gemspec
54
+ - lib/cocoapods-auto-modular-header.rb
55
+ - lib/cocoapods-auto-modular-header/gem_version.rb
56
+ - lib/cocoapods-auto-modular-header/pod_installer.rb
57
+ - lib/cocoapods-auto-modular-header/pod_target.rb
58
+ - lib/cocoapods_plugin.rb
59
+ - spec/command/header_spec.rb
60
+ - spec/spec_helper.rb
61
+ homepage: https://github.com/EXAMPLE/cocoapods-auto-modular-header
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.3.5
81
+ signing_key:
82
+ specification_version: 4
83
+ summary: cocoapods-auto-modular-header can automatically set swift-dependent libraries
84
+ to modules
85
+ test_files:
86
+ - spec/command/header_spec.rb
87
+ - spec/spec_helper.rb