pulsar 0.3.5 → 1.0.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rspec +1 -0
- data/.rubocop.yml +150 -0
- data/.ruby-version +1 -1
- data/LICENSE.txt +1 -1
- data/README.md +4 -265
- data/bin/pulsar +1 -1
- data/circle.yml +22 -0
- data/lib/pulsar.rb +28 -7
- data/lib/pulsar/cli.rb +79 -0
- data/lib/pulsar/constants.rb +5 -0
- data/lib/pulsar/generators/initial_repo/Gemfile +3 -0
- data/lib/pulsar/generators/{init_repo → initial_repo}/README.md +1 -1
- data/lib/pulsar/generators/initial_repo/apps/Capfile +8 -0
- data/lib/pulsar/generators/initial_repo/apps/deploy.rb +35 -0
- data/lib/pulsar/generators/initial_repo/apps/your_app/Capfile +18 -0
- data/lib/pulsar/generators/initial_repo/apps/your_app/deploy.rb +4 -0
- data/lib/pulsar/generators/initial_repo/apps/your_app/production.rb +3 -0
- data/lib/pulsar/generators/initial_repo/apps/your_app/staging.rb +3 -0
- data/lib/pulsar/generators/initial_repo/recipes/generic/rake.rake +12 -0
- data/lib/pulsar/generators/{init_repo/apps/your_app/recipes/production → initial_repo/recipes/rails}/.gitkeep +0 -0
- data/lib/pulsar/interactors/add_applications.rb +48 -0
- data/lib/pulsar/interactors/cleanup.rb +9 -0
- data/lib/pulsar/interactors/clone_repository.rb +50 -0
- data/lib/pulsar/interactors/copy_environment_file.rb +30 -0
- data/lib/pulsar/interactors/copy_initial_repository.rb +22 -0
- data/lib/pulsar/interactors/create_capfile.rb +32 -0
- data/lib/pulsar/interactors/create_deploy_file.rb +32 -0
- data/lib/pulsar/interactors/create_run_dirs.rb +21 -0
- data/lib/pulsar/interactors/identify_repository_location.rb +23 -0
- data/lib/pulsar/interactors/identify_repository_type.rb +34 -0
- data/lib/pulsar/interactors/run_bundle_install.rb +28 -0
- data/lib/pulsar/interactors/run_capistrano.rb +30 -0
- data/lib/pulsar/organizers/deploy.rb +16 -0
- data/lib/pulsar/organizers/install.rb +7 -0
- data/lib/pulsar/organizers/list.rb +12 -0
- data/lib/pulsar/version.rb +1 -1
- data/pulsar.gemspec +13 -11
- data/spec/features/deploy_spec.rb +162 -0
- data/spec/features/install_spec.rb +66 -0
- data/spec/features/list_spec.rb +140 -0
- data/spec/spec_helper.rb +26 -14
- data/{lib/pulsar/generators/init_repo/apps/your_app/recipes/staging → spec/support/dummies}/.gitkeep +0 -0
- data/spec/support/dummies/conf/dir/Gemfile +3 -0
- data/spec/support/dummies/conf/dir/apps/Capfile +9 -0
- data/spec/support/dummies/conf/dir/apps/blog/Capfile +1 -0
- data/spec/support/dummies/conf/dir/apps/blog/deploy.rb +4 -0
- data/spec/support/dummies/conf/dir/apps/blog/production.rb +4 -0
- data/spec/support/dummies/conf/dir/apps/blog/staging.rb +4 -0
- data/spec/support/dummies/conf/dir/apps/deploy.rb +1 -0
- data/{lib/pulsar/generators/init_repo/recipes/rails/.gitkeep → spec/support/dummies/conf/dir/apps/ecommerce/staging.rb} +0 -0
- data/spec/support/dummies/conf/dir/recipes/.gitkeep +0 -0
- data/spec/support/dummies/conf/dotenv +1 -0
- data/spec/support/dummies/conf/empty/apps/.gitkeep +0 -0
- data/spec/support/dummies/conf/empty/recipes/.gitkeep +0 -0
- data/spec/support/dummies/conf/wrong_bundle/Gemfile +3 -0
- data/spec/support/dummies/conf/wrong_bundle/apps/Capfile +9 -0
- data/spec/support/dummies/conf/wrong_bundle/apps/blog/Capfile +1 -0
- data/spec/support/dummies/conf/wrong_bundle/apps/blog/deploy.rb +4 -0
- data/spec/support/dummies/conf/wrong_bundle/apps/blog/production.rb +4 -0
- data/spec/support/dummies/conf/wrong_bundle/apps/deploy.rb +1 -0
- data/spec/support/dummies/conf/wrong_bundle/recipes/.gitkeep +0 -0
- data/spec/support/dummies/conf/wrong_cap/Gemfile +3 -0
- data/spec/support/dummies/conf/wrong_cap/apps/Capfile +0 -0
- data/spec/support/dummies/conf/wrong_cap/apps/blog/deploy.rb +4 -0
- data/spec/support/dummies/conf/wrong_cap/apps/blog/production.rb +4 -0
- data/spec/support/dummies/conf/wrong_cap/apps/deploy.rb +1 -0
- data/spec/support/dummies/conf/wrong_cap/recipes/.gitkeep +0 -0
- data/spec/units/cli/deploy_spec.rb +116 -0
- data/spec/units/cli/install_spec.rb +44 -0
- data/spec/units/cli/list_spec.rb +107 -0
- data/spec/units/constants_spec.rb +21 -0
- data/spec/units/interactors/add_applications_spec.rb +46 -0
- data/spec/units/interactors/cleanup_spec.rb +21 -0
- data/spec/units/interactors/clone_initial_repository_spec.rb +41 -0
- data/spec/units/interactors/clone_repository_spec.rb +122 -0
- data/spec/units/interactors/copy_environment_file_spec.rb +80 -0
- data/spec/units/interactors/create_capfile_spec.rb +77 -0
- data/spec/units/interactors/create_deploy_file_spec.rb +70 -0
- data/spec/units/interactors/create_run_dirs_spec.rb +47 -0
- data/spec/units/interactors/identify_repository_location_spec.rb +49 -0
- data/spec/units/interactors/identify_repository_type_spec.rb +85 -0
- data/spec/units/interactors/run_bundle_install_spec.rb +60 -0
- data/spec/units/interactors/run_capistrano_spec.rb +92 -0
- data/spec/units/organizers/deploy_spec.rb +28 -0
- data/spec/units/organizers/install_spec.rb +13 -0
- data/spec/units/organizers/list_spec.rb +24 -0
- metadata +179 -106
- data/.ruby-gemset +0 -1
- data/.travis.yml +0 -17
- data/bin/pulsar-utils +0 -5
- data/lib/pulsar/commands/all.rb +0 -6
- data/lib/pulsar/commands/init.rb +0 -23
- data/lib/pulsar/commands/list.rb +0 -19
- data/lib/pulsar/commands/main.rb +0 -64
- data/lib/pulsar/commands/utils.rb +0 -14
- data/lib/pulsar/generators/init_repo/Gemfile +0 -7
- data/lib/pulsar/generators/init_repo/apps/base.rb +0 -41
- data/lib/pulsar/generators/init_repo/apps/your_app/defaults.rb +0 -9
- data/lib/pulsar/generators/init_repo/apps/your_app/production.rb +0 -12
- data/lib/pulsar/generators/init_repo/apps/your_app/recipes/custom_recipe.rb +0 -14
- data/lib/pulsar/generators/init_repo/apps/your_app/staging.rb +0 -12
- data/lib/pulsar/generators/init_repo/recipes/generic/cleanup.rb +0 -50
- data/lib/pulsar/generators/init_repo/recipes/generic/utils.rb +0 -9
- data/lib/pulsar/helpers/all.rb +0 -8
- data/lib/pulsar/helpers/capistrano.rb +0 -47
- data/lib/pulsar/helpers/clamp.rb +0 -223
- data/lib/pulsar/helpers/path.rb +0 -71
- data/lib/pulsar/helpers/shell.rb +0 -31
- data/lib/pulsar/options/all.rb +0 -6
- data/lib/pulsar/options/conf_repo.rb +0 -41
- data/lib/pulsar/options/shared.rb +0 -15
- data/spec/pulsar/commands/init_spec.rb +0 -10
- data/spec/pulsar/commands/list_spec.rb +0 -127
- data/spec/pulsar/commands/main_spec.rb +0 -360
- data/spec/pulsar/commands/utils_spec.rb +0 -33
- data/spec/pulsar/helpers/capistrano_spec.rb +0 -70
- data/spec/pulsar/helpers/clamp_spec.rb +0 -105
- data/spec/pulsar/helpers/shell_spec.rb +0 -11
- data/spec/support/dummies/dummy_app/config.ru +0 -3
- data/spec/support/dummies/dummy_conf/Gemfile +0 -4
- data/spec/support/dummies/dummy_conf/apps/base.rb +0 -46
- data/spec/support/dummies/dummy_conf/apps/dummy_app/custom_stage.rb +0 -5
- data/spec/support/dummies/dummy_conf/apps/dummy_app/defaults.rb +0 -7
- data/spec/support/dummies/dummy_conf/apps/dummy_app/production.rb +0 -5
- data/spec/support/dummies/dummy_conf/apps/dummy_app/recipes/custom_recipe.rb +0 -1
- data/spec/support/dummies/dummy_conf/apps/dummy_app/recipes/production/custom_recipe.rb +0 -1
- data/spec/support/dummies/dummy_conf/apps/dummy_app/recipes/staging/custom_recipe.rb +0 -1
- data/spec/support/dummies/dummy_conf/apps/dummy_app/staging.rb +0 -5
- data/spec/support/dummies/dummy_conf/apps/other_dummy_app/custom_stage.rb +0 -5
- data/spec/support/dummies/dummy_conf/apps/other_dummy_app/defaults.rb +0 -7
- data/spec/support/dummies/dummy_conf/apps/other_dummy_app/production.rb +0 -5
- data/spec/support/dummies/dummy_conf/apps/other_dummy_app/staging.rb +0 -5
- data/spec/support/dummies/dummy_conf/recipes/generic/recipe.rb +0 -3
- data/spec/support/modules/helpers.rb +0 -85
- data/spec/support/modules/output_capture.rb +0 -21
@@ -1,21 +0,0 @@
|
|
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
|