janky 0.11.1 → 0.12.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 58d52422d4f7c22902eeeff06e8b63671fa21594
4
- data.tar.gz: a65162a5e523477f2c0ecd29d2db9d97c6318295
3
+ metadata.gz: f039c609da4b8b8d5caa60c860aa4140adf8a8a1
4
+ data.tar.gz: 17f08463778bd8cf3ffc17d2d2e90a59421b9116
5
5
  SHA512:
6
- metadata.gz: 3416367277f1c30ab0609b74f99f9a667b4385be56f611bce7fa26698866d6f4aa6d9bf79db0db2ddda752160774d0b839bc210db4f84943550e562ef1558fd1
7
- data.tar.gz: 62e67c8e6719ccd9082dc2bcac8eee5edd0af591097f8fae1da50f5696123e16598a9bd9fc601b319beba2c2f00d65724244dcc2fe177f44a6d6236ebf2deb26
6
+ metadata.gz: cd76f405decebd3f22357f43d2761121ffd35cd132e602f6c39aa2f9cb16b07f8870f5042a349244c7d6037c5ffcf41bf90666711b7cc9837010e5b73477a125
7
+ data.tar.gz: 73df879a5376b721b045f0c54555ab736c7077b794ecfa7aa2c4caee2e34c71e29c8f78d982913e274c25dd3013a53765698c9eb1ff3edaa5a9ee35698c40aaa
data/CHANGES CHANGED
@@ -1,3 +1,9 @@
1
+ = 0.12.0 / 2017-06-05
2
+ * Update yajl-ruby to work with Ruby 2.4
3
+ * Add the ability to use MySQL 5.7
4
+ * Update mocha to a more recent version
5
+ * Allow DATABASE_URL to be specified for tests
6
+
1
7
  = 0.11.1 / 2015-02-20
2
8
  * Update gemspec to include the hubot chat service files
3
9
  * Update recommended Jenkins version in the README
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  Janky
2
2
  =====
3
3
 
4
+ [![Gem Version](https://badge.fury.io/rb/janky.svg)](https://badge.fury.io/rb/janky)
5
+
4
6
  This is Janky, a continuous integration server built on top of
5
7
  [Jenkins][], controlled by [Hubot][], and designed for [GitHub][].
6
8
 
@@ -246,10 +248,16 @@ Sends notifications to Hubot via [janky script](http://git.io/hubot-janky).
246
248
 
247
249
  Required settings:
248
250
 
251
+ * `JANKY_CHAT=hubot`
249
252
  * `JANKY_CHAT_HUBOT_URL`: URL to your Hubot instance.
250
253
  * `JANKY_CHAT_HUBOT_ROOMS`: List of rooms which can be set via `ci set room`.
251
254
  * For IRC: Comma-separated list of channels `"#room, #another-room"`
252
255
  * For Campfire/HipChat: List with room id and name `"34343:room, 23223:another-room"`
256
+ * For Slack: List with room names `"room, another-room"`
257
+
258
+ Installation:
259
+ * Add `require "janky/chat_service/hubot"` to the `config/environment.rb`
260
+ file **before** the `Janky.setup(ENV)` line.
253
261
 
254
262
  ### Authentication
255
263
 
data/Rakefile CHANGED
@@ -2,6 +2,10 @@ $LOAD_PATH.unshift(File.expand_path("../lib", __FILE__))
2
2
  ENV["RACK_ENV"] ||= "development"
3
3
 
4
4
  require "janky"
5
+
6
+ class ActiveRecord::ConnectionAdapters::Mysql2Adapter
7
+ NATIVE_DATABASE_TYPES[:primary_key] = "int(11) auto_increment PRIMARY KEY"
8
+ end
5
9
  Janky.setup(ENV)
6
10
  require "janky/tasks"
7
11
 
@@ -20,7 +20,7 @@ EOL
20
20
  s.add_dependency "sinatra", "~>1.3"
21
21
  s.add_dependency "sinatra_auth_github", "~>1.0.0"
22
22
  s.add_dependency "mustache", "~>0.11"
23
- s.add_dependency "yajl-ruby", "~>1.1.0"
23
+ s.add_dependency "yajl-ruby", "~>1.3.0"
24
24
  s.add_dependency "activerecord", "~>3.2.0"
25
25
  s.add_dependency "broach", "~>0.2"
26
26
  s.add_dependency "replicate", "~>1.4"
@@ -32,7 +32,7 @@ EOL
32
32
 
33
33
  # test
34
34
  s.add_development_dependency "database_cleaner", "~>0.6"
35
- s.add_development_dependency "mocha", "~>0.10.4"
35
+ s.add_development_dependency "mocha", "~>0.14.0"
36
36
 
37
37
  s.files = %w[
38
38
  CHANGES
@@ -53,6 +53,12 @@ require "janky/views/layout"
53
53
  require "janky/views/index"
54
54
  require "janky/views/console"
55
55
 
56
+ # TODO Remove after upgrading to activerecord 4.x
57
+ require "active_record/connection_adapters/mysql2_adapter"
58
+ class ActiveRecord::ConnectionAdapters::Mysql2Adapter
59
+ NATIVE_DATABASE_TYPES[:primary_key] = "int(11) auto_increment PRIMARY KEY"
60
+ end
61
+
56
62
  # This is Janky, a continuous integration server. Checkout the 'app'
57
63
  # method on this module for an overview of the different components
58
64
  # involved.
@@ -95,10 +101,6 @@ module Janky
95
101
  database = URI(settings["DATABASE_URL"])
96
102
  adapter = database.scheme == "postgres" ? "postgresql" : database.scheme
97
103
  encoding = database.scheme == "postgres" ? "unicode" : "utf8"
98
- if settings["JANKY_BASE_URL"][-1] != ?/
99
- warn "JANKY_BASE_URL must have a trailing slash"
100
- settings["JANKY_BASE_URL"] = settings["JANKY_BASE_URL"] + "/"
101
- end
102
104
  base_url = URI(settings["JANKY_BASE_URL"]).to_s
103
105
  Build.base_url = base_url
104
106
 
@@ -30,7 +30,7 @@ module Janky
30
30
  end
31
31
 
32
32
  def create_url
33
- URI("#{@base_url}job/#{@build.repo_job_name}/build")
33
+ URI.join(@base_url, "job/#{@build.repo_job_name}/build")
34
34
  end
35
35
 
36
36
  def context_push
@@ -28,14 +28,14 @@ module Janky
28
28
  uri = @url
29
29
  user = uri.user
30
30
  pass = uri.password
31
- path = uri.path
31
+ path = File.join(uri.path, "janky")
32
32
 
33
33
  http = Net::HTTP.new(uri.host, uri.port)
34
34
  if uri.scheme == "https"
35
35
  http.use_ssl = true
36
36
  end
37
37
 
38
- post = Net::HTTP::Post.new("#{path}/janky")
38
+ post = Net::HTTP::Post.new(path)
39
39
  post.basic_auth(user, pass) if user && pass
40
40
  post["Content-Type"] = "application/json"
41
41
  post.body = {:message => message, :room => room}.to_json
@@ -46,7 +46,7 @@ module Janky
46
46
  end
47
47
 
48
48
  def valid_signature?
49
- digest = OpenSSL::Digest::Digest.new("sha1")
49
+ digest = OpenSSL::Digest::SHA1.new
50
50
  signature = @request.env["HTTP_X_HUB_SIGNATURE"].split("=").last
51
51
 
52
52
  signature == OpenSSL::HMAC.hexdigest(digest, @secret, data)
@@ -1,3 +1,3 @@
1
1
  module Janky
2
- VERSION = "0.11.1"
2
+ VERSION = "0.12.0"
3
3
  end
@@ -2,7 +2,7 @@ $LOAD_PATH.unshift(File.expand_path("../../lib", __FILE__))
2
2
 
3
3
  require "janky"
4
4
  require "test/unit"
5
- require "mocha"
5
+ require "mocha/setup"
6
6
  require "database_cleaner"
7
7
 
8
8
  class Test::Unit::TestCase
@@ -28,7 +28,7 @@ class Test::Unit::TestCase
28
28
  def environment
29
29
  env = default_environment
30
30
  ENV.each do |key, value|
31
- if key =~ /^JANKY_/
31
+ if key =~ /^JANKY_/ || key == "DATABASE_URL"
32
32
  env[key] = value
33
33
  end
34
34
  end
@@ -67,7 +67,7 @@ class Test::Unit::TestCase
67
67
 
68
68
  repo = Janky::Repository.find_by_name!(repo_name)
69
69
  payload = gh_payload(repo, branch, pusher, [gh_commit(commit)])
70
- digest = OpenSSL::Digest::Digest.new("sha1")
70
+ digest = OpenSSL::Digest::SHA1.new
71
71
  sig = OpenSSL::HMAC.hexdigest(digest, Janky::GitHub.secret,
72
72
  payload.to_json)
73
73
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: janky
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Rozet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-21 00:00:00.000000000 Z
11
+ date: 2017-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 1.1.0
75
+ version: 1.3.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 1.1.0
82
+ version: 1.3.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: activerecord
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -184,14 +184,14 @@ dependencies:
184
184
  requirements:
185
185
  - - "~>"
186
186
  - !ruby/object:Gem::Version
187
- version: 0.10.4
187
+ version: 0.14.0
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
- version: 0.10.4
194
+ version: 0.14.0
195
195
  description: Janky is a Continuous Integration server
196
196
  email:
197
197
  executables: []
@@ -303,7 +303,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
303
303
  version: '0'
304
304
  requirements: []
305
305
  rubyforge_project:
306
- rubygems_version: 2.2.2
306
+ rubygems_version: 2.2.5
307
307
  signing_key:
308
308
  specification_version: 4
309
309
  summary: Continuous Integration server built on top of Jenkins and designed for GitHub