capistrano-committed 0.0.9 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -3
- data/capistrano-committed.gemspec +2 -1
- data/lib/capistrano/committed/output.rb +9 -2
- data/lib/capistrano/committed/version.rb +1 -1
- metadata +17 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c79851f53c9c8aab71d209fb35f758b47875dfa
|
4
|
+
data.tar.gz: 3b371cb357bb6fee4577384df60116cfc622ac1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a9522aae999a3ab231431666a45bf3e08b3d78ee7968e709f3bbbbb91053eac9a335e31f3eb0121cec0413f0f6e9da3b422fb890768d8300d322c561cfa3255
|
7
|
+
data.tar.gz: 9c3fe861575f884fa029085f69ddda95337fba434c067f4af21d6a7e50cabbeca8dfe3ecc88a3e981d93286cb0a8359bc15cc4513be4e89d100620544d699522
|
data/README.md
CHANGED
@@ -43,7 +43,7 @@ Or install it yourself as:
|
|
43
43
|
|
44
44
|
$ gem install capistrano-committed
|
45
45
|
|
46
|
-
In your
|
46
|
+
In your project’s Capfile add this line:
|
47
47
|
|
48
48
|
```ruby
|
49
49
|
require 'capistrano/committed'
|
@@ -51,15 +51,24 @@ require 'capistrano/committed'
|
|
51
51
|
|
52
52
|
## Usage
|
53
53
|
|
54
|
-
In `config/deploy.rb` (in Rails) you need to set at least these options:
|
54
|
+
In `config/deploy.rb` (in Rails) you need to set at least these two options:
|
55
55
|
|
56
56
|
```ruby
|
57
57
|
# This is the GitHub user or organisation for the repository
|
58
58
|
set :committed_user, nil
|
59
|
+
|
60
|
+
# This is the GitHub repository name
|
59
61
|
set :committed_repo, nil
|
60
62
|
```
|
61
63
|
|
62
|
-
|
64
|
+
An example of the above is for a Rails project with a GitHub address of `https://github.com/sambauers/awesome-rails-project` is:
|
65
|
+
|
66
|
+
```ruby
|
67
|
+
set :committed_user, 'sambauers'
|
68
|
+
set :committed_repo, 'awesome-rails-project'
|
69
|
+
```
|
70
|
+
|
71
|
+
If your repository is private, you will need to set the `:committed_github_config` option in order to authenticate, this setting is a hash of options which are passed directly to the [GitHub API gem](https://github.com/peter-murach/github). The full list of GitHub API configuration option are in the [GitHub API gem read me file](https://github.com/peter-murach/github#2-configuration).
|
63
72
|
|
64
73
|
Example of personal access token usage:
|
65
74
|
|
@@ -19,7 +19,8 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
|
-
spec.add_dependency "
|
22
|
+
spec.add_dependency "rack", "~> 1.6"
|
23
|
+
spec.add_dependency "capistrano", "~> 3.4"
|
23
24
|
spec.add_dependency "github_api", "~> 0.14.0"
|
24
25
|
spec.add_dependency "mustache", "~> 1.0"
|
25
26
|
|
@@ -82,6 +82,7 @@ module Capistrano
|
|
82
82
|
return unless context.current[:info]
|
83
83
|
case context.current[:type]
|
84
84
|
when :commit
|
85
|
+
return unless context.current[:info][:commit]
|
85
86
|
::Capistrano::Committed.get_issue_urls(context.current[:info][:commit][:message])
|
86
87
|
when :pull_request
|
87
88
|
::Capistrano::Committed.get_issue_urls(context.current[:info][:title] + context.current[:info][:body])
|
@@ -100,8 +101,11 @@ module Capistrano
|
|
100
101
|
return unless context.current[:info]
|
101
102
|
case context.current[:type]
|
102
103
|
when :commit
|
104
|
+
return unless context.current[:info][:commit]
|
105
|
+
return unless context.current[:info][:commit][:committer]
|
103
106
|
t('committed.output.committed_on', time: context.current[:info][:commit][:committer][:date])
|
104
107
|
when :pull_request
|
108
|
+
return unless context.current[:info][:merged_at]
|
105
109
|
t('committed.output.merged_on', time: context.current[:info][:merged_at])
|
106
110
|
end
|
107
111
|
end
|
@@ -110,8 +114,10 @@ module Capistrano
|
|
110
114
|
return unless context.current[:info]
|
111
115
|
case context.current[:type]
|
112
116
|
when :commit
|
117
|
+
return unless context.current[:info][:committer]
|
113
118
|
t('committed.output.committed_by', login: context.current[:info][:committer][:login])
|
114
119
|
when :pull_request
|
120
|
+
return unless context.current[:info][:merged_by]
|
115
121
|
t('committed.output.merged_by', login: context.current[:info][:merged_by][:login])
|
116
122
|
else
|
117
123
|
|
@@ -119,16 +125,17 @@ module Capistrano
|
|
119
125
|
end
|
120
126
|
|
121
127
|
def item_link
|
128
|
+
return unless context.current[:info]
|
122
129
|
case context.current[:type]
|
123
130
|
when :commit, :pull_request
|
124
|
-
return unless context.current[:info]
|
131
|
+
return unless context.current[:info][:html_url]
|
125
132
|
format_link(context.current[:info][:html_url])
|
126
133
|
end
|
127
134
|
end
|
128
135
|
|
129
136
|
def commits
|
130
137
|
return unless context.current[:type] == :pull_request
|
131
|
-
return
|
138
|
+
return unless context.current[:commits]
|
132
139
|
return if context.current[:commits].empty?
|
133
140
|
context.current[:commits].flatten
|
134
141
|
end
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-committed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Bauers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rack
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.6'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.6'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: capistrano
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -145,10 +159,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
159
|
version: '0'
|
146
160
|
requirements: []
|
147
161
|
rubyforge_project:
|
148
|
-
rubygems_version: 2.
|
162
|
+
rubygems_version: 2.5.1
|
149
163
|
signing_key:
|
150
164
|
specification_version: 4
|
151
165
|
summary: Tells you what Capistrano 3 is going to deploy based on GitHub commits since
|
152
166
|
the last release.
|
153
167
|
test_files: []
|
154
|
-
has_rdoc:
|