capistrano-default_stage 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6d1f55bf9b3abc0ffaec0e5b80dbf4d56fa62b15
4
+ data.tar.gz: c34d523432828eca10c24856329753b719b86db0
5
+ SHA512:
6
+ metadata.gz: 8a9ae8d5e52fd787dd48f1c99ea343d15886a5bb06fe3645fa29776fc8b9c758ae1940a5a56bfebffb1c590c36a14d527856b83759bba424ffee7cb6c7d9ab76
7
+ data.tar.gz: de8173253d843203beb0647f764d2259763988da660f57f7104110ee1b7e688107395b37982b347e5a5ba98fa20f65f586c8d711c7012ee5cec18989c7855443
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in capistrano-default_stage.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 slushie
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
data/README.md ADDED
@@ -0,0 +1,49 @@
1
+ # Capistrano::DefaultStage
2
+
3
+ Set a default stage for your Capistrano 3 tasks!
4
+
5
+ set :default_stage, :production
6
+
7
+ The `default_stage` you specify will be used whenever a stage is not set
8
+ on the command line.
9
+
10
+ ## Installation
11
+
12
+ Add these lines to your application's Gemfile:
13
+
14
+ ```ruby
15
+ gem 'capistrano', '~> 3.0'
16
+ gem 'capistrano-default_stage', '~> 0.1'
17
+ ```
18
+
19
+ And then execute:
20
+
21
+ $ bundle
22
+
23
+ Or install it yourself as:
24
+
25
+ $ gem install capistrano-default_stage
26
+
27
+ ## Usage
28
+
29
+ You must edit your `Capfile` to include the following lines after requiring Capistrano:
30
+
31
+ ```ruby
32
+ require 'capistrano/default_stage'
33
+ set :default_stage, :production
34
+ ```
35
+
36
+ Of course, you aren't limited to the `production` stage. Any existing stage
37
+ can be used, even nested stages defined via `capistrano/multiconfig`!
38
+
39
+ Please note, however, that due to Capistrano's stage architecture, you must define
40
+ your default stage inside of your `Capfile`, and *not* in `deploy.rb`.
41
+
42
+
43
+ ## Contributing
44
+
45
+ 1. Fork it ( https://github.com/slushie/capistrano-default_stage/fork )
46
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
47
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
48
+ 4. Push to the branch (`git push origin my-new-feature`)
49
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
@@ -0,0 +1,24 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'capistrano/default_stage/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "capistrano-default_stage"
8
+ spec.version = Capistrano::DefaultStage::VERSION
9
+ spec.authors = ["Josh Leder"]
10
+ spec.email = ["slushie@gmail.com"]
11
+
12
+ spec.summary = %q{Set a default stage in Capistrano 3}
13
+ spec.description = %q{Set a default stage in Capistrano 3}
14
+ spec.homepage = "https://github.com/slushie/capistrano-default_stage"
15
+ spec.license = 'MIT'
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^spec/}) }
18
+ spec.require_paths = ["lib"]
19
+
20
+ spec.add_dependency 'capistrano', '~> 3.0'
21
+
22
+ spec.add_development_dependency "bundler", "~> 1.8"
23
+ spec.add_development_dependency "rake", "~> 10.0"
24
+ end
@@ -0,0 +1,25 @@
1
+ require "capistrano/default_stage/version"
2
+
3
+ # If the stage is not set on the command line, this
4
+ # task will set it from the configured default_stage.
5
+ Rake::Task.define_task(:default_stage) do
6
+ # neuter capistrano's 'ensure_stage'
7
+ Rake::Task[:ensure_stage].clear_actions
8
+
9
+ unless stage_set?
10
+ default_stage = fetch(:default_stage)
11
+
12
+ # fail loudly when no default_stage is set
13
+ unless default_stage
14
+ puts t(:stage_not_set)
15
+ exit 1
16
+ end
17
+
18
+ set :stage, default_stage
19
+ invoke default_stage
20
+ end
21
+ end
22
+
23
+ # Refine capistrano's 'ensure_stage' task to
24
+ # depend on our 'default_stage' task.
25
+ Rake::Task.define_task(:ensure_stage => :default_stage)
@@ -0,0 +1,5 @@
1
+ module Capistrano
2
+ module DefaultStage
3
+ VERSION = "0.1.0"
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,95 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano-default_stage
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Josh Leder
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-04-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: capistrano
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.8'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.8'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ description: Set a default stage in Capistrano 3
56
+ email:
57
+ - slushie@gmail.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - Gemfile
64
+ - LICENSE
65
+ - README.md
66
+ - Rakefile
67
+ - capistrano-default_stage.gemspec
68
+ - lib/capistrano/default_stage.rb
69
+ - lib/capistrano/default_stage/version.rb
70
+ homepage: https://github.com/slushie/capistrano-default_stage
71
+ licenses:
72
+ - MIT
73
+ metadata: {}
74
+ post_install_message:
75
+ rdoc_options: []
76
+ require_paths:
77
+ - lib
78
+ required_ruby_version: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ required_rubygems_version: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ requirements: []
89
+ rubyforge_project:
90
+ rubygems_version: 2.2.2
91
+ signing_key:
92
+ specification_version: 4
93
+ summary: Set a default stage in Capistrano 3
94
+ test_files: []
95
+ has_rdoc: