capistrano-https_github_deploy 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: 3f220db6c9df4a21bc6c5c28c4c9ac77903e63ef
4
+ data.tar.gz: d8559d51f25c4b48456baa9f4c339a45cac0bea4
5
+ SHA512:
6
+ metadata.gz: bbc9244f097950d6b8d051f946e26bceb6ded5093b5ad8c214c5f4e741eb33290b6c9da372630df70d1197fa2332954516b9884b701cb1d15249c4d9fff9bc65
7
+ data.tar.gz: e31228c8284da53a70a1b8e08ddf340df52fdcb76a2c4777fe053990700e4560301e7bbc4265dcedcc166061163daced527c25e00c2f5d3a21747ed2a92e8454
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-https_github_deploy.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 takkanm
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,70 @@
1
+ # Capistrano::HttpsGithubDeploy
2
+
3
+ Capistrano plugin when use https github repogitory deploy.
4
+
5
+
6
+ ## Installation
7
+
8
+ Add this line to your application's Gemfile:
9
+
10
+ ```ruby
11
+ gem 'capistrano-https_github_deploy'
12
+ ```
13
+
14
+ And then execute:
15
+
16
+ $ bundle
17
+
18
+ Add your Capfile:
19
+
20
+ ```
21
+ require 'capistrano/https_github_deploy'
22
+ ```
23
+
24
+ ## Usage
25
+
26
+ ### Common Setting
27
+
28
+ set 'username/repo_name' to :github_repo in your deploy.rb.
29
+
30
+ ```
31
+ set :github_repo, "#{owner}/#{repo_name}"
32
+ ```
33
+
34
+ ### Use File
35
+
36
+ First, create github token file
37
+ First, create a file(e.g. ~/.github_token), such as the following.
38
+
39
+ ```
40
+ user: user_name
41
+ token: XXXXXXXXXXXXXXXXXXXXXXX
42
+ ```
43
+
44
+ Second, set token file path to :github_token_file_path in your deploy.rb.
45
+
46
+ ```
47
+ set :github_token_file_path, "/home/user_name/.github_token"
48
+ ```
49
+
50
+ ### Use Env
51
+
52
+ Set env name to :github_token_env in your deploy.rb.
53
+
54
+ ```
55
+ set :github_token_env, 'GITHUB_TOKEN'
56
+ ```
57
+
58
+ And, you set GITHUB_TOKEN, such as the following.
59
+
60
+ ```
61
+ GITHUB_TOKEN='#{user_name}:#{github_token}' cap production deploy
62
+ ```
63
+
64
+ ## Contributing
65
+
66
+ 1. Fork it ( https://github.com/[my-github-username]/capistrano-https_github_deploy/fork )
67
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
68
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
69
+ 4. Push to the branch (`git push origin my-new-feature`)
70
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
@@ -0,0 +1,25 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'capistrano/https_github_deploy/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "capistrano-https_github_deploy"
8
+ spec.version = Capistrano::HttpsGithubDeploy::VERSION
9
+ spec.authors = ["takkanm"]
10
+ spec.email = ["takkanm@gmail.com"]
11
+ spec.summary = %q{Capistrano plugin when use https github repogitory deploy}
12
+ spec.description = %q{Capistrano plugin when use https github repogitory deploy}
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_dependency 'capistrano', '~>3.0'
22
+
23
+ spec.add_development_dependency "bundler", "~> 1.7"
24
+ spec.add_development_dependency "rake", "~> 10.0"
25
+ end
@@ -0,0 +1,8 @@
1
+ require "capistrano/https_github_deploy/version"
2
+
3
+ module Capistrano
4
+ module HttpsGithubDeploy
5
+ end
6
+ end
7
+
8
+ load Pathname.new(__dir__).join('https_github_deploy', 'tasks', 'https_github_deploy.rake')
@@ -0,0 +1,22 @@
1
+ namespace :https_github_deploy do
2
+ task :setup do
3
+ token = case
4
+ when (file_path = fetch(:github_token_file_path))
5
+ deploy_config = YAML.load_file(File.expand_path(file_path))
6
+
7
+ "#{deploy_config['user']}:#{deploy_config['token']}"
8
+ when (env_name = fetch(:github_token_env))
9
+ ENV[env_name.to_s]
10
+ else
11
+ nil
12
+ end
13
+
14
+ next unless token
15
+
16
+ github_repo = fetch(:github_repo)
17
+
18
+ set :repo_url, "https://#{token}@github.com/#{github_repo}.git"
19
+ end
20
+ end
21
+
22
+ before 'deploy:starting', 'https_github_deploy:setup'
@@ -0,0 +1,5 @@
1
+ module Capistrano
2
+ module HttpsGithubDeploy
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,95 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano-https_github_deploy
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - takkanm
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-12-04 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.7'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.7'
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: Capistrano plugin when use https github repogitory deploy
56
+ email:
57
+ - takkanm@gmail.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - Gemfile
64
+ - LICENSE.txt
65
+ - README.md
66
+ - Rakefile
67
+ - capistrano-https_github_deploy.gemspec
68
+ - lib/capistrano/https_github_deploy.rb
69
+ - lib/capistrano/https_github_deploy/tasks/https_github_deploy.rake
70
+ - lib/capistrano/https_github_deploy/version.rb
71
+ homepage: ''
72
+ licenses:
73
+ - MIT
74
+ metadata: {}
75
+ post_install_message:
76
+ rdoc_options: []
77
+ require_paths:
78
+ - lib
79
+ required_ruby_version: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ required_rubygems_version: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ requirements: []
90
+ rubyforge_project:
91
+ rubygems_version: 2.4.2
92
+ signing_key:
93
+ specification_version: 4
94
+ summary: Capistrano plugin when use https github repogitory deploy
95
+ test_files: []