google-labs-jules[bot]
63d65c4e6b
Merge pull request #4277 from Growstuff/add-activity-update-coverage
...
Add test coverage for updating an activity via the API
2025-09-30 20:29:11 +09:30
Daniel O'Connor
d9851231f2
Merge pull request #4274 from Growstuff/CloCkWeRX-patch-3
...
API > Render activities links under member
2025-09-29 01:11:24 +09:30
google-labs-jules[bot]
02db5b8130
Add API token generation, authentication, and CRUD for a number of the API resources ( #4237 )
...
* 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 >
2025-09-10 19:50:06 +09:30
google-labs-jules[bot]
e5c71f1dc4
Merge pull request #4230 from Growstuff/feature/add-more-filters
...
feat: Add more filters to API resources
2025-09-09 21:34:49 +09:30
google-labs-jules[bot]
ba6ec689c5
Merge pull request #4150 from Growstuff/feature/failed-plantings
...
Add failed status to plantings
2025-08-27 23:42:53 +09:30
Daniel O'Connor
81060cccf7
Ruby 3.2: Rubocop - Lint/* and Style/* ( #3786 )
...
* Rubocop - Layout/*
* Rubocop - Lint and Style
2024-07-13 15:38:37 +09:30
Daniel O'Connor
f338274611
Rails 7.1 ( #3590 )
...
* Rails 7.1
* Update application.rb
* Bump searchkick
* Bump to 7.0.0
* Fix
* Fix crop search
* Sync translation
* Drop required from form group
* Loosen specs further
* Fix Gemfile
* Update seeds_request_spec.rb
* Update test.rb
* Rename
2024-01-27 10:06:47 +10:30
Daniel O'Connor
d1f754a288
Rubocop
2022-11-08 00:23:38 +10:30
Daniel O'Connor
b24b9f82e6
Rubocop - auto corrections
2022-11-06 16:34:36 +10:30
Daniel O'Connor
260f19e047
Add tests #3401 - wrong resources loaded ( #3045 )
...
* Prove broken
* Allow filter by owner id
* Specify FK
* Mark pending, and cover filter by member
2022-05-01 17:09:13 +09:30
codefactor-io
4ff95fbac9
[CodeFactor] Apply fixes
2020-01-21 22:26:08 +13:00
Brenda
7257b2ada1
Update with frozen literals
2020-01-10 16:50:52 +13:00
Brenda Wallace
04fd1a343a
Rubocop update ( #2334 )
...
* Update rubocop config
* Rubocop update - for rubocop 0.77
* [CodeFactor] Apply fixes
* rubocop fixes
* [CodeFactor] Apply fixes to commit 2826c2e
2019-12-16 22:35:33 +13:00
Brenda Wallace
fa1e70036a
Fix name of spec
2019-11-18 16:06:57 +13:00
Brenda Wallace
df5b0499e4
Update spec for api resource
2019-11-16 13:05:40 +13:00
Awesome Code
4ba5319ba8
Auto corrected by following Lint Ruby Capybara/FeatureMethods
2019-04-01 23:02:50 +13:00
Awesome Code
e10c641702
Auto corrected by following Lint Ruby Layout/AlignHash
2019-03-22 07:55:05 +00:00
Brenda Wallace
77f936cb0f
update spec
2019-03-20 09:43:01 +13:00
Awesome Code
ad470ede1d
Auto corrected by following Lint Ruby RSpec/AlignRightLetBrace
2019-03-13 17:23:33 +13:00
Awesome Code
f90cc792bb
Auto corrected by following Lint Ruby RSpec/AlignLeftLetBrace
2019-03-13 11:42:27 +13:00
Brenda Wallace
572af9d135
Merge branch 'dev' into photos/seeds
2019-02-09 17:00:58 +13:00
Awesome Code
284bb81bbf
Auto corrected by following Lint Ruby RSpecEmptyLine
2019-02-09 03:05:40 +00:00
Brenda Wallace
9a4f1058e1
Adding more attributes and filters to the api
2019-02-09 08:43:59 +13:00
Brenda Wallace
51e6da7da6
Rubocop lint tidxy
2019-02-05 12:37:23 +13:00
Brenda Wallace
f640e41b55
Add seeds to crops api spec
2019-02-05 10:23:10 +13:00
Brenda Wallace
7b01fcbd4b
Align all the hashes
2018-12-30 15:22:29 +13:00
Brenda Wallace
550860178e
Merge remote-tracking branch 'upstream/dev' into upgrade/rails-5
2018-09-11 16:07:30 +12:00
Awesome Code
90f4db4853
Auto corrected by following Ruby rspec layout
2018-09-10 22:20:12 +00:00
brenda
2b8aac19dd
Revert "Auto corrected by following Ruby Capybara/FeatureMethods"
...
This reverts commit b52763b7c2 .
2018-09-07 10:40:09 +12:00
Awesome Code
b52763b7c2
Auto corrected by following Ruby Capybara/FeatureMethods
2018-09-05 12:06:58 +00:00
Brenda Wallace
fa32537c3b
Merge remote-tracking branch 'upstream/dev' into upgrade/rails-5
...
Conflicts:
.rubocop_todo.yml
Gemfile.lock
app/assets/javascripts/application.js
app/assets/javascripts/members.js.erb
app/assets/stylesheets/predictions.sass
app/controllers/crops_controller.rb
app/controllers/orders_controller.rb
app/controllers/plantings_controller.rb
app/models/account.rb
app/models/account_type.rb
app/models/member.rb
app/models/order.rb
app/models/order_item.rb
app/models/product.rb
app/views/gardens/show.html.haml
app/views/layouts/application.html.haml
config/initializers/assets.rb
config/routes.rb
db/schema.rb
package-lock.json
spec/controllers/account_types_controller_spec.rb
spec/controllers/admin/orders_controller_spec.rb
spec/controllers/comments_controller_spec.rb
spec/controllers/gardens_controller_spec.rb
spec/controllers/harvests_controller_spec.rb
spec/controllers/member_controller_spec.rb
spec/controllers/order_items_controller_spec.rb
spec/controllers/orders_controller_spec.rb
spec/controllers/photo_associations_controller_spec.rb
spec/controllers/photos_controller_spec.rb
spec/controllers/plantings_controller_spec.rb
spec/controllers/seeds_controller_spec.rb
spec/controllers/shop_controller_spec.rb
spec/features/crops/crop_detail_page_spec.rb
spec/models/member_spec.rb
spec/models/post_spec.rb
spec/views/crops/_planting_advice.html.haml_spec.rb
spec/views/home/_crops.html.haml_spec.rb
spec/views/orders/show.html.haml_spec.rb
spec/views/posts/show.html.haml_spec.rb
spec/views/shop/index_spec.rb
2018-04-02 10:59:13 +12:00
Brenda Wallace
65b4c7dbc1
Revert "Auto corrected by following Style/StringLiterals"
...
This reverts commit ab56a3c6b3 .
2018-02-09 07:58:47 +13:00
Awesome Code
ab56a3c6b3
Auto corrected by following Style/StringLiterals
2018-02-07 10:20:26 +13:00
Awesome Code
767477df66
Auto corrected by following RSpec/LeadingSubject
2018-01-28 23:47:27 +00:00
Brenda Wallace
c95630e249
Fixed api request specs after rails 5 upgrade
2018-01-06 12:19:42 +13:00
Brenda Wallace
c747d46ab5
Request spec for seeds api
2017-11-17 23:22:10 +13:00
Brenda Wallace
3009ed2d83
Merge branch 'api' of github.com:Br3nda/growstuff into api
2017-11-17 23:16:16 +13:00
Brenda Wallace
c4a1806a87
Request spec for photos api
2017-11-17 22:01:37 +13:00
Brenda Wallace
fa5e151af0
Request spec for photos api
2017-11-17 22:00:32 +13:00
Brenda Wallace
1b4d77e017
Requests spec for member api
2017-11-13 20:03:39 +13:00
Brenda Wallace
08e7c7dd29
Request specs for harvests api
2017-11-13 19:19:18 +13:00
Brenda Wallace
5fec826c41
Add more attributes to crops
2017-11-13 19:19:18 +13:00
Brenda Wallace
c29234c40c
Request specs for crops api
2017-11-13 19:19:18 +13:00
Brenda Wallace
2f0cb5c815
DRY the api specs
2017-11-13 19:19:18 +13:00
Brenda Wallace
b6cbfe25d2
Factory girl becomes factory bot
2017-11-13 19:19:18 +13:00
Brenda Wallace
d8f5876518
Added predictions to planting api, and added specs
2017-11-13 19:19:18 +13:00
Brenda Wallace
ae2cbf0bec
requests spec for modifying immutable gardens on api
2017-11-13 19:19:18 +13:00
Brenda Wallace
d86e0af5ad
Request for for getting api gardens#index
2017-11-13 19:19:18 +13:00