pulsar 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ !tmp/.gitkeep
data/.travis.yml ADDED
@@ -0,0 +1,13 @@
1
+ language: ruby
2
+ before_install: gem install bundler --pre
3
+ script: "DISPLAY=:99.0 bundle exec rspec spec"
4
+ notifications:
5
+ email:
6
+ - kennyadsl@gmail.com
7
+ - mtylty@gmail.com
8
+ branches:
9
+ only:
10
+ - master
11
+ rvm:
12
+ - 1.9.2
13
+ - 1.9.3
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Pulsar
2
2
 
3
+ [![Build Status](https://secure.travis-ci.org/nebulab/pulsar.png?branch=master)](http://travis-ci.org/nebulab/pulsar)
4
+ [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/nebulab/pulsar)
5
+
3
6
  NebuLab's central capistrano deploy resource.
4
7
 
5
8
 
@@ -1,9 +1,13 @@
1
1
  module Pulsar
2
2
  class CapCommand < MainCommand
3
3
  option [ "-k", "--keep-capfile" ], :flag,
4
- "don't remove the generated capfile in the /tmp/ directory",
4
+ "don't remove the generated capfile in the TMP DIR directory",
5
5
  :default => false
6
6
 
7
+ option [ "-r", "--keep-repo" ], :flag,
8
+ "don't remove the downloaded configuration repository from the TMP DIR directory",
9
+ :default => false
10
+
7
11
  option [ "-l", "--log-level" ], "LOG LEVEL",
8
12
  "how much output will Capistrano print out. Can be any of: important, info, debug",
9
13
  :default => "important"
@@ -16,6 +20,14 @@ module Pulsar
16
20
  "specify a branch for the configuration repository",
17
21
  :default => "master"
18
22
 
23
+ option [ "-d", "--tmp-dir" ], "TMP DIR",
24
+ "a directory where to put the configuration repo to build capfile with",
25
+ :default => "/tmp/pulsar"
26
+
27
+ option [ "-s", "--skip-cap-run" ], :flag,
28
+ "do everything pulsar does (build a Capfile) but don't run the cap command",
29
+ :default => false
30
+
19
31
  parameter "APPLICATION", "the application which you would like to deploy"
20
32
  parameter "ENVIRONMENT", "the environment on which you would like to deploy" do |env|
21
33
  %w(production staging development).include?(env) ? env : raise(ArgumentError)
@@ -31,11 +43,13 @@ module Pulsar
31
43
  create_capfile
32
44
  build_capfile(target)
33
45
 
34
- cap_args = [tasks_list].flatten.join(" ")
35
- run_capistrano(cap_args)
46
+ unless skip_cap_run?
47
+ cap_args = [tasks_list].flatten.join(" ")
48
+ run_capistrano(cap_args)
49
+ end
36
50
 
37
51
  remove_capfile unless keep_capfile?
38
- remove_repo
52
+ remove_repo unless keep_repo?
39
53
  end
40
54
  end
41
55
  end
@@ -1,9 +1,13 @@
1
1
  module Pulsar
2
2
  class ListCommand < MainCommand
3
3
  option [ "-k", "--keep-capfile" ], :flag,
4
- "don't remove the generated capfile in the /tmp/ directory",
4
+ "don't remove the generated capfile in the TMP DIR directory",
5
5
  :default => false
6
6
 
7
+ option [ "-r", "--keep-repo" ], :flag,
8
+ "don't remove the downloaded configuration repository from the TMP DIR directory",
9
+ :default => false
10
+
7
11
  option [ "-c", "--conf-repo" ], "REPO URL",
8
12
  "a git repository with deploy configurations, mainly apps and recipes",
9
13
  :required => true
@@ -12,6 +16,10 @@ module Pulsar
12
16
  "specify a branch for the configuration repository",
13
17
  :default => "master"
14
18
 
19
+ option [ "-d", "--tmp-dir" ], "TMP DIR",
20
+ "a directory where to put the configuration repo to build capfile with",
21
+ :default => "/tmp/pulsar"
22
+
15
23
  def execute
16
24
  Bundler.with_clean_env do
17
25
  fetch_repo
@@ -19,7 +27,7 @@ module Pulsar
19
27
  list_apps
20
28
 
21
29
  remove_capfile unless keep_capfile?
22
- remove_repo
30
+ remove_repo unless keep_repo?
23
31
  end
24
32
  end
25
33
  end
@@ -12,9 +12,9 @@ module Pulsar
12
12
  end
13
13
 
14
14
  def method_missing(meth, *args, &block)
15
- if File.directory?("#{config_path}/recipes/#{meth}")
15
+ if File.directory?("#{ENV['CONFIG_PATH']}/recipes/#{meth}")
16
16
  args.each do |arg|
17
- @cap_conf.load("#{config_path}/recipes/#{meth}/#{arg}.rb")
17
+ @cap_conf.load("#{ENV['CONFIG_PATH']}/recipes/#{meth}/#{arg}.rb")
18
18
  end
19
19
  else
20
20
  super
@@ -18,17 +18,22 @@ module Pulsar
18
18
  end
19
19
 
20
20
  def bundle_install
21
- FileUtils.cd(config_path, :verbose => verbose?) do
21
+ cd(config_path, :verbose => verbose?) do
22
22
  run_cmd("bundle install --quiet", :verbose => verbose?)
23
23
  end
24
24
  end
25
25
 
26
26
  def capfile_path
27
- @capfile_name ||= "/tmp/pulsar/capfile-#{Time.now.strftime("%Y-%m-%d-%H%M%S")}"
27
+ @capfile_name ||= "#{tmp_dir}/capfile-#{time_to_deploy}"
28
+ end
29
+
30
+ def cd(path, opts, &block)
31
+ puts "Directory: #{path.white}".yellow if opts[:verbose]
32
+ FileUtils.cd(path) { yield }
28
33
  end
29
34
 
30
35
  def config_path
31
- @configuration_path ||= "/tmp/pulsar/conf_repo"
36
+ @configuration_path ||= "#{tmp_dir}/conf-repo-#{time_to_deploy}"
32
37
  end
33
38
 
34
39
  def create_capfile
@@ -36,7 +41,22 @@ module Pulsar
36
41
  end
37
42
 
38
43
  def fetch_repo
39
- repo = !conf_repo.include?(':') ? "git@github.com:#{conf_repo}.git" : conf_repo
44
+ if conf_repo =~ /\A[a-zA-Z-]+\/[a-zA-Z-]+\Z/
45
+ fetch_git_repo("git@github.com:#{conf_repo}.git")
46
+ else
47
+ fetch_directory_repo(conf_repo)
48
+ end
49
+ end
50
+
51
+ def fetch_directory_repo(repo)
52
+ if File.directory?("#{repo}/.git")
53
+ fetch_git_repo(repo)
54
+ else
55
+ run_cmd("cp -rp #{repo} #{config_path}", :verbose => verbose?)
56
+ end
57
+ end
58
+
59
+ def fetch_git_repo(repo)
40
60
  git_options = "--quiet --depth=1 --branch #{conf_branch}"
41
61
  run_cmd("git clone #{git_options} #{repo} #{config_path}", :verbose => verbose?)
42
62
  end
@@ -87,7 +107,7 @@ module Pulsar
87
107
  end
88
108
  end
89
109
 
90
- puts "#{app_name}: #{app_envs.join(', ')}"
110
+ puts "#{app_name.cyan}: #{app_envs.map(&:magenta).join(', ')}"
91
111
  end
92
112
  end
93
113
  end
@@ -101,14 +121,21 @@ module Pulsar
101
121
  end
102
122
 
103
123
  def run_capistrano(args)
104
- FileUtils.cd(config_path, :verbose => verbose?) do
105
- run_cmd("bundle exec cap --file #{capfile_path} #{args}", :verbose => verbose?)
124
+ cd(config_path, :verbose => verbose?) do
125
+ run_cmd("CONFIG_PATH=#{config_path} bundle exec cap --file #{capfile_path} #{args}", :verbose => verbose?)
106
126
  end
107
127
  end
108
128
 
129
+ def rm_rf(path, opts)
130
+ puts "Remove: #{path.white}".yellow if opts[:verbose]
131
+ FileUtils.rm_rf(path)
132
+ end
133
+
109
134
  def run_cmd(cmd, opts)
110
- puts cmd if opts[:verbose]
135
+ puts "Command: #{cmd.white}".yellow if opts[:verbose]
111
136
  system(cmd)
137
+
138
+ raise "Command #{cmd} Failed" if $? != 0
112
139
  end
113
140
 
114
141
  def set_log_level
@@ -121,6 +148,15 @@ module Pulsar
121
148
 
122
149
  run_cmd(cmd, :verbose => verbose?)
123
150
  end
151
+
152
+ def time_to_deploy
153
+ @now ||= Time.now.strftime("%Y-%m-%d-%H%M%S-s#{rand(9999)}")
154
+ end
155
+
156
+ def touch(file, opts)
157
+ puts "Touch: #{file.white}".yellow if opts[:verbose]
158
+ FileUtils.touch(file)
159
+ end
124
160
  end
125
161
  end
126
162
  end
@@ -1,3 +1,3 @@
1
1
  module Pulsar
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
data/lib/pulsar.rb CHANGED
@@ -1,8 +1,9 @@
1
1
  require "pulsar/version"
2
2
 
3
3
  module Pulsar
4
- require 'bundler'
5
4
  require "clamp"
5
+ require "bundler"
6
+ require "colored"
6
7
  require "pulsar/helpers/clamp"
7
8
  require "pulsar/helpers/capistrano"
8
9
  require "pulsar/commands/all"
data/pulsar.gemspec CHANGED
@@ -23,6 +23,7 @@ Gem::Specification.new do |gem|
23
23
 
24
24
  gem.add_dependency "clamp", "~> 0.5"
25
25
  gem.add_dependency "bundler", "~> 1.2"
26
+ gem.add_dependency "colored", "~> 1.2"
26
27
 
27
28
  gem.add_development_dependency "rake"
28
29
  gem.add_development_dependency "rspec", "~> 2.12"
@@ -0,0 +1,52 @@
1
+ require 'spec_helper'
2
+
3
+ describe Pulsar::CapCommand do
4
+ let(:pulsar) { Pulsar::CapCommand.new("cap") }
5
+
6
+ it "builds a Capfile file in tmp dir" do
7
+ expect { pulsar.run(full_cap_args + dummy_app) }.to change{ Dir.glob("#{tmp_path}/capfile-*").length }.by(1)
8
+ end
9
+
10
+ it "copies a the repo over to temp directory" do
11
+ expect { pulsar.run(full_cap_args + %w(--keep-repo) + dummy_app) }.to change{ Dir.glob("#{tmp_path}/conf-repo*").length }.by(1)
12
+ end
13
+
14
+ it "copies a the repo when there is a dir with same name" do
15
+ system("mkdir #{tmp_path}/conf-repo")
16
+ expect { pulsar.run(full_cap_args + %w(--keep-repo) + dummy_app) }.to change{ Dir.glob("#{tmp_path}/conf-repo*").length }.by(1)
17
+ end
18
+
19
+ context "--conf-repo option" do
20
+ it "is required" do
21
+ expect { pulsar.parse([""]) }.to raise_error(Clamp::UsageError)
22
+ end
23
+
24
+ it "supports directories" do
25
+ expect { pulsar.run(full_cap_args + dummy_app) }.not_to raise_error(Errno::ENOENT)
26
+ end
27
+ end
28
+
29
+ context "--tmp-dir option" do
30
+ it "is supported" do
31
+ expect { pulsar.parse(base_args + %w(--tmp-dir dummy_tmp) + dummy_app) }.to_not raise_error(Clamp::UsageError)
32
+ end
33
+ end
34
+
35
+ context "--keep-capfile option" do
36
+ it "is supported" do
37
+ expect { pulsar.parse(base_args + %w(--keep-capfile) + dummy_app) }.to_not raise_error(Clamp::UsageError)
38
+ end
39
+ end
40
+
41
+ context "--skip-cap-run option" do
42
+ it "is supported" do
43
+ expect { pulsar.parse(base_args + %w(--skip-cap-run) + dummy_app) }.to_not raise_error(Clamp::UsageError)
44
+ end
45
+ end
46
+
47
+ context "--keep-repo option" do
48
+ it "is supported" do
49
+ expect { pulsar.parse(base_args + %w(--keep-repo) + dummy_app) }.to_not raise_error(Clamp::UsageError)
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,36 @@
1
+ require 'spec_helper'
2
+
3
+ describe Pulsar::ListCommand do
4
+ let(:pulsar) { Pulsar::ListCommand.new("list") }
5
+
6
+ it "copies a the repo over to temp directory" do
7
+ expect { pulsar.run(full_list_args + %w(--keep-repo)) }.to change{ Dir.glob("#{tmp_path}/conf-repo*").length }.by(1)
8
+ end
9
+
10
+ it "copies a the repo when there is a dir with same name" do
11
+ system("mkdir #{tmp_path}/conf-repo")
12
+ expect { pulsar.run(full_list_args + %w(--keep-repo)) }.to change{ Dir.glob("#{tmp_path}/conf-repo*").length }.by(1)
13
+ end
14
+
15
+ context "--conf-repo option" do
16
+ it "is required" do
17
+ expect { pulsar.parse([""]) }.to raise_error(Clamp::UsageError)
18
+ end
19
+
20
+ it "supports directories" do
21
+ expect { pulsar.run(full_list_args) }.not_to raise_error(Errno::ENOENT)
22
+ end
23
+ end
24
+
25
+ context "--tmp-dir option" do
26
+ it "is supported" do
27
+ expect { pulsar.parse(base_args + %w(--tmp-dir dummy_tmp)) }.to_not raise_error(Clamp::UsageError)
28
+ end
29
+ end
30
+
31
+ context "--keep-capfile option" do
32
+ it "is supported" do
33
+ expect { pulsar.parse(base_args + %w(--keep-capfile)) }.to_not raise_error(Clamp::UsageError)
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,33 @@
1
+ require 'spec_helper'
2
+
3
+ describe Pulsar::MainCommand do
4
+ let(:pulsar) { Pulsar::MainCommand.new("") }
5
+
6
+ context "--version option" do
7
+ before do
8
+ begin
9
+ pulsar.parse(["--version"])
10
+ rescue SystemExit => e
11
+ @system_exit = e
12
+ end
13
+ end
14
+
15
+ it "shows version" do
16
+ stdout.should include(Pulsar::VERSION)
17
+ end
18
+
19
+ it "exits with a zero status" do
20
+ @system_exit.should_not be_nil
21
+ @system_exit.status.should == 0
22
+ end
23
+ end
24
+
25
+ context "subcommands" do
26
+ it "should be cap and list" do
27
+ help = pulsar.help
28
+ help.should =~ /Subcommands:/
29
+ help.should =~ /cap/
30
+ help.should =~ /list/
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,11 @@
1
+ require 'spec_helper'
2
+
3
+ describe Pulsar::Helpers::Clamp do
4
+ include Pulsar::Helpers::Clamp
5
+
6
+ context "run_cmd" do
7
+ it "raises exception if command fails" do
8
+ expect { run_cmd("return 1", {}) }.to raise_error
9
+ end
10
+ end
11
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,29 +1,21 @@
1
1
  require "rspec"
2
+ require "stringio"
3
+ require "fileutils"
2
4
  require "pulsar"
3
- require 'stringio'
5
+ require "pulsar/commands/main"
6
+
7
+ #
8
+ # Require all helper modules
9
+ #
10
+ Dir[File.join(File.dirname(__FILE__), 'support/modules/**/*.rb')].each { |f| require f }
4
11
 
5
12
  RSpec.configure do |config|
6
13
  config.mock_with :rr
7
- end
8
14
 
9
- module OutputCapture
10
- def self.included(target)
11
- target.before do
12
- $stdout = @out = StringIO.new
13
- $stderr = @err = StringIO.new
14
- end
15
-
16
- target.after do
17
- $stdout = STDOUT
18
- $stderr = STDERR
19
- end
20
- end
15
+ config.include Helpers
16
+ config.include OutputCapture
21
17
 
22
- def stdout
23
- @out.string
18
+ config.after(:suite) do
19
+ FileUtils.rm_r(Dir.glob("#{File.dirname(__FILE__)}/support/tmp/*"))
24
20
  end
25
-
26
- def stderr
27
- @err.string
28
- end
29
- end
21
+ end
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Require from local gem
4
+ gem 'pulsar', :path => '../../../../'
@@ -0,0 +1,44 @@
1
+ #
2
+ # Require and extend with additional modules
3
+ #
4
+ require 'pulsar'
5
+
6
+ extend Pulsar::Helpers::Capistrano
7
+
8
+ #
9
+ # Load deploy capistrano recipe
10
+ #
11
+ load 'deploy'
12
+
13
+ #
14
+ # Configure libraries/recipes from Gemfile
15
+ #
16
+ require 'bundler/capistrano'
17
+
18
+ #
19
+ # Load default recipes
20
+ #
21
+ load_recipes do
22
+ generic :notify, :cleanup, :rake
23
+ end
24
+
25
+ #
26
+ # Put here shared configuration that should be by default
27
+ #
28
+ set :scm, :git
29
+
30
+ set :ssh_options, { :forward_agent => true }
31
+
32
+ set :default_run_options, { :pty => true }
33
+
34
+ set :deploy_to, defer { "/var/www/#{application}" }
35
+
36
+ set :deploy_via, :remote_cache
37
+
38
+ set :user, "www-data"
39
+
40
+ set :use_sudo, false
41
+
42
+ set :rake, "bundle exec rake"
43
+
44
+ set :rails_env, defer { "#{stage}" }
@@ -0,0 +1,5 @@
1
+ set :application, "dummy_app"
2
+
3
+ load_recipes do
4
+ generic :recipe
5
+ end
@@ -0,0 +1,3 @@
1
+ server "dummy.it", :db, :web, :app, :primary => true
2
+
3
+ set :stage, "production"
@@ -0,0 +1,3 @@
1
+ server "staging.dummy.it", :db, :web, :app, :primary => true
2
+
3
+ set :stage, "staging"
@@ -0,0 +1,3 @@
1
+ #
2
+ # This is a dummy generic recipe
3
+ #
@@ -0,0 +1,25 @@
1
+ module Helpers
2
+ def base_args
3
+ [ "--conf-repo", dummy_conf_path ]
4
+ end
5
+
6
+ def full_cap_args
7
+ base_args + [ "--tmp-dir", tmp_path, "--keep-capfile", "--skip-cap-run" ]
8
+ end
9
+
10
+ def full_list_args
11
+ base_args + [ "--tmp-dir", tmp_path, "--keep-capfile" ]
12
+ end
13
+
14
+ def dummy_conf_path
15
+ File.join(File.dirname(__FILE__), "..", "dummy_conf")
16
+ end
17
+
18
+ def tmp_path
19
+ File.join(File.dirname(__FILE__), "..", "tmp")
20
+ end
21
+
22
+ def dummy_app
23
+ [ "dummy_app", "production" ]
24
+ end
25
+ end
@@ -0,0 +1,21 @@
1
+ module OutputCapture
2
+ def self.included(target)
3
+ target.before do
4
+ $stdout = @out = StringIO.new
5
+ $stderr = @err = StringIO.new
6
+ end
7
+
8
+ target.after do
9
+ $stdout = STDOUT
10
+ $stderr = STDERR
11
+ end
12
+ end
13
+
14
+ def stdout
15
+ @out.string
16
+ end
17
+
18
+ def stderr
19
+ @err.string
20
+ end
21
+ end
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pulsar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-12-27 00:00:00.000000000 Z
13
+ date: 2013-03-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: clamp
@@ -44,6 +44,22 @@ dependencies:
44
44
  - - ~>
45
45
  - !ruby/object:Gem::Version
46
46
  version: '1.2'
47
+ - !ruby/object:Gem::Dependency
48
+ name: colored
49
+ requirement: !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '1.2'
55
+ type: :runtime
56
+ prerelease: false
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ~>
61
+ - !ruby/object:Gem::Version
62
+ version: '1.2'
47
63
  - !ruby/object:Gem::Dependency
48
64
  name: rake
49
65
  requirement: !ruby/object:Gem::Requirement
@@ -103,6 +119,7 @@ files:
103
119
  - .gitignore
104
120
  - .rspec
105
121
  - .rvmrc
122
+ - .travis.yml
106
123
  - Gemfile
107
124
  - LICENSE.txt
108
125
  - README.md
@@ -118,8 +135,21 @@ files:
118
135
  - lib/pulsar/tasks/.gitkeep
119
136
  - lib/pulsar/version.rb
120
137
  - pulsar.gemspec
121
- - spec/pulsar/commands_spec.rb
138
+ - spec/pulsar/commands/cap_spec.rb
139
+ - spec/pulsar/commands/list_spec.rb
140
+ - spec/pulsar/commands/main_spec.rb
141
+ - spec/pulsar/helpers/clamp_spec.rb
122
142
  - spec/spec_helper.rb
143
+ - spec/support/dummy_conf/Gemfile
144
+ - spec/support/dummy_conf/apps/base.rb
145
+ - spec/support/dummy_conf/apps/dummy_app/defaults.rb
146
+ - spec/support/dummy_conf/apps/dummy_app/production.rb
147
+ - spec/support/dummy_conf/apps/dummy_app/recipes/.gitkeep
148
+ - spec/support/dummy_conf/apps/dummy_app/staging.rb
149
+ - spec/support/dummy_conf/recipes/generic/recipe.rb
150
+ - spec/support/modules/helpers.rb
151
+ - spec/support/modules/output_capture.rb
152
+ - spec/support/tmp/.gitkeep
123
153
  homepage: https://github.com/nebulab/pulsar
124
154
  licenses: []
125
155
  post_install_message:
@@ -134,7 +164,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
134
164
  version: '0'
135
165
  segments:
136
166
  - 0
137
- hash: 1849999196866319529
167
+ hash: 1088010047728925566
138
168
  required_rubygems_version: !ruby/object:Gem::Requirement
139
169
  none: false
140
170
  requirements:
@@ -143,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
173
  version: '0'
144
174
  segments:
145
175
  - 0
146
- hash: 1849999196866319529
176
+ hash: 1088010047728925566
147
177
  requirements: []
148
178
  rubyforge_project:
149
179
  rubygems_version: 1.8.24
@@ -153,5 +183,18 @@ summary: A simple gem that parses capistrano configuration froma another (privat
153
183
  repository providing a simple solution to managing multiple systems without installing
154
184
  capistrano configurations in each app.
155
185
  test_files:
156
- - spec/pulsar/commands_spec.rb
186
+ - spec/pulsar/commands/cap_spec.rb
187
+ - spec/pulsar/commands/list_spec.rb
188
+ - spec/pulsar/commands/main_spec.rb
189
+ - spec/pulsar/helpers/clamp_spec.rb
157
190
  - spec/spec_helper.rb
191
+ - spec/support/dummy_conf/Gemfile
192
+ - spec/support/dummy_conf/apps/base.rb
193
+ - spec/support/dummy_conf/apps/dummy_app/defaults.rb
194
+ - spec/support/dummy_conf/apps/dummy_app/production.rb
195
+ - spec/support/dummy_conf/apps/dummy_app/recipes/.gitkeep
196
+ - spec/support/dummy_conf/apps/dummy_app/staging.rb
197
+ - spec/support/dummy_conf/recipes/generic/recipe.rb
198
+ - spec/support/modules/helpers.rb
199
+ - spec/support/modules/output_capture.rb
200
+ - spec/support/tmp/.gitkeep
@@ -1,18 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Pulsar::MainCommand do
4
- include OutputCapture
5
-
6
- context "with required arguments" do
7
- before do
8
- @pulsar = Pulsar::CapCommand.new("cap")
9
- @pulsar.parse(%w(-c repo.com project development))
10
- end
11
-
12
- it "should set variables correctly" do
13
- @pulsar.conf_repo.should == "repo.com"
14
- @pulsar.application.should == "project"
15
- @pulsar.environment.should == "development"
16
- end
17
- end
18
- end