redmine_github_hook 2.2.0 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 0a6ff195525b5c076cf4462b8b8e8086cf6951fc
4
- data.tar.gz: 488774f618ee936d027a1f1a3717b2269c4f9e5c
2
+ SHA256:
3
+ metadata.gz: e557b9c48ee315b46a409c913a296b78ad7667832b77e2f377c3f2f969f4b4e0
4
+ data.tar.gz: 1906894bae718bd12f182ffc30410a84839be42b150a706f21c312d4b98c4ec5
5
5
  SHA512:
6
- metadata.gz: 3b6e88ba8fedd6a4e33151b8d11f6d93b2f824ae71ce6203c8eca5933fd8fdba22096d8a902ff68bcd9c5ffb6c343b02974d836ea7abcb90cdc885a9b65c9101
7
- data.tar.gz: b72341171add46e10e8503cd2ebd6ffb0cef3231ba45580924689c1427c69df9552c4fa19419adf265dd02fb8c0391d6c79f129cde317cfe6f08c580399de85f
6
+ metadata.gz: b876106487d0e71584dd3f430e859b77ad9bfcc1155b8eb67612fb8865f1b0f9c411d45300d1772a6db337b2b98362b77a60f416ec4ecd8af38fa86a3304938e
7
+ data.tar.gz: 516cf70b6d902b863b3f7646ed69613250bd3c1d9736ddcc4afe7b947ad1ebb05dc0601e10d62b10ec4916a04d34626f48491b0c9d947f6b35600f3ab69213b1
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
2
 
3
3
  # Use the gems defined in the plugins gemspec
4
4
  gemspec(:path => File.dirname(__FILE__))
data/Rakefile CHANGED
@@ -1,9 +1,9 @@
1
1
  require "bundler/gem_tasks"
2
- require 'rake/testtask'
2
+ require "rake/testtask"
3
3
 
4
4
  Rake::TestTask.new do |t|
5
5
  t.libs << "test"
6
- files = FileList['test/**/*test.rb']
6
+ files = FileList["test/**/*test.rb"]
7
7
  t.test_files = files
8
8
  t.verbose = true
9
9
  end
@@ -1,4 +1,4 @@
1
- require 'json'
1
+ require "json"
2
2
 
3
3
  class GithubHookController < ApplicationController
4
4
  skip_before_filter :verify_authenticity_token, :check_if_login_required
@@ -1,8 +1,11 @@
1
1
  module GithubHook
2
2
  class NullLogger
3
3
  def debug(*_); end
4
+
4
5
  def info(*_); end
6
+
5
7
  def warn(*_); end
8
+
6
9
  def error(*_); end
7
10
  end
8
11
  end
@@ -1,6 +1,6 @@
1
1
  module GithubHook
2
2
  class Updater
3
- GIT_BIN = Redmine::Configuration['scm_git_command'] || "git"
3
+ GIT_BIN = Redmine::Configuration["scm_git_command"] || "git"
4
4
 
5
5
  attr_writer :logger
6
6
 
@@ -23,7 +23,7 @@ module GithubHook
23
23
  repository.fetch_changesets
24
24
  tr2 = Time.now
25
25
 
26
- logger.info { " GithubHook: Redmine repository updated: #{repository.identifier} (Git: #{time_diff_milli(tg1,tg2)}ms, Redmine: #{time_diff_milli(tr1,tr2)}ms)" }
26
+ logger.info { " GithubHook: Redmine repository updated: #{repository.identifier} (Git: #{time_diff_milli(tg1, tg2)}ms, Redmine: #{time_diff_milli(tr1, tr2)}ms)" }
27
27
  end
28
28
  end
29
29
 
@@ -40,7 +40,7 @@ module GithubHook
40
40
  logger.debug { " GithubHook: Executing command: '#{command}'" }
41
41
 
42
42
  # Get a path to a temp file
43
- logfile = Tempfile.new('github_hook_exec')
43
+ logfile = Tempfile.new("github_hook_exec")
44
44
  logfile.close
45
45
 
46
46
  full_command = "#{command} > #{logfile.path} 2>&1"
@@ -54,9 +54,9 @@ module GithubHook
54
54
 
55
55
  output_from_command = File.readlines(logfile.path)
56
56
  if success
57
- logger.debug { " GithubHook: Command output: #{output_from_command.inspect}"}
57
+ logger.debug { " GithubHook: Command output: #{output_from_command.inspect}" }
58
58
  else
59
- logger.error { " GithubHook: Command '#{command}' didn't exit properly. Full output: #{output_from_command.inspect}"}
59
+ logger.error { " GithubHook: Command '#{command}' didn't exit properly. Full output: #{output_from_command.inspect}" }
60
60
  end
61
61
 
62
62
  return success
@@ -64,62 +64,82 @@ module GithubHook
64
64
  logfile.unlink if logfile && logfile.respond_to?(:unlink)
65
65
  end
66
66
 
67
- # Finds the Redmine project in the database based on the given project identifier
67
+ # Finds the Redmine project in the database based on the given project
68
+ # identifier
68
69
  def find_project
69
70
  identifier = get_identifier
70
71
  project = Project.find_by_identifier(identifier.downcase)
71
- raise ActiveRecord::RecordNotFound, "No project found with identifier '#{identifier}'" if project.nil?
72
- return project
72
+ fail(
73
+ ActiveRecord::RecordNotFound,
74
+ "No project found with identifier '#{identifier}'"
75
+ ) if project.nil?
76
+ project
73
77
  end
74
78
 
75
79
  # Returns the Redmine Repository object we are trying to update
76
80
  def find_repositories
77
81
  project = find_project
78
- repositories = project.repositories.select do |repo|
79
- repo.is_a?(Repository::Git)
80
- end
82
+ repositories = git_repositories(project)
81
83
 
82
- if repositories.nil? or repositories.length == 0
83
- raise TypeError, "Project '#{project.to_s}' ('#{project.identifier}') has no repository"
84
- end
85
-
86
- # if a specific repository id is passed in url parameter "repository_id", then try to find it in
87
- # the list of current project repositories and use only this and not all to pull changes from
88
- # (issue #54)
89
- if params.has_key?(:repository_id)
84
+ # if a specific repository id is passed in url parameter "repository_id",
85
+ # then try to find it in the list of current project repositories and use
86
+ # only this and not all to pull changes from (issue #54)
87
+ if params.key?(:repository_id)
90
88
  param_repo = repositories.select do |repo|
91
89
  repo.identifier == params[:repository_id]
92
90
  end
93
91
 
94
- if param_repo.nil? or param_repo.length == 0
95
- logger.info { " GithubHook: The repository '#{params[:repository_id]}' isn't in the list of projects repos. Updating all repos instead." }
92
+ if param_repo.nil? || param_repo.length == 0
93
+ logger.info {
94
+ "GithubHook: The repository '#{params[:repository_id]}' isn't " \
95
+ "in the list of projects repos. Updating all repos instead."
96
+ }
96
97
 
97
98
  else
98
99
  repositories = param_repo
99
100
  end
100
101
  end
101
102
 
102
- return repositories
103
+ repositories
103
104
  end
104
105
 
105
- # Gets the project identifier from the querystring parameters and if that's not supplied, assume
106
- # the Github repository name is the same as the project identifier.
106
+ # Gets the project identifier from the querystring parameters and if that's
107
+ # not supplied, assume the Github repository name is the same as the project
108
+ # identifier.
107
109
  def get_identifier
108
110
  identifier = get_project_name
109
- raise ActiveRecord::RecordNotFound, "Project identifier not specified" if identifier.nil?
110
- return identifier
111
+ fail(
112
+ ActiveRecord::RecordNotFound,
113
+ "Project identifier not specified"
114
+ ) if identifier.nil?
115
+ identifier.to_s
111
116
  end
112
117
 
113
- # Attempts to find the project name. It first looks in the params, then in the
114
- # payload if params[:project_id] isn't given.
118
+ # Attempts to find the project name. It first looks in the params, then in
119
+ # the payload if params[:project_id] isn't given.
115
120
  def get_project_name
116
- params[:project_id] || (payload['repository'] ? payload['repository']['name'] : nil)
121
+ project_id = params[:project_id]
122
+ name_from_repository = payload.fetch("repository", {}).fetch("name", nil)
123
+ project_id || name_from_repository
117
124
  end
118
125
 
119
126
  def git_command(command)
120
127
  GIT_BIN + " #{command}"
121
128
  end
122
129
 
130
+ def git_repositories(project)
131
+ repositories = project.repositories.select do |repo|
132
+ repo.is_a?(Repository::Git)
133
+ end
134
+ if repositories.empty?
135
+ fail(
136
+ TypeError,
137
+ "Project '#{project}' ('#{project.identifier}') has no repository"
138
+ )
139
+ end
140
+ repositories || []
141
+ end
142
+
123
143
  def logger
124
144
  @logger || NullLogger.new
125
145
  end
@@ -134,12 +154,14 @@ module GithubHook
134
154
 
135
155
  # Fetches updates from the remote repository
136
156
  def update_repository(repository)
137
- command = git_command('fetch origin')
138
- if exec(command, repository.url)
139
- command = git_command("fetch origin \"+refs/heads/*:refs/heads/*\"")
140
- exec(command, repository.url)
141
- end
157
+ command = git_command("fetch origin")
158
+ fetch = exec(command, repository.url)
159
+ return nil unless fetch
160
+
161
+ command = git_command(
162
+ "fetch --prune origin \"+refs/heads/*:refs/heads/*\""
163
+ )
164
+ exec(command, repository.url)
142
165
  end
143
-
144
166
  end
145
167
  end
data/config/routes.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  RedmineApp::Application.routes.draw do
2
- match 'github_hook' => 'github_hook#index', :via => [:post]
3
- match 'github_hook' => 'github_hook#welcome', :via => [:get]
2
+ match "github_hook" => 'github_hook#index', :via => [:post]
3
+ match "github_hook" => 'github_hook#welcome', :via => [:get]
4
4
  end
data/init.rb CHANGED
@@ -1,10 +1,10 @@
1
- require 'redmine'
1
+ require "redmine"
2
2
 
3
3
  Redmine::Plugin.register :redmine_github_hook do
4
- name 'Redmine Github Hook plugin'
5
- author 'Jakob Skjerning'
6
- description 'This plugin allows your Redmine installation to receive Github post-receive notifications'
7
- url 'https://github.com/koppen/redmine_github_hook'
8
- author_url 'http://mentalized.net'
4
+ name "Redmine Github Hook plugin"
5
+ author "Jakob Skjerning"
6
+ description "This plugin allows your Redmine installation to receive Github post-receive notifications"
7
+ url "https://github.com/koppen/redmine_github_hook"
8
+ author_url "http://mentalized.net"
9
9
  version RedmineGithubHook::VERSION
10
10
  end
@@ -1,3 +1,3 @@
1
1
  module RedmineGithubHook
2
- VERSION = "2.2.0"
2
+ VERSION = "2.2.1"
3
3
  end
@@ -1,7 +1,7 @@
1
1
  # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
2
+ lib = File.expand_path("../lib", __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'redmine_github_hook/version'
4
+ require "redmine_github_hook/version"
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "redmine_github_hook"
@@ -1,7 +1,7 @@
1
- require 'test_helper'
1
+ require "test_helper"
2
2
 
3
- require 'test/unit'
4
- require 'mocha'
3
+ require "minitest"
4
+ require "mocha"
5
5
 
6
6
  class GithubHookControllerTest < ActionController::TestCase
7
7
  def json
@@ -65,7 +65,7 @@ class GithubHookControllerTest < ActionController::TestCase
65
65
  end
66
66
 
67
67
  def setup
68
- Project.stubs(:find_by_identifier).with('github').returns(project)
68
+ Project.stubs(:find_by_identifier).with("github").returns(project)
69
69
 
70
70
  # Make sure we don't run actual commands in test
71
71
  GithubHook::Updater.any_instance.expects(:system).never
@@ -76,21 +76,24 @@ class GithubHookControllerTest < ActionController::TestCase
76
76
  post :index, :payload => json
77
77
  end
78
78
 
79
- def test_should_render_ok_when_done
79
+ def test_should_render_response_from_github_hook_when_done
80
80
  GithubHook::Updater.any_instance.expects(:update_repository).returns(true)
81
81
  do_post
82
82
  assert_response :success
83
- assert_equal 'OK', @response.body
83
+ assert_match "GithubHook: Redmine repository updated", @response.body
84
84
  end
85
85
 
86
86
  def test_should_render_error_message
87
- GithubHook::Updater.any_instance.expects(:update_repository).raises(ActiveRecord::RecordNotFound.new("Repository not found"))
87
+ GithubHook::Updater
88
+ .any_instance
89
+ .expects(:update_repository)
90
+ .raises(ActiveRecord::RecordNotFound.new("Repository not found"))
88
91
  do_post
89
92
  assert_response :not_found
90
93
  assert_equal({
91
- "title" => "ActiveRecord::RecordNotFound",
92
- "message" => "Repository not found"
93
- }, JSON.parse(@response.body))
94
+ "title" => "ActiveRecord::RecordNotFound",
95
+ "message" => "Repository not found"
96
+ }, JSON.parse(@response.body))
94
97
  end
95
98
 
96
99
  def test_should_not_require_login
@@ -115,5 +118,4 @@ class GithubHookControllerTest < ActionController::TestCase
115
118
  get :index
116
119
  assert_response :success
117
120
  end
118
-
119
121
  end
data/test/test_helper.rb CHANGED
@@ -1,2 +1,2 @@
1
1
  # Load the normal Rails helper from the Redmine host app
2
- require File.expand_path(File.dirname(__FILE__) + '/../../../test/test_helper')
2
+ require File.expand_path(File.dirname(__FILE__) + "/../../../test/test_helper")
@@ -1,9 +1,9 @@
1
1
  # require 'test_helper'
2
- require "test/unit"
2
+ require "minitest/autorun"
3
3
  require_relative "../../../app/services/github_hook/message_logger"
4
4
 
5
- class MessageLoggerTest < Test::Unit::TestCase
6
- setup do
5
+ class MessageLoggerTest < Minitest::Test
6
+ def setup
7
7
  @logger = GithubHook::MessageLogger.new
8
8
  end
9
9
 
@@ -1,10 +1,9 @@
1
- require 'test_helper'
1
+ require "test_helper"
2
2
 
3
- require 'test/unit'
4
- require 'mocha'
5
-
6
- class GithubHookUpdaterTest < Test::Unit::TestCase
3
+ require "minitest/autorun"
4
+ require "mocha"
7
5
 
6
+ class GithubHookUpdaterTest < Minitest::Test
8
7
  def project
9
8
  return @project if @project
10
9
 
@@ -21,10 +20,21 @@ class GithubHookUpdaterTest < Test::Unit::TestCase
21
20
  @repository
22
21
  end
23
22
 
23
+ # rubocop:disable Metrics/LineLength
24
24
  def payload
25
25
  # Ruby hash with the parsed data from the JSON payload
26
- {"before" => "5aef35982fb2d34e9d9d4502f6ede1072793222d", "repository"=>{"url" => "http://github.com/defunkt/github", "name" => "github", "description" => "You're lookin' at it.", "watchers"=>5, "forks"=>2, "private"=>1, "owner"=>{"email" => "chris@ozmm.org", "name" => "defunkt"}}, "commits"=>[{"id" => "41a212ee83ca127e3c8cf465891ab7216a705f59", "url" => "http://github.com/defunkt/github/commit/41a212ee83ca127e3c8cf465891ab7216a705f59", "author"=>{"email" => "chris@ozmm.org", "name" => "Chris Wanstrath"}, "message" => "okay i give in", "timestamp" => "2008-02-15T14:57:17-08:00", "added"=>["filepath.rb"]}, {"id" => "de8251ff97ee194a289832576287d6f8ad74e3d0", "url" => "http://github.com/defunkt/github/commit/de8251ff97ee194a289832576287d6f8ad74e3d0", "author"=>{"email" => "chris@ozmm.org", "name" => "Chris Wanstrath"}, "message" => "update pricing a tad", "timestamp" => "2008-02-15T14:36:34-08:00"}], "after" => "de8251ff97ee194a289832576287d6f8ad74e3d0", "ref" => "refs/heads/master"}
27
- end
26
+ {
27
+ "before" => "5aef35982fb2d34e9d9d4502f6ede1072793222d",
28
+ "repository" => {"url" => "http://github.com/defunkt/github", "name" => "github", "description" => "You're lookin' at it.", "watchers" => 5, "forks" => 2, "private" => 1, "owner" => {"email" => "chris@ozmm.org", "name" => "defunkt"}},
29
+ "commits" => [
30
+ {"id" => "41a212ee83ca127e3c8cf465891ab7216a705f59", "url" => "http://github.com/defunkt/github/commit/41a212ee83ca127e3c8cf465891ab7216a705f59", "author" => {"email" => "chris@ozmm.org", "name" => "Chris Wanstrath"}, "message" => "okay i give in", "timestamp" => "2008-02-15T14:57:17-08:00", "added" => ["filepath.rb"]},
31
+ {"id" => "de8251ff97ee194a289832576287d6f8ad74e3d0", "url" => "http://github.com/defunkt/github/commit/de8251ff97ee194a289832576287d6f8ad74e3d0", "author" => {"email" => "chris@ozmm.org", "name" => "Chris Wanstrath"}, "message" => "update pricing a tad", "timestamp" => "2008-02-15T14:36:34-08:00"}
32
+ ],
33
+ "after" => "de8251ff97ee194a289832576287d6f8ad74e3d0",
34
+ "ref" => "refs/heads/master"
35
+ }
36
+ end
37
+ # rubocop:enable Metrics/LineLength
28
38
 
29
39
  def build_updater(payload, options = {})
30
40
  updater = GithubHook::Updater.new(payload, options)
@@ -38,7 +48,7 @@ class GithubHookUpdaterTest < Test::Unit::TestCase
38
48
  end
39
49
 
40
50
  def setup
41
- Project.stubs(:find_by_identifier).with('github').returns(project)
51
+ Project.stubs(:find_by_identifier).with("github").returns(project)
42
52
 
43
53
  # Make sure we don't run actual commands in test
44
54
  GithubHook::Updater.any_instance.expects(:system).never
@@ -50,7 +60,7 @@ class GithubHookUpdaterTest < Test::Unit::TestCase
50
60
  end
51
61
 
52
62
  def test_uses_repository_name_as_project_identifier
53
- Project.expects(:find_by_identifier).with('github').returns(project)
63
+ Project.expects(:find_by_identifier).with("github").returns(project)
54
64
  updater.call
55
65
  end
56
66
 
@@ -60,20 +70,40 @@ class GithubHookUpdaterTest < Test::Unit::TestCase
60
70
  end
61
71
 
62
72
  def test_resets_repository_when_fetch_origin_succeeds
63
- updater.expects(:exec).with("git fetch origin", repository.url).returns(true)
64
- updater.expects(:exec).with("git fetch origin \"+refs/heads/*:refs/heads/*\"", repository.url)
73
+ updater
74
+ .expects(:exec)
75
+ .with("git fetch origin", repository.url)
76
+ .returns(true)
77
+ updater
78
+ .expects(:exec)
79
+ .with(
80
+ "git fetch --prune origin \"+refs/heads/*:refs/heads/*\"",
81
+ repository.url
82
+ )
65
83
  updater.call
66
84
  end
67
85
 
68
86
  def test_resets_repository_when_fetch_origin_fails
69
- updater.expects(:exec).with("git fetch origin", repository.url).returns(false)
70
- updater.expects(:exec).with("git reset --soft refs\/remotes\/origin\/master", repository.url).never
87
+ updater
88
+ .expects(:exec)
89
+ .with("git fetch origin", repository.url)
90
+ .returns(false)
91
+ updater
92
+ .expects(:exec)
93
+ .with("git reset --soft refs\/remotes\/origin\/master", repository.url)
94
+ .never
71
95
  updater.call
72
96
  end
73
97
 
74
98
  def test_uses_project_identifier_from_request
75
- Project.expects(:find_by_identifier).with('redmine').returns(project)
76
- updater = build_updater(payload, {:project_id => 'redmine'})
99
+ Project.expects(:find_by_identifier).with("redmine").returns(project)
100
+ updater = build_updater(payload, :project_id => "redmine")
101
+ updater.call
102
+ end
103
+
104
+ def test_uses_project_identifier_from_request_as_numeric
105
+ Project.expects(:find_by_identifier).with("42").returns(project)
106
+ updater = build_updater(payload, :project_id => 42)
77
107
  updater.call
78
108
  end
79
109
 
@@ -92,7 +122,7 @@ class GithubHookUpdaterTest < Test::Unit::TestCase
92
122
  another_repository.expects(:fetch_changesets).never
93
123
  project.repositories << another_repository
94
124
 
95
- updater = build_updater(payload, {:repository_id => 'redmine'})
125
+ updater = build_updater(payload, :repository_id => "redmine")
96
126
  updater.expects(:exec).with("git fetch origin", repository.url)
97
127
  updater.call
98
128
  end
@@ -102,7 +132,7 @@ class GithubHookUpdaterTest < Test::Unit::TestCase
102
132
  another_repository.expects(:fetch_changesets).returns(true)
103
133
  project.repositories << another_repository
104
134
 
105
- updater = build_updater(payload, {:repository_id => 'redmine or something'})
135
+ updater = build_updater(payload, :repository_id => "redmine or something")
106
136
  updater.expects(:exec).with("git fetch origin", repository.url)
107
137
  updater.call
108
138
  end
@@ -116,23 +146,23 @@ class GithubHookUpdaterTest < Test::Unit::TestCase
116
146
 
117
147
  def test_raises_record_not_found_if_project_identifier_not_given
118
148
  assert_raises ActiveRecord::RecordNotFound do
119
- updater = build_updater(payload.merge({"repository" => {}}))
149
+ updater = build_updater(payload.merge("repository" => {}))
120
150
  updater.call
121
151
  end
122
152
  end
123
153
 
124
154
  def test_raises_record_not_found_if_project_not_found
125
155
  assert_raises ActiveRecord::RecordNotFound do
126
- Project.expects(:find_by_identifier).with('foobar').returns(nil)
127
- updater = build_updater(payload, {:project_id => "foobar"})
156
+ Project.expects(:find_by_identifier).with("foobar").returns(nil)
157
+ updater = build_updater(payload, :project_id => "foobar")
128
158
  updater.call
129
159
  end
130
160
  end
131
161
 
132
162
  def test_downcases_identifier
133
163
  # Redmine project identifiers are always downcase
134
- Project.expects(:find_by_identifier).with('redmine').returns(project)
135
- updater = build_updater(payload, {:project_id => 'ReDmInE'})
164
+ Project.expects(:find_by_identifier).with("redmine").returns(project)
165
+ updater = build_updater(payload, :project_id => "ReDmInE")
136
166
  updater.call
137
167
  end
138
168
 
@@ -144,19 +174,19 @@ class GithubHookUpdaterTest < Test::Unit::TestCase
144
174
 
145
175
  def test_raises_type_error_if_project_has_no_repository
146
176
  assert_raises TypeError do
147
- project = mock('project', :to_s => 'My Project', :identifier => 'github')
177
+ project = mock("project", :to_s => "My Project", :identifier => "github")
148
178
  project.expects(:repositories).returns([])
149
- Project.expects(:find_by_identifier).with('github').returns(project)
179
+ Project.expects(:find_by_identifier).with("github").returns(project)
150
180
  updater.call
151
181
  end
152
182
  end
153
183
 
154
184
  def test_raises_type_error_if_repository_is_not_git
155
185
  assert_raises TypeError do
156
- project = mock('project', :to_s => 'My Project', :identifier => 'github')
186
+ project = mock("project", :to_s => "My Project", :identifier => "github")
157
187
  repository = Repository::Subversion.new
158
188
  project.expects(:repositories).at_least(1).returns([repository])
159
- Project.expects(:find_by_identifier).with('github').returns(project)
189
+ Project.expects(:find_by_identifier).with("github").returns(project)
160
190
  updater.call
161
191
  end
162
192
  end
@@ -165,7 +195,7 @@ class GithubHookUpdaterTest < Test::Unit::TestCase
165
195
  updater = GithubHook::Updater.new(payload)
166
196
  updater.stubs(:exec).returns(true)
167
197
 
168
- logger = stub('Logger')
198
+ logger = stub("Logger")
169
199
  logger.expects(:info).at_least_once
170
200
  updater.logger = logger
171
201
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redmine_github_hook
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jakob Skjerning
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-30 00:00:00.000000000 Z
11
+ date: 2018-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -85,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
85
85
  version: '0'
86
86
  requirements: []
87
87
  rubyforge_project:
88
- rubygems_version: 2.4.6
88
+ rubygems_version: 2.7.6
89
89
  signing_key:
90
90
  specification_version: 4
91
91
  summary: Allow your Redmine installation to be notified when changes have been pushed