Sha256: 823d30ecf47f3d36886c88d9e2f78b02125371fbd8e9d661d467175467eff85d
Contents?: true
Size: 1.6 KB
Versions: 3
Compression:
Stored size: 1.6 KB
Contents
#!/usr/bin/env ruby18 # # Description # # Author:: Robert Sharp # Copyright:: Copyright (c) 2010 Robert Sharp # License:: Open Software Licence v3.0 # # This software is licensed for use under the Open Software Licence v. 3.0 # The terms of this licence can be found at http://www.opensource.org/licenses/osl-3.0.php # and in the file copyright.txt. Under the terms of this licence, all derivative works # must themselves be licensed under the Open Software Licence v. 3.0 # # # replace this to point to your config class # require 'my_jeckyl_configurator' require 'rubygems' # delves into gem spec to find readme require 'thor' require 'colored' class JellogCLI < Thor default_task :usage desc "usage", "You are looking at it" def usage puts "Assistance with Jellog." puts "" help puts "" puts "See Also:" puts " README.md: (see jelloga readme above)" puts " GitHub: https://github.com/osburn-sharp/jellog" puts " RubyDoc: http://rdoc.info/github/osburn-sharp/jellog/frames" end desc "readme", "display the readme file for the gem" def readme gem_spec = Gem::Specification.find_by_name('jellog') readme_path = File.join(gem_spec.gem_dir, 'README.md') unless FileTest.exists?(readme_path) puts "Cannot find a readme file to show you. Try GitHub?".red invoke :usage return 0 end File.open(readme_path) do |rfile| rfile.each_line do |rline| puts rline end end rescue Gem::LoadError puts "Cannot find the gem for jellog, try GitHub for the README file.".red invoke :usage end end JellogCLI.start
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
jellog-1.0.14 | bin/jellog |
jellog-1.0.13 | bin/jellog |
jellog-1.0.11 | bin/jellog |