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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 052c2d9a3c7a88df4edd8a75173aabe9148b6102774402aaa7b07597afe91326
4
- data.tar.gz: 32afdbc0de57463c5a0714558f2abca31b96ff43873623baac008b8681d21db2
3
+ metadata.gz: 481e1331821875953629a6cac3c704b9867047f8d33cbc0d84c21037ec34ddc0
4
+ data.tar.gz: 9bb8ef3c6c1e1614a9c144e3ff299f824e0c3dc9804ca3c24b616dad35877f76
5
5
  SHA512:
6
- metadata.gz: 69f92f2bc0fd2ec8931121c528b8aa81a5336124e81071f79075760fb7afe37216c8c270f0ccaed771b3caf2e048ec2628c09110be2497ea7d7ece1bdb3ce60d
7
- data.tar.gz: 0634315a52af0fa1de48d66af87d068d003d4eedddffc083fcac9a8df9fb9c58d4d7a51d6a1787d19821990b69dce8bafef6edb8859fda1215cc7cbd4d2ce773
6
+ metadata.gz: dc6339585ffc0a60610e279b0745dc3a9c74b5bb19df18025c20c92c2e1061aee36b9deac84fb4dba69b718b8eab0f9d036419baed3221d3fa45b4634315ee2d
7
+ data.tar.gz: '09ded021e3375c1a0414d75ca181d8f8310539f536dae6ab844941c4f0418bed522dff163768a10afa6c0e957ddfac55252d6f355f0e2e928a3487a2bf65b547'
@@ -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
@@ -1,3 +1,3 @@
1
1
  class Hiiro
2
- VERSION = "0.1.207"
2
+ VERSION = "0.1.208"
3
3
  end
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.207
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