diff options
-rw-r--r-- | bot/tests/run_test.py | 13 | ||||
-rw-r--r-- | site/app/controllers/users_controller.rb | 13 | ||||
-rw-r--r-- | site/app/views/front/index.dryml | 33 | ||||
-rw-r--r-- | site/config/hobo_routes.rb | 1 | ||||
-rw-r--r-- | site/config/locales/app.en.yml | 9 | ||||
-rw-r--r-- | site/features/agenda_items.feature | 9 | ||||
-rw-r--r-- | site/features/hints.feature | 25 | ||||
-rw-r--r-- | site/features/step_definitions/agenda_item_steps.rb | 5 |
8 files changed, 66 insertions, 42 deletions
diff --git a/bot/tests/run_test.py b/bot/tests/run_test.py index 136e135..3f84ccb 100644 --- a/bot/tests/run_test.py +++ b/bot/tests/run_test.py @@ -54,16 +54,21 @@ class MeetBotTest(unittest.TestCase): doesn't have a useful status code, so I need to parse the output. """ - os.symlink("../MeetBot", "MeetBot") - os.symlink("../ircmeeting", "ircmeeting") + + links_to_remove = [] + for file in ["MeetBot", "ircmeeting"]: + if not os.path.exists(file): + os.symlink("../" + file , file) + links_to_remove.append(file) + sys.path.insert(0, ".") try: output = os.popen("supybot-test ./MeetBot 2>&1").read() assert 'FAILED' not in output, "supybot-based tests failed." assert '\nOK\n' in output, "supybot-based tests failed." finally: - os.unlink("MeetBot") - os.unlink("ircmeeting") + for link in links_to_remove: + os.unlink(link) del sys.path[0] trivial_contents = """ diff --git a/site/app/controllers/users_controller.rb b/site/app/controllers/users_controller.rb index 4fd360c..945e259 100644 --- a/site/app/controllers/users_controller.rb +++ b/site/app/controllers/users_controller.rb @@ -2,14 +2,15 @@ class UsersController < ApplicationController hobo_user_controller - auto_actions :all, :except => [ :index, :new, :create ] + auto_actions :all, :except => [ :index, :new, :create, :do_signup ] - def create - hobo_create do + def do_signup + do_creator_action(:signup) do if valid? - self.current_user = this - flash[:notice] = t("hobo.messages.you_are_site_admin", :default=>"You are now the site administrator") - redirect_to home_page + flash[:notice] = ht(:"#{model.to_s.underscore}.messages.signup.success", :default=>["Thanks for signing up!"]) + else + this.password = HoboFields::Types::PasswordString.new + this.password_confirmation = HoboFields::Types::PasswordString.new end end end diff --git a/site/app/views/front/index.dryml b/site/app/views/front/index.dryml index f07d85b..6aacb23 100644 --- a/site/app/views/front/index.dryml +++ b/site/app/views/front/index.dryml @@ -4,26 +4,25 @@ <content:> <header class="content-header"> - <h1>Welcome to <app-name/></h1> - <section class="welcome-message"> - <h3>Congratulations! Your Hobo Rails App is up and running</h3> - <ul> - <li>To customise this page: edit app/views/front/index.dryml</li> - </ul> - - <% if User.count == 0 -%> - <h3 style="margin-top: 20px;">There are no user accounts - please provide the details of the site administrator</h3> - <form with="&this || User.new" without-cancel> - <field-list: fields="name, email_address, password, password_confirmation"/> - <submit: label="Register Administrator"/> - </form> - <% end -%> - - - </section> + <h1>Welcome to Gentoo Council Web Application</h1> </header> <section class="content-body"> + This application will let you different actions: + <ul> + <li>All users (including Guests) can view some parts of website (agendas, suggested items, current council attendance).</li> + <li>Registered users can participate in community vote and suggest agenda items for council.</li> + <li>Administrators can manage users.</li> + <li>Council members can manage agendas: + <ul> + <li>Add, remove and reject items.</li> + <li>Manage voting options.</li> + <li>Set meeting time and reminders.</li> + </ul> + please note that when council member votes using this application this vote is "community vote". Council votes are made only during IRC meetings. + </li> + </ul> + If you want to learn more about Gentoo Council visit <a href="http://www.gentoo.org/proj/en/council/">Gentoo Council project page</a>. </section> </content:> diff --git a/site/config/hobo_routes.rb b/site/config/hobo_routes.rb index 97dced8..a223db4 100644 --- a/site/config/hobo_routes.rb +++ b/site/config/hobo_routes.rb @@ -32,7 +32,6 @@ Council::Application.routes.draw do # Resource routes for controller "users" get 'users/:id/edit(.:format)' => 'users#edit', :as => 'edit_user' get 'users/:id(.:format)' => 'users#show', :as => 'user', :constraints => { :id => %r([^/.?]+) } - post 'users(.:format)' => 'users#create', :as => 'create_user' put 'users/:id(.:format)' => 'users#update', :as => 'update_user', :constraints => { :id => %r([^/.?]+) } delete 'users/:id(.:format)' => 'users#destroy', :as => 'destroy_user', :constraints => { :id => %r([^/.?]+) } diff --git a/site/config/locales/app.en.yml b/site/config/locales/app.en.yml index ecf802b..d19ea21 100644 --- a/site/config/locales/app.en.yml +++ b/site/config/locales/app.en.yml @@ -6,5 +6,14 @@ en: activerecord: attribute_help: + agenda: + email_reminder_sent: "Email reminders will be sent only if this field is unchecked." agenda_item: + agenda: "If you set it to 'No Agenda available.' it will be listed as 'Suggested item'" + body: "You can use markdown in the body of agenda item" + discussion: "Best choice is address of first message in discussion on archives.gentoo.org." + discussion_time: "If you provide address on archives.gentoo.org in discussion field application will manage this field on it's own." + rejected: "Rejected items are not shown on Suggested Items list. You don't have to go to edit page of item to reject it - there is a Reject button on item show page" timelimits: "Enter reminders for this item. Each line should be a separate reminder in 'mm:ss <reminder message>' format" + user: + irc_nick: "Nick you use on freenode (it's important if you are council member)." diff --git a/site/features/agenda_items.feature b/site/features/agenda_items.feature index 5a6dad7..2507e2d 100644 --- a/site/features/agenda_items.feature +++ b/site/features/agenda_items.feature @@ -58,12 +58,3 @@ Feature: Suggest Agenda Items Scenario: View discussion times Given some agenda item with discussion times Then I should see discussion times when viewing agenda items - - Scenario: Show view hint on timelimits format - Given I am logged in as a council member - When I follow "Suggest agenda item" - Then I should see hint on timelimits format - - Given example agenda item - When I am on newest agenda item edit page - Then I should see hint on timelimits format diff --git a/site/features/hints.feature b/site/features/hints.feature new file mode 100644 index 0000000..436476a --- /dev/null +++ b/site/features/hints.feature @@ -0,0 +1,25 @@ +Feature: Hints + As user + I want to see hints in forms + So I will know what I enter + + Scenario: Agenda hints + Given I am logged in as a council member + When I am on the current agenda page + And I follow "Edit" + Then I should see "Email reminders will be sent only if this field is unchecked." + + Scenario: Agenda item hints + Given I am logged in as a council member + When I follow "Suggest agenda item" + Then I should see "If you set it to 'No Agenda available.' it will be listed as 'Suggested item'" + Then I should see "You can use markdown in the body of agenda item" + Then I should see "Best choice is address of first message in discussion on archives.gentoo.org." + Then I should see "If you provide address on archives.gentoo.org in discussion field application will manage this field on it's own." + Then I should see "Rejected items are not shown on Suggested Items list. You don't have to go to edit page of item to reject it - there is a Reject button on item show page" + Then I should see "Enter reminders for this item. Each line should be a separate reminder in 'mm:ss <reminder message>' format" + + Scenario: User hints + When I am on the home page + And I follow "Signup" + Then I should see "Nick you use on freenode (it's important if you are council member)." diff --git a/site/features/step_definitions/agenda_item_steps.rb b/site/features/step_definitions/agenda_item_steps.rb index 4b18f7b..b600bad 100644 --- a/site/features/step_definitions/agenda_item_steps.rb +++ b/site/features/step_definitions/agenda_item_steps.rb @@ -52,8 +52,3 @@ Then /^I should see discussion times when viewing agenda items$/ do Then "I should see \"#{item.discussion_time}\"" end end - -Then /^I should see hint on timelimits format$/ do - Then 'I should see "Enter reminders for this item. Each line should be a ' + - 'separate reminder in \'mm:ss <reminder message>\' format" within ".input-help"' -end |