easyci 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: e16811fbe303dcd906e4dfbbb6d77d95467d9d7c91d67c6299c399677074565b
4
+ data.tar.gz: 25eba83f49c25ce27f04e040e37e210b1f4e70b5c2a94df60391cbf4d0cf07d8
5
+ SHA512:
6
+ metadata.gz: 3f70f76959081795b47f8f12a75f52201c8613851f8588f08ce9c704f57c443143f8f25a24b8226fb37efdcf76faaeb8d602b17551c93c421888fcfc1bdf70f8
7
+ data.tar.gz: 0ff6bde5e2a75ae58bddd2f87772e4ff4853f3378d0b555b68272b7eb5499d0dd38259e7ed3f62c73e22d8e6f2c0e59822306f11d209ba321d18a44bfbea239b
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Your Name
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,59 @@
1
+ # EasyCI
2
+
3
+ EasyCI是一个简单的CI工具集,专为开发人员设计,提供了一系列方便的命令行工具。
4
+
5
+ ## 安装
6
+
7
+ ```bash
8
+ gem install easyci
9
+ ```
10
+
11
+ ## 使用方法
12
+
13
+ ### Unity依赖关系图
14
+
15
+ 分析Unity项目并生成依赖关系图:
16
+
17
+ ```bash
18
+ easyci unitydraw --project-path=/path/to/unity/project --output=dependencies.png
19
+ ```
20
+
21
+ ### 自动构建
22
+
23
+ 自动构建项目:
24
+
25
+ ```bash
26
+ easyci autobuild --project-path=/path/to/project --build-target=iOS --output=/path/to/output --version=1.0.0
27
+ ```
28
+
29
+ ## 选项
30
+
31
+ 全局选项:
32
+
33
+ - `--verbose`: 显示详细输出
34
+
35
+ ## 开发
36
+
37
+ 安装依赖:
38
+
39
+ ```bash
40
+ bundle install
41
+ ```
42
+
43
+ 运行测试:
44
+
45
+ ```bash
46
+ rake spec
47
+ ```
48
+
49
+ ## 贡献
50
+
51
+ 1. Fork本项目
52
+ 2. 创建您的特性分支 (`git checkout -b feature/amazing-feature`)
53
+ 3. 提交您的更改 (`git commit -m 'Add some amazing feature'`)
54
+ 4. 推送到分支 (`git push origin feature/amazing-feature`)
55
+ 5. 打开Pull Request
56
+
57
+ ## 许可证
58
+
59
+ 本项目采用MIT许可证 - 详情请参见 [LICENSE](LICENSE) 文件。
data/bin/easyci ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # 设置lib路径
4
+ lib = File.expand_path('../../lib', __FILE__)
5
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
6
+
7
+ require 'easyci'
8
+ EasyCI::Command.run(ARGV)
@@ -0,0 +1,46 @@
1
+ module EasyCI
2
+ class Command
3
+ class Autobuild < Command
4
+ self.summary = '自动构建项目'
5
+ self.description = '自动构建Unity或其他项目'
6
+
7
+ def self.options
8
+ [
9
+ ['--project-path=PATH', '指定项目路径'],
10
+ ['--build-target=TARGET', '构建目标平台 (iOS/Android/WebGL)'],
11
+ ['--output=PATH', '构建输出路径'],
12
+ ['--version=VERSION', '版本号']
13
+ ].concat(super)
14
+ end
15
+
16
+ def initialize(argv)
17
+ @project_path = argv.option('project-path')
18
+ @build_target = argv.option('build-target', 'iOS')
19
+ @output_path = argv.option('output')
20
+ @version = argv.option('version', '1.0.0')
21
+ super
22
+ end
23
+
24
+ def validate!
25
+ super
26
+ help! '必须提供项目路径' unless @project_path
27
+ help! '必须提供有效的构建目标' unless ['iOS', 'Android', 'WebGL'].include?(@build_target)
28
+ end
29
+
30
+ def run
31
+ puts "开始构建项目: #{@project_path}" if @verbose
32
+ puts "构建目标平台: #{@build_target}"
33
+ puts "版本号: #{@version}"
34
+
35
+ # 这里是实际执行自动构建的代码
36
+ puts "准备构建环境..."
37
+ sleep(1)
38
+ puts "执行构建..."
39
+ sleep(2)
40
+
41
+ output = @output_path || "./build/#{@build_target.downcase}"
42
+ puts "构建完成,输出目录: #{output}"
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,37 @@
1
+ module EasyCI
2
+ class Command
3
+ class Unitydraw < Command
4
+ self.summary = '绘制Unity项目图形'
5
+ self.description = '分析Unity项目并生成依赖关系图'
6
+
7
+ def self.options
8
+ [
9
+ ['--project-path=PATH', '指定Unity项目路径'],
10
+ ['--output=PATH', '输出图形的路径']
11
+ ].concat(super)
12
+ end
13
+
14
+ def initialize(argv)
15
+ @project_path = argv.option('project-path')
16
+ @output_path = argv.option('output')
17
+ super
18
+ end
19
+
20
+ def validate!
21
+ super
22
+ help! '必须提供项目路径' unless @project_path
23
+ end
24
+
25
+ def run
26
+ puts "分析Unity项目: #{@project_path}" if @verbose
27
+ # 这里是实际执行Unity项目分析和绘图的代码
28
+ puts "生成项目依赖图..."
29
+ # 模拟工作
30
+ sleep(1)
31
+
32
+ output = @output_path || "unity_dependencies.png"
33
+ puts "项目依赖图已生成至: #{output}"
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,26 @@
1
+ require 'claide'
2
+
3
+ module EasyCI
4
+ class Command < CLAide::Command
5
+ self.abstract_command = true
6
+ self.command = 'easyci'
7
+ self.version = VERSION
8
+ self.description = '简单的CI工具集'
9
+ self.plugin_prefixes = %w(easyci)
10
+
11
+ def self.options
12
+ [
13
+ ['--verbose', '显示详细输出'],
14
+ ].concat(super)
15
+ end
16
+
17
+ def initialize(argv)
18
+ @verbose = argv.flag?('verbose', false)
19
+ super
20
+ end
21
+
22
+ def validate!
23
+ super
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,3 @@
1
+ module EasyCI
2
+ VERSION = '0.1.0'
3
+ end
data/lib/easyci.rb ADDED
@@ -0,0 +1,8 @@
1
+ require 'easyci/version'
2
+ require 'easyci/command'
3
+ require 'easyci/command/unitydraw'
4
+ require 'easyci/command/autobuild'
5
+
6
+ module EasyCI
7
+ # 您的代码在这里...
8
+ end
metadata ADDED
@@ -0,0 +1,105 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: easyci
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Wade
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 2025-06-11 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: claide
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - "~>"
17
+ - !ruby/object:Gem::Version
18
+ version: '1.0'
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - "~>"
24
+ - !ruby/object:Gem::Version
25
+ version: '1.0'
26
+ - !ruby/object:Gem::Dependency
27
+ name: bundler
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - "~>"
31
+ - !ruby/object:Gem::Version
32
+ version: '2.0'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '2.0'
40
+ - !ruby/object:Gem::Dependency
41
+ name: rake
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '13.0'
47
+ type: :development
48
+ prerelease: false
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '13.0'
54
+ - !ruby/object:Gem::Dependency
55
+ name: rspec
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '3.0'
61
+ type: :development
62
+ prerelease: false
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '3.0'
68
+ description: EasyCI是一个简单的CI工具集,包含unitydraw和autobuild等命令
69
+ email:
70
+ - weishqdev@gmail.com
71
+ executables:
72
+ - easyci
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - LICENSE
77
+ - README.md
78
+ - bin/easyci
79
+ - lib/easyci.rb
80
+ - lib/easyci/command.rb
81
+ - lib/easyci/command/autobuild.rb
82
+ - lib/easyci/command/unitydraw.rb
83
+ - lib/easyci/version.rb
84
+ homepage: https://github.com/yourusername/easyci
85
+ licenses:
86
+ - MIT
87
+ metadata: {}
88
+ rdoc_options: []
89
+ require_paths:
90
+ - lib
91
+ required_ruby_version: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ required_rubygems_version: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ version: '0'
101
+ requirements: []
102
+ rubygems_version: 3.6.3
103
+ specification_version: 4
104
+ summary: EasyCI - 简单的CI工具集
105
+ test_files: []