[whimsy] branch master updated: Fix failing test
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 73485a8b Fix failing test 73485a8b is described below commit 73485a8b2722bcb9a154510dcc8d041145792c7d Author: Sebb AuthorDate: Wed May 18 23:23:29 2022 +0100 Fix failing test --- lib/spec/lib/svn_wunderbar_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spec/lib/svn_wunderbar_spec.rb b/lib/spec/lib/svn_wunderbar_spec.rb index a9075439..1f4a33d0 100644 --- a/lib/spec/lib/svn_wunderbar_spec.rb +++ b/lib/spec/lib/svn_wunderbar_spec.rb @@ -99,10 +99,10 @@ describe "ASF::SVN.svn_" do it "auth: should override env: and user:/password:" do rc1, out1 = _json do |_| - ASF::SVN.svn_('help', 'help', _, {auth: [['a','b']], env: ENV_.new('c','d'), user: 'user', password: 'pass', verbose: true, dryrun: true}) + ASF::SVN.svn_('help', 'help', _, {auth: [['--username', 'a', '--password', 'b']], env: ENV_.new('c','d'), user: 'user', password: 'pass', verbose: true, dryrun: true}) end expect(rc1).to eq(0) -exp = [["svn", "help", [["a", "b"]], "--no-auth-cache", "--non-interactive", "--", "help"], {}] +exp = [["svn", "help", "--non-interactive", "--", "help"], {}] act = out1['transcript'][1] expect(act).to eq(exp.inspect) end
[whimsy] branch master updated: Let _svn_build_cmd handle auth
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new f3a7d535 Let _svn_build_cmd handle auth f3a7d535 is described below commit f3a7d535b06b4a59aec779eec4fc5fdebc348fe5 Author: Sebb AuthorDate: Wed May 18 22:55:36 2022 +0100 Let _svn_build_cmd handle auth --- lib/whimsy/asf/svn.rb | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/whimsy/asf/svn.rb b/lib/whimsy/asf/svn.rb index 086d5c42..0d1981a9 100644 --- a/lib/whimsy/asf/svn.rb +++ b/lib/whimsy/asf/svn.rb @@ -468,14 +468,16 @@ module ASF %i[env user password].each do |k| options.delete(k) end +# convert auth for use by _svn_build_cmd +auth.flatten.each_slice(2) do |a, b| + options[:user] = b if a == "--username" + options[:password] = b if a == "--password" +end end cmd, stdin = self._svn_build_cmd(command, path, options) sysopts[:stdin] = stdin if stdin - if auth # insert after the command name -cmd.insert(2, auth, '--no-auth-cache') - end # This ensures the output is captured in the response _.system ['echo', [cmd, sysopts].inspect] if options[:verbose] # includes auth
[whimsy] branch master updated: No longer used
This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 2b539092 No longer used 2b539092 is described below commit 2b539092ae4ae8c4963a72b56dbedb98e9788da5 Author: Sebb AuthorDate: Wed May 18 22:54:51 2022 +0100 No longer used --- www/secretary/workbench/tasks.rb | 20 +++- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/www/secretary/workbench/tasks.rb b/www/secretary/workbench/tasks.rb index 3b3e18e5..dc5172ac 100644 --- a/www/secretary/workbench/tasks.rb +++ b/www/secretary/workbench/tasks.rb @@ -58,25 +58,11 @@ class Wunderbar::JsonBuilder super end - def svn *args -args << svnauth if env.password and %(checkout update commit).include?(args.first) -_.system! 'svn', *args - end - - # alternate version using library method + # invoke svn using library method # assumes correct ordering of parameters - def svn!(command,path,options={}) + def svn!(command, path, options={}) options[:env] = env if env.password and %(checkout update commit).include?(command) -ASF::SVN.svn_!(command,path,_,options) - end - - def svnauth -[ - '--non-interactive', - '--no-auth-cache', - '--username', env.user, - '--password', env.password -] +ASF::SVN.svn_!(command, path, _, options) end # Commit new file(s) and update associated index
[whimsy] branch master updated: avoid use of chars as a field as it looks like a method call
This is an automated email from the ASF dual-hosted git repository. rubys pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git The following commit(s) were added to refs/heads/master by this push: new 61271403 avoid use of chars as a field as it looks like a method call 61271403 is described below commit 6127140356016335df7c87eee2e25141858ffcda Author: Sam Ruby AuthorDate: Wed May 18 05:31:02 2022 -0700 avoid use of chars as a field as it looks like a method call --- www/board/agenda/views/utils.js.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/board/agenda/views/utils.js.rb b/www/board/agenda/views/utils.js.rb index 70ffe36b..c137d923 100644 --- a/www/board/agenda/views/utils.js.rb +++ b/www/board/agenda/views/utils.js.rb @@ -7,10 +7,10 @@ Server = {directors: []} # Escape HTML characters so that raw text can be safely inserted as HTML def htmlEscape(string) - return string.gsub(htmlEscape.chars) {|c| htmlEscape.replacement[c]} + return string.gsub(htmlEscape.special) {|c| htmlEscape.replacement[c]} end -htmlEscape.chars = Regexp.new('[&<>]', 'g') +htmlEscape.special = Regexp.new('[&<>]', 'g') htmlEscape.replacement = {'&' => '', '<' => '', '>' => ''} # escape a string so that it can be used as a regular expression