janky 0.9.14.rc1 → 0.9.14
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.
- data/CHANGES +3 -1
- data/COPYING +1 -1
- data/README.md +19 -4
- data/janky.gemspec +6 -0
- data/lib/janky/chat_service/hipchat.rb +6 -1
- data/lib/janky/github/receiver.rb +4 -4
- data/lib/janky/hubot.rb +4 -1
- data/lib/janky/version.rb +1 -1
- metadata +14 -6
data/CHANGES
CHANGED
data/COPYING
CHANGED
data/README.md
CHANGED
@@ -107,7 +107,20 @@ After configuring the app (see below), create the database:
|
|
107
107
|
|
108
108
|
[gist]: https://gist.github.com/1497335
|
109
109
|
|
110
|
-
|
110
|
+
Upgrading
|
111
|
+
---------
|
112
|
+
|
113
|
+
We **strongly recommend** backing up your Janky database before upgrading.
|
114
|
+
|
115
|
+
The general process is to then upgrade the gem, and then run migrate. Here is how
|
116
|
+
you do that on a local box you have access to (this process will differ for Heroku):
|
117
|
+
|
118
|
+
cd [PATH-TO-JANKY]
|
119
|
+
gem update janky
|
120
|
+
rake db:migrate
|
121
|
+
|
122
|
+
Configuring
|
123
|
+
-----------
|
111
124
|
|
112
125
|
Janky is configured using environment variables. Use the `heroku config`
|
113
126
|
command:
|
@@ -139,7 +152,7 @@ Optional database settings:
|
|
139
152
|
* `JANKY_DATABASE_SOCKET`: Path to the database socket. Example:
|
140
153
|
`/var/run/mysql5/mysqld.sock`.
|
141
154
|
|
142
|
-
|
155
|
+
### GitHub Enterprise
|
143
156
|
|
144
157
|
Using Janky with [GitHub Enterprise][ghe] requires one extra setting:
|
145
158
|
|
@@ -155,7 +168,7 @@ https://github.com/blog/1227-commit-status-api
|
|
155
168
|
To update pull requests with the build status generate an OAuth token
|
156
169
|
like so:
|
157
170
|
|
158
|
-
|
171
|
+
curl -u username:password -d '{ "scopes": [ "repo:status" ], "note": "janky" }' https://api.github.com/authorizations
|
159
172
|
|
160
173
|
then set `JANKY_GITHUB_STATUS_TOKEN`.
|
161
174
|
|
@@ -264,7 +277,9 @@ Contributing
|
|
264
277
|
------------
|
265
278
|
|
266
279
|
Fork the [Janky repository on GitHub](https://github.com/github/janky) and
|
267
|
-
send a Pull Request.
|
280
|
+
send a Pull Request. Note that any changes to behavior without tests will
|
281
|
+
be rejected. If you are adding significant new features, please add both
|
282
|
+
tests and documentation.
|
268
283
|
|
269
284
|
Copying
|
270
285
|
-------
|
data/janky.gemspec
CHANGED
@@ -8,6 +8,12 @@ Gem::Specification.new "janky", Janky::VERSION do |s|
|
|
8
8
|
s.homepage = "https://github.com/github/janky"
|
9
9
|
s.has_rdoc = false
|
10
10
|
|
11
|
+
s.post_install_message = <<-EOL
|
12
|
+
If you are upgrading from Janky 0.9.13, you will want to add a JANKY_BRANCH parameter
|
13
|
+
to your config/default.xml.erb. See
|
14
|
+
https://github.com/github/janky/commit/0fc6214e3a75cc138aed46a2493980440e848aa3#commitcomment-1815400 for details.
|
15
|
+
EOL
|
16
|
+
|
11
17
|
# runtime
|
12
18
|
s.add_dependency "rake", "~>0.9.2"
|
13
19
|
s.add_dependency "sinatra", "~>1.3"
|
@@ -13,7 +13,12 @@ module Janky
|
|
13
13
|
@from = settings["JANKY_CHAT_HIPCHAT_FROM"] || "CI"
|
14
14
|
end
|
15
15
|
|
16
|
-
def speak(message, room_id, options = {
|
16
|
+
def speak(message, room_id, options = {})
|
17
|
+
default = {
|
18
|
+
:color => "yellow",
|
19
|
+
:message_format => "text"
|
20
|
+
}
|
21
|
+
options = default.merge(options)
|
17
22
|
@client[room_id].send(@from, message, options)
|
18
23
|
end
|
19
24
|
|
@@ -25,6 +25,10 @@ module Janky
|
|
25
25
|
return Rack::Response.new("Invalid signature", 403).finish
|
26
26
|
end
|
27
27
|
|
28
|
+
if @request.content_type != "application/json"
|
29
|
+
return Rack::Response.new("Invalid Content-Type", 400).finish
|
30
|
+
end
|
31
|
+
|
28
32
|
if !payload.head_commit
|
29
33
|
return Rack::Response.new("Ignored", 400).finish
|
30
34
|
end
|
@@ -57,10 +61,6 @@ module Janky
|
|
57
61
|
end
|
58
62
|
|
59
63
|
def data!
|
60
|
-
if @request.content_type != "application/json"
|
61
|
-
return Rack::Response.new("Invalid Content-Type", 400).finish
|
62
|
-
end
|
63
|
-
|
64
64
|
body = ""
|
65
65
|
@request.body.each { |chunk| body << chunk }
|
66
66
|
body
|
data/lib/janky/hubot.rb
CHANGED
@@ -81,7 +81,7 @@ module Janky
|
|
81
81
|
end
|
82
82
|
|
83
83
|
# Get the status of a repository's branch.
|
84
|
-
get %r{\/([-_\.0-9a-zA-Z]+)\/([-_
|
84
|
+
get %r{\/([-_\.0-9a-zA-Z]+)\/([-_\+\.a-zA-z0-9\/]+)} do |repo_name, branch_name|
|
85
85
|
limit = params["limit"]
|
86
86
|
|
87
87
|
repo = find_repo(repo_name)
|
@@ -114,6 +114,9 @@ ci setup github/janky [name]
|
|
114
114
|
ci toggle janky
|
115
115
|
ci rooms
|
116
116
|
ci set room janky development
|
117
|
+
ci status
|
118
|
+
ci status janky
|
119
|
+
ci status janky/master
|
117
120
|
EOS
|
118
121
|
end
|
119
122
|
end
|
data/lib/janky/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: janky
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.14
|
5
|
-
prerelease:
|
4
|
+
version: 0.9.14
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Simon Rozet
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-02-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -303,7 +303,15 @@ files:
|
|
303
303
|
- test/test_helper.rb
|
304
304
|
homepage: https://github.com/github/janky
|
305
305
|
licenses: []
|
306
|
-
post_install_message:
|
306
|
+
post_install_message: ! 'If you are upgrading from Janky 0.9.13, you will want to
|
307
|
+
add a JANKY_BRANCH parameter
|
308
|
+
|
309
|
+
to your config/default.xml.erb. See
|
310
|
+
|
311
|
+
https://github.com/github/janky/commit/0fc6214e3a75cc138aed46a2493980440e848aa3#commitcomment-1815400
|
312
|
+
for details.
|
313
|
+
|
314
|
+
'
|
307
315
|
rdoc_options: []
|
308
316
|
require_paths:
|
309
317
|
- lib
|
@@ -316,9 +324,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
316
324
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
317
325
|
none: false
|
318
326
|
requirements:
|
319
|
-
- - ! '
|
327
|
+
- - ! '>='
|
320
328
|
- !ruby/object:Gem::Version
|
321
|
-
version:
|
329
|
+
version: '0'
|
322
330
|
requirements: []
|
323
331
|
rubyforge_project:
|
324
332
|
rubygems_version: 1.8.23
|