Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added a notify event and extracted growl to its own plugin #605

Closed
wants to merge 760 commits into from

Conversation

Delapouite
Copy link
Contributor

Hi.

This Pull Request is a follow up of #332, to move growl capabilities out of the core.

  • It adds a new 'notify' event to docpad.events array in order to plugins to listen to it.
  • docpad.notify() does not call growl directly anymore but simply triggers the aforementionned notify event
  • the growl handling and instantiaton have been moved to its own plugin : docpad-plugin-growl https://github.com/Delapouite/docpad-plugin-growl

balupton and others added 30 commits November 27, 2012 10:33
- v6.13.2 November 27, 2012
	- Reduced the extension not rendering error to a warning
- v6.13.3 November 28, 2012
	- Reduced the extension not rendering warning to a notice
	- Fixed the `include` template helper
	- `DocPad::getFileAtPath` now does fuzzy finding
	- `FilesCollection::fuzzyFindOne` now also fuzzy matches against the
url and accepts `sorting` and `paging` arguments
- v6.13.4 November 29, 2012
	- `reportErrors` and `reportStatistics` are now `false` if `test` is
included in the `process.argv`
		- Closes [issue docpad#354](docpad#354)
- v6.14.0 November 29, 2012
	- Added  `DocPad::getFileByUrl(url)` and updated the middleware router
to use it
		- Big performance gain on request response time
- v6.15.0 December 3, 2012
	- [Nodejitsu](http://nodejitsu.com/) Support
- v6.16.0 December 4, 2012
	- The amount of render passes is now customisable via the
`renderPasses` configuration option, defaults to `1`
		- Increment this value dependening on how many levels of
cross-document references you have (e.g. 2 passes for C includes B, B
includes A)
	- The render pass functionality has been changed to render all
documents that don't reference anything else first, then for each
additional render pass, render documents that do reference others
		- Previously it would render both types of documents in the one
batch, which resulted in hit and miss results
		- Doing this, we now safely have the default `renderPasses` value set
to `1` which has the same effect as the traditional `2` render pass
		- Refer to [issue docpad#359](docpad#359)
for more information
- Removed useless `Document::initialize` and `Document::getMeta`
- Updated `File::getMeta` to create meta if it doesn't exist yet
- Added `Base::setDefaults`, `File::setMeta`, and
`File::setMetaDefaults`
- v6.17.0 December 4, 2012
	- Updated
		- `File::getMeta` to create meta if it doesn't exist yet
	- Removed
		-  `Document::initialize` didn't do anything
		-  `Document::getMeta` didn't do anything
		-  `File::readFile` merged into `File::parse`
		- `File::parseData` renamed to `File::parse` and cleaned signficantly
	- Added
		- `Base::setDefaults` to update attributes that haven't been set
		- `File::setMeta` to update the meta more easily than
`File.getMeta().set`
		- `File::setMetaDefaults` to update the meta attributes that haven't
been set
		- `File::getContent` to get the content or buffer
		- `File::getOutContent` to get the rendered content, or content, or
buffer
		- `File::getStat` to get the stat
		- `File::setBuffer` to set the buffer
		- `File::getBuffer` to get the buffer
- v6.17.1 December 4, 2012
	- Updated misc internals to use the new `File::getOutContent` call
- v6.17.2 December 5, 2012
	- `watch` and `server` actions now perform an initial generation
		- Thanks [Khalid Jebbari](https://github.com/DjebbZ), [Vladislav
Botvin](https://github.com/darrrk)
		- Closes [docpad#369](docpad#369),
[docpad#368](docpad#368),
[docpad#366](docpad#366)
- v6.17.3 December 5, 2012
	- Fixed an issue introduced in v6.17.0 that prevented files from
reloading under certain circumstances
		- Thanks [Vladislav Botvin](https://github.com/darrrk) for [issue
docpad#370](docpad#370) and [pull request
docpad#371](docpad#371)
- v6.18.0 December 14, 2012
	- Added `regeneratePaths` configuration option
	- Include now returns expected results if the content hasn't been
rendered yet
		- Closes [issue docpad#378](docpad#378)
	- Updated [QueryEngine](https://github.com/bevry/query-engine/) to
v1.5.x from v1.4.x
	- [Backbone](http://backbonejs.org/) dependency now moved to our
dependencies from QueryEngine's. Version set explicitly to v0.9.9.
		- If you have any plugins or whatever that used the
`myCollection.getByCid` function, change that call to `myCollection.get`
	- Improved help URLs
balupton and others added 20 commits July 25, 2013 01:50
## Changes

- Added naming to collections to easliy identify which collection we
are in when debugging
- Realised that tags for tumblr items were not being created because
tumblr items had isDocument and isFile undefined as it is a virtual
document, which the collection isHTML required
- Updated isHTML to check for write:true instead of isDocument and
isFile
- Added isDocument and isFile defaults

## Choices
This leaves us with the following choices

### documents/files as types

- then partials,layouts would be inside the documents collection - very
bad
- can work around by having documents,files collections check for
write:true
- then we have write:false draft documents inside the documents
directory not inside the documents collection
- result is isDocument,isFile set appropriatly for types

### documents/files as directories

- then importers have problems
- can work around by having html,stylesheet collections check for
write:true
- result is isDocument,isFile undefined for imported documents
…werver

- Fixed virtual documents firing duplicated events
	- Added `cloneModel(model)` to properly handle events when cloning
(`model.clone()` will no longer clone events)
- Fixed `Object #<Model> has no method 'setDefaults'` error (bug since
v6.46.3)
	- Moved `FileModel::setDefaults` back into `Base::setDefaults`
	- Thanks to [Jeff Barczewski](https://github.com/jeffbski) for
[docpad-archive/documentation#40](https://github.com/bevry/docpad-document
ation/pull/40)
- Fixed the 500 middleware not working
- Added ability to do `getCollection('database')` to get the global
database
- Added `render` alias for documents directory
- Added `static` alias for files directory
- The `documents` collection is now defiend by `render:true,
write:true` rather than being paths and `isDocument:true` based
- The `files` collection is now defiend by `render:false, write:true`
rather than being paths and `isFile:true` based
- The `html` collection is now checks for `write:true` instead of
`isDocument:true` or `isFile:true`
- The `stylesheet` collection is now checks for `write:true` instead of
`isDocument:true` or `isFile:true`
- Re-added `DocPad::parseDocumentDirectory` and `parseFileDirectory`
(removed from v6.46.0) which wraps around the new ways of doing things
- Added `DocPad::createModel(attrs,opts)` and updated
`DocPad::createDocument` and `DocPad::createFile` to use it
- Added `DocPad::ensureModel(attrs,opts)` and updated
`DocPad::ensureDocument`, `DocPad::ensurefile`, and
`DocPad::ensureFileOrDocument` to use it
- Added `DocPad::attachModelEvents(model)` to attach the required
docpad events to a model
- v6.46.4 July 27, 2013
	- Fixes
		- Fixed virtual documents firing duplicated events
			- Plugins should now use `DocPad::cloneModel(model)` instead of
`model.clone()` as the latter can't bind events correctly
		- Fixed `Object #<Model> has no method 'setDefaults'` error (bug
since v6.46.3)
			- Moved `FileModel::setDefaults` back into `Base::setDefaults`
			- Thanks to [Jeff Barczewski](https://github.com/jeffbski) for
[docpad-archive/documentation#40](https://github.com/bevry/docpad-document
ation/pull/40)
		- Fixed the 500 middleware not working
	- Changes
		- The `documents` collection is now defined by `render:true,
write:true` rather than being paths and `isDocument:true` based
		- The `files` collection is now defined by `render:false, write:true`
rather than being paths and `isFile:true` based
		- The `html` collection now checks for `write:true` instead of
`isDocument:true` or `isFile:true`
		- The `stylesheet` collection now checks for `write:true` instead of
`isDocument:true` or `isFile:true`
	- Additions
		- Added ability to do `getCollection('database')` to get the global
database
		- Added naming to collections to easily identify which collection we
are in when debugging
		- Added `render` alias for documents directory
		- Added `static` alias for files directory
		- Added logging for event emits
		- Re-added `DocPad::parseDocumentDirectory` and `parseFileDirectory`
(removed from v6.46.0) which wraps around the new ways of doing things
		- Added `DocPad::createModel(attrs,opts)` and updated
`DocPad::createDocument` and `DocPad::createFile` to use it
		- Added `DocPad::ensureModel(attrs,opts)` and updated
`DocPad::ensureDocument`, `DocPad::ensurefile`, and
`DocPad::ensureFileOrDocument` to use it
		- Added `DocPad::attachModelEvents(model)` to attach the required
docpad events to a model
- v6.46.5 July 28, 2013
	- Fixed `ReferenceError: result is not defined` (bug since v6.46.4)
		- Thanks to [Anup Shinde](https://github.com/anupshinde) for [issue
- v6.47.0 July 31, 2013
	- Added `FileModel::deleteSource`
	- Added support for specifying inline content within the styles block
	- Fixed `DocPad::parseFileDirectory`
- v6.48.0 August 5, 2013
	- Moved `regenerateEvery` timer into `generate` rather than
`setConfig` to avoid action stacking
	- DocPad will now warn you when your project's local DocPad version
does not match the global version
- v6.48.1 August 9, 2013
	- Fixed [issue docpad#584](docpad#584)
		- Now the output filename of a file without an extension will remain unchanged
	- Added a test for the aforementioned issue
- v6.49.0 August 9, 2013
	- DocPad will now shutdown and destroy itself more thoroughly
		- Thanks to [Ashton Williams](https://github.com/Ashton-W) for [issue docpad#595](docpad#595)
	- Added the event `docpadDestroy` for plugins that are doing anything long-running so they can destroy themselves thoroughly too
fixed missing progress option for loadFiles step
- v6.49.1 August 14, 2013
	- `loadFiles` step is now properly reported in the progress bar
		- Thanks to [Bruno Heridet](https://github.com/Delapouite) for [pull
request docpad#498](docpad#598)
@balupton
Copy link
Member

balupton commented Sep 1, 2013

Looks good to me. I'll merge this in the next minor release :)

@balupton
Copy link
Member

balupton commented Sep 7, 2013

We will need to think about a way to inform people of this change. As once released, people will be wondering where their growl notifications went.

@Delapouite
Copy link
Contributor Author

Absolutely, deprecated notices should be displayed in the console output.

@balupton balupton closed this Oct 23, 2013
@balupton
Copy link
Member

Why on earth did this get closed?

@balupton balupton reopened this Oct 26, 2013
@balupton balupton closed this Oct 26, 2013
@balupton
Copy link
Member

Merged in manually :)

@balupton
Copy link
Member

Released to v6.54.0 October 27, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.