wxp 0.0.5 → 0.0.6
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 +4 -4
- data/bin/wxp +2 -2
- data/lib/wxp/command/op/gems.rb +33 -0
- data/lib/wxp/command/op/gitconf.rb +34 -0
- data/lib/wxp/command/op/xcache.rb +33 -0
- data/lib/wxp/command/op.rb +15 -0
- data/lib/wxp/command.rb +47 -0
- data/lib/wxp/version.rb +1 -1
- data/lib/wxp.rb +2 -5
- metadata +68 -2
- data/lib/wxp/translator.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71cc2d5f20e3979af92146f1fc04da88b6aa519d686737c66117ce02103b3b56
|
4
|
+
data.tar.gz: 8452245341e5cfe3de0f34a6c4cb432aab3eef4c26ae30a962478e99894fc912
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a9bc1fbc4b516398c99d77c5733177c9383f2117209974dd0c53389156f87d5449ef178c5b9eb11a2ae417c66c6034f0fb2bfe43ca73597489ff5d55bf66486
|
7
|
+
data.tar.gz: b5abb14674b2f3f3374fc4757906c2fe6175afd7bd551f6e0ff75f5247616da80860ad9937f11d2f9bcbf344353e363dfdc83790adb00b9575c1dedb905a0827
|
data/bin/wxp
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require "bundler/setup"
|
4
4
|
require "wxp"
|
5
|
+
require "cocoapods"
|
5
6
|
|
6
7
|
# You can add fixtures and/or initialization code here to make experimenting
|
7
8
|
# with your gem easier. You can also use a different console, if you like.
|
@@ -10,5 +11,4 @@ require "wxp"
|
|
10
11
|
# require "pry"
|
11
12
|
# Pry.start
|
12
13
|
|
13
|
-
|
14
|
-
IRB.start(__FILE__)
|
14
|
+
Wxp::Command.run(ARGV)
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Wxp
|
2
|
+
class Command
|
3
|
+
class Op < Command
|
4
|
+
class Gems < Op
|
5
|
+
|
6
|
+
self.summary = '打开gems文件夹'
|
7
|
+
self.description = <<-DESC
|
8
|
+
打开gems文件夹
|
9
|
+
DESC
|
10
|
+
|
11
|
+
self.arguments = [
|
12
|
+
]
|
13
|
+
|
14
|
+
def initialize(argv)
|
15
|
+
super
|
16
|
+
end
|
17
|
+
|
18
|
+
def validate!
|
19
|
+
super
|
20
|
+
end
|
21
|
+
|
22
|
+
def run
|
23
|
+
openGems
|
24
|
+
end
|
25
|
+
|
26
|
+
def openGems
|
27
|
+
puts 'gem路径为:/Library/Ruby/Gems/'.green
|
28
|
+
system 'open /Library/Ruby/Gems/'
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module Wxp
|
2
|
+
class Command
|
3
|
+
class Op < Command
|
4
|
+
class Gitconf < Op
|
5
|
+
|
6
|
+
self.summary = '打开.gitconfig文件'
|
7
|
+
self.description = <<-DESC
|
8
|
+
打开.gitconfig文件
|
9
|
+
DESC
|
10
|
+
|
11
|
+
self.arguments = [
|
12
|
+
]
|
13
|
+
|
14
|
+
def initialize(argv)
|
15
|
+
super
|
16
|
+
end
|
17
|
+
|
18
|
+
def validate!
|
19
|
+
super
|
20
|
+
end
|
21
|
+
|
22
|
+
def run
|
23
|
+
openGitConfig
|
24
|
+
end
|
25
|
+
|
26
|
+
def openGitConfig
|
27
|
+
puts 'git config路径为:~/.gitconfig'.green
|
28
|
+
puts 'git命令为: git config --list'
|
29
|
+
`git config --list`
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Wxp
|
2
|
+
class Command
|
3
|
+
class Op < Command
|
4
|
+
class Xcache < Op
|
5
|
+
|
6
|
+
self.summary = '打开Xcode 缓存文件夹'
|
7
|
+
self.description = <<-DESC
|
8
|
+
打开Xcode 缓存文件夹
|
9
|
+
DESC
|
10
|
+
|
11
|
+
self.arguments = [
|
12
|
+
]
|
13
|
+
|
14
|
+
def initialize(argv)
|
15
|
+
super
|
16
|
+
end
|
17
|
+
|
18
|
+
def validate!
|
19
|
+
super
|
20
|
+
end
|
21
|
+
|
22
|
+
def run
|
23
|
+
openXcodeCache
|
24
|
+
end
|
25
|
+
|
26
|
+
def openXcodeCache
|
27
|
+
puts 'Xcode缓存路径为:~/Library/Developer/Xcode/DerivedData/'.green
|
28
|
+
system 'open ~/Library/Developer/Xcode/DerivedData/'
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'wxp/command/op/gems'
|
2
|
+
require 'wxp/command/op/gitconf'
|
3
|
+
require 'wxp/command/op/xcache'
|
4
|
+
|
5
|
+
module Wxp
|
6
|
+
class Command
|
7
|
+
class Op < Command
|
8
|
+
self.abstract_command = true
|
9
|
+
self.summary = '打开常用文件'
|
10
|
+
self.description = <<-DESC
|
11
|
+
打开常用文件夹,并输出路径
|
12
|
+
DESC
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/lib/wxp/command.rb
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'colored2'
|
2
|
+
require 'claide'
|
3
|
+
require 'molinillo/errors'
|
4
|
+
|
5
|
+
module Molinillo
|
6
|
+
class ResolverError
|
7
|
+
include CLAide::InformativeError
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
module Wxp
|
12
|
+
|
13
|
+
class PlainInformative
|
14
|
+
include CLAide::InformativeError
|
15
|
+
end
|
16
|
+
|
17
|
+
class Command < CLAide::Command # < 继承
|
18
|
+
require 'wxp/command/op'
|
19
|
+
|
20
|
+
self.abstract_command = true
|
21
|
+
self.command = 'wxp'
|
22
|
+
self.version = VERSION
|
23
|
+
self.description = 'wxp, a tool to manager pod'
|
24
|
+
self.plugin_prefixes = %w(claide wxp)
|
25
|
+
|
26
|
+
def self.options
|
27
|
+
[
|
28
|
+
['--silent', 'Show nothing'],
|
29
|
+
].concat(super)
|
30
|
+
end
|
31
|
+
|
32
|
+
# 类方法使用 def self.methodname() 定义
|
33
|
+
def self.run(argv)
|
34
|
+
super(argv)
|
35
|
+
end
|
36
|
+
|
37
|
+
# initialize 方法是一个标准的 Ruby 类方法,是类的构造函数
|
38
|
+
def initialize(argv)
|
39
|
+
super
|
40
|
+
|
41
|
+
unless self.ansi_output?
|
42
|
+
Colored2.disable!
|
43
|
+
String.send(:define_method, :colorize) { |string, _| string }
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
data/lib/wxp/version.rb
CHANGED
data/lib/wxp.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wxp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- xiaopengwang
|
@@ -38,6 +38,68 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: claide
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.0.2
|
48
|
+
- - "<"
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '2.0'
|
51
|
+
type: :runtime
|
52
|
+
prerelease: false
|
53
|
+
version_requirements: !ruby/object:Gem::Requirement
|
54
|
+
requirements:
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: 1.0.2
|
58
|
+
- - "<"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '2.0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: molinillo
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: 0.6.6
|
68
|
+
type: :runtime
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 0.6.6
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: colored2
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '3.1'
|
82
|
+
type: :runtime
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '3.1'
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: cocoapods
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: 1.8.4
|
96
|
+
type: :runtime
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: 1.8.4
|
41
103
|
description: a longer description or delete this line.
|
42
104
|
email:
|
43
105
|
- xiaopengmonsters@gmail.com
|
@@ -49,7 +111,11 @@ files:
|
|
49
111
|
- README.md
|
50
112
|
- bin/wxp
|
51
113
|
- lib/wxp.rb
|
52
|
-
- lib/wxp/
|
114
|
+
- lib/wxp/command.rb
|
115
|
+
- lib/wxp/command/op.rb
|
116
|
+
- lib/wxp/command/op/gems.rb
|
117
|
+
- lib/wxp/command/op/gitconf.rb
|
118
|
+
- lib/wxp/command/op/xcache.rb
|
53
119
|
- lib/wxp/version.rb
|
54
120
|
homepage: https://github.com/xiaopengmonsters/wxp
|
55
121
|
licenses:
|