middleman-deploy-with-notifications 0.0.30 → 0.0.31
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/Gemfile +1 -1
- data/Gemfile.lock +96 -0
- data/lib/middleman-deploy-with-notifications/commands.rb +21 -16
- data/lib/middleman-deploy-with-notifications/pkg-info.rb +1 -1
- data/middleman-deploy-with-notifications.gemspec +2 -2
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3e1ecf7ec07a01399eb4563426e637ec7afe669
|
4
|
+
data.tar.gz: 9638f7e4e69a433fe250208397a83c352b03406e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b624214ae6beddfe061439704454af0f4dfb628e100712954906cbb74455961f9c82789b9941009025668e31812f1a11daafc0812690e8abeec1c52f3e4af49
|
7
|
+
data.tar.gz: 239a6bcffa54ded3ecb78db45ac517d7007faf3b160af3b27829f79b46688d3f91eca5aeb84022dbf15dd4f8c76d09e2e2a36bd259e27961261aad59b75c46ae
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
middleman-deploy-with-notifications (0.0.29)
|
5
|
+
airbrake
|
6
|
+
colorize
|
7
|
+
hipchat
|
8
|
+
middleman-core (>= 3.0.0)
|
9
|
+
ptools
|
10
|
+
|
11
|
+
GEM
|
12
|
+
remote: https://rubygems.org/
|
13
|
+
specs:
|
14
|
+
activesupport (3.2.13)
|
15
|
+
i18n (= 0.6.1)
|
16
|
+
multi_json (~> 1.0)
|
17
|
+
airbrake (3.1.12)
|
18
|
+
activesupport
|
19
|
+
builder
|
20
|
+
json
|
21
|
+
aruba (0.4.11)
|
22
|
+
childprocess (>= 0.2.3)
|
23
|
+
cucumber (>= 1.1.1)
|
24
|
+
ffi (>= 1.0.11)
|
25
|
+
rspec (>= 2.7.0)
|
26
|
+
builder (3.2.0)
|
27
|
+
childprocess (0.3.9)
|
28
|
+
ffi (~> 1.0, >= 1.0.11)
|
29
|
+
colorize (0.5.8)
|
30
|
+
cucumber (1.2.5)
|
31
|
+
builder (>= 2.1.2)
|
32
|
+
diff-lcs (>= 1.1.3)
|
33
|
+
gherkin (~> 2.11.7)
|
34
|
+
multi_json (~> 1.3)
|
35
|
+
diff-lcs (1.2.4)
|
36
|
+
ffi (1.8.1)
|
37
|
+
fivemat (1.2.1)
|
38
|
+
gherkin (2.11.8)
|
39
|
+
multi_json (~> 1.3)
|
40
|
+
hipchat (0.8.0)
|
41
|
+
httparty
|
42
|
+
httparty
|
43
|
+
httparty (0.11.0)
|
44
|
+
multi_json (~> 1.0)
|
45
|
+
multi_xml (>= 0.5.2)
|
46
|
+
i18n (0.6.1)
|
47
|
+
json (1.7.7)
|
48
|
+
listen (0.7.3)
|
49
|
+
middleman-core (3.0.13)
|
50
|
+
activesupport (~> 3.2.6)
|
51
|
+
bundler (~> 1.1)
|
52
|
+
listen (~> 0.7.3)
|
53
|
+
rack (~> 1.4.1)
|
54
|
+
rack-test (~> 0.6.1)
|
55
|
+
rb-fsevent (~> 0.9.3)
|
56
|
+
thor (~> 0.15.4)
|
57
|
+
tilt (~> 1.3.6)
|
58
|
+
multi_json (1.7.3)
|
59
|
+
multi_xml (0.5.3)
|
60
|
+
ptools (1.2.2)
|
61
|
+
rack (1.4.5)
|
62
|
+
rack-test (0.6.2)
|
63
|
+
rack (>= 1.0)
|
64
|
+
rake (0.9.6)
|
65
|
+
rb-fsevent (0.9.3)
|
66
|
+
rdoc (3.12.2)
|
67
|
+
json (~> 1.4)
|
68
|
+
rspec (2.13.0)
|
69
|
+
rspec-core (~> 2.13.0)
|
70
|
+
rspec-expectations (~> 2.13.0)
|
71
|
+
rspec-mocks (~> 2.13.0)
|
72
|
+
rspec-core (2.13.1)
|
73
|
+
rspec-expectations (2.13.0)
|
74
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
75
|
+
rspec-mocks (2.13.1)
|
76
|
+
simplecov (0.7.1)
|
77
|
+
multi_json (~> 1.0)
|
78
|
+
simplecov-html (~> 0.7.1)
|
79
|
+
simplecov-html (0.7.1)
|
80
|
+
thor (0.15.4)
|
81
|
+
tilt (1.3.7)
|
82
|
+
yard (0.8.6.1)
|
83
|
+
|
84
|
+
PLATFORMS
|
85
|
+
ruby
|
86
|
+
|
87
|
+
DEPENDENCIES
|
88
|
+
aruba (~> 0.4.11)
|
89
|
+
cucumber (~> 1.2.0)
|
90
|
+
fivemat
|
91
|
+
middleman-deploy-with-notifications!
|
92
|
+
rake (~> 0.9.2)
|
93
|
+
rdoc (~> 3.9)
|
94
|
+
rspec (~> 2.7)
|
95
|
+
simplecov
|
96
|
+
yard (~> 0.8.0)
|
@@ -32,6 +32,8 @@ module Middleman
|
|
32
32
|
:aliases => "-c",
|
33
33
|
:desc => "Remove orphaned files or directories on the remote host"
|
34
34
|
def deploy
|
35
|
+
# build before deploys
|
36
|
+
Middleman::Cli::Build.new.build
|
35
37
|
send("deploy_#{self.deploy_options.method}")
|
36
38
|
end
|
37
39
|
|
@@ -105,16 +107,23 @@ EOF
|
|
105
107
|
options
|
106
108
|
end
|
107
109
|
|
110
|
+
def notify_airbrake(short_rev, rev, who)
|
111
|
+
puts "Recording a timestamped deploy in Airbrake: #{short_rev}".green
|
112
|
+
url = "api_key=#{self.deploy_options.airbrake_api_key}" +
|
113
|
+
"&deploy[rails_env]=production" +
|
114
|
+
"&deploy[local_username]=#{who}" +
|
115
|
+
"&deploy[scm_repository]=git@github.com:140proof/280.140proof.com.git" +
|
116
|
+
"&deploy[scm_revision]=#{short_rev}"
|
117
|
+
`curl -d "#{url}" http://airbrake.io/deploys &> /dev/null`
|
118
|
+
end
|
119
|
+
|
108
120
|
def send_hc_mesg(mesg, fmt = "text")
|
109
121
|
uri = uri || URI.parse( "http://api.hipchat.com/v1/rooms/message" )
|
110
|
-
|
111
|
-
hipchat_rooms = [26057,39979] # Engineering + BAP hc rooms
|
112
|
-
|
113
|
-
hipchat_rooms.each do |room|
|
122
|
+
self.deploy_options.hipchat_rooms.each do |room|
|
114
123
|
Net::HTTP.post_form( uri, {
|
115
124
|
"format" => "json",
|
116
125
|
"color" => "random",
|
117
|
-
"auth_token" => hipchat_token,
|
126
|
+
"auth_token" => self.deploy_options.hipchat_token,
|
118
127
|
"room_id" => room,
|
119
128
|
"from" => "280 Deploy",
|
120
129
|
"message" => mesg,
|
@@ -149,18 +158,14 @@ EOF
|
|
149
158
|
github_user, github_project = `git remote -v | grep "/" | head -n1`.gsub( /.*:([\w_-]+)\/([\w_\.-]+).git.*/, '\1/\2' ).split( "/" )
|
150
159
|
github_project.chomp!
|
151
160
|
|
152
|
-
|
153
|
-
|
154
|
-
branch
|
155
|
-
comment
|
156
|
-
|
157
|
-
if self.deploy_options.airbrake_api_key
|
158
|
-
puts "Recording a timestamped deploy in Airbrake: #{rev}".green
|
159
|
-
url = "api_key=#{airbrake_api_key}&deploy[rails_env]=production&deploy[local_username]=#{who}&deploy[scm_repository]=git://github.com/140proof/280.140proof.com&deploy[scm_revision]=#{rev}"
|
160
|
-
`curl -d "#{url}" http://airbrake.io/deploys &> /dev/null`
|
161
|
-
end
|
161
|
+
rev = `git rev-parse HEAD`.gsub( /\s*$/, '' ).chomp
|
162
|
+
short_rev = `git rev-parse --short HEAD`.gsub( /\s*$/, '' ).chomp
|
163
|
+
branch = `git rev-parse --abbrev-ref HEAD`.gsub( /\s*/, '' ).chomp
|
164
|
+
comment = `git log -1 --pretty=%B`.gsub( /\s*$/, '' ).chomp
|
165
|
+
who = `git config --get github.user`.chomp
|
162
166
|
|
163
|
-
|
167
|
+
notify_airbrake(short_rev, rev, who) if self.deploy_options.airbrake_api_key
|
168
|
+
hipchat_start(who, github_project) if self.deploy_options.hipchat_token
|
164
169
|
|
165
170
|
puts "Deploying via rsync to #{user}@#{host}".red
|
166
171
|
|
@@ -6,8 +6,8 @@ Gem::Specification.new do |s|
|
|
6
6
|
s.name = Middleman::DeployWithNotifications::PACKAGE
|
7
7
|
s.version = Middleman::DeployWithNotifications::VERSION
|
8
8
|
s.platform = Gem::Platform::RUBY
|
9
|
-
s.authors = ["
|
10
|
-
s.email = ["
|
9
|
+
s.authors = ["Tom Vaughan", "John Manoogian III"]
|
10
|
+
s.email = ["thomas.david.vaughan@gmail.com"]
|
11
11
|
s.license = "MIT"
|
12
12
|
s.homepage = "http://github.com/jm3/middleman-deploy/"
|
13
13
|
s.summary = %q{Deploy a middleman built site over rsync or via git (e.g. gh-pages on github).}
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-deploy-with-notifications
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.31
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- John Manoogian III
|
8
7
|
- Tom Vaughan
|
8
|
+
- John Manoogian III
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-05-
|
12
|
+
date: 2013-05-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: middleman-core
|
@@ -84,7 +84,7 @@ dependencies:
|
|
84
84
|
description: Deploy a middleman-built site over rsync or via git with airbrake + hipchat
|
85
85
|
notifications.
|
86
86
|
email:
|
87
|
-
-
|
87
|
+
- thomas.david.vaughan@gmail.com
|
88
88
|
executables: []
|
89
89
|
extensions: []
|
90
90
|
extra_rdoc_files: []
|
@@ -92,6 +92,7 @@ files:
|
|
92
92
|
- .gitignore
|
93
93
|
- COPYING
|
94
94
|
- Gemfile
|
95
|
+
- Gemfile.lock
|
95
96
|
- README.md
|
96
97
|
- Rakefile
|
97
98
|
- THANKS
|