You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2016/06/10 14:59:28 UTC
[whimsy] branch master updated (ba98d41 -> fdbd1db)
This is an automated email from the ASF dual-hosted git repository.
rubys pushed a change to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git.
from ba98d41 refactor administrivia into the common helper
new 5924a8e get one test passing again
new 92087ec if nodejs exists, use it
new 7b73e20 on second thought, don't commit
new fdbd1db remove agenda work files after every test
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.
Summary of changes:
lib/whimsy/asf/svn.rb | 7 ++++---
www/board/agenda/spec/actions_spec.rb | 7 +++++--
www/board/agenda/spec/react_server.rb | 3 ++-
www/board/agenda/spec/secretary_spec.rb | 18 +++++-------------
www/board/agenda/spec/spec_helper.rb | 8 ++++++--
5 files changed, 22 insertions(+), 21 deletions(-)
--
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].
[whimsy] 02/04: if nodejs exists, use it
Posted by ru...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rubys pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git
commit 92087ec2456b5ed4c3174f25b1e172335196e9e7
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Fri Jun 10 09:05:38 2016 -0400
if nodejs exists, use it
---
www/board/agenda/spec/react_server.rb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/www/board/agenda/spec/react_server.rb b/www/board/agenda/spec/react_server.rb
index d94b0c9..acec0b4 100644
--- a/www/board/agenda/spec/react_server.rb
+++ b/www/board/agenda/spec/react_server.rb
@@ -26,7 +26,8 @@ class ReactServer
server.close
# spawn a server process
- @@pid = spawn('node', '-e',
+ nodejs = (`which nodejs`.empty? ? 'node' : 'nodejs')
+ @@pid = spawn(nodejs, '-e',
Ruby2JS.convert(@@server, {ivars: {:@port => @@port}}))
# wait for server to start
--
To stop receiving notification emails like this one, please contact
"commits@whimsical.apache.org" <co...@whimsical.apache.org>.
[whimsy] 01/04: get one test passing again
Posted by ru...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rubys pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git
commit 5924a8e866420f905f72a5c13dbecc9724526361
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Fri Jun 10 06:34:46 2016 -0400
get one test passing again
---
lib/whimsy/asf/svn.rb | 3 ++-
www/board/agenda/spec/secretary_spec.rb | 1 +
www/board/agenda/spec/spec_helper.rb | 5 +++--
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/lib/whimsy/asf/svn.rb b/lib/whimsy/asf/svn.rb
index 28996db..5375830 100644
--- a/lib/whimsy/asf/svn.rb
+++ b/lib/whimsy/asf/svn.rb
@@ -139,6 +139,7 @@ module ASF
# updating a new file
previous_contents = nil
contents = yield tmpdir, ''
+ previous_contents = File.read(tmpfile) if File.file? tmpfile
end
# create/update the temporary copy
@@ -167,7 +168,7 @@ module ASF
end
# fail if there are pending changes
- unless rc == 0 and `svn st`.empty?
+ unless rc == 0 and `svn st #{tmpfile || tmpdir}`.empty?
raise "svn failure #{path.inspect}"
end
ensure
diff --git a/www/board/agenda/spec/secretary_spec.rb b/www/board/agenda/spec/secretary_spec.rb
index 57ca350..3484ba9 100644
--- a/www/board/agenda/spec/secretary_spec.rb
+++ b/www/board/agenda/spec/secretary_spec.rb
@@ -94,6 +94,7 @@ feature 'report' do
begin
eval(File.read('views/actions/draft.json.rb'), nil, 'draft.json.rb')
+ system 'svn', 'update', file
expect(File.exist? file).to be true
expect(File.read file).to eq draft
ensure
diff --git a/www/board/agenda/spec/spec_helper.rb b/www/board/agenda/spec/spec_helper.rb
index 78b9a51..15c867d 100644
--- a/www/board/agenda/spec/spec_helper.rb
+++ b/www/board/agenda/spec/spec_helper.rb
@@ -50,9 +50,10 @@ module MockServer
# intercept commits, adding the files to the cleanup list
def system(*args)
args.flatten!
- if args[1] == 'commit'
- @cleanup <<= args[2] if @cleanup
+ if args[1] == 'commit' and @cleanup
+ @cleanup <<= args[2]
else
+ args.reject! {|arg| Array === arg}
@transcript ||= ''
@transcript += `#{Shellwords.join(args)}`
end
--
To stop receiving notification emails like this one, please contact
"commits@whimsical.apache.org" <co...@whimsical.apache.org>.
[whimsy] 04/04: remove agenda work files after every test
Posted by ru...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rubys pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git
commit fdbd1dba5a24ec96b9c958893c70ef62c02f3f42
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Fri Jun 10 10:58:47 2016 -0400
remove agenda work files after every test
---
www/board/agenda/spec/actions_spec.rb | 1 +
1 file changed, 1 insertion(+)
diff --git a/www/board/agenda/spec/actions_spec.rb b/www/board/agenda/spec/actions_spec.rb
index 5d52492..e5933c1 100644
--- a/www/board/agenda/spec/actions_spec.rb
+++ b/www/board/agenda/spec/actions_spec.rb
@@ -372,6 +372,7 @@ feature 'server actions' do
if @commits
@commits.each do |name, contents|
Agenda[name].replace :mtime=>0
+ File.unlink "#{AGENDA_WORK}/#{name}"
end
end
end
--
To stop receiving notification emails like this one, please contact
"commits@whimsical.apache.org" <co...@whimsical.apache.org>.
[whimsy] 03/04: on second thought, don't commit
Posted by ru...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rubys pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git
commit 7b73e204be865765353f1457a52b9966ec1f9db0
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Fri Jun 10 10:19:25 2016 -0400
on second thought, don't commit
tests shouldn't make changes that might affect other tests
---
lib/whimsy/asf/svn.rb | 4 ++--
www/board/agenda/spec/actions_spec.rb | 6 ++++--
www/board/agenda/spec/secretary_spec.rb | 19 +++++--------------
www/board/agenda/spec/spec_helper.rb | 9 ++++++---
4 files changed, 17 insertions(+), 21 deletions(-)
diff --git a/lib/whimsy/asf/svn.rb b/lib/whimsy/asf/svn.rb
index 5375830..f83eb25 100644
--- a/lib/whimsy/asf/svn.rb
+++ b/lib/whimsy/asf/svn.rb
@@ -162,9 +162,9 @@ module ASF
rc = _.system ['svn', 'diff', tmpfile]
else
# commit the changes
- rc = _.system ['svn', 'commit', '--message', msg.untaint,
+ rc = _.system ['svn', 'commit', tmpfile || tmpdir,
['--username', env.user, '--password', env.password],
- tmpfile || tmpdir]
+ '--message', msg.untaint]
end
# fail if there are pending changes
diff --git a/www/board/agenda/spec/actions_spec.rb b/www/board/agenda/spec/actions_spec.rb
index 4e6fd8f..5d52492 100644
--- a/www/board/agenda/spec/actions_spec.rb
+++ b/www/board/agenda/spec/actions_spec.rb
@@ -369,8 +369,10 @@ feature 'server actions' do
File.unlink 'test/work/data/test.bak'
end
- @cleanup.each do |file|
- Agenda[File.basename(file)].replace :mtime=>0
+ if @commits
+ @commits.each do |name, contents|
+ Agenda[name].replace :mtime=>0
+ end
end
end
end
diff --git a/www/board/agenda/spec/secretary_spec.rb b/www/board/agenda/spec/secretary_spec.rb
index 3484ba9..14c1696 100644
--- a/www/board/agenda/spec/secretary_spec.rb
+++ b/www/board/agenda/spec/secretary_spec.rb
@@ -89,20 +89,11 @@ feature 'report' do
@message = 'Draft minutes for 2015-02-18'
@text = draft
- file = "#{FOUNDATION_BOARD}/board_minutes_2015_02_18.txt"
-
- begin
- eval(File.read('views/actions/draft.json.rb'), nil, 'draft.json.rb')
-
- system 'svn', 'update', file
- expect(File.exist? file).to be true
- expect(File.read file).to eq draft
- ensure
- if File.exist? file
- `svn rm #{file}`
- `svn commit #{file} -m cleanup`
- end
- end
+ eval(File.read('views/actions/draft.json.rb'), nil, 'draft.json.rb')
+
+ minutes = @agenda.sub('_agenda_', '_minutes_')
+ expect(@commits).to include(minutes)
+ expect(@commits[minutes]).to eq draft
end
end
diff --git a/www/board/agenda/spec/spec_helper.rb b/www/board/agenda/spec/spec_helper.rb
index 15c867d..e8dcc20 100644
--- a/www/board/agenda/spec/spec_helper.rb
+++ b/www/board/agenda/spec/spec_helper.rb
@@ -50,14 +50,17 @@ module MockServer
# intercept commits, adding the files to the cleanup list
def system(*args)
args.flatten!
- if args[1] == 'commit' and @cleanup
- @cleanup <<= args[2]
+ if args[1] == 'commit'
+ @commits ||= {}
+ @commits[File.basename args[2]] = File.read(args[2])
+ `svn revert #{args[2]}`
+ 0
else
args.reject! {|arg| Array === arg}
@transcript ||= ''
@transcript += `#{Shellwords.join(args)}`
+ $?.exitstatus
end
- 0
end
end
--
To stop receiving notification emails like this one, please contact
"commits@whimsical.apache.org" <co...@whimsical.apache.org>.