bootsetting 0.1.3 → 0.1.4
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 +5 -5
- data/Gemfile.lock +9 -3
- data/README.md +2 -0
- data/bootsetting.gemspec +8 -2
- data/lib/bootsetting.rb +31 -3
- data/lib/bootsetting/version.rb +1 -1
- data/lib/resourcesCopy.rb +35 -0
- metadata +64 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: f462aaef28b361c6d3ccfb52543eae270d27e927
|
4
|
+
data.tar.gz: ecb5a8032bbf23419fb80dd45e68e88e510707f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a85963b898734d1f68d76ac6fff765b2a2c7b31e328078e432223fa2e24e59d2d69cd070d8fd0fc5419a43ac9c71aec50ef08177de74b0b4bf303bfd2b2836ab
|
7
|
+
data.tar.gz: c4753c91c67f32e89b7d8174e78ca688aa4f96a3fb5d7f1f4373ec077c5a891cf814e419fb0b20c49ba91bce90174c47900bfa5439f17949b45614b189e133d8
|
data/Gemfile.lock
CHANGED
@@ -1,22 +1,28 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
bootsetting (0.1.
|
4
|
+
bootsetting (0.1.4)
|
5
5
|
colored2
|
6
|
+
rainbow
|
7
|
+
thor
|
6
8
|
|
7
9
|
GEM
|
8
10
|
remote: https://rubygems.org/
|
9
11
|
specs:
|
10
12
|
colored2 (3.1.2)
|
13
|
+
rainbow (3.0.0)
|
11
14
|
rake (10.5.0)
|
15
|
+
thor (0.20.3)
|
12
16
|
|
13
17
|
PLATFORMS
|
14
18
|
ruby
|
15
19
|
|
16
20
|
DEPENDENCIES
|
17
21
|
bootsetting!
|
18
|
-
bundler (~> 1
|
22
|
+
bundler (~> 2.0.1)
|
23
|
+
rainbow
|
19
24
|
rake (~> 10.0)
|
25
|
+
thor
|
20
26
|
|
21
27
|
BUNDLED WITH
|
22
|
-
|
28
|
+
2.0.1
|
data/README.md
CHANGED
@@ -24,6 +24,8 @@ Or install it yourself as:
|
|
24
24
|
|
25
25
|
TODO: Write usage instructions here
|
26
26
|
|
27
|
+
## [Keyboard map](https://developer.apple.com/library/archive/technotes/tn2450/_index.html)
|
28
|
+
|
27
29
|
## Development
|
28
30
|
|
29
31
|
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.
|
data/bootsetting.gemspec
CHANGED
@@ -35,7 +35,13 @@ Gem::Specification.new do |spec|
|
|
35
35
|
spec.require_paths = ["lib"]
|
36
36
|
|
37
37
|
spec.add_runtime_dependency 'colored2'
|
38
|
+
spec.add_runtime_dependency 'rainbow'
|
39
|
+
spec.add_runtime_dependency 'thor'
|
40
|
+
|
41
|
+
spec.add_development_dependency "bundler", "~> 2.0.1"
|
42
|
+
spec.add_development_dependency "rake", "~> 10.5.0"
|
43
|
+
spec.add_development_dependency "rainbow"
|
44
|
+
spec.add_development_dependency "thor"
|
45
|
+
|
38
46
|
|
39
|
-
spec.add_development_dependency "bundler", "~> 1.16"
|
40
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
41
47
|
end
|
data/lib/bootsetting.rb
CHANGED
@@ -1,8 +1,36 @@
|
|
1
1
|
require "bootsetting/version"
|
2
|
+
require "resourcesCopy"
|
3
|
+
require 'rainbow/refinement'
|
4
|
+
require "thor"
|
5
|
+
using Rainbow
|
2
6
|
|
3
7
|
module Bootsetting
|
4
8
|
# Your code goes here...
|
5
|
-
|
6
|
-
|
7
|
-
|
9
|
+
class CLI < Thor
|
10
|
+
# contents of the Thor class
|
11
|
+
desc "hello NAME", "say hello to NAME"
|
12
|
+
def hello(name, from=nil)
|
13
|
+
puts "from: #{from}" if from
|
14
|
+
puts "Hello method #{name}".bright.red
|
15
|
+
end
|
16
|
+
|
17
|
+
desc "UserKeyMapping", "say hello to new keyMapping"
|
18
|
+
def kswitch()
|
19
|
+
`hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000039,"HIDKeyboardModifierMappingDst":0x7000000E0},{"HIDKeyboardModifierMappingSrc":0x7000000E0,"HIDKeyboardModifierMappingDst":0x700000039}]}'`
|
20
|
+
puts "say hello to new keyMapping".bright.green
|
21
|
+
end
|
22
|
+
|
23
|
+
desc "Copy resourses from", "another specific dir"
|
24
|
+
def copy(from_dir, to_dir)
|
25
|
+
puts "form: #{from_dir} to: #{to_dir}".bright.red
|
26
|
+
helper = CopyHelper.new()
|
27
|
+
helper.copy(from_dir, to_dir)
|
28
|
+
end
|
29
|
+
|
8
30
|
end
|
31
|
+
|
32
|
+
CLI.start(ARGV)
|
33
|
+
exit
|
34
|
+
end
|
35
|
+
|
36
|
+
# Thor See: http://whatisthor.com/
|
data/lib/bootsetting/version.rb
CHANGED
@@ -0,0 +1,35 @@
|
|
1
|
+
|
2
|
+
require 'FileUtils'
|
3
|
+
|
4
|
+
class CopyHelper
|
5
|
+
# desc "Copying files from acgn_ios_plugin to acgn_ios_plugin_pod folder"
|
6
|
+
|
7
|
+
# specify files which should not be copied
|
8
|
+
dont_copy = ['.xcassets','.bundle']
|
9
|
+
|
10
|
+
# desc "Instance"
|
11
|
+
def initialize()
|
12
|
+
end
|
13
|
+
|
14
|
+
# desc "private copy"
|
15
|
+
def copy_with_path(src, dest)
|
16
|
+
FileUtils.mkdir_p(File.dirname(dest))
|
17
|
+
FileUtils.cp(src, dest)
|
18
|
+
end
|
19
|
+
|
20
|
+
# desc "public copy"
|
21
|
+
def copy(from_dir, to_dir)
|
22
|
+
Dir[from_dir + "/**/*.{xib,storyboard,xcassets,bundle,jsbundle}"].each do |old_dest|
|
23
|
+
new_dest = old_dest.gsub(from_dir, to_dir)
|
24
|
+
should_not_copy = dont_copy.any? { |s| new_dest.end_with?(s) }
|
25
|
+
if !should_not_copy
|
26
|
+
copy_with_path(old_dest, new_dest);
|
27
|
+
else
|
28
|
+
FileUtils.mkdir_p(File.dirname(new_dest))
|
29
|
+
comd = "cp -R " + old_dest + " " + new_dest
|
30
|
+
system(comd)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootsetting
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CNKCQ
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colored2
|
@@ -24,34 +24,90 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rainbow
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: thor
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
27
55
|
- !ruby/object:Gem::Dependency
|
28
56
|
name: bundler
|
29
57
|
requirement: !ruby/object:Gem::Requirement
|
30
58
|
requirements:
|
31
59
|
- - "~>"
|
32
60
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
61
|
+
version: 2.0.1
|
34
62
|
type: :development
|
35
63
|
prerelease: false
|
36
64
|
version_requirements: !ruby/object:Gem::Requirement
|
37
65
|
requirements:
|
38
66
|
- - "~>"
|
39
67
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
68
|
+
version: 2.0.1
|
41
69
|
- !ruby/object:Gem::Dependency
|
42
70
|
name: rake
|
43
71
|
requirement: !ruby/object:Gem::Requirement
|
44
72
|
requirements:
|
45
73
|
- - "~>"
|
46
74
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
75
|
+
version: 10.5.0
|
48
76
|
type: :development
|
49
77
|
prerelease: false
|
50
78
|
version_requirements: !ruby/object:Gem::Requirement
|
51
79
|
requirements:
|
52
80
|
- - "~>"
|
53
81
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
82
|
+
version: 10.5.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rainbow
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: thor
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
55
111
|
description: effective command for boot setting
|
56
112
|
email:
|
57
113
|
- chengquan.personal@gmail.com
|
@@ -73,6 +129,7 @@ files:
|
|
73
129
|
- bootsetting.gemspec
|
74
130
|
- lib/bootsetting.rb
|
75
131
|
- lib/bootsetting/version.rb
|
132
|
+
- lib/resourcesCopy.rb
|
76
133
|
homepage: https://github.com/CNKCQ/bootsetting.git
|
77
134
|
licenses:
|
78
135
|
- MIT
|
@@ -94,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
151
|
version: '0'
|
95
152
|
requirements: []
|
96
153
|
rubyforge_project:
|
97
|
-
rubygems_version: 2.
|
154
|
+
rubygems_version: 2.5.2.3
|
98
155
|
signing_key:
|
99
156
|
specification_version: 4
|
100
157
|
summary: happy setting
|