Big code merge

22 views
Skip to first unread message

Seb Bacon

unread,
Jul 12, 2011, 8:55:21 AM7/12/11
to alavet...@googlegroups.com
Hi,

I've just completed the merge of the Informata Zyrtare (Kosovo) fork
at https://github.com/selishta/alaveteli.

Because the IZ team were up against time, they had to hard code a lot
of their changes into the core software. So a lot of the work I've
been doing has been to factor out their changes so that they can all
live in a "theme".

This factoring out is pretty dumb at the moment, just the bare minimum
needed to get customisations out of the core code.

So, there have been a large number of changes lately on the master branch:

* It's now possible to extend the base request states in a plugin
* This feature (plus implementing a theme) are (briefly) documented [1]
* The config file is no longer in PHP syntax --it's now YAML (thanks Robin!)
* The config file has grown a number of new options [2]
* The "blog" page has a new layout
* As a side-effect of factoring out local status, there are now
groupings of the possible states on the request-categorisation page
("this request is in progress", "this request is finished") [3]
* The language switcher widget looks up the local name of a locale string
* Since we removed translate_routes plugin, the only way of switching
languages was with a query string. Added routing-filter gem, to
support prepending URL with locale. This gem introduces the
possibility of other interesting types of URL rewriting.
* Made various bits of templates more generic

For anyone who's running older versions of the software, the main
thing to do is review your config file.

Some time soon, I plan to put in place some more predictable release
management :)

Seb

[1] https://github.com/sebbacon/alaveteli/blob/master/doc/THEMES.md
[2] https://github.com/sebbacon/alaveteli/commit/b05260cd94d8ef210c02d96401b7df7dc03ec437#config/general.yml-example
[3] https://github.com/sebbacon/alaveteli/commit/35e4ffd67a383b36364c287b6e96e78aec3c4e15#app/views/request/_other_describe_state.rhtml

--
skype: seb.bacon
mobile: 07790 939224
land: 01531 671074

David Cabo

unread,
Jul 12, 2011, 9:50:46 AM7/12/11
to alavet...@googlegroups.com
> I've just completed the merge of the Informata Zyrtare (Kosovo) fork
> at https://github.com/selishta/alaveteli.

Great work Seb. I'm jumping in now...

faton selishta

unread,
Jul 13, 2011, 9:26:30 AM7/13/11
to alavet...@googlegroups.com
Hi,

Seb, thanks a lot for merging the code.

When I ran ./script/rails-post-deploy I got this error:

commonlib/shlib/deployfns: line 42: /data/mysociety/bin/yaml2sh: No such file or directory

so this appears to be hard-coded, i left it hardcoded too but just changed the path to suite my installation.
I guess we need to make it relative. Maybe Robin can take a look at it.

After i fixed this i got another error about missing package:

"ImportError: No module named yaml"

I installed python-yaml and the installation completed. Should we add python-yaml package to the config/packages file ?

I also got four failures after rake spec (486 examples, 4 failures).

Here is the printout:

1)
'AdminUserController when administering users searches for 'bob'' FAILED
expected: [#<User id: 1, email: "bob@localhost", name: "Bob Smith", hashed_password: "6b7cd45a5f35fd83febc0452a799530398bfb6e8", salt: "-6116981980.392287733335677", created_at: "2007-10-31 10:39:15", updated_at: "2007-10-31 10:39:15", email_confirmed: true, url_name: "bob_smith", last_daily_track_email: "2000-01-01 00:00:00", admin_level: "none", ban_text: "", about_me: "I like making requests about fancy dogs and naughty...">],
     got: nil (using ==)
./spec/controllers/admin_user_controller_spec.rb:13:

2)
'AdminGeneralController when viewing front page of admin interface should render the front page' FAILED
expected "index", got nil
./spec/controllers/admin_general_controller_spec.rb:8:

3)
NoMethodError in 'AdminRequestController when administering requests saves edits to a request'
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.include?
./spec/controllers/admin_request_controller_spec.rb:22:

4)
NoMethodError in 'AdminRequestController when administering requests saves edits to an outgoing_message'
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.include?
./spec/controllers/admin_request_controller_spec.rb:34:


Thanks
Faton

Seb Bacon

unread,
Jul 13, 2011, 11:39:27 AM7/13/11
to alavet...@googlegroups.com
Hi,

Thanks. Those test failures didn't show up for me when I ran the
entire test suite, but do when I run them individually. It looks like
it's to do with state persisting between tests. I'll take a look
tomorrow.

Seb

--

Robin Houston

unread,
Jul 13, 2011, 12:51:53 PM7/13/11
to alavet...@googlegroups.com
I think the test failures are related to 732b3e5c430a83f72adb44dc621d48edb86f081f

The reason I say this is that the failing tests appear to be correlated with log messages saying Filter chain halted as [:authenticate] rendered_or_redirected, and if I comment out before_filter :authenticate from the AdminController, then they pass.

Robin
Reply all
Reply to author
Forward
0 new messages