capistrano-fiesta 1.5.2 → 2.0.1
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 +4 -4
- data/.travis.yml +3 -1
- data/lib/capistrano/fiesta.rb +1 -0
- data/lib/capistrano/fiesta/github.rb +7 -0
- data/lib/capistrano/fiesta/repo_url_parser.rb +14 -0
- data/lib/capistrano/fiesta/report.rb +4 -7
- data/lib/capistrano/fiesta/timestamp_normalizer.rb +18 -0
- data/lib/capistrano/fiesta/version.rb +1 -1
- data/lib/capistrano/tasks/fiesta.rake +6 -3
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 713f3f018e034e340711b332992b14bc2efa27ad
|
4
|
+
data.tar.gz: 4f0db3184951ec2294ac8937937059251c738390
|
5
5
|
SHA512:
|
6
|
-
metadata.gz: '
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0180b58dd41a92cb6a4e501605edc861d7c13abac0fb801ec9082dc212210cae9ded6d3b3e395f5603b7d760c5cde904f420f389694485bde0597aa88decca0e'
|
7
|
+
data.tar.gz: 2b6c334ca55fe53a0da861aa9aa98b3325f2c902d1ae8829bf04f6efe6bc4d3926c4e0bd5e33c08244bea01b73f2d3b2bf41bfed09e4444b44ce4cd6f9653234
|
data/.travis.yml
CHANGED
data/lib/capistrano/fiesta.rb
CHANGED
@@ -4,6 +4,9 @@ require "yaml"
|
|
4
4
|
module Capistrano
|
5
5
|
module Fiesta
|
6
6
|
class Github
|
7
|
+
class << self
|
8
|
+
attr_accessor :config
|
9
|
+
end
|
7
10
|
|
8
11
|
def self.client
|
9
12
|
new.client
|
@@ -16,6 +19,10 @@ module Capistrano
|
|
16
19
|
private
|
17
20
|
|
18
21
|
def config
|
22
|
+
self.class.config || default_config
|
23
|
+
end
|
24
|
+
|
25
|
+
def default_config
|
19
26
|
{ access_token: hub_config["oauth_token"] }
|
20
27
|
end
|
21
28
|
|
@@ -9,12 +9,13 @@ require "capistrano/fiesta/logger"
|
|
9
9
|
require "capistrano/fiesta/story"
|
10
10
|
require "capistrano/fiesta/auto_composed_story"
|
11
11
|
require "capistrano/fiesta/release"
|
12
|
+
require "capistrano/fiesta/timestamp_normalizer"
|
12
13
|
|
13
14
|
module Capistrano
|
14
15
|
module Fiesta
|
15
16
|
class Report
|
16
17
|
extend AttrExtras.mixin
|
17
|
-
pattr_initialize :
|
18
|
+
pattr_initialize :repo, [:last_released_at, :comment, :auto_compose]
|
18
19
|
attr_query :auto_compose?
|
19
20
|
|
20
21
|
def announce(config = {})
|
@@ -76,13 +77,9 @@ module Capistrano
|
|
76
77
|
[]
|
77
78
|
end
|
78
79
|
|
79
|
-
def repo
|
80
|
-
github_url.match(/github.com[:\/](\S+\/\S+)\.git/)[1]
|
81
|
-
end
|
82
|
-
|
83
80
|
def last_released_at
|
84
|
-
if
|
85
|
-
|
81
|
+
if @last_released_at
|
82
|
+
TimestampNormalizer.new(@last_released_at).run.iso8601
|
86
83
|
end
|
87
84
|
end
|
88
85
|
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require "attr_extras/explicit"
|
2
|
+
|
3
|
+
module Capistrano
|
4
|
+
module Fiesta
|
5
|
+
class TimestampNormalizer
|
6
|
+
extend AttrExtras.mixin
|
7
|
+
pattr_initialize :timestamp
|
8
|
+
|
9
|
+
def run
|
10
|
+
if timestamp.is_a?(Time)
|
11
|
+
timestamp
|
12
|
+
else
|
13
|
+
Time.parse(timestamp.to_s + "Z")
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -18,13 +18,16 @@ namespace :fiesta do
|
|
18
18
|
task :announce do
|
19
19
|
run_locally do
|
20
20
|
report.announce(slack_params)
|
21
|
-
report.create_release(timestamp)
|
22
21
|
Capistrano::Fiesta::Logger.logs.each { |log| warn log }
|
23
22
|
end
|
24
23
|
end
|
25
24
|
|
26
25
|
def build_report
|
27
|
-
Capistrano::Fiesta::Report.new(
|
26
|
+
Capistrano::Fiesta::Report.new(repo, report_options)
|
27
|
+
end
|
28
|
+
|
29
|
+
def repo
|
30
|
+
Capistrano::Fiesta::RepoUrlParser.new(repo_url).repo
|
28
31
|
end
|
29
32
|
|
30
33
|
def report
|
@@ -33,7 +36,7 @@ namespace :fiesta do
|
|
33
36
|
|
34
37
|
def report_options
|
35
38
|
{
|
36
|
-
|
39
|
+
last_released_at: last_release,
|
37
40
|
comment: fetch(:fiesta_comment),
|
38
41
|
auto_compose: fetch(:fiesta_auto_compose)
|
39
42
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-fiesta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jens Balvig
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: attr_extras
|
@@ -189,10 +189,12 @@ files:
|
|
189
189
|
- lib/capistrano/fiesta/github.rb
|
190
190
|
- lib/capistrano/fiesta/logger.rb
|
191
191
|
- lib/capistrano/fiesta/release.rb
|
192
|
+
- lib/capistrano/fiesta/repo_url_parser.rb
|
192
193
|
- lib/capistrano/fiesta/report.rb
|
193
194
|
- lib/capistrano/fiesta/slack_dummy.rb
|
194
195
|
- lib/capistrano/fiesta/story.rb
|
195
196
|
- lib/capistrano/fiesta/template.rb
|
197
|
+
- lib/capistrano/fiesta/timestamp_normalizer.rb
|
196
198
|
- lib/capistrano/fiesta/version.rb
|
197
199
|
- lib/capistrano/tasks/fiesta.rake
|
198
200
|
- lib/capistrano/templates/draft.erb
|
@@ -216,7 +218,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
216
218
|
version: '0'
|
217
219
|
requirements: []
|
218
220
|
rubyforge_project:
|
219
|
-
rubygems_version: 2.
|
221
|
+
rubygems_version: 2.6.13
|
220
222
|
signing_key:
|
221
223
|
specification_version: 4
|
222
224
|
summary: Celebrate your releases!
|