Commit Graph
726 Commits
Author SHA1 Message Date
gnattery 886c57b908 sort members by login name 2013-03-20 14:57:09 +11:00
gnattery 349aecbb69 Delete gardens 2013-03-20 12:30:38 +11:00
Joseph Caudle ddf29d6a21 Merge branch 'restrict_usernames' into dev
* restrict_usernames:
  make login names remember case (so I can have Skud)
  Added validations for member names:

Conflicts:
	spec/factories/member.rb
2013-03-18 08:11:40 -04:00
Skud 68a36310b7 make login names remember case (so I can have Skud)
... but don't let anyone take "skud" if I'm "Skud"

don't allow 'staff' as a login_name either
2013-03-18 20:48:06 +11:00
Skud 5378e7344d Added validations for member names:
2-25 chars long
alphanumeric and underscores only
disallowed: "growstuff", "admin", "moderator"

removed everything that was there to handle/truncate long usernames
since it's no longer needed.
2013-03-18 17:36:54 +11:00
Skud 84a730ddcb limit crop wrangling to crop wranglers 2013-03-18 17:02:22 +11:00
Skud 0bb6a68220 Merge branch 'dev' of https://github.com/Growstuff/growstuff into signed-in-homepage 2013-03-05 22:36:55 +11:00
Skud 3c0e467da1 prettified signed-in homepage; tests still needed 2013-03-05 22:20:13 +11:00
Miles Gould b0ffd85326 Stringify gardens as their names. 2013-02-25 23:07:47 +00:00
Skud 28b26179f4 Merge branch 'dev' of https://github.com/Growstuff/growstuff into prettier-plantings 2013-02-25 21:42:06 +11:00
Skud 1081131246 Prettifying the plantings page.
Added a couple of tiny methods on Crop, and delegated them across to
Planting, to easily display the default/first scientific name, and to
show the number of times a given crop's been planted.

Sadly, the tests randomly fail on my box saying "No route matches
{:controller=>"plantings", :action=>"show"}" which is just nonsense. I
have no idea why it's doing that, so I'm committing it anyway, in the
hopes that either someone can tell me what's up, or else it's just a
glitch on my dev box.
2013-02-25 20:44:47 +11:00
Miles Gould 16605b82b6 Merge branch "notifications". 2013-02-22 13:40:58 +00:00
Skud adaee1c9ab don't send notifications to yourself 2013-02-22 17:27:40 +11:00
Skud af9c1591ef added inbox link and count to nav 2013-02-22 17:20:25 +11:00
Joseph Caudle 9e29aec14a Merge branch 'dev' into unique_usernames
* dev: (28 commits)
  Upgrade bootstrap by running `rails g bootstrap:install`
  added .to_i to times to attempt to pass tests on travis
  stubbed Time.now to prevent test failures
  Added friendly IDs for forum and role
  General prettification and making it look nice.
  show forum name in post meta
  Added a rake task to create an admin user.
  hooked roles up to cancan
  Added roles, but haven't yet hooked them up to CanCan
  PT story 41985889, Hides 'new garden' tab on other member's pages
  Add forums to top nav
  Display posts in summary on forum page
  tests for markdown
  post in (or not in) a forum
  prettifying forum views
  added associations between forums, posts, and members
  rails g scaffold Forum
  Rearranging password fields
  Attempted rearranging settings page, broke something
  Upgrade to Rails 3.2.12, after *another* security flaw.
  ...

Conflicts:
	spec/models/member_spec.rb
2013-02-21 22:19:45 -05:00
Joseph Caudle 434d06ad83 Add test to ensure uniqueness of login_name 2013-02-21 22:08:25 -05:00
Joseph Caudle 728f8ec9ce Update factory for members and specs about members
We have added a sequence for login_name which is similar to the one for
emails in which the member name is incremented each time a new member is
saved.

In addition, we have updated all specs which asked for an explicit
login_name of member1 to use a regex looking only for member and some
digit.
2013-02-21 21:57:39 -05:00
Skud 75306dc57a added .to_i to times to attempt to pass tests on travis 2013-02-22 09:19:30 +11:00
Skud da5a3fb76c stubbed Time.now to prevent test failures 2013-02-22 08:28:14 +11:00
Skud b743fe9465 Added friendly IDs for forum and role 2013-02-20 15:51:31 +11:00
Skud 0aab5286f0 General prettification and making it look nice.
Also upgraded Bootstrap, just for the hell of it.
2013-02-20 15:42:44 +11:00
Skud 11fa06b56c show forum name in post meta 2013-02-20 14:54:38 +11:00
Skud f12941576c hooked roles up to cancan
Now only admins can create/edit forums, or mess with roles.

To add an admin user:

rails c
m = Member.find('skud')
r = Role.create(:name => 'admin')
r.members << m

We'll have to do this on the server to bootstrap the admin stuff.
Though actually, we should really write a rake task to generalise this.
2013-02-20 14:53:11 +11:00
Skud 0bc2ff25fe Added roles, but haven't yet hooked them up to CanCan 2013-02-19 12:29:22 +11:00
Skud cdee808933 prettified notifications inbox etc 2013-02-16 01:22:19 +11:00
Skud 4516a2f099 comments now generate notifications 2013-02-16 00:18:49 +11:00
Skud cc2c63b2eb added cancan abilities for reading notifications 2013-02-15 23:17:52 +11:00
Skud b4c6a74caa Display posts in summary on forum page
Also had to tweak timezone config so that "X minutes ago" display
worked.  This *may* break tests or who knows what, for devs who are
elsewhere. Let's keep an eye out for that!
2013-02-14 13:35:23 +11:00
gnattery de85a6dcce added associations between forums, posts, and members 2013-02-13 15:17:40 +11:00
gnattery e10ea7f180 rails g scaffold Forum 2013-02-13 12:55:17 +11:00
Miles Gould 42d9034fc6 rails g scaffold notifications. 2013-02-12 13:17:14 +00:00
Skud 192196ae8e added map to profile.
also making sure lat/long are zeroed if location is blanked
2013-02-12 22:38:48 +11:00
Skud c50a652eb7 geocode locations when saved, using google API 2013-02-12 11:36:33 +11:00
Skud d37e7a148d Delete comments when post is deleted 2013-02-08 17:45:37 +11:00
Skud 93edede4da Merged from mistaken branch on G/g 2013-02-08 16:11:38 +11:00
Skud 363502a807 add show_email field to members 2013-02-06 16:25:17 +11:00
gnattery 6da3e4fae5 Added associations and tested them 2013-02-06 15:20:44 +11:00
gnattery 3cff543184 rails g scaffold Comment 2013-02-06 14:49:49 +11:00
Skud 6113be1e69 sorting gardens alphabetically, so behaviour is clearer 2013-01-28 18:19:59 +11:00
Miles Gould dc1ab0912f Order crops case-insensitively by default. 2013-01-25 11:19:15 +00:00
gnattery 9f788ba8df added friendly IDs for plantings, and tests 2013-01-18 16:06:20 +11:00
gnattery 72f38118d9 Slight tweak to garden slug tests 2013-01-18 15:39:10 +11:00
gnattery d1e3f8ce32 Added description field to gardens 2013-01-18 15:11:11 +11:00
Skud 501cad39f9 Plantings now show up on members and gardens pages 2013-01-17 15:12:37 +11:00
Skud 7579d894aa Renamed default garden in /spec/factory/garden
"My Garden" was too generic and hard to test for -- tests like
rendered.should contain "Garden" are far too easy to have a false
positive pass.  So I renamed it "Springfield Community Garden" so that
false-positive passes were less likely.
2013-01-13 21:32:54 +11:00
Skud 8da9a13eae Changed garden.member_id to garden.owner_id 2013-01-13 21:29:28 +11:00
Skud df76f2497a renamed Post.member_id to Post.author 2013-01-13 20:57:28 +11:00
Skud 689448f87c renamed Member.username to login_name 2013-01-13 19:14:46 +11:00
Skud 657ccf7cd8 s/users/members/g -- models and tests for them 2013-01-13 17:24:46 +11:00
Skud 21f0f39bf9 Model and controller spec files pass.
Views are another matter (and will explode badly at this point)
2013-01-13 16:12:45 +11:00