capistrano-friday 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f7f3ef74ae4ffd785f2feea978639d19038d4459
4
+ data.tar.gz: d0bcd3072dc17328aa8d4eaf41505b41f37c953a
5
+ SHA512:
6
+ metadata.gz: 6582b83209f6dbca8fe05b1e62b75bdb84f6043504b3651a2a1ddfd34b153bc1c53ce78d687d28ebbc43ec5d69e183d415c9b0c7d847817a3a0e992c89e6f04c
7
+ data.tar.gz: 795616660942c1c0493b3d547010e189ae31ce68631138e0e9ce9f687b6cb84d4334ebeba8ddf39e6099a1d703ce925392143ce3adcefe1d68b02331b6e41beb
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in capistrano-friday.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 Vladimir Kochnev
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # capistrano-friday
2
+
3
+ Why you [deploy](github.com/capistrano/capistrano) on friday?!
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'capistrano-friday'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install capistrano-friday
20
+
21
+ ## Usage
22
+
23
+ Require in Capfile to use the task:
24
+
25
+ ```ruby
26
+ # Capfile
27
+ require 'capistrano/friday'
28
+ ```
29
+
30
+ In your `config/deploy.rb` do something like that:
31
+
32
+ ```ruby
33
+ # config/deploy.rb
34
+ before 'deploy:starting', 'friday:check'
35
+ ```
36
+
37
+ ## Options
38
+
39
+ In default configuration it's just a warning but you can completely disable deploying by setting:
40
+
41
+ ```ruby
42
+ set :friday_disable_deploy, false
43
+ ```
44
+
45
+ You also can change default MOTD (default is `:base_jumper`):
46
+
47
+ ```ruby
48
+ set :friday_motd, :flipping_table
49
+ ```
50
+
51
+ **TODO:** need to add many more MOTDs!
52
+
53
+ ## Contributing
54
+
55
+ 1. Fork it ( https://github.com/marshall-lee/capistrano-friday/fork )
56
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
57
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
58
+ 4. Push to the branch (`git push origin my-new-feature`)
59
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
@@ -0,0 +1,22 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "capistrano-friday"
7
+ spec.version = '0.0.1'
8
+ spec.authors = ["Vladimir Kochnev"]
9
+ spec.email = ["hashtable@yandex.ru"]
10
+ spec.summary = %q{You better stab yourself if you deploy on friday!}
11
+ spec.description = %q{You better stab yourself if you deploy on friday!}
12
+ spec.homepage = "https://github.com/marshall-lee/capistrano-friday"
13
+ spec.license = "MIT"
14
+
15
+ spec.files = `git ls-files -z`.split("\x0")
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ spec.require_paths = ["lib"]
19
+
20
+ spec.add_dependency 'capistrano', '~> 3.0'
21
+ spec.add_dependency 'sshkit', '~> 1.2'
22
+ end
File without changes
@@ -0,0 +1 @@
1
+ load File.expand_path("../tasks/friday.rake", __FILE__)
@@ -0,0 +1,42 @@
1
+ namespace :friday do
2
+ motds = {
3
+ :base_jumper => %{
4
+ ┓┏┓┏┓┃
5
+ ┛┗┛┗┛┃⟍ ○⟋
6
+ ┓┏┓┏┓┃ ∕ Friday
7
+ ┛┗┛┗┛┃ノ)
8
+ ┓┏┓┏┓┃ deploy,
9
+ ┛┗┛┗┛┃
10
+ ┓┏┓┏┓┃ good
11
+ ┛┗┛┗┛┃
12
+ ┓┏┓┏┓┃ luck!
13
+ ┃┃┃┃┃┃
14
+ ┻┻┻┻┻┻
15
+ }.strip!,
16
+ :flipping_table => %{
17
+ (╯°□°)╯︵ ┻━┻ FRIDAY DEPLOY!
18
+ }.strip!
19
+ }
20
+
21
+ task :check do
22
+ invoke 'friday:good_luck' if Time.now.friday?
23
+ end
24
+
25
+ task :good_luck do
26
+ motd = fetch :friday_motd
27
+ unless motds.key? motd
28
+ fail "MOTD #{motd.inspect} not found!"
29
+ end
30
+ warn motds[motd].yellow
31
+ if fetch :friday_disable_deploy
32
+ fail "Friday deploy disabled!"
33
+ end
34
+ end
35
+ end
36
+
37
+ namespace :load do
38
+ task :defaults do
39
+ set :friday_motd, :base_jumper
40
+ set :friday_disable_deploy, false
41
+ end
42
+ end
metadata ADDED
@@ -0,0 +1,82 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano-friday
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Vladimir Kochnev
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-01-19 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: sshkit
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.2'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.2'
41
+ description: You better stab yourself if you deploy on friday!
42
+ email:
43
+ - hashtable@yandex.ru
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ".gitignore"
49
+ - Gemfile
50
+ - LICENSE.txt
51
+ - README.md
52
+ - Rakefile
53
+ - capistrano-friday.gemspec
54
+ - lib/capistrano-friday.rb
55
+ - lib/capistrano/friday.rb
56
+ - lib/capistrano/tasks/friday.rake
57
+ homepage: https://github.com/marshall-lee/capistrano-friday
58
+ licenses:
59
+ - MIT
60
+ metadata: {}
61
+ post_install_message:
62
+ rdoc_options: []
63
+ require_paths:
64
+ - lib
65
+ required_ruby_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ required_rubygems_version: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ requirements: []
76
+ rubyforge_project:
77
+ rubygems_version: 2.4.5
78
+ signing_key:
79
+ specification_version: 4
80
+ summary: You better stab yourself if you deploy on friday!
81
+ test_files: []
82
+ has_rdoc: