methadone 1.0.0.rc5 → 1.0.0.rc6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. data/lib/methadone/cli.rb +2 -0
  2. data/lib/methadone/cli_logging.rb +3 -0
  3. data/lib/methadone/cucumber.rb +1 -1
  4. data/lib/methadone/error.rb +8 -1
  5. data/lib/methadone/execution_strategy/jvm.rb +2 -0
  6. data/lib/methadone/execution_strategy/mri.rb +2 -0
  7. data/lib/methadone/execution_strategy/open_3.rb +2 -0
  8. data/lib/methadone/execution_strategy/open_4.rb +2 -0
  9. data/lib/methadone/execution_strategy/rbx_open_4.rb +2 -0
  10. data/lib/methadone/exit_now.rb +18 -3
  11. data/lib/methadone/main.rb +34 -6
  12. data/lib/methadone/process_status.rb +45 -0
  13. data/lib/methadone/sh.rb +52 -29
  14. data/lib/methadone/version.rb +1 -1
  15. data/methadone.gemspec +10 -0
  16. data/test/test_main.rb +20 -0
  17. data/test/test_sh.rb +104 -3
  18. metadata +23 -47
  19. data/tutorial/.vimrc +0 -6
  20. data/tutorial/1_intro.md +0 -52
  21. data/tutorial/2_bootstrap.md +0 -174
  22. data/tutorial/3_ui.md +0 -336
  23. data/tutorial/4_happy_path.md +0 -405
  24. data/tutorial/5_more_features.md +0 -693
  25. data/tutorial/6_refactor.md +0 -220
  26. data/tutorial/7_logging_debugging.md +0 -274
  27. data/tutorial/8_conclusion.md +0 -11
  28. data/tutorial/code/.rvmrc +0 -1
  29. data/tutorial/code/fullstop/.gitignore +0 -5
  30. data/tutorial/code/fullstop/Gemfile +0 -4
  31. data/tutorial/code/fullstop/LICENSE.txt +0 -202
  32. data/tutorial/code/fullstop/README.rdoc +0 -23
  33. data/tutorial/code/fullstop/Rakefile +0 -31
  34. data/tutorial/code/fullstop/bin/fullstop +0 -43
  35. data/tutorial/code/fullstop/features/fullstop.feature +0 -40
  36. data/tutorial/code/fullstop/features/step_definitions/fullstop_steps.rb +0 -64
  37. data/tutorial/code/fullstop/features/support/env.rb +0 -22
  38. data/tutorial/code/fullstop/fullstop.gemspec +0 -28
  39. data/tutorial/code/fullstop/lib/fullstop.rb +0 -2
  40. data/tutorial/code/fullstop/lib/fullstop/repo.rb +0 -38
  41. data/tutorial/code/fullstop/lib/fullstop/version.rb +0 -3
  42. data/tutorial/code/fullstop/test/tc_something.rb +0 -7
  43. data/tutorial/en.utf-8.add +0 -18
  44. 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,2 +0,0 @@
1
- require 'fullstop/version'
2
- require 'fullstop/repo'
@@ -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
@@ -1,3 +0,0 @@
1
- module Fullstop
2
- VERSION = "0.0.1"
3
- end
@@ -1,7 +0,0 @@
1
- require 'test/unit'
2
-
3
- class TestSomething < Test::Unit::TestCase
4
- def test_truth
5
- assert true
6
- end
7
- end
@@ -1,18 +0,0 @@
1
- http
2
- prepended
3
- ARGV
4
- GLI
5
- apps
6
- inline
7
- interoperate
8
- stanard/!
9
- FreeBSD
10
- parseable
11
- this/!
12
- very/!
13
- app
14
- OptionParser
15
- hyperlinks
16
- deserialize
17
- YAML
18
- things/!
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