-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add check runtime dependences, fix readme and yandex.gemspec
- Loading branch information
Showing
4 changed files
with
37 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
#!/usr/bin/env ruby | ||
|
||
# handle ARGV, and execute Yadisk::Main class | ||
|
||
require 'yadisk' | ||
require 'yadisk/check_runtime' | ||
|
||
Yadisk::CheckRuntime.check_wget |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
require "io/console" | ||
|
||
module Yadisk | ||
class CheckRuntime | ||
def self.check_wget | ||
output = IO.popen("which wget").read | ||
if output.empty? | ||
puts "Please install wget or add it to 'PATH' and try again\n" | ||
abort | ||
end | ||
end | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,15 +5,16 @@ require_relative 'lib/yadisk/version' | |
|
||
Gem::Specification.new do |s| | ||
s.name = 'yadisk' | ||
s.version = Yadisk::VERSION # '0.0.1' | ||
s.version = Yadisk::VERSION | ||
s.date = '2018-01-25' | ||
s.summary = "Download file from Yandex.Disk through share link" | ||
s.description = "Command line tool for download file from Yandex.Disk through share link" | ||
s.author = "Artem Yegorov" | ||
s.email = '[email protected]' | ||
s.files = ["lib/yadisk.rb", "lib/yadisk/version.rb"] | ||
s.files = ["lib/yadisk.rb", "lib/yadisk/check_runtime.rb", "lib/yadisk/version.rb"] | ||
s.platform = Gem::Platform::RUBY | ||
s.executables << 'yadisk' | ||
s.add_development_dependency 'rspec', '~> 3.7.0' | ||
s.add_development_dependency 'rspec', ['~> 3.7.0', '< 4.0'] | ||
s.homepage = 'https://github.com/yegorov/yadisk' | ||
s.license = 'MIT' | ||
end | ||
|