Commit Graph

46 Commits

Author SHA1 Message Date
Skud
8223025d35 Set default plantings_count to 0 not nil 2014-07-18 18:06:43 +10:00
Skud
5744499182 Added rake task to add new crop wranglers
Also changed code for admin and crop wrangler to assume we already have
those roles set up, as they're part of db/seeds.rb
2014-07-06 20:37:54 +10:00
pozorvlak
06f1d9cb7e Merge pull request #338 from Skud/crop-mentions
Crop mentions
2014-01-02 03:16:40 -08:00
Skud
9da92c8f71 Make growstuff HAML extensions case insensitive 2013-11-11 11:18:14 +11:00
Skud
076db6dd07 Use growstuff markdown in RSS feeds 2013-11-11 10:33:35 +11:00
Skud
ce7bf82336 Make growstuff markdown actually work 2013-11-11 10:20:52 +11:00
Skud
3a162e9b31 Fixed broken tests for markdown filter 2013-11-08 12:55:47 +11:00
Miles Gould
4add2f3dcf s/system_name/name 2013-11-07 12:03:43 +00:00
Skud
f3779cd2c9 Quick links to crop pages in Markdown. 2013-11-07 11:43:25 +00:00
Miles Gould
f723fea4e2 Load plant parts in db:seed and rake task. 2013-10-30 23:49:34 +00:00
Skud
b63c854b16 Set default garden locations
Also created a handy rake task to depopulate Null Island (i.e. fix up
anyone's lat/long that's somehow ended up as 0,0).
2013-10-25 23:45:48 +11:00
Skud
803f8244c9 Added various fields to garden
- active (default: true)
- location, latitude and longitude (because when you move house, you
    don't take your garden with you)
- area and area units (square feet or metres)
2013-10-25 21:54:13 +11:00
Skud
c46e19e43e Load multiple crop CSV files from seeds.rb
We factored out a Crop.create_from_csv method to avoid duplicated code.

Note: naming convention with db/seeds/crop*.csv is to use a 2-digit
number for ordering.  00 and 10 chosen (with a gap in between) because I
learned to program in BASIC and it seemed like a good idea just in case.
2013-10-17 22:45:09 +11:00
Skud
a98cb31161 Added rake task to import new crops from CSV 2013-10-17 22:08:54 +11:00
Miles Gould
b30ea755e0 Merge branch 'planting-owner' into dev
Conflicts:
	script/deploy-tasks.sh
2013-08-27 16:35:32 +01:00
Skud
7b307ab907 reined in over-enthusiastic rake task 2013-08-27 11:18:41 +10:00
Skud
99bfc704dc Added plantings_count (i.e. counter_cache) to Member
Also removed the superfluous .plantings_count method on Crop, which was
causing some confusion.

A thing we learned today: we should use .size to find the size of
ActiveRecord collections, not .count, because .count doesn't use the
cache (while .size does).
2013-08-26 13:54:09 +10:00
Skud
73b7897c28 Added rake task to update planting owner
(using planting.garden.owner)
2013-08-26 12:28:01 +10:00
Miles Gould
b31bdbb325 Make "rake" depend on "rake db:test:prepare".
This also tests for pending migrations.
2013-08-24 00:00:43 +01:00
Skud
183acff5f4 populate scientific names creator field 2013-08-21 17:52:33 +10:00
Skud
29908351be die sooner if you can't find cropbot 2013-08-21 17:36:48 +10:00
martyhines
eaa8ca0084 set default crop creator (rake task, deploy script, seeds) 2013-08-20 22:30:08 -04:00
Skud
06c608e6b6 added rake task to reset crop.plantings_count 2013-08-19 18:10:11 +10:00
Skud
6c8b959120 rake task to set seed.tradable_to to nowhere 2013-07-23 20:47:06 +10:00
Skud
067fd27837 Merge pull request #238 from pozorvlak/exclude-staff-from-members
Exclude staff from list of interesting members
2013-07-03 16:58:13 -07:00
Miles Gould
24af32970c Remove watchr continuous-testing gem.
Nobody was using it :-(
2013-06-26 11:50:09 +01:00
Miles Gould
0040ee8727 Rake task to give everyone free accounts; fix descriptions. 2013-06-26 10:55:19 +01:00
Skud
36a959c92e Give Skud a staff account as part of oneoff shop setup 2013-06-04 20:35:50 +10:00
Skud
660d70645e Added oneoff task to set up shop/products/etc 2013-06-04 20:21:59 +10:00
Skud
dd556d8638 Merge branch 'dev' into payments-new 2013-05-28 14:07:53 +10:00
Skud
df5ee9cf4b give each member an account_detail entry 2013-05-17 15:28:22 +10:00
Miles Gould
d5c781a97f Tests for Haml::Filters::EscapedMarkdown. 2013-05-16 18:00:00 +01:00
Miles Gould
6b487ab1f6 Escaped_Markdown HAML filter, for use in RSS.
I tried to do this using Haml::Filters::Markdown so it would be
independent of our Markdown renderer, but I couldn't get
Haml::Filters::Markdown.render to work programmatically - whatever I
did, it returned its input unchanged. So I hardcoded a dependence on
bluecloth.
2013-05-16 15:08:50 +01:00
Miles Gould
bc400a1483 Stop Rake from telling us every spec it's about to run.
As per
https://github.com/rspec/rspec-core/issues/266#issuecomment-1866898
2013-05-15 12:58:41 +01:00
Ryan Clark
95a2007683 fix up existing gardens with blank names. 2013-05-13 17:36:37 -07:00
Ryan Clark
ee136666d5 Replace name validation with before_filter and add rake tast for empty names. Replace validation testing with before_filter tests. 2013-05-09 13:06:29 -07:00
Skud
d4e5f0e32a fixed linebreak causing syntax error 2013-05-08 20:23:55 +10:00
Skud
ad8a0110c5 One-off rake task to clean up empty notification subjects
Also fixed admin_user task to use login_name (case sensitive) rather
than the id-like stub generated by friendlyid (always lowercase).
2013-05-03 12:35:02 +10:00
Skud
ea96813d7c make the site/app name (growstuff) a config var 2013-03-19 14:41:54 +11:00
Skud
81f247769f Added a rake task to create an admin user.
You should only have to do this once, after deploying.  Subsequent
admins can add new ones via the web interface.

The syntax is:

rake growstuff:admin_user name=skud

or, on heroku:

heroku run rake growstuff:admin_user name=skud
2013-02-20 14:54:38 +11:00
Miles Gould
dd28420210 Only run specs once. 2012-12-07 12:15:17 +00:00
Miles Gould
387d68185d Wrap dev/test Rake tasks in error recovery
Rake was dying due to missing gems in production.
2012-09-24 21:05:20 +01:00
Miles Gould
b173aad6b7 Added pre-commit hook script to run spec tests.
Based on instructions found at
http://codeinthehole.com/writing/tips-for-using-a-git-pre-commit-hook/

I have no idea how portable this will be.
2012-09-10 15:29:49 +01:00
Miles Gould
40f111001c Add a "rake watchr" task.
As before, code nicked from
http://www.rubyinside.com/how-to-rails-3-and-rspec-2-4336.html
2012-09-10 14:24:01 +01:00
Cesy Avon
1e907d4cb9 Fixing failing unit test and making rspec tests the default 2012-09-07 06:09:48 -07:00
Cesy Avon
95145f2869 Moving development to top level directory 2012-08-23 10:41:00 -07:00