From da81776c0d86b151962bd3986a66a72ddc702c97 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Thu, 9 Dec 2010 16:36:04 -0500 Subject: [PATCH] docs and cleanup --- .gitignore | 2 +- .screenie | 8 ----- README.md | 85 ++++++++++++++++++++++++++++++++++++++++++++ screenie.gemspec | 3 -- test/screenie.config | 7 ---- 5 files changed, 86 insertions(+), 19 deletions(-) delete mode 100644 .screenie create mode 100644 README.md delete mode 100644 test/screenie.config diff --git a/.gitignore b/.gitignore index c94ae06..ba8d737 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ .bundle/* - +*.gem diff --git a/.screenie b/.screenie deleted file mode 100644 index 84bda9d..0000000 --- a/.screenie +++ /dev/null @@ -1,8 +0,0 @@ -session :first do - screen "bundle exec autotest", :title => 'autotest' - screen! -end - -session :second do - screen %{echo "cats"} -end diff --git a/README.md b/README.md new file mode 100644 index 0000000..d5ed655 --- /dev/null +++ b/README.md @@ -0,0 +1,85 @@ +# screenie + +You like screen, I like screen. Make getting those big multi-command line-running projects +even easier to get started up with `screenie`. + +## How? + +Make a `.screenie` file in your app and write: + +
+session do
+  screen "bundle exec autotest", :title => "autotest"
+  screen "rails c", :title => "dev console"
+  screen "rails s", :title => "dev server"
+  screen "less +F -fr log/test.log", :title => "test log tail"
+  screen! :title => "bash"
+end
+
+ +Then run: + + screenie + +_~~whoa~~_ + +### More? + +
+session :backend do
+  screen "bundle exec autotest", :title => "autotest"
+  screen "less +F -fr log/test.log", :title => "test log tail"
+  screen! :title => "bash"
+end
+
+session :frontend do
+  screen "bundle exec autotest", :title => "autotest"
+  screen "rails c", :title => "console"
+  screen "rails s", :title => "server"
+  screen "rake jasmine", :title => "jasmine"
+  screen! :title => "bash"
+end
+
+ +Then run: + + screenie backend + +or even: + + screenie frontend + +## Defaults? + +Like magic `screenie` bits anywhere? `~/.screenie' is what you want! Same syntax! + +## Ruby? DRY? + +Just like `Gemfile`, `*.gemspec`, and other modern Ruby things, `.screenie` is Ruby code. Like +DRYing things? You can do it! + +
+class Screenie::DSL::Session
+  def whoa(&block)
+    screen :title => "first"
+    instance_eval(&block)
+    screen :title => "last"
+  end
+end
+
+session :first do
+  whoa do
+    screen "bundle exec autotest", :title => 'autotest'
+  end
+end
+
+session :second do
+  whoa do
+    screen %{echo "cats"}
+  end
+end
+
+ +## What's left? + +A _bunch_. I write what I need. Feel like addings fun things and/or tests? Fork, hack, pull request. You know the drill. diff --git a/screenie.gemspec b/screenie.gemspec index dbc34c4..08d67d7 100644 --- a/screenie.gemspec +++ b/screenie.gemspec @@ -17,9 +17,6 @@ Gem::Specification.new do |s| s.add_development_dependency "rspec" s.add_development_dependency "mocha" s.add_development_dependency "autotest" - s.add_development_dependency "cucumber" - s.add_development_dependency "aruba" - s.add_dependency 'thor' s.files = `git ls-files`.split("\n") s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact diff --git a/test/screenie.config b/test/screenie.config deleted file mode 100644 index 5eb59e3..0000000 --- a/test/screenie.config +++ /dev/null @@ -1,7 +0,0 @@ -session :testing do - screen %{bundle exec autotest}, :name => 'autotest' - screen %{rails s}, :name => 'rails' - screen :name => 'command prompt' - - select :first -end