djutils 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 +7 -0
- data/README.md +35 -0
- data/exe/djutils +19 -0
- data/lib/djutils/inspector.rb +51 -0
- data/lib/djutils/version.rb +3 -0
- data/lib/djutils.rb +7 -0
- metadata +92 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 18e287a1e4238616d46045d086d0ed452164992e
|
4
|
+
data.tar.gz: 1b04e91eb1c9d21ef69a47e32c536bb5b49ff74f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c6011e49f9deae95efe6e7134f3ee488d09fbbe661e1bf31db53a9bf54f50424a54daf16acd6cf8175ea3222e7226f9ef35c97bff1fd8f93a4e0b5da26a25445
|
7
|
+
data.tar.gz: 33dc4c0fef7bf9e95e9efff0fae67c55d444eb15816ee6656320f7f29a137177144dcc0e86d87cfe43bbd768b732b44baa5e66c8c1b7ed904801263561ecb32b
|
data/README.md
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# Djutils
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/djutils`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'djutils'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install djutils
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/djutils.
|
data/exe/djutils
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'djutils'
|
4
|
+
|
5
|
+
if ARGV.empty?
|
6
|
+
puts %Q{
|
7
|
+
Usage:
|
8
|
+
|
9
|
+
djutils inspect 对工程配置进行一些检查
|
10
|
+
|
11
|
+
}
|
12
|
+
else
|
13
|
+
cmd = ARGV[0]
|
14
|
+
if cmd == 'inspect'
|
15
|
+
Djutils::Inspector.inspect_targets()
|
16
|
+
else
|
17
|
+
puts "Command '#{cmd}' not found."
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
module Djutils
|
2
|
+
|
3
|
+
class Inspector
|
4
|
+
|
5
|
+
require 'xcodeproj'
|
6
|
+
|
7
|
+
def self.inspect_targets
|
8
|
+
|
9
|
+
proj_path = File.join(Dir.pwd, '东家.xcodeproj')
|
10
|
+
|
11
|
+
if !File.exist?(proj_path)
|
12
|
+
puts "Error: #{proj_path} not found."
|
13
|
+
return
|
14
|
+
end
|
15
|
+
|
16
|
+
proj = Xcodeproj::Project.open(proj_path)
|
17
|
+
|
18
|
+
target_dongjia = nil
|
19
|
+
target_dongjia_ent = nil
|
20
|
+
|
21
|
+
proj.targets.each do |target|
|
22
|
+
if target.name == '东家'
|
23
|
+
target_dongjia = target
|
24
|
+
elsif target.name == '东家企业版'
|
25
|
+
target_dongjia_ent = target
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
if target_dongjia == nil or target_dongjia_ent == nil
|
30
|
+
puts "Target校验错误"
|
31
|
+
return -1
|
32
|
+
end
|
33
|
+
|
34
|
+
mismatched_files = []
|
35
|
+
|
36
|
+
for file_ref in target_dongjia.source_build_phase.files_references
|
37
|
+
if !target_dongjia_ent.source_build_phase.include?(file_ref)
|
38
|
+
mismatched_files << file_ref.display_name
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
if mismatched_files.size > 0
|
43
|
+
puts "\n\n#{mismatched_files}\n\n"
|
44
|
+
return -1
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
data/lib/djutils.rb
ADDED
metadata
ADDED
@@ -0,0 +1,92 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: djutils
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- zhuoyi
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-09-14 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.16'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.16'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: xcodeproj
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.6'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.6'
|
55
|
+
description: dongjia utils.
|
56
|
+
email:
|
57
|
+
- jiangzhuoyi@idongjia.cn
|
58
|
+
executables:
|
59
|
+
- djutils
|
60
|
+
extensions: []
|
61
|
+
extra_rdoc_files: []
|
62
|
+
files:
|
63
|
+
- README.md
|
64
|
+
- exe/djutils
|
65
|
+
- lib/djutils.rb
|
66
|
+
- lib/djutils/inspector.rb
|
67
|
+
- lib/djutils/version.rb
|
68
|
+
homepage: http://code.kaipao.cc/zhuoyi/djutils
|
69
|
+
licenses:
|
70
|
+
- MIT
|
71
|
+
metadata: {}
|
72
|
+
post_install_message:
|
73
|
+
rdoc_options: []
|
74
|
+
require_paths:
|
75
|
+
- lib
|
76
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '0'
|
81
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - ">="
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
requirements: []
|
87
|
+
rubyforge_project:
|
88
|
+
rubygems_version: 2.6.14
|
89
|
+
signing_key:
|
90
|
+
specification_version: 4
|
91
|
+
summary: dongjia utils
|
92
|
+
test_files: []
|