public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/council-webapp:master commit in: /
@ 2011-05-24  9:41 Petteri Räty
  0 siblings, 0 replies; 9+ messages in thread
From: Petteri Räty @ 2011-05-24  9:41 UTC (permalink / raw
  To: gentoo-commits

commit:     f1ee1594b69d7fbf469b1f4693e455aef4f0bb7d
Author:     Joachim Filip Ignacy Bartosik <jbartosik <AT> gmail <DOT> com>
AuthorDate: Fri May  6 14:39:43 2011 +0000
Commit:     Petteri Räty <betelgeuse <AT> gentoo <DOT> org>
CommitDate: Fri May  6 14:45:47 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/council-webapp.git;a=commit;h=f1ee1594

.gitignore file

---
 .gitignore |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..2a03f8b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+site/.bundle
+site/db/*.sqlite3
+site/config/database.yml
+site/log/*.log
+site/tmp/**/*
+site/app/views/taglibs/auto
+*.swp



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/council-webapp:master commit in: /
@ 2011-05-24  9:41 Petteri Räty
  0 siblings, 0 replies; 9+ messages in thread
From: Petteri Räty @ 2011-05-24  9:41 UTC (permalink / raw
  To: gentoo-commits

commit:     6d86342c3076319087195c521d3978ea7eecb53f
Author:     Joachim Filip Ignacy Bartosik <jbartosik <AT> gmail <DOT> com>
AuthorDate: Fri May  6 14:24:29 2011 +0000
Commit:     Petteri Räty <betelgeuse <AT> gentoo <DOT> org>
CommitDate: Fri May  6 14:24:29 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/council-webapp.git;a=commit;h=6d86342c

Initial commit




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/council-webapp:master commit in: /
@ 2011-06-05 20:37 Petteri Räty
  0 siblings, 0 replies; 9+ messages in thread
From: Petteri Räty @ 2011-06-05 20:37 UTC (permalink / raw
  To: gentoo-commits

commit:     f53b6f39048e353fab224229f1cf17486a321313
Author:     Joachim Filip Ignacy Bartosik <jbartosik <AT> gmail <DOT> com>
AuthorDate: Mon May 23 10:29:44 2011 +0000
Commit:     Petteri Räty <betelgeuse <AT> gentoo <DOT> org>
CommitDate: Wed Jun  1 13:21:14 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/council-webapp.git;a=commit;h=f53b6f39

Add *.pyc to .gitignore

We don't want to track those files.

---
 .gitignore |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore
index 2a03f8b..1abc1e5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@ site/log/*.log
 site/tmp/**/*
 site/app/views/taglibs/auto
 *.swp
+*.pyc



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/council-webapp:master commit in: /
@ 2011-06-18 15:46 Petteri Räty
  0 siblings, 0 replies; 9+ messages in thread
From: Petteri Räty @ 2011-06-18 15:46 UTC (permalink / raw
  To: gentoo-commits

commit:     dd32ce1ebac8c9b2fd3a3b715c955f965066e770
Author:     Petteri Räty <petsku <AT> petteriraty <DOT> eu>
AuthorDate: Sat Jun 18 15:44:53 2011 +0000
Commit:     Petteri Räty <betelgeuse <AT> gentoo <DOT> org>
CommitDate: Sat Jun 18 15:44:53 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/council-webapp.git;a=commit;h=dd32ce1e

Merge remote-tracking branch 'github/new_bot_commands'


 bot/Reminder/plugin.py    |    6 +-
 bot/Reminder/run_test.py  |   28 ++++++++
 bot/ircmeeting/agenda.py  |   90 +++++++++++++++++++++-----
 bot/ircmeeting/meeting.py |   11 +++
 bot/tests/run_test.py     |  159 +++++++++++++++++++++++++--------------------
 bot/tests/test_meeting.py |   63 ++++++++++++++++++
 6 files changed, 266 insertions(+), 91 deletions(-)



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/council-webapp:master commit in: /
@ 2011-06-22  7:59 Petteri Räty
  0 siblings, 0 replies; 9+ messages in thread
From: Petteri Räty @ 2011-06-22  7:59 UTC (permalink / raw
  To: gentoo-commits

commit:     c78e102632f0230204d73750dd970c512d823f52
Author:     Joachim Filip Ignacy Bartosik <jbartosik <AT> gmail <DOT> com>
AuthorDate: Sat Jun 18 15:02:25 2011 +0000
Commit:     Petteri Räty <betelgeuse <AT> gentoo <DOT> org>
CommitDate: Wed Jun 22 07:22:05 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/council-webapp.git;a=commit;h=c78e1026

Shell script to run all tests

---
 test.sh |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/test.sh b/test.sh
new file mode 100755
index 0000000..19aa19a
--- /dev/null
+++ b/test.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+function run_test {
+  if $1 $2
+  then
+    date +"%Y-%m-%d %H:%M:%S Test of $3 was succesfull" >>tests.log
+  else
+    date +"%Y-%m-%d %H:%M:%S Test of $3 failed" >>tests.log
+  fi
+}
+run_test python bot/tests/run_test.py MeetBot
+run_test python bot/Reminder/run_test.py Reminder
+pushd site
+run_test "bundle exec" "rake" WebApp
+popd



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/council-webapp:master commit in: /
@ 2011-06-25 11:55 Petteri Räty
  0 siblings, 0 replies; 9+ messages in thread
From: Petteri Räty @ 2011-06-25 11:55 UTC (permalink / raw
  To: gentoo-commits

commit:     eab5375bf3829daa62fa79f16791bec78ec22257
Author:     Petteri Räty <petsku <AT> petteriraty <DOT> eu>
AuthorDate: Sat Jun 25 11:52:19 2011 +0000
Commit:     Petteri Räty <betelgeuse <AT> gentoo <DOT> org>
CommitDate: Sat Jun 25 11:52:19 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/council-webapp.git;a=commit;h=eab5375b

Merge remote-tracking branch 'github/time_limit'

Conflicts:
	bot/tests/run_test.py


 bot/ircmeeting/agenda.py             |   56 +++++++++++++++++++++++--
 bot/ircmeeting/meeting.py            |   21 ++++++++-
 bot/tests/run_test.py                |   75 +++++++++++++++++++++++++++++++++-
 site/app/models/agenda.rb            |    2 +-
 site/app/models/agenda_item.rb       |   13 ++++++
 site/db/schema.rb                    |    3 +-
 site/spec/models/agenda_item_spec.rb |   19 +++++++++
 site/spec/models/agenda_spec.rb      |   17 ++++----
 8 files changed, 188 insertions(+), 18 deletions(-)

diff --cc bot/ircmeeting/agenda.py
index af03c3a,101c73c..8b9650c
--- a/bot/ircmeeting/agenda.py
+++ b/bot/ircmeeting/agenda.py
@@@ -15,9 -23,13 +23,13 @@@ class Agenda(object)
      voting_already_closed_msg = "Voting is already closed. You can start it with #startvote."
      voting_open_so_item_not_changed_msg = "Voting is currently open so I didn't change item. Please #endvote first"
      can_not_vote_msg = "You can not vote or change agenda. Only {} can."
 -    not_a_number_msg = "Your vote was not recognized as a number. Please retry."
 -    out_of_range_msg = "Your vote was out of range!"
 +    not_a_number_msg = "Your choice was not recognized as a number. Please retry."
 +    out_of_range_msg = "Your choice was out of range!"
      vote_confirm_msg = "You voted for #{} - {}"
+     timelimit_added_msg = 'Added "{}" reminder in {}:{}'
+     timelimit_list_msg = 'Set reminders: "{}"'
+     timelimit_removed_msg = 'Reminder "{}" removed'
+     timelimit_missing_msg = 'No such reminder "{}"'
  
      # Internal
      _voters     = []
diff --cc bot/ircmeeting/meeting.py
index c01176a,e3cf38d..a86c782
--- a/bot/ircmeeting/meeting.py
+++ b/bot/ircmeeting/meeting.py
@@@ -323,14 -323,26 +323,29 @@@ class MeetingCommands(object)
          self.reply(self.config.agenda.get_agenda_item())
  
      def do_nextitem(self, nick, time_, line, **kwargs):
-         self.reply(self.config.agenda.next_agenda_item())
+         self.reply(self.config.agenda.next_agenda_item(self))
  
      def do_previtem(self, nick, time_, line, **kwargs):
-         self.reply(self.config.agenda.prev_agenda_item())
+         self.reply(self.config.agenda.prev_agenda_item(self))
+ 
+     def do_timelimit(self, nick, time_, line, **kwargs):
+         reply = 'Usage "#timelimit add <minutes>:<seconds> <message>" or ' +\
+                 '"#timelimit list" or "#timelimit remove <message>"'
+         match = re.match( ' *?add ([0-9]+):([0-9]+) (.*)', line)
+         if match:
+           reply = self.config.agenda.add_timelimit(int(match.group(1)),
+                        int(match.group(2)), match.group(3), self)
+         elif re.match( ' *?list', line):
+           reply = self.config.agenda.list_timielimits()
+         else:
+           match = re.match( ' *?remove (.*)', line)
+           if(match):
+             reply = self.config.agenda.remove_timelimit(match.group(1))
+         self.reply(reply)
  
 +    def do_changeitem(self, nick, time_, line, **kwargs):
 +        self.reply(self.config.agenda.change_agenda_item(line))
 +
      def do_startvote(self, nick, time_, line, **kwargs):
         for messageline in self.config.agenda.start_vote().split('\n'):
              self.reply(messageline)
diff --cc bot/tests/run_test.py
index 1358d47,e22516b..bd116ff
--- a/bot/tests/run_test.py
+++ b/bot/tests/run_test.py
@@@ -342,7 -344,7 +344,7 @@@ class MeetBotTest(unittest.TestCase)
      def get_simple_agenda_test(self):
          test = test_meeting.TestMeeting()
          test.set_voters(['x', 'z'])
-         test.set_agenda([['first item', ['opt1', 'opt2']], ['second item', []], ['third item', []]])
 -        test.set_agenda([['first item', ['opt1', 'opt2'], ''], ['second item', [], '']])
++        test.set_agenda([['first item', ['opt1', 'opt2'], ''], ['second item', [], ''], ['third item', [], '']])
          test.M.config.manage_agenda = False
  
          test.answer_should_match("20:13:50 <x> #startmeeting",
@@@ -434,18 -427,79 +436,89 @@@
          test.answer_should_match('20:13:50 <x> #endmeeting', 'Meeting ended ' +\
                                    '.*\nMinutes:.*\nMinutes \(text\):.*\nLog:.*')
  
 -        assert(test.votes() == {'first item': {u'x': 'opt2', u'z': 'opt1'}, 'second item': {}})
 +        assert(test.votes() == {'first item': {u'x': 'opt2', u'z': 'opt1'}, 'second item': {}, 'third item': {}})
 +
 +    def test_agenda_close_voting_after_last_vote(self):
 +        test = self.get_simple_agenda_test()
 +        test.answer_should_match('20:13:50 <x> #startvote', 'Voting started\. ' +\
 +                                  'Available voting options are:\n0. opt1\n1. opt2\nVote ' +\
 +                                  '#vote <option number>.\nEnd voting with #endvote.')
 +        test.answer_should_match('20:13:50 <x> #startvote', 'Voting is already open. ' +\
 +                                  'You can end it with #endvote.')
 +        test.answer_should_match('20:13:50 <x> #vote 0', 'You voted for #0 - opt1')
 +        test.answer_should_match('20:13:50 <z> #vote 0', 'You voted for #0 - opt1. Voting closed.')
  
+     def test_agenda_time_limit_adding(self):
+         test = self.get_simple_agenda_test()
+         test.answer_should_match('20:13:50 <x> #timelimit', 'Usage "#timelimit ' +\
+                                   'add <minutes>:<seconds> <message>" or "' +\
+                                   '#timelimit list" or "#timelimit remove ' +\
+                                   '<message>"')
+         test.answer_should_match('20:13:50 <x> #timelimit add 0:1 some other message',
+                                   'Added "some other message" reminder in 0:1')
+         test.answer_should_match('20:13:50 <x> #timelimit add 1:0 some message',
+                                   'Added "some message" reminder in 1:0')
+         time.sleep(2)
+         last_message = test.log[-1]
+         assert(last_message == 'some other message')
+         reminders = test.M.config.agenda.reminders
+         assert(len(reminders) == 2)
+         for reminder in reminders.values():
+           assert(reminder.__class__ == threading._Timer)
+ 
+         test.process('20:13:50 <x> #nextitem')
+ 
+     def test_agenda_time_limit_removing_when_changing_item(self):
+         test = self.get_simple_agenda_test()
+ 
+         test.process('20:13:50 <x> #timelimit add 0:1 message')
+         assert(len(test.M.config.agenda.reminders) == 1)
+         test.process('20:13:50 <x> #nextitem')
+         assert(len(test.M.config.agenda.reminders) == 0)
+         test.process('20:13:50 <x> #timelimit add 0:1 message')
+         assert(len(test.M.config.agenda.reminders) == 1)
+         test.process('20:13:50 <x> #previtem')
+         assert(len(test.M.config.agenda.reminders) == 0)
+ 
+     def test_agenda_time_limit_manual_removing(self):
+         test = self.get_simple_agenda_test()
+ 
+         test.process('20:13:50 <x> #timelimit add 0:1 message')
+         test.process('20:13:50 <x> #timelimit add 0:1 other message')
+         keys = test.M.config.agenda.reminders.keys()
+         keys.sort()
+         assert(keys == ['message', 'other message'])
+ 
+         test.answer_should_match('20:13:50 <x> #timelimit remove other message', 'Reminder "other message" removed')
+         keys = test.M.config.agenda.reminders.keys()
+         assert(keys == ['message'])
+ 
+     def test_agenda_time_limit_listing(self):
+         test = self.get_simple_agenda_test()
+         test.process('20:13:50 <x> #timelimit add 0:1 message')
+         test.process('20:13:50 <x> #timelimit add 0:1 other message')
+         test.process('20:13:50 <x> #timelimit add 0:1 yet another message')
+         keys = test.M.config.agenda.reminders.keys()
+         test.answer_should_match('20:13:50 <x> #timelimit list',
+                                   'Set reminders: "' + '", "'.join(keys) + '"')
+ 
+     def test_preset_agenda_time_limits(self):
+         test = self.get_simple_agenda_test()
+         test.M.config.agenda._agenda[0][2] = '1:0 message'
+         test.M.config.agenda._agenda[1][2] = '1:0 another message\n0:10 some other message'
+ 
+         test.process('20:13:50 <x> #nextitem')
+         keys = test.M.config.agenda.reminders.keys()
+         keys.sort()
+         assert(keys == ['another message', 'some other message'])
+ 
+         test.process('20:13:50 <x> #previtem')
+         keys = test.M.config.agenda.reminders.keys()
+         keys.sort()
+         assert(keys == ['message'])
+ 
+         test.process('20:13:50 <x> #nextitem')
+ 
  if __name__ == '__main__':
      os.chdir(os.path.join(os.path.dirname(__file__), '.'))
  



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/council-webapp:master commit in: /
@ 2011-07-05 15:09 Petteri Räty
  0 siblings, 0 replies; 9+ messages in thread
From: Petteri Räty @ 2011-07-05 15:09 UTC (permalink / raw
  To: gentoo-commits

commit:     2cc900875d83e616a53638dfad2a80d5565c3471
Author:     Petteri Räty <petsku <AT> petteriraty <DOT> eu>
AuthorDate: Tue Jul  5 10:15:05 2011 +0000
Commit:     Petteri Räty <betelgeuse <AT> gentoo <DOT> org>
CommitDate: Tue Jul  5 10:15:05 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/council-webapp.git;a=commit;h=2cc90087

Merge remote-tracking branch 'github/bugfix'


 site/app/models/agenda.rb                          |    4 +++-
 site/app/models/user.rb                            |    3 +++
 site/app/views/agenda_items/show.dryml             |   10 ++++++++--
 site/config/initializers/agenda.rb                 |   12 ------------
 site/features/agenda_items.feature                 |   10 ++++++++++
 .../features/step_definitions/agenda_item_steps.rb |   12 ++++++++++++
 site/features/step_definitions/within_steps.rb     |    2 +-
 site/public/stylesheets/application.css            |    4 ++++
 site/spec/models/agenda_spec.rb                    |   12 ++++++++++++
 site/spec/models/user_spec.rb                      |    6 ++++++
 10 files changed, 59 insertions(+), 16 deletions(-)



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/council-webapp:master commit in: /
@ 2011-07-21 16:06 Petteri Räty
  0 siblings, 0 replies; 9+ messages in thread
From: Petteri Räty @ 2011-07-21 16:06 UTC (permalink / raw
  To: gentoo-commits

commit:     b86ea29abd7ed47c435dd48654a8c2d42d97db72
Author:     Petteri Räty <petsku <AT> petteriraty <DOT> eu>
AuthorDate: Thu Jul 21 16:01:40 2011 +0000
Commit:     Petteri Räty <betelgeuse <AT> gentoo <DOT> org>
CommitDate: Thu Jul 21 16:01:40 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/council-webapp.git;a=commit;h=b86ea29a

Merge remote-tracking branch 'github/seed'


 site/Gemfile                       |    2 +-
 site/Gemfile.lock                  |    7 +++-
 site/db/seed.yml                   |   42 +++++++++++++++++++++++++++++++
 site/db/seeds.rb                   |   48 ++++++++++++++++++++++++++++++++++++
 site/features/support/factories.rb |    2 -
 site/spec/factories.rb             |    2 +
 site/spec/spec_helper.rb           |    1 -
 7 files changed, 98 insertions(+), 6 deletions(-)



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/council-webapp:master commit in: /
@ 2011-08-01 14:38 Petteri Räty
  0 siblings, 0 replies; 9+ messages in thread
From: Petteri Räty @ 2011-08-01 14:38 UTC (permalink / raw
  To: gentoo-commits

commit:     4f32847c92654f3e8b9e8a0569872cdc1336e537
Author:     Petteri Räty <petsku <AT> petteriraty <DOT> eu>
AuthorDate: Mon Aug  1 14:35:02 2011 +0000
Commit:     Petteri Räty <betelgeuse <AT> gentoo <DOT> org>
CommitDate: Mon Aug  1 14:35:02 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/council-webapp.git;a=commit;h=4f32847c

Merge remote-tracking branch 'github/review'


 site/app/controllers/agendas_controller.rb         |    2 +-
 site/app/controllers/approvals_controller.rb       |    7 +++
 site/app/controllers/voting_options_controller.rb  |    8 ++--
 site/app/models/agenda.rb                          |   32 ++++++++--------
 site/app/models/agenda_item.rb                     |   12 ++++++
 site/app/models/approval.rb                        |   26 ++++++++++++
 site/app/models/proxy.rb                           |    1 +
 site/app/models/user.rb                            |    9 +++-
 site/app/models/vote.rb                            |    3 +-
 site/app/models/voting_option.rb                   |    2 +-
 site/app/views/agendas/show.dryml                  |   16 ++++++++
 site/config/hobo_routes.rb                         |    8 ++++
 site/db/schema.rb                                  |   21 ++++++++--
 site/features/meeting_summary_approvals.feature    |   28 +++++++++++++
 .../meeting_summary_approvals_steps.rb             |    5 ++
 site/features/step_definitions/within_steps.rb     |    1 +
 site/spec/factories.rb                             |    5 ++
 site/spec/models/agenda_item_spec.rb               |    2 +-
 site/spec/models/agenda_spec.rb                    |   41 ++++++++++++++++++--
 site/spec/models/approval_spec.rb                  |   36 +++++++++++++++++
 site/spec/models/participation_spec.rb             |    4 +-
 site/spec/models/proxy_spec.rb                     |    6 +-
 site/spec/models/user_spec.rb                      |    6 +-
 site/spec/models/vote_spec.rb                      |   10 ++--
 site/spec/models/voting_option_spec.rb             |    4 +-
 site/spec/support/users_factory.rb                 |   15 ++++++-
 26 files changed, 256 insertions(+), 54 deletions(-)



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-08-01 14:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-24  9:41 [gentoo-commits] proj/council-webapp:master commit in: / Petteri Räty
  -- strict thread matches above, loose matches on Subject: below --
2011-08-01 14:38 Petteri Räty
2011-07-21 16:06 Petteri Räty
2011-07-05 15:09 Petteri Räty
2011-06-25 11:55 Petteri Räty
2011-06-22  7:59 Petteri Räty
2011-06-18 15:46 Petteri Räty
2011-06-05 20:37 Petteri Räty
2011-05-24  9:41 Petteri Räty

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox