my_help 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/m_t +4 -0
- data/exe/o_h +4 -0
- data/lib/my_help/version.rb +1 -1
- data/lib/my_help.rb +18 -25
- data/my_help.gemspec +0 -5
- metadata +6 -3
- data/lib/.#my_help.rb +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c13f6d7b2fd61e64e2722bde2a1c0f0d49aa59af
|
4
|
+
data.tar.gz: db0c737b6266ee5e8ffef2d2b2cddaad35c31140
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 309261c3ecc2e6a86fa25fe890a122738150812006f8380c5a39d46beab18324ef3b16982425251ef60562e4f583704f28839986df1dfb37c128461d7a0527ff
|
7
|
+
data.tar.gz: 714e9fb5f2771eb1305d57b3eb61501a9e9149220c9f9966dab4770c8e5b8f4db5052d45ea9d7d249cfbe420ebad460bd7ee90bbc02a8903a4a34a886e5f0e2b
|
data/exe/m_t
ADDED
data/exe/o_h
ADDED
data/lib/my_help/version.rb
CHANGED
data/lib/my_help.rb
CHANGED
@@ -18,6 +18,7 @@ module MyHelp
|
|
18
18
|
def initialize(argv=[])
|
19
19
|
@argv = argv
|
20
20
|
@template_dir = File.expand_path("../../lib/templates", __FILE__)
|
21
|
+
@exe_path = File.expand_path("../../exe", __FILE__)
|
21
22
|
@local_help_dir = File.join(ENV['HOME'],'.my_help')
|
22
23
|
set_help_dir_if_not_exists
|
23
24
|
end
|
@@ -69,7 +70,7 @@ module MyHelp
|
|
69
70
|
del_files=[]
|
70
71
|
del_files << File.join(@local_help_dir,file+'.org')
|
71
72
|
exe_dir=File.join(File.expand_path('../..',@template_dir),'exe')
|
72
|
-
exe_0_dir=
|
73
|
+
exe_0_dir= @exe_path
|
73
74
|
del_files << File.join(exe_dir,file)
|
74
75
|
del_files << File.join(exe_0_dir,file)
|
75
76
|
del_files << File.join(exe_dir,short_name(file))
|
@@ -89,26 +90,17 @@ module MyHelp
|
|
89
90
|
end
|
90
91
|
end
|
91
92
|
|
92
|
-
USER_INST_DIR="USER INSTALLATION DIRECTORY:"
|
93
|
-
INST_DIR="INSTALLATION DIRECTORY:"
|
94
93
|
def install_local
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
if pwd_dir == system_inst_dir
|
105
|
-
puts "Download my_help from github, and using bundle for edit helps\n"
|
106
|
-
puts "Read README in detail.\n"
|
107
|
-
exit
|
94
|
+
status, stdout = systemu 'gem env gemdir'
|
95
|
+
system_inst_dir = stdout.chomp
|
96
|
+
local_help_entries.each do |file|
|
97
|
+
title = file.split('.')[0]
|
98
|
+
[title, short_name(title)].each do |name|
|
99
|
+
source = File.join(@exe_path, name)
|
100
|
+
target = File.join(system_inst_dir, 'bin', name)
|
101
|
+
FileUtils.cp(source, target, verbose: true)
|
102
|
+
end
|
108
103
|
end
|
109
|
-
system "git add -A"
|
110
|
-
system "git commit -m 'update exe dirs'"
|
111
|
-
system "Rake install:local"
|
112
104
|
end
|
113
105
|
|
114
106
|
def short_name(file)
|
@@ -125,21 +117,22 @@ require 'specific_help'
|
|
125
117
|
help_file = File.join(ENV['HOME'],'.my_help','#{file}')
|
126
118
|
SpecificHelp::Command.run(help_file, ARGV)
|
127
119
|
EOS
|
128
|
-
[title, short_name(title)].each
|
129
|
-
p target=File.join(
|
120
|
+
[title, short_name(title)].each do |name|
|
121
|
+
p target=File.join(@exe_path, name)
|
130
122
|
File.open(target,'w'){|file| file.print exe_cont}
|
131
123
|
FileUtils.chmod('a+x', target, :verbose => true)
|
132
|
-
|
124
|
+
end
|
133
125
|
}
|
134
126
|
install_local
|
135
127
|
end
|
136
128
|
|
137
129
|
def clean_exe_dir
|
138
130
|
local_help_entries.each{|file|
|
139
|
-
next if ['emacs_help','
|
131
|
+
next if ['emacs_help.org', 'my_help.org',
|
132
|
+
'my_todo.org', 'org_help.org'].include?(file)
|
140
133
|
file = File.basename(file,'.org')
|
141
134
|
[file, short_name(file)].each{|name|
|
142
|
-
p target=File.join(
|
135
|
+
p target=File.join(@exe_path, name)
|
143
136
|
begin
|
144
137
|
FileUtils::Verbose.rm(target)
|
145
138
|
rescue=> eval
|
@@ -152,7 +145,7 @@ EOS
|
|
152
145
|
def init_help(file)
|
153
146
|
p target_help=File.join(@local_help_dir,file+'.org')
|
154
147
|
if File::exists?(target_help)
|
155
|
-
puts "File exists.
|
148
|
+
puts "File exists. --delete it first to initialize it."
|
156
149
|
exit
|
157
150
|
end
|
158
151
|
p template = File.join(@template_dir,'template_help.org')
|
data/my_help.gemspec
CHANGED
@@ -29,11 +29,6 @@ Gem::Specification.new do |spec|
|
|
29
29
|
|
30
30
|
spec.add_development_dependency "bundler", "~> 1.11"
|
31
31
|
spec.add_development_dependency "rake", "~> 10.0"
|
32
|
-
# spec.add_development_dependency "minitest", "~> 5.0"
|
33
|
-
# spec.add_development_dependency "yard"
|
34
|
-
# spec.add_development_dependency "hiki2md"
|
35
|
-
# spec.add_development_dependency "rspec", "~> 3.0"
|
36
|
-
# spec.add_development_dependency "aruba", '~> 1.3.20'
|
37
32
|
spec.add_dependency "systemu"
|
38
33
|
spec.add_dependency "colorize"
|
39
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: my_help
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shigeto R. Nishitani
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -72,8 +72,10 @@ email:
|
|
72
72
|
executables:
|
73
73
|
- e_h
|
74
74
|
- emacs_help
|
75
|
+
- m_t
|
75
76
|
- my_help
|
76
77
|
- my_todo
|
78
|
+
- o_h
|
77
79
|
- org_help
|
78
80
|
extensions: []
|
79
81
|
extra_rdoc_files: []
|
@@ -476,10 +478,11 @@ files:
|
|
476
478
|
- docs/yagi/thor_task.ipynb
|
477
479
|
- exe/e_h
|
478
480
|
- exe/emacs_help
|
481
|
+
- exe/m_t
|
479
482
|
- exe/my_help
|
480
483
|
- exe/my_todo
|
484
|
+
- exe/o_h
|
481
485
|
- exe/org_help
|
482
|
-
- lib/.#my_help.rb
|
483
486
|
- lib/emacs_help.rb
|
484
487
|
- lib/my_help.rb
|
485
488
|
- lib/my_help/org2yml.rb
|
data/lib/.#my_help.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
lib/bob@ShigetonoMacBook.local.98720
|