xcodeprojfiler 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.rspec +3 -0
- data/.travis.yml +6 -0
- data/CHANGELOG.md +3 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Docs/xcodeprojfiler_cli_deployment_check_list.md +26 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +49 -0
- data/LICENSE.txt +21 -0
- data/README.md +34 -0
- data/Rakefile +6 -0
- data/bin/xcodeprojfiler +11 -0
- data/lib/xcodeprojfiler.rb +58 -0
- data/lib/xcodeprojfiler/command.rb +167 -0
- data/lib/xcodeprojfiler/version.rb +3 -0
- data/xcodeprojfiler.gemspec +36 -0
- metadata +126 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8877ce70524f252648fbcdc0f12babcdc3c65e1f30c3ffbd3aa9ac4b75f3e086
|
4
|
+
data.tar.gz: 10f1b8830a8b1ca382a5c27e2b6ab9f759ae7189a4042c5e554e9103a361b452
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: dc4c92bbb59dd544715611b492ab148c6ff8c0c8083c92f4d76f050ef3f192b53eb94f77616cbe691ecc6b2ba9dbb5a96f48294b109cf86a2007800f545ac5a7
|
7
|
+
data.tar.gz: 3966990b8a3165bd09dd23b79fccb05553fc96cca55a0f7e43f38ec8646b9e7976df6bc134630da251bc736d292d4a47e54938f1ba6f704c57d3e382e62939d9
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CHANGELOG.md
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at yorkzhang520@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [https://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: https://contributor-covenant.org
|
74
|
+
[version]: https://contributor-covenant.org/version/1/4/
|
@@ -0,0 +1,26 @@
|
|
1
|
+
## Xcodeprojfiler Cli Deployment Check List
|
2
|
+
|
3
|
+
1. 确定Deployment的版本号:X.Y.Z
|
4
|
+
1. 编辑`lib/xcodeprojfiler/version.rb`,更新`VERSION`:
|
5
|
+
|
6
|
+
```ruby
|
7
|
+
module Xcodeprojfiler
|
8
|
+
VERSION = "X.Y.Z"
|
9
|
+
...
|
10
|
+
end
|
11
|
+
```
|
12
|
+
1. 更新CHANGELOG.md
|
13
|
+
1. 在项目根目录下运行脚本更新Gemfile:`bundle exec ./bin/xcodeprojfiler`
|
14
|
+
1. 提交当前变更到git
|
15
|
+
1. 在项目根目录下运行脚本打包Gem:`gem build xcodeprojfiler.gemspec`
|
16
|
+
1. 本地安装`Xcodeprojfiler`进行测试:`sudo gem install xcodeprojfiler-x.y.z.gem`
|
17
|
+
1. 若无问题,则发布`Xcodeprojfiler`到RubyGems市场
|
18
|
+
|
19
|
+
## Publish Xcodeprojfiler Cli
|
20
|
+
|
21
|
+
1. 在项目根目录下运行脚本发布`Xcodeprojfiler`:`gem push xcodeprojfiler-x.y.z.gem`
|
22
|
+
|
23
|
+
## Other
|
24
|
+
|
25
|
+
1. 从RubyGems市场下架指定版本的`Xcodeprojfiler`:`gem yank xcodeprojfiler -v x.y.z`
|
26
|
+
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
xcodeprojfiler (0.1.0)
|
5
|
+
bundler (~> 2.0, >= 2.0.2)
|
6
|
+
thor (~> 1.0, >= 1.0.1)
|
7
|
+
xcodeproj (~> 1.0, >= 1.9.0)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
CFPropertyList (3.0.3)
|
13
|
+
atomos (0.1.3)
|
14
|
+
claide (1.0.3)
|
15
|
+
colored2 (3.1.2)
|
16
|
+
diff-lcs (1.4.4)
|
17
|
+
nanaimo (0.3.0)
|
18
|
+
rake (12.3.3)
|
19
|
+
rspec (3.10.0)
|
20
|
+
rspec-core (~> 3.10.0)
|
21
|
+
rspec-expectations (~> 3.10.0)
|
22
|
+
rspec-mocks (~> 3.10.0)
|
23
|
+
rspec-core (3.10.0)
|
24
|
+
rspec-support (~> 3.10.0)
|
25
|
+
rspec-expectations (3.10.0)
|
26
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
27
|
+
rspec-support (~> 3.10.0)
|
28
|
+
rspec-mocks (3.10.0)
|
29
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
30
|
+
rspec-support (~> 3.10.0)
|
31
|
+
rspec-support (3.10.0)
|
32
|
+
thor (1.0.1)
|
33
|
+
xcodeproj (1.19.0)
|
34
|
+
CFPropertyList (>= 2.3.3, < 4.0)
|
35
|
+
atomos (~> 0.1.3)
|
36
|
+
claide (>= 1.0.2, < 2.0)
|
37
|
+
colored2 (~> 3.1)
|
38
|
+
nanaimo (~> 0.3.0)
|
39
|
+
|
40
|
+
PLATFORMS
|
41
|
+
ruby
|
42
|
+
|
43
|
+
DEPENDENCIES
|
44
|
+
rake (~> 12.0)
|
45
|
+
rspec (~> 3.0)
|
46
|
+
xcodeprojfiler!
|
47
|
+
|
48
|
+
BUNDLED WITH
|
49
|
+
2.1.4
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2020 York
|
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
|
+
# Xcodeprojfiler
|
2
|
+
|
3
|
+
Xcodeprojfiler is a CLI tooL which can help iOS developer to get the info of files which exist in the xcode project dir.
|
4
|
+
|
5
|
+
For example, Xcodeprojfiler can scan the current xcode project dir and find out the files which are not included in xcworkspace.
|
6
|
+
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
```shell
|
11
|
+
sudo gem install xcodeprojfiler
|
12
|
+
```
|
13
|
+
## Usage
|
14
|
+
|
15
|
+
```shell
|
16
|
+
cd path/to/a-xcode-project-dir
|
17
|
+
|
18
|
+
# show the excluded code files
|
19
|
+
xcodeprojfiler show_excluded_code_files
|
20
|
+
|
21
|
+
# show the files which not included in xcworkspace
|
22
|
+
xcodeprojfiler show_excluded_files
|
23
|
+
|
24
|
+
# show the code files(C/C++/Objective-C/Objective-C++/Swift/xib/storyboard) which not included in xcworkspace
|
25
|
+
xcodeprojfiler show_excluded_code_files
|
26
|
+
|
27
|
+
# Describe available commands or one specific command
|
28
|
+
xcodeprojfiler help
|
29
|
+
```
|
30
|
+
|
31
|
+
## License
|
32
|
+
|
33
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
34
|
+
|
data/Rakefile
ADDED
data/bin/xcodeprojfiler
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# 用于解决当前目录下存在Gemfile时,Xcodeprojfiler可能会加载失败的场景
|
4
|
+
if $PROGRAM_NAME == __FILE__
|
5
|
+
ENV['BUNDLE_GEMFILE'] = File.expand_path('../../Gemfile', __FILE__)
|
6
|
+
require 'bundler/setup'
|
7
|
+
end
|
8
|
+
|
9
|
+
require "xcodeprojfiler"
|
10
|
+
|
11
|
+
Xcodeprojfiler::CLI.start(ARGV)
|
@@ -0,0 +1,58 @@
|
|
1
|
+
require 'thor'
|
2
|
+
require "xcodeprojfiler/version"
|
3
|
+
require 'xcodeprojfiler/command'
|
4
|
+
|
5
|
+
module Xcodeprojfiler
|
6
|
+
|
7
|
+
class CLI < Thor
|
8
|
+
|
9
|
+
def self.help(shell, subcommand = false, display_introduction = true)
|
10
|
+
introduction = <<-MESSAGE
|
11
|
+
Xcodeprojfiler is a CLI tooL which can help iOS developer to get the info of files which exist in the xcode project dir.
|
12
|
+
For example, Xcodeprojfiler can scan the current xcode project dir and find out the files which are not included in xcworkspace.
|
13
|
+
|
14
|
+
MESSAGE
|
15
|
+
if display_introduction
|
16
|
+
puts(introduction)
|
17
|
+
end
|
18
|
+
super(shell,subcommand)
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.exit_on_failure?
|
22
|
+
puts("")
|
23
|
+
help(CLI::Base.shell.new, false, false)
|
24
|
+
true
|
25
|
+
end
|
26
|
+
|
27
|
+
desc "version", "Display version"
|
28
|
+
long_desc <<-LONGDESC
|
29
|
+
Display the version of Xcodeprojfiler.
|
30
|
+
LONGDESC
|
31
|
+
def version
|
32
|
+
Command.version
|
33
|
+
end
|
34
|
+
map %w[-v --version] => :version
|
35
|
+
|
36
|
+
desc "show_excluded_files", "show the files which not included in xcworkspace"
|
37
|
+
long_desc <<-LONGDESC
|
38
|
+
|
39
|
+
Scan the current xcode project directory and find out the files which not included in xcworkspace
|
40
|
+
|
41
|
+
LONGDESC
|
42
|
+
def show_excluded_files
|
43
|
+
Command.show_excluded_files
|
44
|
+
end
|
45
|
+
|
46
|
+
desc "show_excluded_code_files", "show the code files(C/C++/Objective-C/Objective-C++/Swift/xib/storyboard) which not included in xcworkspace"
|
47
|
+
long_desc <<-LONGDESC
|
48
|
+
|
49
|
+
Scan the current xcode project directory and find out the code files(C/C++/Objective-C/Objective-C++/Swift/xib/storyboard) which not included in xcworkspace
|
50
|
+
|
51
|
+
LONGDESC
|
52
|
+
def show_excluded_code_files
|
53
|
+
Command.show_excluded_code_files
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
@@ -0,0 +1,167 @@
|
|
1
|
+
require 'xcodeproj'
|
2
|
+
require 'yaml'
|
3
|
+
|
4
|
+
module Xcodeprojfiler
|
5
|
+
|
6
|
+
class Command
|
7
|
+
def self.version
|
8
|
+
version_desc = "#{Xcodeprojfiler::VERSION}"
|
9
|
+
puts(version_desc)
|
10
|
+
end
|
11
|
+
|
12
|
+
# find_xclued_files -> xcluded_file_result_tuple
|
13
|
+
#
|
14
|
+
# 扫描当前目录,返回包含和不包含在xcworkspace的文件数组
|
15
|
+
# 返回文件结果二元组 xcluded_file_result_tuple
|
16
|
+
# xcluded_file_result_tuple = [included_file_array, excluded_file_array]
|
17
|
+
#
|
18
|
+
# @return [included_file_array, excluded_file_array]
|
19
|
+
def self.find_xclued_files
|
20
|
+
included_file_array = []
|
21
|
+
excluded_file_array = []
|
22
|
+
|
23
|
+
# 获取当前目录的 xcworkspace 文件路径
|
24
|
+
root_dir = "#{Pathname::pwd}"
|
25
|
+
xcworkspace_file = Dir.glob(["#{root_dir}/*.xcworkspace"]).first
|
26
|
+
# xcworkspace_root_dir = "/Users/yorkfish/Workspace/Demo-Projects/TestGitFilter-OC"
|
27
|
+
# xcworkspace_file = "/Users/yorkfish/Workspace/Demo-Projects/TestGitFilter-OC/TestGitFilter-OC.xcworkspace"
|
28
|
+
|
29
|
+
if xcworkspace_file == nil
|
30
|
+
puts("Xcodeprojfiler Error: not exited xcworkspace file: #{xcworkspace_file}")
|
31
|
+
return [included_file_array, excluded_file_array]
|
32
|
+
end
|
33
|
+
|
34
|
+
puts("scan the current directory now ...")
|
35
|
+
puts("")
|
36
|
+
puts("PS: if the xcode project is very larger, Xcodeprojfiler needs more than 10min to scan")
|
37
|
+
|
38
|
+
xcworkspace = Xcodeproj::Workspace.new_from_xcworkspace(xcworkspace_file)
|
39
|
+
xcworkspace_file_references = xcworkspace.file_references
|
40
|
+
|
41
|
+
xcworkspace_file_array = []
|
42
|
+
xcworkspace_file_references.each do |file_ref|
|
43
|
+
if file_ref.path != "Pods/Pods.xcodeproj"
|
44
|
+
proj_absolute_path = "#{root_dir}/#{file_ref.path}"
|
45
|
+
# puts("xcworkspace_project: #{proj_absolute_path}")
|
46
|
+
proj = Xcodeproj::Project::open(proj_absolute_path)
|
47
|
+
proj.files.each do |pbx_file_ref|
|
48
|
+
full_file_path = "#{proj.project_dir}/#{pbx_file_ref.full_path}"
|
49
|
+
xcworkspace_file_array.push(full_file_path)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
puts("")
|
55
|
+
ignore_file_tips = <<-MESSAGE
|
56
|
+
PS: Xcodeprojfiler will ignore the following files:
|
57
|
+
|
58
|
+
- fastlane/*
|
59
|
+
- Pods/*
|
60
|
+
- Podfile
|
61
|
+
- Gemfile
|
62
|
+
- .git/*
|
63
|
+
- *.xcassets
|
64
|
+
- *.xctemplate
|
65
|
+
- *.framework
|
66
|
+
- *.bundle
|
67
|
+
- *.lock
|
68
|
+
- *.py
|
69
|
+
- *.rb
|
70
|
+
- *.sh
|
71
|
+
- *.log
|
72
|
+
- *.config
|
73
|
+
|
74
|
+
MESSAGE
|
75
|
+
puts("#{ignore_file_tips}")
|
76
|
+
|
77
|
+
all_files = Dir.glob(["#{root_dir}/**/*.*"])
|
78
|
+
excluded_file_regex_array = [
|
79
|
+
"#{root_dir}/**/*.xcodeproj/**/*",
|
80
|
+
"#{root_dir}/**/*.xcworkspace/**/*",
|
81
|
+
"#{root_dir}/**/*.xcassets/**/*",
|
82
|
+
"#{root_dir}/**/*.xctemplate/**/*",
|
83
|
+
"#{root_dir}/**/*.framework/**/*",
|
84
|
+
"#{root_dir}/**/*.bundle/**/*",
|
85
|
+
"#{root_dir}/**/.git/**/*",
|
86
|
+
"#{root_dir}/**/fastlane/**/*",
|
87
|
+
"#{root_dir}/**/Pods/**/*",
|
88
|
+
"#{root_dir}/**/Podfile",
|
89
|
+
"#{root_dir}/**/Gemfile",
|
90
|
+
"#{root_dir}/**/*{.xcworkspace,.xcodeproj,.lproj,.xcassets,.xctemplate,.framework,.bundle,.lock,.rb,.py,.sh,.log,.config}"
|
91
|
+
]
|
92
|
+
all_files = all_files - Dir.glob(excluded_file_regex_array)
|
93
|
+
|
94
|
+
included_file_array = xcworkspace_file_array
|
95
|
+
excluded_file_array = all_files - included_file_array
|
96
|
+
|
97
|
+
puts("")
|
98
|
+
puts("scan the current directory done !!!")
|
99
|
+
|
100
|
+
return [included_file_array, excluded_file_array]
|
101
|
+
end
|
102
|
+
|
103
|
+
# dump_excluded_files_to_file -> true
|
104
|
+
#
|
105
|
+
# 保存 excluded_file_array 到 excluded_files.yaml
|
106
|
+
#
|
107
|
+
def self.dump_excluded_files_to_file(excluded_file_array)
|
108
|
+
root_dir = "#{Pathname::pwd}"
|
109
|
+
yaml_file_path = "#{root_dir}/excluded_files.yaml"
|
110
|
+
yaml_file = File.open(yaml_file_path, 'w')
|
111
|
+
|
112
|
+
excluded_file_array.uniq!
|
113
|
+
excluded_file_array.sort!
|
114
|
+
yaml_content = {
|
115
|
+
"excluded_files" => excluded_file_array
|
116
|
+
}.to_yaml
|
117
|
+
# remove three dashes (“---”).
|
118
|
+
#
|
119
|
+
# To get the details about three dashes (“---”)
|
120
|
+
# see: https://yaml.org/spec/1.2/spec.html#id2760395
|
121
|
+
#
|
122
|
+
document_separate_maker = "---\n"
|
123
|
+
regx = /\A#{document_separate_maker}/
|
124
|
+
if yaml_content =~ regx
|
125
|
+
yaml_content[document_separate_maker] = ""
|
126
|
+
end
|
127
|
+
|
128
|
+
yaml_file.write(yaml_content)
|
129
|
+
yaml_file.close
|
130
|
+
|
131
|
+
puts("")
|
132
|
+
puts("to see the excluded files from: #{yaml_file_path}")
|
133
|
+
return true
|
134
|
+
end
|
135
|
+
|
136
|
+
def self.show_excluded_files
|
137
|
+
xcluded_file_result_tuple = self.find_xclued_files
|
138
|
+
excluded_file_array = xcluded_file_result_tuple[1]
|
139
|
+
dump_excluded_files_to_file(excluded_file_array)
|
140
|
+
end
|
141
|
+
|
142
|
+
def self.show_excluded_code_files
|
143
|
+
xcluded_file_result_tuple = self.find_xclued_files
|
144
|
+
excluded_file_array = xcluded_file_result_tuple[1]
|
145
|
+
|
146
|
+
code_file_types = [
|
147
|
+
".h",
|
148
|
+
".c",
|
149
|
+
".cpp",
|
150
|
+
".m",
|
151
|
+
".mm",
|
152
|
+
".swift",
|
153
|
+
".xib",
|
154
|
+
".storyboard"
|
155
|
+
]
|
156
|
+
|
157
|
+
excluded_code_file_array = excluded_file_array.select do |file|
|
158
|
+
file_extname = File.extname(file)
|
159
|
+
if code_file_types.include?(file_extname)
|
160
|
+
next true
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
dump_excluded_files_to_file(excluded_code_file_array)
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
lib = File.expand_path("../lib", __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require "xcodeprojfiler/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "xcodeprojfiler"
|
7
|
+
spec.version = Xcodeprojfiler::VERSION
|
8
|
+
spec.authors = ["York"]
|
9
|
+
spec.email = ["yorkzhang520@gmail.com"]
|
10
|
+
|
11
|
+
spec.summary = "A CLI TooL which can help iOS developer to get the info of files which exist in the xcode project dir"
|
12
|
+
spec.description = "Xcodeprojfiler is a CLI tooL which can help iOS developer to get the info of files which exist in the xcode project dir.
|
13
|
+
For example, Xcodeprojfiler can scan the current xcode project dir and find out the files which are not included in xcworkspace."
|
14
|
+
spec.homepage = "https://github.com/YK-Unit/Xcodeprojfiler"
|
15
|
+
spec.license = "MIT"
|
16
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
17
|
+
|
18
|
+
# spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
|
19
|
+
|
20
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
21
|
+
spec.metadata["source_code_uri"] = spec.homepage
|
22
|
+
spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/master/CHANGELOG.md"
|
23
|
+
|
24
|
+
# Specify which files should be added to the gem when it is released.
|
25
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
26
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
27
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
28
|
+
end
|
29
|
+
spec.bindir = "bin"
|
30
|
+
spec.executables = ["xcodeprojfiler"]
|
31
|
+
spec.require_paths = ["lib"]
|
32
|
+
|
33
|
+
spec.add_runtime_dependency "bundler", "~> 2.0", '>= 2.0.2'
|
34
|
+
spec.add_runtime_dependency "thor", "~> 1.0", '>= 1.0.1'
|
35
|
+
spec.add_runtime_dependency "xcodeproj", "~> 1.0", '>= 1.9.0'
|
36
|
+
end
|
metadata
ADDED
@@ -0,0 +1,126 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: xcodeprojfiler
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- York
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-12-10 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: '2.0'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 2.0.2
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '2.0'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 2.0.2
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: thor
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '1.0'
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 1.0.1
|
43
|
+
type: :runtime
|
44
|
+
prerelease: false
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '1.0'
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 1.0.1
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: xcodeproj
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - "~>"
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '1.0'
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 1.9.0
|
63
|
+
type: :runtime
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '1.0'
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: 1.9.0
|
73
|
+
description: |-
|
74
|
+
Xcodeprojfiler is a CLI tooL which can help iOS developer to get the info of files which exist in the xcode project dir.
|
75
|
+
For example, Xcodeprojfiler can scan the current xcode project dir and find out the files which are not included in xcworkspace.
|
76
|
+
email:
|
77
|
+
- yorkzhang520@gmail.com
|
78
|
+
executables:
|
79
|
+
- xcodeprojfiler
|
80
|
+
extensions: []
|
81
|
+
extra_rdoc_files: []
|
82
|
+
files:
|
83
|
+
- ".gitignore"
|
84
|
+
- ".rspec"
|
85
|
+
- ".travis.yml"
|
86
|
+
- CHANGELOG.md
|
87
|
+
- CODE_OF_CONDUCT.md
|
88
|
+
- Docs/xcodeprojfiler_cli_deployment_check_list.md
|
89
|
+
- Gemfile
|
90
|
+
- Gemfile.lock
|
91
|
+
- LICENSE.txt
|
92
|
+
- README.md
|
93
|
+
- Rakefile
|
94
|
+
- bin/xcodeprojfiler
|
95
|
+
- lib/xcodeprojfiler.rb
|
96
|
+
- lib/xcodeprojfiler/command.rb
|
97
|
+
- lib/xcodeprojfiler/version.rb
|
98
|
+
- xcodeprojfiler.gemspec
|
99
|
+
homepage: https://github.com/YK-Unit/Xcodeprojfiler
|
100
|
+
licenses:
|
101
|
+
- MIT
|
102
|
+
metadata:
|
103
|
+
homepage_uri: https://github.com/YK-Unit/Xcodeprojfiler
|
104
|
+
source_code_uri: https://github.com/YK-Unit/Xcodeprojfiler
|
105
|
+
changelog_uri: https://github.com/YK-Unit/Xcodeprojfiler/blob/master/CHANGELOG.md
|
106
|
+
post_install_message:
|
107
|
+
rdoc_options: []
|
108
|
+
require_paths:
|
109
|
+
- lib
|
110
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
111
|
+
requirements:
|
112
|
+
- - ">="
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: 2.3.0
|
115
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - ">="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0'
|
120
|
+
requirements: []
|
121
|
+
rubygems_version: 3.0.3
|
122
|
+
signing_key:
|
123
|
+
specification_version: 4
|
124
|
+
summary: A CLI TooL which can help iOS developer to get the info of files which exist
|
125
|
+
in the xcode project dir
|
126
|
+
test_files: []
|