cocoapods-no-autoimports 0.1.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: dc9bff96995c0dacdecff621d1552e1d7df4b1e3f95be37681373e22c4e5450e
4
+ data.tar.gz: e3d7404078c24561394292962f2f4531ae5ddbec9de10a54adeadc3e6c299bdb
5
+ SHA512:
6
+ metadata.gz: 25af1d8c412969bf8b0fb238da0fe5c1e1c40a7003e75c30ff241256c5f7e5c3b68bf5d284c4e2699b421a417a80dc21d7afc420212bf0937c829712ee40e706
7
+ data.tar.gz: 27c38e46f896e527168b67c0dd88cfd21b95c21310d8b05912c1209211c234489fcb17833210f766974fd6ec094eb629d3b811e57cc80523415e65151714ad04
data/.gitignore ADDED
@@ -0,0 +1,13 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
12
+ .DS_Store
13
+ .gem
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.travis.yml ADDED
@@ -0,0 +1,6 @@
1
+ ---
2
+ language: ruby
3
+ cache: bundler
4
+ rvm:
5
+ - 2.7.5
6
+ before_install: gem install bundler -v 2.1.4
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in cocoapods-no-autoimports.gemspec
4
+ gemspec
5
+
6
+ gem "rake", "~> 12.0"
7
+ gem "rspec", "~> 3.0"
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2023 Ivan Glushko
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
13
+ all 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
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,34 @@
1
+ # Cocoapods no autoimports?
2
+
3
+ A cocoapods plugin that let's you hook in generating umbrella and prefix headers for pods. And remove autoimports of
4
+ 1. `UIKit`.h
5
+ 2. `Cocoa`.h
6
+ 3. `Foundation`.h
7
+
8
+ ## ⭐ Usage
9
+
10
+ Add this line to your application's Gemfile:
11
+
12
+ ```ruby
13
+ gem 'cocoapods-no-autoimports'
14
+ ```
15
+
16
+ Add this line to your Podfile:
17
+ ```ruby
18
+ plugin 'cocoapods-no-autoimports'
19
+ ```
20
+
21
+ Execute:
22
+
23
+ $ bundle install
24
+
25
+ Now run:
26
+
27
+ $ pod install
28
+
29
+ Done! Now go and check your Xcode build erros 😁
30
+
31
+
32
+ ## License
33
+
34
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "cocoapods/no/autoimports/plugin"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,21 @@
1
+ lib = File.expand_path("../lib", __FILE__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require_relative 'lib/cocoapods-no-autoimports/plugin/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "cocoapods-no-autoimports"
7
+ spec.version = CocoapodsNoAutoimports::VERSION
8
+ spec.authors = ["Ivan Glushko"]
9
+ spec.email = ["ivanglushkodev@yandex.ru"]
10
+ spec.summary = "A CocoaPods plugin for removing autoimported [UIKit/Cocoa/Foundation] headers."
11
+ spec.homepage = "https://github.com/ivanglushko/cocoapods-no-autoimports"
12
+ spec.license = "MIT"
13
+
14
+ spec.files = `git ls-files`.split($/)
15
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
16
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
17
+ spec.require_paths = ["lib"]
18
+
19
+ spec.add_development_dependency "bundler", "~> 1.3"
20
+ spec.add_development_dependency "rake"
21
+ end
@@ -0,0 +1,3 @@
1
+ module CocoapodsNoAutoimports
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,37 @@
1
+ module Pod
2
+ module Generator
3
+ class Header
4
+
5
+ # Removed the following lines:
6
+ # result << "#ifdef __OBJC__\n"
7
+ # result << generate_platform_import_header
8
+ # result << "#else\n"
9
+ # result << "#endif\n"
10
+
11
+ def generate
12
+ result = ''
13
+ result << "#ifndef FOUNDATION_EXPORT\n"
14
+ result << "#if defined(__cplusplus)\n"
15
+ result << "#define FOUNDATION_EXPORT extern \"C\"\n"
16
+ result << "#else\n"
17
+ result << "#define FOUNDATION_EXPORT extern\n"
18
+ result << "#endif\n"
19
+ result << "#endif\n"
20
+ result << "\n"
21
+
22
+ imports.each do |import|
23
+ result << %(#import "#{import}"\n)
24
+ end
25
+
26
+ unless module_imports.empty?
27
+ module_imports.each do |import|
28
+ result << %(\n@import #{import})
29
+ end
30
+ result << "\n"
31
+ end
32
+
33
+ result
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,3 @@
1
+ Pod::HooksManager.register('cocoapods-no-autoimports', :pre_install) do |context, options|
2
+ require 'cocoapods-no-autoimports/plugin'
3
+ end
@@ -0,0 +1,9 @@
1
+ RSpec.describe CocoapodsNoAutoimports do
2
+ it "has a version number" do
3
+ expect(CocoapodsNoAutoimports::VERSION).not_to be nil
4
+ end
5
+
6
+ it "does something useful" do
7
+ expect(false).to eq(true)
8
+ end
9
+ end
@@ -0,0 +1,14 @@
1
+ require "bundler/setup"
2
+ require "cocoapods/no/autoimports/plugin"
3
+
4
+ RSpec.configure do |config|
5
+ # Enable flags like --only-failures and --next-failure
6
+ config.example_status_persistence_file_path = ".rspec_status"
7
+
8
+ # Disable RSpec exposing methods globally on `Module` and `main`
9
+ config.disable_monkey_patching!
10
+
11
+ config.expect_with :rspec do |c|
12
+ c.syntax = :expect
13
+ end
14
+ end
metadata ADDED
@@ -0,0 +1,90 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cocoapods-no-autoimports
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Ivan Glushko
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-06-16 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:
42
+ email:
43
+ - ivanglushkodev@yandex.ru
44
+ executables:
45
+ - console
46
+ - setup
47
+ extensions: []
48
+ extra_rdoc_files: []
49
+ files:
50
+ - ".gitignore"
51
+ - ".rspec"
52
+ - ".travis.yml"
53
+ - Gemfile
54
+ - LICENSE.txt
55
+ - README.md
56
+ - Rakefile
57
+ - bin/console
58
+ - bin/setup
59
+ - cocoapods-no-autoimports.gemspec
60
+ - lib/cocoapods-no-autoimports/plugin.rb
61
+ - lib/cocoapods-no-autoimports/plugin/version.rb
62
+ - lib/cocoapods_plugin.rb
63
+ - spec/cocoapods/no/autoimports/plugin_spec.rb
64
+ - spec/spec_helper.rb
65
+ homepage: https://github.com/ivanglushko/cocoapods-no-autoimports
66
+ licenses:
67
+ - MIT
68
+ metadata: {}
69
+ post_install_message:
70
+ rdoc_options: []
71
+ require_paths:
72
+ - lib
73
+ required_ruby_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ required_rubygems_version: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ requirements: []
84
+ rubygems_version: 3.1.6
85
+ signing_key:
86
+ specification_version: 4
87
+ summary: A CocoaPods plugin for removing autoimported [UIKit/Cocoa/Foundation] headers.
88
+ test_files:
89
+ - spec/cocoapods/no/autoimports/plugin_spec.rb
90
+ - spec/spec_helper.rb