janky 0.9.14 → 0.9.15

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,9 @@
1
+ = 0.9.15 / 2013-07-25
2
+
3
+ * Upgrade sinatra_auth_github to make this work better with latest GitHub.com requirements
4
+
5
+ * Truncate MD5 digests in job names to 12 characters
6
+
1
7
  = 0.9.14 / 2013-02-26
2
8
 
3
9
  * Many doc changes and improvements
data/README.md CHANGED
@@ -90,7 +90,7 @@ Grab all the necessary files from [the gist][gist]:
90
90
 
91
91
  $ git clone git://gist.github.com/1497335 janky
92
92
 
93
- Then push up it to a new Heroku app:
93
+ Then push it up to a new Heroku app:
94
94
 
95
95
  $ cd janky
96
96
  $ heroku create --stack cedar
@@ -193,6 +193,7 @@ Required settings:
193
193
  * `JANKY_CHAT_HIPCHAT_FROM`: name that messages will appear be sent from.
194
194
  Defaults to `CI`.
195
195
  * `JANKY_HUBOT_USER` should be XMPP/Jabber username in format xxxxx_xxxxxx rather than email
196
+ * `JANKY_CHAT_DEFAULT_ROOM` should be the name of the room instead of the XMPP format, for example: `Engineers` instead of xxxx_xxxxxx.
196
197
 
197
198
  Installation:
198
199
 
@@ -215,6 +216,7 @@ a few extra settings:
215
216
  * `JANKY_AUTH_CLIENT_ID`: The client ID of the OAuth application.
216
217
  * `JANKY_AUTH_CLIENT_SECRET`: The client secret of the OAuth application.
217
218
  * `JANKY_AUTH_ORGANIZATION`: The organization name. Example: "github".
219
+ * `JANKY_AUTH_TEAM_ID`: An optional team ID to give auth to. Example: "1234".
218
220
 
219
221
  ### Hubot
220
222
 
data/janky.gemspec CHANGED
@@ -17,7 +17,7 @@ EOL
17
17
  # runtime
18
18
  s.add_dependency "rake", "~>0.9.2"
19
19
  s.add_dependency "sinatra", "~>1.3"
20
- s.add_dependency "sinatra_auth_github", "~>0.7.0"
20
+ s.add_dependency "sinatra_auth_github", "~>0.13.3"
21
21
  s.add_dependency "mustache", "~>0.11"
22
22
  s.add_dependency "yajl-ruby", "~>1.1.0"
23
23
  s.add_dependency "activerecord", "~>3.2.0"
data/lib/janky.rb CHANGED
@@ -93,6 +93,7 @@ module Janky
93
93
 
94
94
  database = URI(settings["DATABASE_URL"])
95
95
  adapter = database.scheme == "postgres" ? "postgresql" : database.scheme
96
+ encoding = database.scheme == "postgres" ? "unicode" : "utf8"
96
97
  if settings["JANKY_BASE_URL"][-1] != ?/
97
98
  warn "JANKY_BASE_URL must have a trailing slash"
98
99
  settings["JANKY_BASE_URL"] = settings["JANKY_BASE_URL"] + "/"
@@ -102,11 +103,13 @@ module Janky
102
103
 
103
104
  connection = {
104
105
  :adapter => adapter,
105
- :host => database.host,
106
+ :encoding => encoding,
107
+ :pool => 5,
106
108
  :database => database.path[1..-1],
107
109
  :username => database.user,
108
110
  :password => database.password,
109
- :reconnect => true,
111
+ :host => database.host,
112
+ :port => database.port
110
113
  }
111
114
  if socket = settings["JANKY_DATABASE_SOCKET"]
112
115
  connection[:socket] = socket
@@ -20,7 +20,7 @@ module Janky
20
20
 
21
21
  response = http.request(request)
22
22
 
23
- if response.code != "302"
23
+ if !%w[302 201].include?(response.code)
24
24
  Exception.push_http_response(response)
25
25
  raise Error, "Failed to create build"
26
26
  end
@@ -189,7 +189,7 @@ module Janky
189
189
  md5 << uri
190
190
  md5 << job_config_path.read
191
191
  md5 << builder.callback_url.to_s
192
- "#{github_owner}-#{github_name}-#{md5.hexdigest}"
192
+ "#{name}-#{md5.hexdigest[0,12]}"
193
193
  end
194
194
  end
195
195
  end
data/lib/janky/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Janky
2
- VERSION = "0.9.14"
2
+ VERSION = "0.9.15"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: janky
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.14
4
+ version: 0.9.15
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-27 00:00:00.000000000 Z
12
+ date: 2013-07-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -50,7 +50,7 @@ dependencies:
50
50
  requirements:
51
51
  - - ~>
52
52
  - !ruby/object:Gem::Version
53
- version: 0.7.0
53
+ version: 0.13.3
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
@@ -58,7 +58,7 @@ dependencies:
58
58
  requirements:
59
59
  - - ~>
60
60
  - !ruby/object:Gem::Version
61
- version: 0.7.0
61
+ version: 0.13.3
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: mustache
64
64
  requirement: !ruby/object:Gem::Requirement