aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tasks/themes.rake
Commit message (Collapse)AuthorAgeLines
* Support the full four-point version stringGareth Rees2014-11-19-0/+2
|
* Make 'rake themes:install' safer for developersMark Longair2013-12-06-59/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the themes:install rake task would remove the existing theme with 'rm -rf' and re-clone the theme into place. This is unfortunate for a developer who has been making changes to a theme and then runs the rails-post-deploy script, since it calls the themes:install task which will wipe out those changes. In addition, when installing themes it would deliberately remove the .git directory of the theme, so if you do want to work in that theme you'd have to reinitialize the theme directory to be a git repository again. This commit changes the task so that now: - If a theme directory is present but it isn't a git repository, it's moved out of the way. - If there's no theme directory at the expected location after that step, the theme repository is cloned into place - The task ensures that the origin remote points to the theme's URL, and fetches from that remote. - If there are any uncommitted changes in the theme repository or the current commit appears not to have been pushed, the task exits with a helpful error. - The preferred branch or tag is checked out in the theme repository as before. (The uninstall, install and post_install hooks are run as before.) This shouldn't make a difference to deployed instances of Alaveteli but will be helpful for developers who want to work on developing a theme. Fixes #1111.
* Try to uninstall the old theme from vendor/plugins and lib/themesMark Longair2013-12-03-8/+17
| | | | | | | | | | | The theme install task would fail if there's an old theme present in vendor/plugins, since it doesn't try to uninstall the plugin from that location, only the new location. Then when the install.rb in the new plugin runs, it'll complain that there's a public/alavetelitheme symlink already present. This commit changes themes:install to try to uninstall the plugin from both locations.
* Ensure that the lib/themes directory exists before installing to thereMark Longair2013-12-03-0/+1
| | | | | | (An alternative would have been to add an empty lib/themes/.gitkeep file to this directory, but that makes ignoring the installed themes more complicated.)
* Move themes from vendor/plugins to lib/themesMark Longair2013-12-03-1/+1
| | | | | | | | | | These are essentially required in exactly the same way as before, but from lib/themes rather than vendor/plugins. This is the simplest possible change in order make the themes work outside vendor/plugins, I think, but it's not necessarily ideal. It would be worth considering whether these should be changed to Rails engines, as described here: http://guides.rubyonrails.org/engines.html
* Make theme URL to theme name mapping consistentMark Longair2013-10-15-1/+1
| | | | | | | | | | | | | | | | | | | | | The code that extracted the theme name from each entry in THEME_URLS (in order to require code from a directory whose leaf name is the theme name) only supported git URLs that ended in '.git'. However, the themes:install rake task usefully supports a wider range of git URLs - for example, all of the following were supported: /home/whoever/themes/blah-theme => blah-theme /home/whoever/themes/blah-theme/ => blah-theme git://wherever/blah-theme.git => blah-theme ssh://wherever/blah-theme.git// => blah-theme This commit factors out a theme_url_to_theme_name method, adds tests for it, and uses that method in both: lib/tasks/themes.rake config/initializers/theme_loader.rb ... so that a wider range of theme URLs are consistently supported.
* themes:install: minor refactoring of checking out a refMark Longair2013-05-24-5/+7
|
* Rename Configuration class to avoid conflict with ActiveSupport::ConfigurableHenare Degan2013-03-03-5/+5
|
* Add optional branch to install themes from. Falls back if it doesn't exist.Matthew Landauer2012-11-01-2/+10
|
* Extract configuration with defaults into one moduleMatthew Landauer2012-09-25-5/+3
|
* Simpler usage of git when trying to get usage tags for themes. Also for ↵Louise Crow2012-09-11-24/+34
| | | | ALAVETELI_VERSIONS with more than 4 sequence elements (hotfixes), if we can't find an exactly matching usage tag, look for one matching the related minor release. This should prevent unexpected switching to HEAD for themes with no matching usage tag for that hotfix.
* Be more specific about the output from git remote-ls - anything except a ↵release/0.6.5Louise Crow2012-08-30-1/+1
| | | | single commit hash and tag should cause us just to pull head.
* Be verbose for now to make any errors more obvious.Louise Crow2012-08-30-1/+1
|
* The exit-code flag to git ls-remote seems relatively recent. Check for a ↵Louise Crow2012-08-30-3/+3
| | | | non-empty output from the tag query instead.
* Raise an error on a non-zero return code from the git pull command.Louise Crow2012-08-29-0/+1
|
* Handle absence of deprecated THEME_URL option.Louise Crow2012-08-29-1/+2
|
* Pass through verbose param, switch to false.Louise Crow2012-08-29-4/+4
|
* Move the installation of themes to a Rake task so that we can use the ↵Louise Crow2012-08-29-0/+85
ALAVETELI_VERSION constant to check for tags in themes that indicate compatibility with this version of the Alaveteli codebase.