arli 0.2.1
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 +7 -0
- data/.gitignore +16 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/Gemfile +5 -0
- data/LICENSE.txt +21 -0
- data/README.md +91 -0
- data/Rakefile +6 -0
- data/arli.gemspec +40 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/exe/arli +9 -0
- data/lib/arli.rb +10 -0
- data/lib/arli/app.rb +46 -0
- data/lib/arli/cli.rb +147 -0
- data/lib/arli/commands/install.rb +51 -0
- data/lib/arli/parser.rb +84 -0
- data/lib/arli/version.rb +3 -0
- metadata +164 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 43e1909fb095e1501d093f53991d7272281c9bb5
|
4
|
+
data.tar.gz: ade74d5c96106dc1e1bea96716332fcdbe7648b8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4c9daf3b81b26a8ce323b03f71d14f70523566a6cf39cf29a1292a64f60f8812c5b819414542e43c0fac8c482a756b219f23fec025b8a1ce46efc2ad36a8fd5e
|
7
|
+
data.tar.gz: d5f564e8272beead7287ebd6b773456ecb42a02af44a61e3ab2a935a33805517390678dc4ae992fadd2f6ade61f71cd79ddfa0c0ebac4756cdf3c3da06d36513
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Konstantin Gredeskoul
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
[](https://travis-ci.org/kigster/arli)
|
2
|
+
|
3
|
+
# Arli
|
4
|
+
|
5
|
+
Arli is a simple and easy to use installer of dependencies that can be
|
6
|
+
declared in a JSON file of the following format:
|
7
|
+
|
8
|
+
|
9
|
+
```json
|
10
|
+
{
|
11
|
+
"dependencies": [
|
12
|
+
{
|
13
|
+
"name": "DS1307RTC",
|
14
|
+
"git": "https://github.com/PaulStoffregen/DS1307RTC.git"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"name": "Adafruit_LEDBackpack",
|
18
|
+
"git": "https://github.com/adafruit/Adafruit-LED-Backpack-Library.git"
|
19
|
+
},
|
20
|
+
]
|
21
|
+
}
|
22
|
+
```
|
23
|
+
|
24
|
+
Basically a simple pairing of a library/project name (which also happens to be the local
|
25
|
+
directory it's cloned into) and a remote URL.
|
26
|
+
|
27
|
+
The gem was created to fill the need of managing many external libraries for an Arduino projects
|
28
|
+
in a consistent way. Arli's API was loosely inspired by Bundler.
|
29
|
+
|
30
|
+
## Installation
|
31
|
+
|
32
|
+
Install the gem globally like this:
|
33
|
+
|
34
|
+
```bash
|
35
|
+
# if using rbenv, or rvm
|
36
|
+
$ gem install arli
|
37
|
+
|
38
|
+
# OR, if your Ruby is a system ruby installed in eg. /usr/local,
|
39
|
+
$ sudo gem install arli
|
40
|
+
```
|
41
|
+
|
42
|
+
## Usage
|
43
|
+
|
44
|
+
Run `arli --help` for more information:
|
45
|
+
|
46
|
+
```
|
47
|
+
Usage:
|
48
|
+
arli [options] [command [options]]
|
49
|
+
|
50
|
+
-L, --lib-home HOME Specify a local directory where libraries are installed
|
51
|
+
-h, --help prints this help
|
52
|
+
|
53
|
+
Available Commands:
|
54
|
+
install : installs libraries defined in the JSON file
|
55
|
+
update : updates libraries defined in the JSON file
|
56
|
+
library : Install, update, or remove a single library
|
57
|
+
|
58
|
+
See arli <command> --help for more information on a specific command.
|
59
|
+
```
|
60
|
+
|
61
|
+
#### Install Command
|
62
|
+
|
63
|
+
`install` is currently the only implemented command, and it should be used as follows:
|
64
|
+
|
65
|
+
```
|
66
|
+
Description:
|
67
|
+
installs libraries defined in the JSON file
|
68
|
+
|
69
|
+
Usage:
|
70
|
+
arli install [options]
|
71
|
+
|
72
|
+
Command Options
|
73
|
+
-L, --lib-home HOME Specify a local directory where libraries are installed
|
74
|
+
-a, --arli-json FILE JSON file with dependencies (defaults to arli.json)
|
75
|
+
-h, --help prints this help
|
76
|
+
```
|
77
|
+
|
78
|
+
|
79
|
+
## Development
|
80
|
+
|
81
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
82
|
+
|
83
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
84
|
+
|
85
|
+
## Contributing
|
86
|
+
|
87
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/kigster/arli.
|
88
|
+
|
89
|
+
## License
|
90
|
+
|
91
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/arli.gemspec
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
lib = File.expand_path('../lib', __FILE__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'arli/version'
|
6
|
+
|
7
|
+
Arli::DESCRIPTION = <<-eof
|
8
|
+
This is a command-line installer of any number of dependent Github
|
9
|
+
projects, or libraries. Arli was created to offer Arduino-based projects
|
10
|
+
an easy to use and consistent library manager.
|
11
|
+
eof
|
12
|
+
|
13
|
+
Gem::Specification.new do |spec|
|
14
|
+
spec.name = 'arli'
|
15
|
+
spec.version = Arli::VERSION
|
16
|
+
spec.authors = ['Konstantin Gredeskoul']
|
17
|
+
spec.email = ['kigster@gmail.com']
|
18
|
+
|
19
|
+
spec.summary = Arli::DESCRIPTION
|
20
|
+
spec.description = Arli::DESCRIPTION
|
21
|
+
spec.homepage = 'https://github.com/kigster/arli'
|
22
|
+
spec.license = 'MIT'
|
23
|
+
|
24
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
25
|
+
f.match(%r{^(test|spec|features)/})
|
26
|
+
end
|
27
|
+
spec.bindir = 'exe'
|
28
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
29
|
+
spec.require_paths = ['lib']
|
30
|
+
|
31
|
+
spec.add_dependency 'hashie'
|
32
|
+
spec.add_dependency 'colored2'
|
33
|
+
|
34
|
+
|
35
|
+
spec.add_development_dependency 'simplecov'
|
36
|
+
spec.add_development_dependency 'bundler', '~> 1.15'
|
37
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
38
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
39
|
+
spec.add_development_dependency 'rspec-its'
|
40
|
+
end
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "arli"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/exe/arli
ADDED
data/lib/arli.rb
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'arli/version'
|
2
|
+
require 'arli/cli'
|
3
|
+
|
4
|
+
module Arli
|
5
|
+
DEFAULT_JSON_FILE_ENV = 'ARDUINO_ARLI_LIBRARY_FILE'.freeze
|
6
|
+
DEFAULT_JSON_FILE = ENV[DEFAULT_JSON_FILE_ENV] || 'arli.json'.freeze
|
7
|
+
|
8
|
+
DEFAULT_LIBRARY_PATH_ENV = 'ARDUINO_CUSTOM_LIBRARY_PATH'.freeze
|
9
|
+
DEFAULT_LIBRARY_PATH = ENV[DEFAULT_LIBRARY_PATH_ENV] || (ENV['HOME'] + '/Documents/Arduino/Libraries')
|
10
|
+
end
|
data/lib/arli/app.rb
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
require 'colored2'
|
2
|
+
require 'optparse'
|
3
|
+
require 'hashie/mash'
|
4
|
+
require 'saves/cli/parser'
|
5
|
+
require 'forwardable'
|
6
|
+
module Saves
|
7
|
+
module CLI
|
8
|
+
class App
|
9
|
+
extend Forwardable
|
10
|
+
def_delegators :@parser, :options, :output
|
11
|
+
|
12
|
+
attr_accessor :args, :command, :parser, :options, :output
|
13
|
+
|
14
|
+
def initialize(args)
|
15
|
+
if args.nil? || args.empty?
|
16
|
+
self.args = %w[--help]
|
17
|
+
else
|
18
|
+
self.args = args.dup
|
19
|
+
end
|
20
|
+
|
21
|
+
self.parser = ::Saves::CLI::Parser
|
22
|
+
self.options = parser.options
|
23
|
+
self.output = parser.output
|
24
|
+
end
|
25
|
+
|
26
|
+
def parse!
|
27
|
+
if args.first =~ /^-/
|
28
|
+
parser.global.parse!(args)
|
29
|
+
else
|
30
|
+
cmd = self.args.shift.to_sym
|
31
|
+
begin
|
32
|
+
Parser.parser_for(cmd).parse!(args)
|
33
|
+
self.command = cmd # did not raise exception, so valid command.
|
34
|
+
rescue Saves::CLI::InvalidCommandError => e
|
35
|
+
options[:errors] = [e.message]
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def out
|
41
|
+
output.join("\n")
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
data/lib/arli/cli.rb
ADDED
@@ -0,0 +1,147 @@
|
|
1
|
+
require 'optparse'
|
2
|
+
require 'hashie/mash'
|
3
|
+
require 'hashie/extensions/symbolize_keys'
|
4
|
+
require 'colored2'
|
5
|
+
require 'arli'
|
6
|
+
require 'arli/parser'
|
7
|
+
require 'arli/commands/install'
|
8
|
+
|
9
|
+
module Arli
|
10
|
+
class CLI
|
11
|
+
class InvalidCommandError < ArgumentError;
|
12
|
+
end
|
13
|
+
|
14
|
+
COMMAND = 'arli'
|
15
|
+
PARSER = ::Arli::CLI::Parser
|
16
|
+
|
17
|
+
attr_accessor :argv, :command, :parser
|
18
|
+
attr_accessor :options
|
19
|
+
|
20
|
+
def initialize(argv = ARGV.dup)
|
21
|
+
self.argv = argv
|
22
|
+
self.options = Hashie::Mash.new
|
23
|
+
end
|
24
|
+
|
25
|
+
def parse
|
26
|
+
if argv.first
|
27
|
+
if argv.first =~ /^-.*$/
|
28
|
+
self.parser = self.class.global
|
29
|
+
elsif command_detected?
|
30
|
+
self.parser = parse_command_options!
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
if parser
|
35
|
+
parser.parse!(argv)
|
36
|
+
parser.print
|
37
|
+
options.merge!(parser.options)
|
38
|
+
end
|
39
|
+
|
40
|
+
@options = Hashie::Extensions::SymbolizeKeys.symbolize_keys!(options.to_h)
|
41
|
+
|
42
|
+
run_command! unless options[:help]
|
43
|
+
|
44
|
+
rescue InvalidCommandError => e
|
45
|
+
puts e.message
|
46
|
+
end
|
47
|
+
|
48
|
+
private
|
49
|
+
|
50
|
+
def run_command!
|
51
|
+
if command
|
52
|
+
command_class = ::Arli::Commands.const_get(command.to_s.capitalize)
|
53
|
+
|
54
|
+
options[:arli_json] ||= ::Arli::DEFAULT_JSON_FILE
|
55
|
+
options[:lib_home] ||= ::Arli::DEFAULT_LIBRARY_PATH
|
56
|
+
|
57
|
+
command_class.new(options).run
|
58
|
+
end
|
59
|
+
rescue NameError => e
|
60
|
+
puts "Unfortunately command #{command.to_s.red} is not yet implemented.\n\n"
|
61
|
+
end
|
62
|
+
|
63
|
+
def parse_command_options!
|
64
|
+
self.class.parser_for(command)
|
65
|
+
end
|
66
|
+
|
67
|
+
def command_detected?
|
68
|
+
self.command = argv.shift if argv.first && argv.first !~ /^-.*$/
|
69
|
+
if self.command
|
70
|
+
self.command = command.to_sym
|
71
|
+
unless self.class.commands.key?(command)
|
72
|
+
raise InvalidCommandError, "Error: #{command ? command.to_s.bold.red : 'nil'} is not a valid arli command!"
|
73
|
+
end
|
74
|
+
end
|
75
|
+
self.command
|
76
|
+
end
|
77
|
+
|
78
|
+
class << self
|
79
|
+
|
80
|
+
def global
|
81
|
+
@global ||= PARSER.new do |parser|
|
82
|
+
parser.banner = usage_line
|
83
|
+
parser.sep
|
84
|
+
parser.option_help(commands: true)
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
def usage_line(command = nil)
|
89
|
+
command ? command_usage(command) : global_usage(command)
|
90
|
+
end
|
91
|
+
|
92
|
+
def global_usage(command)
|
93
|
+
"Usage:\n ".bold + COMMAND.bold.blue + ' ' + '[options] '.yellow + '[' + (command || 'command').green + ' [options]'.yellow + ']' + "\n"
|
94
|
+
end
|
95
|
+
|
96
|
+
def command_usage(command)
|
97
|
+
"Usage:\n ".bold + COMMAND.bold.blue + ' ' + command.bold.green + ' [options]'.yellow + "\n\n" + 'Command Options'.bold
|
98
|
+
end
|
99
|
+
|
100
|
+
def commands
|
101
|
+
@commands ||= {
|
102
|
+
install: {
|
103
|
+
description: 'installs libraries defined in the JSON file',
|
104
|
+
parser: -> (command) {
|
105
|
+
PARSER.new do |parser|
|
106
|
+
parser.banner = usage_line 'install'
|
107
|
+
parser.option_lib_home
|
108
|
+
parser.option_dependency_file
|
109
|
+
parser.option_help(command: command)
|
110
|
+
end
|
111
|
+
} },
|
112
|
+
|
113
|
+
update: {
|
114
|
+
description: 'updates libraries defined in the JSON file',
|
115
|
+
parser: -> (command) {
|
116
|
+
PARSER.new do |parser|
|
117
|
+
parser.banner = usage_line 'update'
|
118
|
+
parser.option_lib_home
|
119
|
+
parser.option_dependency_file
|
120
|
+
parser.option_help(command: command)
|
121
|
+
end
|
122
|
+
} },
|
123
|
+
|
124
|
+
library: {
|
125
|
+
description: 'Install, update, or remove a single library',
|
126
|
+
parser: -> (command) {
|
127
|
+
PARSER.new do |parser|
|
128
|
+
parser.banner = usage_line 'library'
|
129
|
+
parser.option_lib_home
|
130
|
+
parser.option_library
|
131
|
+
parser.option_help(command: command)
|
132
|
+
end
|
133
|
+
} }
|
134
|
+
}
|
135
|
+
end
|
136
|
+
|
137
|
+
def parser_for(cmd)
|
138
|
+
if commands[cmd]
|
139
|
+
cmd_hash = commands[cmd]
|
140
|
+
commands[cmd][:parser][cmd_hash]
|
141
|
+
else
|
142
|
+
raise(InvalidCommandError, "'#{cmd}' is not a valid command.\nSupported commands are:\n\t#{commands.keys.join("\n\t")}")
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'json'
|
2
|
+
require 'fileutils'
|
3
|
+
require 'open3'
|
4
|
+
require 'arli'
|
5
|
+
|
6
|
+
module Arli
|
7
|
+
module Commands
|
8
|
+
|
9
|
+
class Install
|
10
|
+
attr_accessor :lib_path, :json_file
|
11
|
+
|
12
|
+
def initialize(options)
|
13
|
+
|
14
|
+
self.lib_path = options[:lib_home]
|
15
|
+
self.json_file = options[:arli_json]
|
16
|
+
|
17
|
+
setup
|
18
|
+
end
|
19
|
+
|
20
|
+
def run
|
21
|
+
libs = JSON.load(File.read(json_file))
|
22
|
+
puts "Installing into #{lib_path.bold.green}"
|
23
|
+
|
24
|
+
Dir.chdir(lib_path) do
|
25
|
+
libs['dependencies'].each do |dependency|
|
26
|
+
name = dependency['name']
|
27
|
+
url = dependency['git']
|
28
|
+
printf 'processing library: ' + name.yellow.bold + "\n"
|
29
|
+
unless Dir.exist?(name)
|
30
|
+
cmd = "git clone -v #{url} #{name} 2>&1"
|
31
|
+
else
|
32
|
+
cmd = "cd #{name} && git pull --rebase 2>&1"
|
33
|
+
end
|
34
|
+
puts 'command: ' + cmd.bold.blue
|
35
|
+
o, e, s = Open3.capture3(cmd)
|
36
|
+
puts o if o
|
37
|
+
puts e.red if e
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
private
|
43
|
+
|
44
|
+
def setup
|
45
|
+
FileUtils.mkdir_p(lib_path)
|
46
|
+
yield self if block_given?
|
47
|
+
self
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
data/lib/arli/parser.rb
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
module Arli
|
2
|
+
class CLI
|
3
|
+
class Parser < OptionParser
|
4
|
+
attr_accessor :output_lines, :command, :options
|
5
|
+
|
6
|
+
def initialize(command = nil)
|
7
|
+
super
|
8
|
+
self.output_lines = Array.new
|
9
|
+
self.command = command
|
10
|
+
self.options = Hashie::Mash.new
|
11
|
+
|
12
|
+
end
|
13
|
+
|
14
|
+
def sep(text = nil)
|
15
|
+
separator text || ''
|
16
|
+
end
|
17
|
+
|
18
|
+
def option_dependency_file
|
19
|
+
on('-a FILE', '--arli-json FILE', "JSON file with dependencies (defaults to #{DEFAULT_JSON_FILE.bold.magenta})") { |v| options[:arli_json] = v }
|
20
|
+
end
|
21
|
+
|
22
|
+
def option_help(commands: false, command: nil)
|
23
|
+
on('-h', '--help', 'prints this help') do
|
24
|
+
puts 'Description:'.bold if command
|
25
|
+
output ' ' * 4 + command[:description].bold.green if command
|
26
|
+
output ''
|
27
|
+
output_help
|
28
|
+
output_command_help if commands
|
29
|
+
options[:help] = true
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def option_lib_home
|
34
|
+
on('-L', '--lib-home HOME', 'Specify a local directory where libraries are installed') { |v| options[:lib_home] = v }
|
35
|
+
end
|
36
|
+
|
37
|
+
def option_library
|
38
|
+
on('-l', '--lib LIBRARY', 'Library Name') { |v| options[:library_name] = v }
|
39
|
+
on('-f', '--from FROM', 'A git or https URL') { |v| options[:library_from] = v }
|
40
|
+
on('-v', '--version VERSION', 'Library Version, i.e. git tag') { |v| options[:library_version] = v }
|
41
|
+
on('-i', '--install', 'Install a library') { |v| options[:library_action] = :install }
|
42
|
+
on('-r', '--remove', 'Remove a library') { |v| options[:library_action] = :remove }
|
43
|
+
on('-u', '--update', 'Update a local library') { |v| options[:library_action] = :update }
|
44
|
+
end
|
45
|
+
|
46
|
+
def option_help_with_subtext
|
47
|
+
option_help
|
48
|
+
end
|
49
|
+
|
50
|
+
def output_help
|
51
|
+
output self.to_s
|
52
|
+
end
|
53
|
+
|
54
|
+
def output_command_help
|
55
|
+
output command_help
|
56
|
+
end
|
57
|
+
|
58
|
+
def command_help
|
59
|
+
subtext = " Available Commands:\n"
|
60
|
+
|
61
|
+
::Arli::CLI.commands.each_pair do |command, config|
|
62
|
+
subtext << <<-EOS
|
63
|
+
#{sprintf(' %-12s', command.to_s).green} : #{sprintf('%-70s', config[:description]).yellow}
|
64
|
+
EOS
|
65
|
+
end
|
66
|
+
subtext << <<-EOS
|
67
|
+
|
68
|
+
See #{COMMAND.bold.blue + ' <command> '.bold.green + '--help'.bold.yellow} for more information on a specific command.
|
69
|
+
|
70
|
+
EOS
|
71
|
+
subtext
|
72
|
+
end
|
73
|
+
|
74
|
+
def output(value = nil)
|
75
|
+
self.output_lines << value if value
|
76
|
+
self.output_lines
|
77
|
+
end
|
78
|
+
|
79
|
+
def print
|
80
|
+
puts output.join("\n")
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
data/lib/arli/version.rb
ADDED
metadata
ADDED
@@ -0,0 +1,164 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: arli
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Konstantin Gredeskoul
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-10-21 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: hashie
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: colored2
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: simplecov
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.15'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.15'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '10.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '10.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '3.0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '3.0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rspec-its
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
description: " This is a command-line installer of any number of dependent Github\n
|
112
|
+
\ projects, or libraries. Arli was created to offer Arduino-based projects \n an
|
113
|
+
easy to use and consistent library manager.\n"
|
114
|
+
email:
|
115
|
+
- kigster@gmail.com
|
116
|
+
executables:
|
117
|
+
- arli
|
118
|
+
extensions: []
|
119
|
+
extra_rdoc_files: []
|
120
|
+
files:
|
121
|
+
- ".gitignore"
|
122
|
+
- ".rspec"
|
123
|
+
- ".travis.yml"
|
124
|
+
- Gemfile
|
125
|
+
- LICENSE.txt
|
126
|
+
- README.md
|
127
|
+
- Rakefile
|
128
|
+
- arli.gemspec
|
129
|
+
- bin/console
|
130
|
+
- bin/setup
|
131
|
+
- exe/arli
|
132
|
+
- lib/arli.rb
|
133
|
+
- lib/arli/app.rb
|
134
|
+
- lib/arli/cli.rb
|
135
|
+
- lib/arli/commands/install.rb
|
136
|
+
- lib/arli/parser.rb
|
137
|
+
- lib/arli/version.rb
|
138
|
+
homepage: https://github.com/kigster/arli
|
139
|
+
licenses:
|
140
|
+
- MIT
|
141
|
+
metadata: {}
|
142
|
+
post_install_message:
|
143
|
+
rdoc_options: []
|
144
|
+
require_paths:
|
145
|
+
- lib
|
146
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
147
|
+
requirements:
|
148
|
+
- - ">="
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '0'
|
151
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
152
|
+
requirements:
|
153
|
+
- - ">="
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
version: '0'
|
156
|
+
requirements: []
|
157
|
+
rubyforge_project:
|
158
|
+
rubygems_version: 2.6.11
|
159
|
+
signing_key:
|
160
|
+
specification_version: 4
|
161
|
+
summary: This is a command-line installer of any number of dependent Github projects,
|
162
|
+
or libraries. Arli was created to offer Arduino-based projects an easy to use and
|
163
|
+
consistent library manager.
|
164
|
+
test_files: []
|