Commit Graph

60 Commits

Author SHA1 Message Date
Skud
536cf21e3e make it easier to wrangle scientific names 2013-05-09 11:39:22 +10:00
Skud
45935c6e38 connect to flickr 2013-04-30 23:01:18 +10:00
Skud
c2dbebb046 Merge pull request #189 from pozorvlak/nearby
Find users within a given distance; allow specification of units.
2013-04-30 03:04:29 -07:00
Miles Gould
2b84fa8bad Show previous comments when creating a comment.
- Move "show previous comments" into a partial
 - invoke said partial from the new comment form
 - add tests.
2013-04-29 21:30:26 +01:00
Miles Gould
2421126825 Put locations in geolocated_member factory names. 2013-04-25 23:27:52 +01:00
Skud
2418be18d3 added connections to settings page, fixed tests 2013-04-18 23:41:04 +10:00
Miles Gould
5ea91bf56a Added an Authentications table.
Connects users to remote web services, as recommended at
http://asciicasts.com/episodes/235-omniauth-part-1

In addition, we store "token" and "secret" fields.
2013-04-09 16:39:09 +01:00
Miles Gould
0f22fbf4aa Merge branch 'dev' into members_nearby
Conflicts:
	spec/factories/member.rb
2013-04-02 13:10:38 +01:00
pozorvlak
195055365d Merge pull request #161 from phazel/private_message
Private message
2013-04-02 04:21:19 -07:00
Skud
efb3c1cf50 Added a display of interesting members to the homepage.
Also merged in the latest dev (hence some minor changes to non-homepage,
non-member stuff).  I think I messed up the merge a bit :-/
2013-04-02 13:59:34 +11:00
Skud
0ec01ab259 improved date/time formatting
we set defaults for date and time formatting (and override them in a few
places)
2013-04-02 12:30:05 +11:00
gnattery
2ecd996e8a Merge branch 'dev' of github.com:phazel/growstuff into private_message 2013-04-01 13:42:09 +11:00
Miles Gould
afa5b7a72f Find nearby members back-end (hardcoded to 100mi). 2013-03-29 16:03:00 +00:00
Skud
0e9b4caf58 added sunniness field to plantings 2013-03-29 16:33:37 +11:00
Miles Gould
91acf9f878 Only send email notifications to members who want them. 2013-03-27 12:17:46 +00:00
gnattery
ac7b48406b Members can send each other private messages.
Problems:
Notifications controller test fails on redirecting, but seems to work fine in practice
Send Message button doesn't look nice on page
2013-03-25 17:52:50 +11:00
Joseph Caudle
f5c2733756 Remove merge conflict marker to fix build 2013-03-18 08:25:41 -04: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
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
Miles Gould
16605b82b6 Merge branch "notifications". 2013-02-22 13:40:58 +00: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
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
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
a2cfd44de4 Removed "notification type" since WAGNI (yet)
We figured that doing without it was more like the simplest thing that
could possibly work.

Note that we edited the migration in place after rolling back.  This
would cause problems if anyone had downloaded the code from pozorvlak's
repo the other day and run it, but we're assuming they didn't (since
they wouldn't have got anything interesting out of it anyway.)
2013-02-15 23:58:27 +11:00
Skud
cc2c63b2eb added cancan abilities for reading notifications 2013-02-15 23:17:52 +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
8ded8eb0c3 display location as text on profile 2013-02-12 11:56:56 +11:00
Skud
93edede4da Merged from mistaken branch on G/g 2013-02-08 16:11:38 +11:00
Skud
09727d99b2 show email on profile if wanted 2013-02-06 16:54:15 +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
8d2fe8809d Add an uppercase crop factory.
Use it to test that crops are sorted alphabetically in the plantings
form.
2013-01-25 11:12:44 +00:00
Miles Gould
9ebbeb125d Sort crops case-insensitively in the plantings form. 2013-01-25 00:16:50 +00:00
gnattery
d1e3f8ce32 Added description field to gardens 2013-01-18 15:11:11 +11:00
Skud
1503cbddad Plantings show on members, gardens, and crops pages
Created a thumbnail to standardise the display.  It's not pretty but it
has the basic info.
2013-01-18 13:40:30 +11:00
Skud
501cad39f9 Plantings now show up on members and gardens pages 2013-01-17 15:12:37 +11:00
Joseph Caudle
fd54fe8ffe Configure application to have UTC as default timezone
This commit sets the default timezone for the app as UTC for both Time
methods and for ActiveRecord. It also removes an unecessary pair of
parentheses attached to a call to `Time.now` which did not match the
style throughout the rest of the project.

[#41633207]
2013-01-14 22:17:36 -05: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
801a3d0f6c Added some basic tests for RSS feeds. 2013-01-13 17:06:36 +11:00