Skip to content

Commit

Permalink
Initial commit CLI framwork generation
Browse files Browse the repository at this point in the history
  • Loading branch information
MartyGentillon committed Apr 14, 2018
0 parents commit 2057d4b
Show file tree
Hide file tree
Showing 10 changed files with 153 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.DS_Store
results.html
pkg
html
.history/
*.bak
*.bak2
7 changes: 7 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"default": true,
"header-increment": false,
"line-length": false,
"no-reversed-links": true,
"no-trailing-punctuation": false
}
6 changes: 6 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source "https://rubygems.org"

git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }

# Specify your gem's dependencies in lmt.gemspec
gemspec
51 changes: 51 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
def dump_load_path
puts $LOAD_PATH.join("\n")
found = nil
$LOAD_PATH.each do |path|
if File.exists?(File.join(path,"rspec"))
puts "Found rspec in #{path}"
if File.exists?(File.join(path,"rspec","core"))
puts "Found core"
if File.exists?(File.join(path,"rspec","core","rake_task"))
puts "Found rake_task"
found = path
else
puts "!! no rake_task"
end
else
puts "!!! no core"
end
end
end
if found.nil?
puts "Didn't find rspec/core/rake_task anywhere"
else
puts "Found in #{path}"
end
end
require 'bundler'
require 'rake/clean'

require 'rake/testtask'

gem 'rdoc' # we need the installed RDoc gem, not the system one
require 'rdoc/task'

include Rake::DSL

Bundler::GemHelper.install_tasks


Rake::TestTask.new do |t|
t.pattern = 'test/tc_*.rb'
end

Rake::RDocTask.new do |rd|

rd.main = "README.rdoc"

rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*")
end

task :default => [:test]

20 changes: 20 additions & 0 deletions bin/console
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env ruby
# Encoding: utf-8

require "bundler/setup"
require "lmt"
load File.expand_path(File.dirname(__FILE__) + '/lmt')

# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.
tangle = nil

def make_tangle()
tangle = App::Tangler.new("src/lmt.lmd")
end


# (If you use this, don't forget to add pry to your Gemfile!)
require "pry"
Pry.start

8 changes: 8 additions & 0 deletions bin/setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
set -vx

bundle install

# Do any other automated setup that you need to do here
5 changes: 5 additions & 0 deletions lib/lmt.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
require "lmt/version"

module Lmt
# Your code goes here...
end
3 changes: 3 additions & 0 deletions lib/lmt/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module Lmt
VERSION = "0.1.0"
end
39 changes: 39 additions & 0 deletions lmt.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

lib = File.expand_path("../lib", __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "lmt/version"

Gem::Specification.new do |spec|
spec.name = "lmt"
spec.license = ""
spec.version = Lmt::VERSION
spec.authors = ["Marty Gentillon"]
spec.email = ["marty.gentillon@gmail.com"]

spec.summary = %q{A literate tangler written in Ruby for use with MarkDown.}
spec.description = %q{A literate tangler written in Ruby for use with MarkDown.}
spec.homepage = ""

# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
# to allow pushing to a single host or delete this section to allow pushing to any host.
if spec.respond_to?(:metadata)
spec.metadata["allowed_push_host"] = "http://mygemserver.com"
else
raise "RubyGems 2.0 or newer is required to protect against " \
"public gem pushes."
end

spec.files = `git ls-files -z`.split("\x0").reject do |f|
f.match(%r{^(test|spec|features)/})
end
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_development_dependency "bundler", "~> 1.16"
spec.add_development_dependency "rake", "~> 10.0"
spec.add_development_dependency('rdoc')
spec.add_development_dependency('pry')
spec.add_dependency('methadone', '~> 1.9.5')
spec.add_development_dependency('test-unit')
end
7 changes: 7 additions & 0 deletions test/tc_something.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require 'test/unit'

class TestSomething < Test::Unit::TestCase
def test_truth
assert true
end
end

0 comments on commit 2057d4b

Please sign in to comment.