Skip to content

Commit

Permalink
Add command line stub and gemfile
Browse files Browse the repository at this point in the history
  • Loading branch information
copyhacker committed Apr 17, 2014
1 parent 58eb5fc commit 2928894
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Gemfile.lock
*.gem
*.rbc
.bundle
Expand Down
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
source "https://rubygems.org"
gemspec
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Comb your gems for licensing info and collate it nicely for the lawyers.

1. Command line or rake task
2. Read the Gemfile(.lock)
4. Hit rubygems for info on each gem
4. Hit rubygems and/or GitHub for info on each gem
4. Pull all that into a hash:
- name
- version?
Expand Down
5 changes: 5 additions & 0 deletions bin/diligent
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env ruby

require 'diligent/cli'

Diligent::CLI.start(ARGV)
3 changes: 3 additions & 0 deletions diligent.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ Gem::Specification.new do |s|
s.authors = [ "Jonathan Vaught" ]
s.email = '[email protected]'
s.files = `git ls-files`.split("\n")
s.executables = [ "diligent" ]
s.test_files = `git ls-files -- spec/*`.split("\n")
s.require_paths = [ "lib" ]
s.homepage =
'https://github.com/copyhacker/diligent'
s.license = 'MIT'

s.add_runtime_dependency 'thor', '~> 0'
end
11 changes: 11 additions & 0 deletions lib/diligent/cli.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
require 'thor'
require 'diligent'

module Diligent
class CLI < Thor
desc 'legalese', 'If you can read this, thank a lawyer.'
def legalese
puts Diligent::Info.legalese
end
end
end

0 comments on commit 2928894

Please sign in to comment.