* This change introduces a new feature that allows users to create recurring activities.
A user can now specify that an activity should be repeated "X" times, every "Y" weeks. When an activity is created with these options, the application will create the initial activity and then "X" additional copies, with each copy's due date offset by "Y" weeks from the previous one.
The repeat information is not stored in the database. It is only used at the time of creation to generate the recurring activities.
The following changes were made:
- Updated the new activity form to include fields for "repeat times" and "repeat weeks".
- Modified the `ActivitiesController#create` action to handle the creation of recurring activities.
- Added feature tests to ensure the new functionality works as expected.
* Remove not very useful spec
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
* feat: Add API token generation and authentication
This commit introduces API token generation and authentication for write operations.
- Adds a section to the user's profile edit page to generate and display an API token.
- Reuses the `authentications` table to store the API token, avoiding the need for a database migration.
- Implements token-based authentication for the API using the `Authorization: Token token=...` header.
- Enables write operations for all API resources and ensures they are protected by the new authentication mechanism.
- Adds feature and request specs to test the new functionality.
* feat: Add API token generation and authentication
This commit introduces API token generation and authentication for write operations.
- Adds a section to the user's profile edit page to generate and display an API token.
- Reuses the `authentications` table to store the API token, avoiding the need for a database migration.
- Implements token-based authentication for the API using the `Authorization: Token token=...` header.
- Enables write operations for all API resources and ensures they are protected by the new authentication mechanism.
- Adds feature and request specs to test the new functionality.
* Mark as editable
* Refactor
* WIP - Authentication
* Implement more test coverage
* Split 401 and 403
* Before Create hooks
* Update harvest specs, defaulting to the first plant part - this may not be right
* Update coverage
* Update coverage
* Rubocop
* Rubocop
* Rubocop
* Fix coverage
* For now, mark photos immutable again
* Fix specs
* Fix specs
* Rubocop
* Fix specs
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
This commit adds instructions for mobile users on how to install the Growstuff website as a Progressive Web App (PWA).
The changes include:
- A new section on the homepage with instructions for both iOS and Android devices. This section is only visible to logged-out users.
- New translations for the instructions in the `en.yml` locale file.
- Basic styling for the new section.
- Updated feature tests to verify the new section's visibility.
* Add comments to photos
Extend the photo show page to support comments by logged in users.
- Make the Comment model polymorphic.
- Update the Photo and Post models to have comments.
- Update the comments controller to handle the polymorphic association.
- Update the photo show page to display comments and a comment form.
- Create a reusable comments partial.
* Add migration
* Fix tests
* Fix tests
* Slightly fix tests
* Fix variables
* Add field
* Refactor slightly
* Refactor slightly
* Refactor slightly
* Refactor
* Photos respond to this as well
* Refactor to polymorphic_url
* Rename
* Wrong relationship
* Refactor and fix tests
* Fix relationships
* Fix rendering
* Fix tests
* Fix model tests
* Fix test
* Fix test
* Fix test
* Fix test
* Fix controller spec
* Fix view tests
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
This change removes the twitter authentication feature from the application.
It removes the `omniauth-twitter` gem and all related code from controllers, views, and tests. It also removes the twitter icon and environment variable settings.
* Split feature tests off to own area
* Split up feature specs
* Split up feature specs
* Split up feature specs
* Split up pipeline
* Split up pipeline
* Split up pipeline
* Split up pipeline
* Split further
* Improve stability slightly
* Skip tagged flaky
* Split mroe
* Improve reliability of test
* Improve reliability of test
* Extra asserts
* Increase reliability by asserting the current path is right
* Comment out unreliable area
* Ability to like activities
* Ability to like activities
* Add likeable everywhere
* Refactor
* Remove extra newline
* Typo
* Use classes, not IDs
* Explicitly wait for ajax
* Fix tests
* Move likes under owner
* Add separation
* Move harvest likes near actions
* Rearrange harvests
* Render likes under owner
* Make harvest consistent with other views
* Move planting detail into header
* Move detail into header
* Move detail into header
* Revert
* Fix header
* Move likes into jumotrons
* Fix name
* Change all actions to be after likes and a span
* Cleanup
* Cleanup
* Cleanup
* Cleanup
* i18n and accessibility
* Fix name
* Temporarily make ack into a div
* Update app/views/photos/_actions.html.haml
* Avoid showing when there are 0 things
* Styling
* Styling
* Collapse stats by default on small screens
* Add ARIA skip links
* Refactoring out of partial, and use CSS to set order on mobile
* Remove partial
* Update expectations
* Fix visual appearance on Ban button on your own profile for admins
* Typo
* Stale expectation
* Upgrade boostrap
* Remove deprecated bootstrap toggles
* Migrate other details
* Avoid accidentally including bootstrap twice
* Avoid accidentally including bootstrap twice
* Avoid accidentally including bootstrap twice
* Fix spec
* Fix spec, where the size of the screen has gone to a partial breakpoint/you can't click on your own name in tablet view
* Fix spec
* Cleanup
* Cleanup
* Register mime type
* Add rough first pass
* Index predictions, and add links
* Trailing space
* Fix implementation
* Fix names, make public
* Fix names, make public
* Fix
* Fix tyyos
* Add date
* If there are no predictions, keep growing
* Add a todo
* Fix factories
* Specs
* Add dep
* Add tests around accessibility
* Add examples in a few places
* Try to fix screenshots
* Remove redundant role
* Adjust rules, colors, etc so tests pass
* Update app/assets/stylesheets/overrides.scss
* Wrap in label
* Omit rule, which is failing with a false positive
* Update index.haml
* Update _blurb.html.haml
* Fix todo
* Rubcop
* Rubocop
* Rubocop
* Rename harvests_routing_spec.rb to harvests_controller_routing_spec.rb
Making codeclimate happier
* Rename for CodeFactor: updates_routing_spec.rb to posts_controller_updates_routing_spec.rb
For codefactor
* Rename for CodeFactor: follows_routing_spec.rb to follows_controller_routing_spec.rb
* Rename for CodeFactor: forums_routing_spec.rb to forums_controller_routing_spec.rb
* Rename spec/routing/roles_routing_spec.rb to spec/routing/admin/roles_controller_routing_spec.rb
* Rename authentications_routing_spec.rb to authentications_controller_routing_spec.rb
* Rename for CodeFactor: plantings_routing_spec.rb to plantings_controller_routing_spec.rb
* Rename for CodeFactor: scientific_names_routing_spec.rb to scientific_names_controller_routing_spec.rb
* Rename for CodeFactor: seeds_routing_spec.rb to seeds_controller_routing_spec.rb
* Rename for CodeFactor: comments_routing_spec.rb to comments_controller_routing_spec.rb
* Rename for CodeFactor: garden_types_routing_spec.rb to garden_types_controller_routing_spec.rb
* Rename for CodeFactor: admin_routing_spec.rb to admin_controller_routing_spec.rb
* Rename for CodeFactor: gardens_routing_spec.rb to gardens_controller_routing_spec.rb
* Rename for CodeFactor: photos_routing_spec.rb to photos_controller_routing_spec.rb
* Rename for CodeFactor: plant_parts_routing_spec.rb to plant_parts_controller_routing_spec.rb
* Rename for CodeFactor: crops_routing_spec.rb to crops_controller_routing_spec.rb
* [CodeFactor] Apply fixes
* Rename
* Code factor bot
---------
Co-authored-by: Cesy <cesy.avon@gmail.com>
Co-authored-by: codefactor-io <support@codefactor.io>