Permalink
Browse files

Add global config option. Added Travis config. Updated Changelog and …

…README
  • Loading branch information...
Seth Vargo
Seth Vargo committed Jun 8, 2012
1 parent 0c9ef9a commit 0c9cf99dd6d589a419eedb5dffdc02f76230aad3
Showing with 193 additions and 9 deletions.
  1. +2 −0 .chef/knife.rb
  2. +1 −0 .gitignore
  3. +7 −0 .travis.yml
  4. +11 −0 CHANGELOG.md
  5. +5 −0 Gemfile
  6. +95 −0 Gemfile.lock
  7. +8 −6 README.md
  8. +34 −0 Rakefile
  9. +1 −1 metadata.rb
  10. +6 −2 recipes/default.rb
  11. +23 −0 templates/default/tmux.conf
View
@@ -0,0 +1,2 @@
+cache_type 'BasicFile'
+cache_options(:path => "#{ENV['HOME']}/.chef/checksums")
View
@@ -0,0 +1 @@
+tmp
View
@@ -0,0 +1,7 @@
+language: ruby
+rvm:
+ - 1.9.2
+ - 1.9.3
+script:
+ - bundle exec rake knife
+ - bundle exec rake foodcritic
View
@@ -0,0 +1,11 @@
+Changelog
+=========
+
+v1.0.0
+------
+* Initial Release
+
+v1.0.1
+------
+* Added default template
+* Added TravisCI support
View
@@ -0,0 +1,5 @@
+source 'http://rubygems.org'
+
+gem 'chef', '~> 0.10.10'
+gem 'foodcritic', :platforms => :ruby_19
+gem 'rake'
View
@@ -0,0 +1,95 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ bunny (0.7.9)
+ chef (0.10.10)
+ bunny (>= 0.6.0)
+ erubis
+ highline (>= 1.6.9)
+ json (>= 1.4.4, <= 1.6.1)
+ mixlib-authentication (>= 1.1.0)
+ mixlib-cli (>= 1.1.0)
+ mixlib-config (>= 1.1.2)
+ mixlib-log (>= 1.3.0)
+ mixlib-shellout (~> 1.0.0.rc)
+ moneta
+ net-ssh (~> 2.2.2)
+ net-ssh-multi (~> 1.1.0)
+ ohai (>= 0.6.0)
+ rest-client (>= 1.0.4, < 1.7.0)
+ treetop (~> 1.4.9)
+ uuidtools
+ yajl-ruby (>= 1.1.0)
+ coderay (0.9.8)
+ erubis (2.7.0)
+ foodcritic (1.3.0)
+ gherkin (~> 2.8.0)
+ gist (~> 2.0.4)
+ nokogiri (~> 1.5.0, != 1.5.2, != 1.5.1)
+ pry (~> 0.9.7.4)
+ pry-doc (~> 0.3.0)
+ rak (~> 1.4)
+ treetop (~> 1.4.10)
+ yajl-ruby (~> 1.1.0)
+ gherkin (2.8.0)
+ json (>= 1.4.6)
+ gist (2.0.4)
+ highline (1.6.12)
+ ipaddress (0.8.0)
+ json (1.6.1)
+ method_source (0.6.7)
+ ruby_parser (>= 2.3.1)
+ mime-types (1.18)
+ mixlib-authentication (1.1.4)
+ mixlib-log
+ mixlib-cli (1.2.2)
+ mixlib-config (1.1.2)
+ mixlib-log (1.3.0)
+ mixlib-shellout (1.0.0)
+ moneta (0.6.0)
+ net-ssh (2.2.2)
+ net-ssh-gateway (1.1.0)
+ net-ssh (>= 1.99.1)
+ net-ssh-multi (1.1)
+ net-ssh (>= 2.1.4)
+ net-ssh-gateway (>= 0.99.0)
+ nokogiri (1.5.0)
+ ohai (0.6.12)
+ ipaddress
+ mixlib-cli
+ mixlib-config
+ mixlib-log
+ systemu
+ yajl-ruby
+ polyglot (0.3.3)
+ pry (0.9.7.4)
+ coderay (~> 0.9.8)
+ method_source (~> 0.6.7)
+ ruby_parser (>= 2.3.1)
+ slop (~> 2.1.0)
+ pry-doc (0.3.0)
+ pry (>= 0.9.0)
+ yard (>= 0.6.4)
+ rak (1.4)
+ rake (0.9.2.2)
+ rest-client (1.6.7)
+ mime-types (>= 1.16)
+ ruby_parser (2.3.1)
+ sexp_processor (~> 3.0)
+ sexp_processor (3.2.0)
+ slop (2.1.0)
+ systemu (2.5.0)
+ treetop (1.4.10)
+ polyglot
+ polyglot (>= 0.3.1)
+ uuidtools (2.1.2)
+ yajl-ruby (1.1.0)
+ yard (0.8.1)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ chef (~> 0.10.10)
+ foodcritic
+ rake
View
@@ -1,15 +1,17 @@
-DESCRIPTION
-===========
+[![Build Status](https://secure.travis-ci.org/opscode-cookbooks/tmux.png?branch=master)](http://travis-ci.org/opscode-cookbooks/tmux)
+
+tmux
+====
Installs tmux, a terminal multiplexer.
-REQUIREMENTS
-============
+Requirements
+------------
Platform with a package named 'tmux'.
-LICENSE AND AUTHOR
-==================
+License and Author
+------------------
Author:: Joshua Timberman (<joshua@opscode.com>)
View
@@ -0,0 +1,34 @@
+#!/usr/bin/env rake
+
+task :default => 'foodcritic'
+
+desc "Runs foodcritic linter"
+task :foodcritic do
+ Rake::Task[:prepare_sandbox].execute
+
+ if Gem::Version.new("1.9.2") <= Gem::Version.new(RUBY_VERSION.dup)
+ sh "foodcritic -f any #{sandbox_path}"
+ else
+ puts "WARN: foodcritic run is skipped as Ruby #{RUBY_VERSION} is < 1.9.2."
+ end
+end
+
+desc "Runs knife cookbook test"
+task :knife do
+ Rake::Task[:prepare_sandbox].execute
+
+ sh "bundle exec knife cookbook test cookbook -o #{sandbox_path}/../"
+end
+
+task :prepare_sandbox do
+ files = %w{*.md *.rb attributes definitions files providers recipes resources templates}
+
+ rm_rf sandbox_path
+ mkdir_p sandbox_path
+ cp_r Dir.glob("{#{files.join(',')}}"), sandbox_path
+end
+
+private
+def sandbox_path
+ File.join(File.dirname(__FILE__), %w(tmp cookbooks cookbook))
+end
View
@@ -3,4 +3,4 @@
license "Apache 2.0"
description "Installs tmux"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
-version "1.0.0"
+version "1.0.1"
View
@@ -14,8 +14,12 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
-#
+#
-package "tmux" do
+package 'tmux' do
action :install
end
+
+template '/etc/tmux.conf' do
+ source 'tmux.conf'
+end
@@ -0,0 +1,23 @@
+# Use a better prefix:
+set -g prefix C-a
+unbind C-b
+
+# Change the default delay:
+set -sg escape-time 1
+
+# Set the window and panes index
+set -g base-index 1
+setw -g pane-base-index 1
+
+# Send prefix to ohter apps:
+bind C-a send-prefix
+
+# Split windows with more logical keys
+bind | split-window -h
+bind - split-window -v
+
+# Remap movement keys
+bind h select-pane -L
+bind j select-pane -D
+bind k select-pane -U
+bind l select-pane -R

0 comments on commit 0c9cf99

Please sign in to comment.