my_help 1.2.2 → 1.2.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4aea4b438a5be4715107a41097ff21fa7d35e8cebed822e9995594bc827c6305
4
- data.tar.gz: b964ebdcc06a3e414d5535172a31b69018dbf1cb43db5641101c88f5457a4c91
3
+ metadata.gz: d4a86f6d2f3dabef582a9c43dca24554b1dda2f5d773d0f7f8c9907c1dd205f8
4
+ data.tar.gz: 7010d97c58171b9606db261705a93deb7d6f23e546baeb32d25869e99ec1bfc7
5
5
  SHA512:
6
- metadata.gz: c6d3ce8dcdd71f8e01baecc483f56412791137ab455ba45750966321fb197f7941fd341720bedba55035a3c573d21fea1753d154977a2ddb7c44dfb8751694b0
7
- data.tar.gz: 4fcb4b3440365f8364677a6b7aac6d06574cd781e89e277185b0eb54934d976b4df58da318e09c05686fbbe1fd93ca912f458c970d59bfb9445896f4f02568e0
6
+ metadata.gz: 1e0aaf779bb22e17ebd06d6d4277e323619b054120cb56ba8eab1e33c33d1ab2f8df9b71245f769276ce3c2de7d7c99804c5fd55710164cbef20eb063d8f235e
7
+ data.tar.gz: ec825103b28a678f0dcc7f2c94ec9afdfc836f69deae5b763279b61bb38ace3295a4be45f04956d87b118f95ce8af964cf89c629f5288ea9bc6cc42164228f90
data/.yardoc/checksums CHANGED
@@ -1,11 +1,11 @@
1
1
  lib/my_help.rb 7539f0f58056d44d38352f868bfea4d6fb63a9ee
2
- lib/my_help/cli.rb 8cd7468e74ef89e8a9ee83e5e780b70b6e2874c4
2
+ lib/my_help/cli.rb c2a482691a6e9183e393110da8a552d477cf856e
3
3
  lib/my_help/init.rb ac83b0cbfd9394278da8e7bf83b089cb84e132e4
4
- lib/my_help/list.rb 30d4be2eb41e623abeeb6914ab9907ced97ed722
5
- lib/my_help/config.rb d7162fbe953828fc7e6a5aac89adf8678131068f
4
+ lib/my_help/list.rb a63c0f1366a7c162d2c5e16e70f37f7ebb32cf8e
5
+ lib/my_help/config.rb be52fb39c0656febb6d230aa50e7b7a6804c7cc4
6
6
  lib/my_help/modify.rb 17a00a9f1b4126d9c067a320b47639e5a5fec845
7
7
  lib/my_help/git_cli.rb bb04396f0b9d54ecb13100fe5cde029f7dbb0ea7
8
8
  lib/my_help/md2hash.rb 35ebd32d3f545b40cd9ebb1972dc60d53b58b22a
9
9
  lib/my_help/org2yml.rb 334d0a7b648dc75b1d9504ec6d68937c70e96343
10
- lib/my_help/version.rb e82ec18cc8f885ee6c9b6846c3813e1eb96981a9
10
+ lib/my_help/version.rb 618ac9ac5ac451afc28fc6bae7bd657fc71a915a
11
11
  lib/my_help/org2hash.rb 939fea903abb5247959d74e18afc8db30fb5f6c8
Binary file
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- my_help (1.2.2)
4
+ my_help (1.2.3)
5
5
  colorize
6
6
  command_line
7
7
  thor
data/Rakefile CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
-
2
+ require 'yard'
3
3
  require 'bundler/gem_tasks'
4
4
  require 'rake/testtask'
5
5
 
@@ -30,3 +30,22 @@ RuboCop::RakeTask.new
30
30
  task :default do
31
31
  system "rake -T"
32
32
  end
33
+
34
+ require "colorize"
35
+ require 'command_line/global'
36
+
37
+ desc 'git auto'
38
+ task :git_auto do
39
+ print "Input comments: "
40
+ comment = STDIN.gets.chomp
41
+ comment = comment == "" ? "auto pull and push" : comment.gsub("\'", "\\'")
42
+ ["git add -A",
43
+ "git commit -m '#{comment}'",
44
+ "git pull origin main",
45
+ "git push origin main"].each do |comm|
46
+ puts comm.cyan
47
+ res = command_line comm
48
+ puts res.stdout.green
49
+ end
50
+ end
51
+
data/lib/my_help/cli.rb CHANGED
@@ -30,6 +30,7 @@ module MyHelp
30
30
 
31
31
  def init(*args)
32
32
  config = get_config # for using methods in Config
33
+
33
34
  #config.ask_default
34
35
  init = Init.new(config)
35
36
  raise "Local help dir exist." if init.help_dir_exist?
@@ -12,7 +12,7 @@ module MyHelp
12
12
  @config = {
13
13
  template_dir: File.expand_path("../templates", __dir__),
14
14
  local_help_dir: local_help_dir,
15
- conf_file: File.join(local_help_dir, ".my_help_conf.yml"),
15
+ conf_file: File.join(conf_path, ".my_help_conf.yml"),
16
16
  editor: ENV["EDITOR"] || "emacs",
17
17
  ext: ".org",
18
18
  verbose: false,
data/lib/my_help/list.rb CHANGED
@@ -8,7 +8,7 @@ module MyHelp
8
8
  def initialize(path = "", ext = ".org", layer = 1)
9
9
  @path = path
10
10
  @ext = ext
11
- p @layer = layer
11
+ @layer = layer
12
12
  end
13
13
 
14
14
  def list(help_options = "", level = 0)
@@ -34,8 +34,10 @@ module MyHelp
34
34
  Dir.glob(files).inject("") do |out, file|
35
35
  # p [out, file]
36
36
  help_info = read_help(file)
37
- out << "%10s: %s\n" % [help_info[:name],
38
- help_info[:items]["head"].split("\n")[0]]
37
+ head = help_info[:items]["head"] ?
38
+ help_info[:items]["head"].split("\n")[0] :
39
+ ''
40
+ out << "%10s: %s\n" % [help_info[:name], head]
39
41
  end
40
42
  end
41
43
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MyHelp
4
- VERSION = "1.2.2"
4
+ VERSION = "1.2.3"
5
5
  end
@@ -1,9 +1,7 @@
1
1
  #+STARTUP: indent nolineimages overview
2
- * head
3
- - help_title example
4
- * license
5
- - cc by Shigeto R. Nishitani, 2016-22
2
+ * head: help_title example
3
+ * license: cc by Shigeto R. Nishitani, 2016-23
6
4
  * a_item : item_short_description
7
5
  - content_a
8
6
  * b_item
9
- - content_b
7
+ - content_b
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: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shigeto R. Nishiani
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-01-07 00:00:00.000000000 Z
11
+ date: 2023-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -107,34 +107,6 @@ files:
107
107
  - README_j.org
108
108
  - Rakefile
109
109
  - development_memo.org
110
- - doc/MyHelp.html
111
- - doc/MyHelp/CLI.html
112
- - doc/MyHelp/Config.html
113
- - doc/MyHelp/Control.html
114
- - doc/MyHelp/Error.html
115
- - doc/MyHelp/GetConfig.html
116
- - doc/MyHelp/Git.html
117
- - doc/MyHelp/Init.html
118
- - doc/MyHelp/List.html
119
- - doc/MyHelp/Md2Hash.html
120
- - doc/MyHelp/Modify.html
121
- - doc/MyHelp/Org2Hash.html
122
- - doc/Org2Yaml.html
123
- - doc/OrgToYaml.html
124
- - doc/_index.html
125
- - doc/class_list.html
126
- - doc/css/common.css
127
- - doc/css/full_list.css
128
- - doc/css/style.css
129
- - doc/file.README.html
130
- - doc/file_list.html
131
- - doc/frames.html
132
- - doc/index.html
133
- - doc/js/app.js
134
- - doc/js/full_list.js
135
- - doc/js/jquery.js
136
- - doc/method_list.html
137
- - doc/top-level-namespace.html
138
110
  - exe/my_help
139
111
  - lib/my_help.rb
140
112
  - lib/my_help/cli.rb