44 Commits

Author SHA1 Message Date
Miles Gould
9f54641e95 Find crops by name when loading altnames
Crop IDs are not guaranteed to be the same on staging and production.
2014-12-01 11:03:27 +00:00
Miles Gould
4b90f6385b Merge branch 'dev' into load_alternate_names
Conflicts:
	Gemfile.lock
	script/deploy-tasks.sh
2014-12-01 10:47:10 +00:00
Skud
267c671259 cweek not cw_week 2014-11-11 20:55:04 +11:00
Skud
eb98910bea Only send planting reminders to confirmed accounts 2014-11-11 19:45:07 +11:00
Miles Gould
badb0c4fe7 Make load altnames task idempotent. 2014-10-19 22:21:29 +01:00
Miles Gould
06a4fcab71 Remove superfluous* error-checks from load_altnames
* /me crosses fingers...
2014-10-19 22:19:41 +01:00
Miles Gould
36be5e9533 Hardcode alternate-name CSV file path. 2014-10-19 21:54:46 +01:00
Miles Gould
0aea1721d8 Add altname data and include load in deploy-tasks. 2014-10-19 17:24:18 +01:00
Miles Gould
3d10553373 Add Rake task to load altnames. 2014-10-19 17:24:18 +01:00
Skud
e4cf636bef Merge branch 'dev' of https://github.com/Growstuff/growstuff into plantingreminder
Conflicts:
	app/models/harvest.rb
	db/schema.rb
	spec/models/harvest_spec.rb
2014-10-15 14:20:16 +01:00
Shiho Takagi
cf07ecfa4a improved test spec, crop page and added rake task 2014-10-05 23:16:46 +11:00
Shiho Takagi
6e02f40e0a merging from dev 2014-10-05 13:47:12 +11:00
Shiho Takagi
14d039ee01 Added crops-posts association as well as updated GUI for crop show 2014-10-05 13:32:08 +11:00
Skud
a5b856b506 Merge pull request #410 from maco/dev
Harvest photos
2014-10-02 17:45:59 +10:00
Skud
8497782847 Clear crop hierarchy view cache after uploading crops
The crop_sweeper only acts in response to things that happen in the
controller.  Since this works directly with the model, we need to clear
the cache fragment manually.
2014-09-30 23:02:09 +10:00
Skud
98da785d8a Removed spurious debugging puts 2014-09-30 22:37:58 +10:00
Skud
65c46c334b Delete unused photos
Make sure the models are setup so that if a photo is not used for
anything, it's removed from the system.

Also wrote a rake task (which should be run on deploy) to remove older
unused photos.
2014-09-29 09:18:28 +10:00
Skud
529c98f5dc Move actual sending of planting reminder to rake task 2014-09-28 15:28:53 +10:00
Mackenzie Morgan
f3c3d73ef1 updating test for harvest units to list the valid units and adding a task to correct misspelled pint harvests already in the database 2014-08-10 19:49:10 -04:00
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
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
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
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
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
df5ee9cf4b give each member an account_detail entry 2013-05-17 15:28:22 +10: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