Created
September 16, 2012 18:13
-
-
Save arvidj/3733570 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
require 'rubygems' | |
require 'enumerator' | |
require 'mechanize' | |
require 'json' | |
key = '' # FILL IN YOUR API-KEY | |
sysexts = [ | |
# 'about', | |
# 'aboutmodules', | |
# 'adodb', | |
# 'belog', | |
# 'beuser', | |
'cli', | |
'cms', | |
'context_help', | |
'cshmanual', | |
'css_styled_content', | |
'extensionmanager', | |
'extra_page_cm_options', | |
'feedit', | |
'felogin', | |
'filelist', | |
'form', | |
'func', | |
'func_wizards', | |
'impexp', | |
'indexed_search', | |
'info', | |
'info_pagetsconfig', | |
'install', | |
'integrity', | |
'lang', | |
'opendocs', | |
'openid', | |
'perm', | |
'recordlist', | |
'recycler', | |
'reports', | |
'rsaauth', | |
'rtehtmlarea', | |
'saltedpasswords', | |
'scheduler', | |
'setup', | |
'statictemplates', | |
'sv', | |
'sys_action', | |
'sys_note', | |
't3editor', | |
't3skin', | |
'taskcenter', | |
'tsconfig_help', | |
'tstemplate', | |
'tstemplate_analyzer', | |
'tstemplate_ceditor', | |
'tstemplate_info', | |
'tstemplate_objbrowser', | |
'viewpage', | |
'wizard_crpages', | |
'wizard_sortpages', | |
] | |
headers = { | |
'X-Redmine-API-Key' => key, | |
'Content-Type' => 'application/json' | |
} | |
url = 'http://forge.typo3.org/issues.json' | |
data = { | |
'issue' => { | |
'subject' => 'Superfluous brackets in sysexts "aboutmodules", "adodb", "belog" and "beuser" after namespaces move', | |
'tracker_id' => 4, # Task | |
'project_id' => 27, # TYPO3 4 & 6 / Core | |
'priority_id' => 4, # Should have | |
'description' => ' | |
The following syntax appears in various parts of these extensions: | |
<pre> | |
- if (((!$root && !$DBmount) && $elFromTable) && $GLOBALS[\'TCA\'][$table][\'ctrl\'][\'sortby\']) { | |
+ if (!$root && !$DBmount && $elFromTable && $GLOBALS[\'TCA\'][$table][\'ctrl\'][\'sortby\']) { | |
</pre> | |
', | |
'category_id' => 1133, # Code cleanup | |
'assigned_to_id' => 27934, # Arvid Jakobsson | |
'status_id' => 1, # New | |
'parent_id' => 40113, # Issue #40113: Superfluous brackets in functions after namespaces move | |
'custom_field_values' => { | |
'4' => '6.0', # TYPO3 Version | |
'5' => '', # PHP Version | |
'8' => '', # Complexity | |
} | |
} | |
} | |
sysexts.each_slice(4) do | exts | | |
exts.map!{ | e | '"' + e + '"' } | |
if exts.length == 1 | |
extssubj = "sysext " + exts[0] | |
else | |
extssubj = exts[0..exts.length-2].join(', ') | |
extssubj += " and " + exts[exts.length-1] | |
extssubj = 'sysexts ' + extssubj | |
end | |
subj = "Superfluous brackets in #{extssubj} after namespaces move" | |
puts subj | |
data['issue']['subject'] = subj | |
m = Mechanize.new | |
begin | |
p = m.post url, data.to_json, headers | |
rescue Mechanize::ResponseCodeError => e | |
puts e.inspect() | |
puts e.page.content | |
break | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment