Environment #210

merged 423 commits into from Nov 3, 2017


None yet
3 participants

bryanp commented Dec 4, 2016

Refactor entire codebase to support the goals of Pakyow Environment, as discussed.

  • finish the routing refactor, including tests and docs
  • rename to definable
  • update pakyow/presenter
  • update pakyow/mailer
  • update pakyow/realtime
  • update pakyow/ui

bryanp and others added some commits Mar 17, 2017

Remove hook validation
This causes issues in some edge cases. Since we can’t always validate
(when defining hooks on a group for example) we shouldn’t validate and
just let things fail at runtime.
Share state between router instances
When rerouting we want to share any state that was set on the initial
route to the router that was rerouted to. Thus, this commit.
Rework exception matching logic
Same result, cleaner appriach
Fix intermittent test failures
rspec does some weird stuff sometimes
Fix main pakyow tests
Controller isn’t available, so protect against that
Improve hierarchical error handling
With the previous approach, @current_router was only ever a top-level
router. This caused problems when the router to trigger the error was
not a top-level router. Now @current_router is set by the router itself
when routing, so we know exactly where we are in the routing process.

Also, @current_router is now always an instance.
Add support for defining routes in another router
This requires routers to know where they are being defined, so that
routers can be accessed that aren’t direct descendants.
Inherit handlers from parent
This removes the need for a router to know who its parent router is.
Don't define all resource routes on the router
This requires a different approach, where expansion of the template
itself happens in a private router to define the “base routes”. Then,
the router that’s expanding the template pulls in the desired routes.

bryanp added some commits Oct 16, 2017

Prefix attributes string with a space
Prevents significant nodes from having an extra space when no attributes, e.g. <title >
Introducte PathBuilder for building paths to routes
Allows for better separation of concerns, and makes it so that presenter no longer has to concern itself with the controller when it only cares about paths.
Remove multi-level delegation
This simplifies things, making it easier to follow and understand.
Merge pull request #258 from pakyow/environment-presenter
Refactor presenter to work within environment
Make the tests not fail
I don't want to take the time to rewrite these, since mailer is changing for v1.0.
Catch halt outside of process hooks
This allows a hook to halt execution.
Add on change callback api to server
This lets anyone execute code when a certain file in the app changes, prior to the server being restarted.
Merge pull request #257 from pakyow/server-reload
Restart server when a file changes
Remove pakyow/ui from all
UI needs quite a lot of work to function within environment. Rather than
updating it now, we'll wait until pakyow/data is finished.

@bryanp bryanp changed the title from [WIP] Environment to Environment Nov 3, 2017


This comment has been minimized.

Show comment
Hide comment

bryanp Nov 3, 2017


FYI I'm merging this without refactoring pakyow/ui. It needs a good amount of work, much of it related to the ongoing pakyow/data work. So, on to data and then back to ui.


bryanp commented Nov 3, 2017

FYI I'm merging this without refactoring pakyow/ui. It needs a good amount of work, much of it related to the ongoing pakyow/data work. So, on to data and then back to ui.

@bryanp bryanp merged commit 6809f64 into master Nov 3, 2017

1 check failed

continuous-integration/travis-ci/pr The Travis CI build failed

@bryanp bryanp deleted the environment branch Nov 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment