Permalink
Browse files

fixes an issue with ruby 1.9 and the backtick character in yaml

  • Loading branch information...
1 parent 26c9c4a commit 430f52a871efdf5f87d05370208ba593ce82a79b @jondruse committed Mar 15, 2013
Showing with 24 additions and 17 deletions.
  1. +14 −13 README.md
  2. +1 −1 Rakefile
  3. +1 −1 lib/screeninator/assets/sample.yml
  4. +3 −1 lib/screeninator/assets/screen_config.screen
  5. +5 −1 lib/screeninator/config_writer.rb
View
@@ -7,7 +7,7 @@ Installation
------------
$ gem install screeninator
-
+
Then follow the instructions. You just have to drop a line in your ~/.bashrc file, similar to RVM if you've used that before:
if [[ -s $HOME/.screeninator/scripts/screeninator ]] ; then source $HOME/.screeninator/scripts/screeninator ; fi
@@ -16,38 +16,39 @@ Editor
------
Screeninator uses your shell's default editor for opening files. If you're not sure what that is type:
-
+
$ echo $EDITOR
-
-For me that produces "mate -w"
+
+For me that produces "mate -w"
If you want to change your default editor simple put a line in ~/.bashrc that changes it. Mine looks like this:
export EDITOR='mate -w'
Usage
-----
-
+
### Create a project ###
-
+
$ screeninator open project_name
-
+
Create or edit your projects with this command. Your default editor ($EDITOR) is used to open the file. If this is a new project you will see this default config:
# ~/.screeninator/project_name.yml
# you can make as many tabs as you wish...
- escape: ``
+ escape: tick
project_name: Screeninator
project_root: ~/code/rails_project
tabs:
- shell: git pull
- database: rails db
- console: rails c
- - logs:
+ - logs:
- cd logs
- tail -f development.log
- ssh: ssh me@myhost
-
+
+By default screen's escape key is C-a but I prefer to use ` instead. If you'd rather use C-a just remove the escape line altogether.
If a tab contains multiple commands, they will be 'joined' together with '&&'.
@@ -58,7 +59,7 @@ Starting a project
------------------
$ start_project_name
-
+
This will fire up screen with all the tabs you configured.
### Limitations ###
@@ -76,7 +77,7 @@ Other Commands
--------------
For a list of available commands:
-
+
$ screeninator help
Questions? Comments? Feature Request?
@@ -89,7 +90,7 @@ For realtime feedback check out the #screeninator channel on irc.freenode.com
Note on Patches/Pull Requests
-----------------------------
-
+
* Fork the project.
* Make your feature addition or bug fix.
* Add tests for it. This is important so I don't break it in a
View
@@ -54,7 +54,7 @@ task :test => :check_dependencies
task :default => :test
-require 'rake/rdoctask'
+require 'rdoc/task'
Rake::RDocTask.new do |rdoc|
version = File.exist?('VERSION') ? File.read('VERSION') : ""
@@ -1,7 +1,7 @@
# ~/.screeninator/<%= @name %>.yml
# you can make as many tabs as you wish...
-escape: ``
+escape: tick
project_name: <%= @name %>
project_root: ~/code/rails_project
tabs:
@@ -1,6 +1,8 @@
startup_message off
vbell off
-escape <%= @escape || "``" %>
+<% if @escape %>
+escape <%= @escape %>
+<% end %>
autodetach on
defscrollback 10000
hardstatus alwayslastline
@@ -44,7 +44,11 @@ def process_config!
raise ArgumentError.new("Your configuration file didn't specify a 'project_root'") if yaml["project_root"].nil?
raise ArgumentError.new("Your configuration file didn't specify a 'project_name'") if yaml["project_name"].nil?
- @escape = yaml["escape"]
+ @escape = if yaml["escape"]
+ yaml["escape"] == "tick" ? "``" : yaml["escape"]
+ else
+ nil
+ end
@project_name = yaml["project_name"]
@project_root = yaml["project_root"]
@tabs = []

0 comments on commit 430f52a

Please sign in to comment.