-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gemfile
39 lines (31 loc) · 981 Bytes
/
Gemfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# frozen_string_literal: true
require 'yaml'
source "https://rubygems.org"
config_dir = File.join(Dir.home, '.cli')
yml_location = File.join(config_dir, 'config.yml')
if File.exist?(yml_location)
config_commands = YAML.load_file(yml_location)['commands']
config_commands.map do |command_options|
# puts command_options.inspect
case
when command_options['path']
path = File.join(config_dir, 'commands', command_options['name'])
# puts path
gem command_options['name'], path: path
when command_options['path_relative']
path = File.join(Dir.pwd, command_options['name'])
# puts path
gem command_options['name'], path: path
else
gem command_options['name']
end
end
else
puts "config not found skipping"
end
# Specify your gem's dependencies in cli.gemspec
gemspec
gem "rake", "~> 13.0"
gem "rspec", "~> 3.0"
gem "rubocop", "~> 1.21"
gem "cli_toolkit", "~> 0.1.0", path: '../cli_toolkit', require: false