methadone 1.0.0.rc5 → 1.0.0.rc6
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.
- data/lib/methadone/cli.rb +2 -0
- data/lib/methadone/cli_logging.rb +3 -0
- data/lib/methadone/cucumber.rb +1 -1
- data/lib/methadone/error.rb +8 -1
- data/lib/methadone/execution_strategy/jvm.rb +2 -0
- data/lib/methadone/execution_strategy/mri.rb +2 -0
- data/lib/methadone/execution_strategy/open_3.rb +2 -0
- data/lib/methadone/execution_strategy/open_4.rb +2 -0
- data/lib/methadone/execution_strategy/rbx_open_4.rb +2 -0
- data/lib/methadone/exit_now.rb +18 -3
- data/lib/methadone/main.rb +34 -6
- data/lib/methadone/process_status.rb +45 -0
- data/lib/methadone/sh.rb +52 -29
- data/lib/methadone/version.rb +1 -1
- data/methadone.gemspec +10 -0
- data/test/test_main.rb +20 -0
- data/test/test_sh.rb +104 -3
- metadata +23 -47
- data/tutorial/.vimrc +0 -6
- data/tutorial/1_intro.md +0 -52
- data/tutorial/2_bootstrap.md +0 -174
- data/tutorial/3_ui.md +0 -336
- data/tutorial/4_happy_path.md +0 -405
- data/tutorial/5_more_features.md +0 -693
- data/tutorial/6_refactor.md +0 -220
- data/tutorial/7_logging_debugging.md +0 -274
- data/tutorial/8_conclusion.md +0 -11
- data/tutorial/code/.rvmrc +0 -1
- data/tutorial/code/fullstop/.gitignore +0 -5
- data/tutorial/code/fullstop/Gemfile +0 -4
- data/tutorial/code/fullstop/LICENSE.txt +0 -202
- data/tutorial/code/fullstop/README.rdoc +0 -23
- data/tutorial/code/fullstop/Rakefile +0 -31
- data/tutorial/code/fullstop/bin/fullstop +0 -43
- data/tutorial/code/fullstop/features/fullstop.feature +0 -40
- data/tutorial/code/fullstop/features/step_definitions/fullstop_steps.rb +0 -64
- data/tutorial/code/fullstop/features/support/env.rb +0 -22
- data/tutorial/code/fullstop/fullstop.gemspec +0 -28
- data/tutorial/code/fullstop/lib/fullstop.rb +0 -2
- data/tutorial/code/fullstop/lib/fullstop/repo.rb +0 -38
- data/tutorial/code/fullstop/lib/fullstop/version.rb +0 -3
- data/tutorial/code/fullstop/test/tc_something.rb +0 -7
- data/tutorial/en.utf-8.add +0 -18
- data/tutorial/toc.md +0 -27
@@ -1,28 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
$:.push File.expand_path("../lib", __FILE__)
|
3
|
-
require "fullstop/version"
|
4
|
-
|
5
|
-
Gem::Specification.new do |s|
|
6
|
-
s.name = "fullstop"
|
7
|
-
s.version = Fullstop::VERSION
|
8
|
-
s.authors = ["Dave Copeland"]
|
9
|
-
s.email = ["davetron5000@gmail.com"]
|
10
|
-
s.homepage = ""
|
11
|
-
s.summary = %q{TODO: Write a gem summary}
|
12
|
-
s.description = %q{TODO: Write a gem description}
|
13
|
-
|
14
|
-
s.rubyforge_project = "fullstop"
|
15
|
-
|
16
|
-
s.files = `git ls-files`.split("\n")
|
17
|
-
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
|
-
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
|
-
s.require_paths = ["lib"]
|
20
|
-
|
21
|
-
# specify any dependencies here; for example:
|
22
|
-
# s.add_development_dependency "rspec"
|
23
|
-
# s.add_runtime_dependency "rest-client"
|
24
|
-
s.add_development_dependency('rdoc')
|
25
|
-
s.add_development_dependency('aruba')
|
26
|
-
s.add_development_dependency('rake','~> 0.9.2')
|
27
|
-
s.add_dependency('methadone', '1.0.0.rc2')
|
28
|
-
end
|
@@ -1,38 +0,0 @@
|
|
1
|
-
module Fullstop
|
2
|
-
class Repo
|
3
|
-
|
4
|
-
include Methadone::CLILogging
|
5
|
-
include Methadone::SH
|
6
|
-
include Methadone::ExitNow
|
7
|
-
|
8
|
-
def self.clone_from(repo_url,force=false)
|
9
|
-
repo_dir = repo_url.split(/\//)[-1].gsub(/\.git$/,'')
|
10
|
-
# vvv
|
11
|
-
debug "Cloning #{repo_url} into #{repo_dir}"
|
12
|
-
# ^^^
|
13
|
-
if force && Dir.exists?(repo_dir)
|
14
|
-
warn "deleting #{repo_dir} before cloning"
|
15
|
-
FileUtils.rm_rf repo_dir
|
16
|
-
end
|
17
|
-
unless sh("git clone #{repo_url}") == 0
|
18
|
-
exit_now!(1,"checkout dir already exists, use --force to overwrite")
|
19
|
-
end
|
20
|
-
Repo.new(repo_dir)
|
21
|
-
end
|
22
|
-
|
23
|
-
attr_reader :repo_dir
|
24
|
-
def initialize(repo_dir)
|
25
|
-
@repo_dir = repo_dir
|
26
|
-
end
|
27
|
-
|
28
|
-
def files
|
29
|
-
Dir.entries(@repo_dir).each do |file|
|
30
|
-
next if file == '.' || file == '..' || file == '.git'
|
31
|
-
# vvv
|
32
|
-
debug "Yielding #{file}"
|
33
|
-
# ^^^
|
34
|
-
yield file
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
data/tutorial/en.utf-8.add
DELETED
data/tutorial/toc.md
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
# Methadone iBook
|
2
|
-
|
3
|
-
A tutorial for how to use Methadone to make a command-line app
|
4
|
-
|
5
|
-
A mixture of:
|
6
|
-
|
7
|
-
* Text
|
8
|
-
* Code
|
9
|
-
* Screencasts
|
10
|
-
|
11
|
-
# App
|
12
|
-
|
13
|
-
We'll build the "fullstop" app that creates an app to manage our dotfiles.
|
14
|
-
|
15
|
-
# Approach
|
16
|
-
|
17
|
-
We'll do this thing entirely TDD
|
18
|
-
|
19
|
-
# TOC
|
20
|
-
|
21
|
-
1. Overview of fullstop
|
22
|
-
2. Bootstrap app and write tests for UI
|
23
|
-
3. Get to pass using `OptionParser`
|
24
|
-
4. Add happy-path logic
|
25
|
-
5. Add error cases
|
26
|
-
6. Deep dive: Logging & Debugging
|
27
|
-
7. Deep dive: SH
|