rename to screenomat
This commit is contained in:
parent
b71d9039f4
commit
906d85da36
4
.screenomat
Normal file
4
.screenomat
Normal file
@ -0,0 +1,4 @@
|
||||
session do
|
||||
screen! "bundle exec autotest", :title => 'autotest'
|
||||
screen :title => 'command prompt'
|
||||
end
|
@ -1,7 +1,7 @@
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
screenie (0.0.1)
|
||||
screenomat (0.0.1)
|
||||
|
||||
GEM
|
||||
remote: http://rubygems.org/
|
||||
@ -30,4 +30,4 @@ DEPENDENCIES
|
||||
bundler (>= 1.0.0)
|
||||
mocha
|
||||
rspec
|
||||
screenie!
|
||||
screenomat!
|
||||
|
18
README.md
18
README.md
@ -1,11 +1,11 @@
|
||||
# screenie
|
||||
# screenomat
|
||||
|
||||
You like screen, I like screen. Make getting those big multi-command line-running projects
|
||||
even easier to get started up with `screenie`.
|
||||
even easier to get started up with `screenomat`.
|
||||
|
||||
## How?
|
||||
|
||||
Make a `.screenie` file in your app and write:
|
||||
Make a `.screenomat` file in your app and write:
|
||||
|
||||
<pre>
|
||||
session do
|
||||
@ -19,7 +19,7 @@ end
|
||||
|
||||
Then run:
|
||||
|
||||
screenie
|
||||
screenomat
|
||||
|
||||
_~~whoa~~_
|
||||
|
||||
@ -43,23 +43,23 @@ end
|
||||
|
||||
Then run:
|
||||
|
||||
screenie backend
|
||||
screenomat backend
|
||||
|
||||
or even:
|
||||
|
||||
screenie frontend
|
||||
screenomat frontend
|
||||
|
||||
## Defaults?
|
||||
|
||||
Like magic `screenie` bits anywhere? `~/.screenie` is what you want! Same syntax!
|
||||
Like magic `screenomat` bits anywhere? `~/.screenomat` is what you want! Same syntax!
|
||||
|
||||
## Ruby? DRY?
|
||||
|
||||
Just like `Gemfile`, `*.gemspec`, and other modern Ruby things, `.screenie` is Ruby code. Like
|
||||
Just like `Gemfile`, `*.gemspec`, and other modern Ruby things, `.screenomat` is Ruby code. Like
|
||||
DRYing things? You can do it!
|
||||
|
||||
<pre>
|
||||
class Screenie::DSL::Session
|
||||
class Screenomat::DSL::Session
|
||||
def whoa(&block)
|
||||
screen :title => "first"
|
||||
instance_eval(&block)
|
||||
|
@ -1,13 +1,13 @@
|
||||
#!which ruby
|
||||
|
||||
require 'getoptlong'
|
||||
require 'screenie/dsl/builder'
|
||||
require 'screenomat/dsl/builder'
|
||||
|
||||
opt = GetoptLong.new(
|
||||
[ '--input', '-i', GetoptLong::REQUIRED_ARGUMENT ]
|
||||
)
|
||||
|
||||
files = %w{.screenie ~/.screenie}
|
||||
files = %w{.screenomat ~/.screenomat}
|
||||
|
||||
opt.each do |key, value|
|
||||
case key
|
||||
@ -20,7 +20,7 @@ session_name = ARGV.shift
|
||||
|
||||
files.each do |path|
|
||||
if File.exist?(target = File.expand_path(path))
|
||||
sessions = Screenie::DSL::Builder.new(File.read(target))
|
||||
sessions = Screenomat::DSL::Builder.new(File.read(target))
|
||||
|
||||
if !session_name || session_name.empty?
|
||||
session = sessions.first
|
@ -1,3 +0,0 @@
|
||||
module Screenie
|
||||
|
||||
end
|
3
lib/screenomat.rb
Normal file
3
lib/screenomat.rb
Normal file
@ -0,0 +1,3 @@
|
||||
module Screenomat
|
||||
|
||||
end
|
@ -1,6 +1,6 @@
|
||||
require 'screenie/dsl/session'
|
||||
require 'screenomat/dsl/session'
|
||||
|
||||
module Screenie
|
||||
module Screenomat
|
||||
module DSL
|
||||
class Builder
|
||||
attr_reader :sessions
|
@ -1,4 +1,4 @@
|
||||
module Screenie
|
||||
module Screenomat
|
||||
module DSL
|
||||
class Screen
|
||||
attr_accessor :screen_id
|
@ -1,6 +1,6 @@
|
||||
require 'screenie/dsl/screen'
|
||||
require 'screenomat/dsl/screen'
|
||||
|
||||
module Screenie
|
||||
module Screenomat
|
||||
module DSL
|
||||
class Session
|
||||
attr_accessor :name
|
@ -1,3 +1,3 @@
|
||||
module Screenie
|
||||
module Screenomat
|
||||
VERSION = '0.0.1'
|
||||
end
|
@ -1,9 +1,9 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
require File.expand_path("../lib/screenie/version", __FILE__)
|
||||
require File.expand_path("../lib/screenomat/version", __FILE__)
|
||||
|
||||
Gem::Specification.new do |s|
|
||||
s.name = "screenie"
|
||||
s.version = Screenie::VERSION
|
||||
s.name = "screenomat"
|
||||
s.version = Screenomat::VERSION
|
||||
s.platform = Gem::Platform::RUBY
|
||||
s.authors = []
|
||||
s.email = []
|
@ -1,24 +0,0 @@
|
||||
require 'spec_helper'
|
||||
require 'screenie/dsl/builder'
|
||||
|
||||
describe Screenie::DSL::Builder do
|
||||
describe '#sessions' do
|
||||
context 'from block' do
|
||||
subject { Screenie::DSL::Builder.new { session("cats") { } }}
|
||||
|
||||
specify { subject[:cats].should_not be_nil }
|
||||
end
|
||||
|
||||
context 'from code' do
|
||||
subject { Screenie::DSL::Builder.new(%{session("cats") { } })}
|
||||
|
||||
specify { subject[:cats].should_not be_nil }
|
||||
end
|
||||
end
|
||||
|
||||
describe '#first' do
|
||||
subject { Screenie::DSL::Builder.new { session do; end }}
|
||||
|
||||
its(:first) { should be_a_kind_of(Screenie::DSL::Session) }
|
||||
end
|
||||
end
|
@ -1,5 +0,0 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Screenie do
|
||||
|
||||
end
|
24
spec/lib/screenomat/dsl/builder_spec.rb
Normal file
24
spec/lib/screenomat/dsl/builder_spec.rb
Normal file
@ -0,0 +1,24 @@
|
||||
require 'spec_helper'
|
||||
require 'screenomat/dsl/builder'
|
||||
|
||||
describe Screenomat::DSL::Builder do
|
||||
describe '#sessions' do
|
||||
context 'from block' do
|
||||
subject { Screenomat::DSL::Builder.new { session("cats") { } }}
|
||||
|
||||
specify { subject[:cats].should_not be_nil }
|
||||
end
|
||||
|
||||
context 'from code' do
|
||||
subject { Screenomat::DSL::Builder.new(%{session("cats") { } })}
|
||||
|
||||
specify { subject[:cats].should_not be_nil }
|
||||
end
|
||||
end
|
||||
|
||||
describe '#first' do
|
||||
subject { Screenomat::DSL::Builder.new { session do; end }}
|
||||
|
||||
its(:first) { should be_a_kind_of(Screenomat::DSL::Session) }
|
||||
end
|
||||
end
|
@ -1,9 +1,9 @@
|
||||
require 'spec_helper'
|
||||
require 'screenie/dsl/screen'
|
||||
require 'screenomat/dsl/screen'
|
||||
|
||||
describe Screenie::DSL::Screen do
|
||||
describe Screenomat::DSL::Screen do
|
||||
describe '#to_cmd' do
|
||||
let(:screen) { Screenie::DSL::Screen.new(*params) }
|
||||
let(:screen) { Screenomat::DSL::Screen.new(*params) }
|
||||
|
||||
subject { screen }
|
||||
|
@ -1,11 +1,11 @@
|
||||
require 'spec_helper'
|
||||
require 'screenie/dsl/session'
|
||||
require 'screenomat/dsl/session'
|
||||
|
||||
describe Screenie::DSL::Session do
|
||||
describe Screenomat::DSL::Session do
|
||||
describe '#to_cmd' do
|
||||
context 'one screen' do
|
||||
subject {
|
||||
Screenie::DSL::Session.new("my-session") { screen "test" }.to_cmd
|
||||
Screenomat::DSL::Session.new("my-session") { screen "test" }.to_cmd
|
||||
}
|
||||
|
||||
it { should == [
|
||||
@ -18,7 +18,7 @@ describe Screenie::DSL::Session do
|
||||
|
||||
context 'two screens' do
|
||||
subject {
|
||||
Screenie::DSL::Session.new("my-session") { screen "test"; screen "test2" }.to_cmd
|
||||
Screenomat::DSL::Session.new("my-session") { screen "test"; screen "test2" }.to_cmd
|
||||
}
|
||||
|
||||
it { should == [
|
||||
@ -35,7 +35,7 @@ describe Screenie::DSL::Session do
|
||||
|
||||
describe 'from string' do
|
||||
subject {
|
||||
Screenie::DSL::Session.new("my-session", <<-EOR).to_cmd
|
||||
Screenomat::DSL::Session.new("my-session", <<-EOR).to_cmd
|
||||
screen "test"
|
||||
EOR
|
||||
}
|
||||
@ -50,7 +50,7 @@ screen "test"
|
||||
|
||||
describe 'screen!' do
|
||||
subject {
|
||||
Screenie::DSL::Session.new("my-session") { screen "test"; screen! "test2" }.to_cmd
|
||||
Screenomat::DSL::Session.new("my-session") { screen "test"; screen! "test2" }.to_cmd
|
||||
}
|
||||
|
||||
it { should == [
|
Loading…
Reference in New Issue
Block a user