capistrano3-git-push 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: 32b3ea04b2312e940eeea95b42e9eab5a73adc5f
4
+ data.tar.gz: 4542ff86f03604c1a28a3ea493cb887de058b9c8
5
+ SHA512:
6
+ metadata.gz: 9eea2818de25d10c542ab3a9da5e4a4d4426ff3e07506796839232a4f32ea3a535f7f09a0dfae6c59f6a463c3c400b99d8d8b1ebdd69d84a635a5c133ba2d8ea
7
+ data.tar.gz: 7a97bc846a081da8e9c7c4cca1ceb0d9640d1ab1f5f4e290ce8e280e14f1c9363625ec6f40ee86c7cd20806d39688d4ef443d46bfb6ae3e34b43995c5aeb89a5
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-ubuntu-server-prepare.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 goooseman
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,33 @@
1
+ # capistrano3-git-push
2
+
3
+ This Capistrano (v3) task ask for the commit message and then makes
4
+ ```
5
+ git add -A
6
+ git commit -m '#{message}'
7
+ git push
8
+ ```
9
+ if there are any changes. You can skip it by typing ``` skip ``` when you are asked for the commit message. It is very handy to make it
10
+ ``` ruby
11
+ before :deploy, 'git:push'
12
+ ```
13
+ in ``` config/deploy.rb ```.
14
+
15
+ ## Installation
16
+
17
+ Add this line to your application's Gemfile:
18
+
19
+ ```ruby
20
+ group :development do
21
+ gem 'capistrano-ubuntu-server-prepare'
22
+ end
23
+ ```
24
+
25
+ And then execute:
26
+
27
+ $ bundle
28
+
29
+ And then add ``` require 'capistrano3/git-push' ``` to your ``` Capfile ```
30
+
31
+ ## My other works
32
+
33
+ Take a look at my [capistrano3-ubuntu-server-prepare](https://github.com/goooseman/capistrano3-ubuntu-server-prepare) (it can install Nginx, PostgreSQL, Redis, RVM, Rails, Bundler, Imagemagick and do some other helpfull things to prepare your blank Ubuntu server for the first deploy) Capistrano (v3) gems.
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
@@ -0,0 +1,23 @@
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 = "capistrano3-git-push"
7
+ spec.version = "0.0.1"
8
+ spec.authors = ["goooseman"]
9
+ spec.email = ["inbox@goooseman.ru"]
10
+ spec.summary = "A task for Capistrano v3 to add, commit and push changes to git repo"
11
+ spec.description = "A task for Capistrano v3 to add, commit and push changes to git repo if there are any changes"
12
+ spec.homepage = "http://github.com/goooseman/capistrano3-git-push"
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_development_dependency "bundler", "~> 1.7"
21
+ spec.add_development_dependency "rake", "~> 10.0"
22
+ spec.add_runtime_dependency 'capistrano', '~> 3.1', '>= 3.1.0'
23
+ end
@@ -0,0 +1 @@
1
+ load File.expand_path("../tasks/git-push.rake", __FILE__)
@@ -0,0 +1,19 @@
1
+ namespace :git do
2
+ desc 'Push changes if there are any'
3
+ task :push do
4
+ on roles(:all) do
5
+ status = %x(git status --porcelain).chomp
6
+ if status != ""
7
+
8
+ set :commit_message, ask("commit message (or input skip to skip)", "commit")
9
+ if fetch(:commit_message) != 'skip'
10
+ run_locally do
11
+ execute "git add -A"
12
+ execute "git commit -m '#{fetch(:commit_message)}'"
13
+ execute "git push"
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
File without changes
metadata ADDED
@@ -0,0 +1,102 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano3-git-push
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - goooseman
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-12-16 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.7'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.7'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: capistrano
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.1'
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: 3.1.0
51
+ type: :runtime
52
+ prerelease: false
53
+ version_requirements: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - "~>"
56
+ - !ruby/object:Gem::Version
57
+ version: '3.1'
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: 3.1.0
61
+ description: A task for Capistrano v3 to add, commit and push changes to git repo
62
+ if there are any changes
63
+ email:
64
+ - inbox@goooseman.ru
65
+ executables: []
66
+ extensions: []
67
+ extra_rdoc_files: []
68
+ files:
69
+ - ".gitignore"
70
+ - Gemfile
71
+ - LICENSE.txt
72
+ - README.md
73
+ - Rakefile
74
+ - capistrano-git-push.gemspec
75
+ - lib/capistrano3-git-push.rb
76
+ - lib/capistrano3/git-push.rb
77
+ - lib/capistrano3/tasks/git-push.rake
78
+ homepage: http://github.com/goooseman/capistrano3-git-push
79
+ licenses:
80
+ - MIT
81
+ metadata: {}
82
+ post_install_message:
83
+ rdoc_options: []
84
+ require_paths:
85
+ - lib
86
+ required_ruby_version: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ required_rubygems_version: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ requirements: []
97
+ rubyforge_project:
98
+ rubygems_version: 2.2.2
99
+ signing_key:
100
+ specification_version: 4
101
+ summary: A task for Capistrano v3 to add, commit and push changes to git repo
102
+ test_files: []