backstop-deploys 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/backstop-deploys.gemspec +1 -0
- data/lib/backstop-deploys.rb +1 -0
- data/lib/backstop-deploys/version.rb +1 -1
- data/lib/backstop-deploys/web.rb +9 -3
- metadata +24 -13
data/backstop-deploys.gemspec
CHANGED
data/lib/backstop-deploys.rb
CHANGED
data/lib/backstop-deploys/web.rb
CHANGED
@@ -21,9 +21,11 @@ module Backstop
|
|
21
21
|
|
22
22
|
put '/deploys/:id' do |id|
|
23
23
|
app, version, start_time = parse_id(id)
|
24
|
+
description = params[:description]
|
24
25
|
halt [400, {:message => ':id should be in the format of app.version.epoch'}.to_json] if app.nil? or version.nil? or start_time.nil?
|
25
26
|
end_time = params[:end_time]
|
26
27
|
halt [400, {:message => ':source is a required param'}.to_json] unless source = params[:source]
|
28
|
+
title = "#{source}.#{app}.#{version}"
|
27
29
|
stream_exists = true
|
28
30
|
data = nil
|
29
31
|
|
@@ -38,14 +40,18 @@ module Backstop
|
|
38
40
|
# events already exists, we just need to update
|
39
41
|
event = events.first
|
40
42
|
event_id = event['id']
|
41
|
-
payload = { :title =>
|
42
|
-
payload[:end_time] =
|
43
|
+
payload = { :title => title }
|
44
|
+
payload[:end_time] = end_time if end_time
|
45
|
+
payload[:description] = description if description
|
46
|
+
Scrolls.log(:lib => 'backstop-deploys', :title => title, :start_time => start_time, :end_time => end_time, :description => description)
|
43
47
|
RestClient.put "#{api_endpoint}/annotations/deploys/#{event_id}", payload
|
44
48
|
else
|
45
49
|
# new event needs to be created
|
46
|
-
payload = { :start_time => start_time, :title =>
|
50
|
+
payload = { :start_time => start_time, :title => title, :source => source }
|
47
51
|
payload[:end_time] = end_time if end_time
|
52
|
+
payload[:description] = description if description
|
48
53
|
q = payload.map { |k,v| "#{k}=#{v}" }.sort.join("&")
|
54
|
+
Scrolls.log(:lib => 'backstop-deploys', :title => title, :start_time => start_time, :end_time => end_time, :description => description)
|
49
55
|
RestClient.post "#{api_endpoint}/annotations/deploys", q
|
50
56
|
end
|
51
57
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: backstop-deploys
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-10-18 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack-test
|
16
|
-
requirement: &
|
16
|
+
requirement: &70241047936460 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70241047936460
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rake
|
27
|
-
requirement: &
|
27
|
+
requirement: &70241047935660 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70241047935660
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &70241047934620 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70241047934620
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: webmock
|
49
|
-
requirement: &
|
49
|
+
requirement: &70241047934180 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70241047934180
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: rest-client
|
60
|
-
requirement: &
|
60
|
+
requirement: &70241047933600 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,21 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70241047933600
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: scrolls
|
71
|
+
requirement: &70241047932740 !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
73
|
+
requirements:
|
74
|
+
- - ! '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
type: :runtime
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: *70241047932740
|
69
80
|
- !ruby/object:Gem::Dependency
|
70
81
|
name: sinatra
|
71
|
-
requirement: &
|
82
|
+
requirement: &70241047931620 !ruby/object:Gem::Requirement
|
72
83
|
none: false
|
73
84
|
requirements:
|
74
85
|
- - ! '>='
|
@@ -76,7 +87,7 @@ dependencies:
|
|
76
87
|
version: '0'
|
77
88
|
type: :runtime
|
78
89
|
prerelease: false
|
79
|
-
version_requirements: *
|
90
|
+
version_requirements: *70241047931620
|
80
91
|
description: An extension to backstop to allow submission to Librato Metrics
|
81
92
|
email:
|
82
93
|
- michael.gorsuch@gmail.com
|