hiiro 0.1.207 → 0.1.208
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/lib/hiiro/config.rb +33 -0
- data/lib/hiiro/version.rb +1 -1
- data/lib/hiiro.rb +1 -26
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 481e1331821875953629a6cac3c704b9867047f8d33cbc0d84c21037ec34ddc0
|
|
4
|
+
data.tar.gz: 9bb8ef3c6c1e1614a9c144e3ff299f824e0c3dc9804ca3c24b616dad35877f76
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dc6339585ffc0a60610e279b0745dc3a9c74b5bb19df18025c20c92c2e1061aee36b9deac84fb4dba69b718b8eab0f9d036419baed3221d3fa45b4634315ee2d
|
|
7
|
+
data.tar.gz: '09ded021e3375c1a0414d75ca181d8f8310539f536dae6ab844941c4f0418bed522dff163768a10afa6c0e957ddfac55252d6f355f0e2e928a3487a2bf65b547'
|
data/lib/hiiro/config.rb
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
class Hiiro
|
|
2
|
+
class Config
|
|
3
|
+
BASE_DIR = File.join(Dir.home, '.config/hiiro')
|
|
4
|
+
|
|
5
|
+
class << self
|
|
6
|
+
def path(relpath='')
|
|
7
|
+
File.join(BASE_DIR, relpath)
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def plugin_files
|
|
11
|
+
user_files = Dir.glob(File.join(plugin_dir, '*.rb'))
|
|
12
|
+
user_basenames = user_files.map { |f| File.basename(f) }
|
|
13
|
+
|
|
14
|
+
gem_plugin_dir = File.join(File.expand_path('../..', __FILE__), 'plugins')
|
|
15
|
+
gem_files = Dir.exist?(gem_plugin_dir) ? Dir.glob(File.join(gem_plugin_dir, '*.rb')) : []
|
|
16
|
+
|
|
17
|
+
fallback_files = gem_files.reject { |f| user_basenames.include?(File.basename(f)) }
|
|
18
|
+
|
|
19
|
+
user_files + fallback_files
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def plugin_dir
|
|
23
|
+
config_dir('plugins')
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def config_dir(subdir=nil)
|
|
27
|
+
File.join(Dir.home, '.config/hiiro', *[subdir].compact).tap do |config_path|
|
|
28
|
+
FileUtils.mkdir_p(config_path) unless Dir.exist?(config_path)
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
data/lib/hiiro/version.rb
CHANGED
data/lib/hiiro.rb
CHANGED
|
@@ -5,6 +5,7 @@ require "pry"
|
|
|
5
5
|
require "ostruct"
|
|
6
6
|
|
|
7
7
|
require_relative "hiiro/version"
|
|
8
|
+
require_relative "hiiro/config"
|
|
8
9
|
require_relative "hiiro/bins"
|
|
9
10
|
require_relative "hiiro/fuzzyfind"
|
|
10
11
|
require_relative "hiiro/git"
|
|
@@ -405,32 +406,6 @@ class Hiiro
|
|
|
405
406
|
runner&.values&.[](name)
|
|
406
407
|
end
|
|
407
408
|
|
|
408
|
-
class Config
|
|
409
|
-
class << self
|
|
410
|
-
def plugin_files
|
|
411
|
-
user_files = Dir.glob(File.join(plugin_dir, '*.rb'))
|
|
412
|
-
user_basenames = user_files.map { |f| File.basename(f) }
|
|
413
|
-
|
|
414
|
-
gem_plugin_dir = File.join(File.expand_path('../..', __FILE__), 'plugins')
|
|
415
|
-
gem_files = Dir.exist?(gem_plugin_dir) ? Dir.glob(File.join(gem_plugin_dir, '*.rb')) : []
|
|
416
|
-
|
|
417
|
-
fallback_files = gem_files.reject { |f| user_basenames.include?(File.basename(f)) }
|
|
418
|
-
|
|
419
|
-
user_files + fallback_files
|
|
420
|
-
end
|
|
421
|
-
|
|
422
|
-
def plugin_dir
|
|
423
|
-
config_dir('plugins')
|
|
424
|
-
end
|
|
425
|
-
|
|
426
|
-
def config_dir(subdir=nil)
|
|
427
|
-
File.join(Dir.home, '.config/hiiro', *[subdir].compact).tap do |config_path|
|
|
428
|
-
FileUtils.mkdir_p(config_path) unless Dir.exist?(config_path)
|
|
429
|
-
end
|
|
430
|
-
end
|
|
431
|
-
end
|
|
432
|
-
end
|
|
433
|
-
|
|
434
409
|
def default_subcommand
|
|
435
410
|
Runners::Subcommand.new(
|
|
436
411
|
bin_name,
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hiiro
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.208
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Joshua Toyota
|
|
@@ -136,6 +136,7 @@ files:
|
|
|
136
136
|
- lib/hiiro.rb
|
|
137
137
|
- lib/hiiro/app_files.rb
|
|
138
138
|
- lib/hiiro/bins.rb
|
|
139
|
+
- lib/hiiro/config.rb
|
|
139
140
|
- lib/hiiro/fuzzyfind.rb
|
|
140
141
|
- lib/hiiro/git.rb
|
|
141
142
|
- lib/hiiro/git/branch.rb
|