diff --git a/CHANGELOG.markdown b/CHANGELOG.md similarity index 100% rename from CHANGELOG.markdown rename to CHANGELOG.md diff --git a/CONTRIB.markdown b/CONTRIB.md similarity index 100% rename from CONTRIB.markdown rename to CONTRIB.md diff --git a/LICENSE.markdown b/LICENSE.md similarity index 100% rename from LICENSE.markdown rename to LICENSE.md diff --git a/README.markdown b/README.md similarity index 98% rename from README.markdown rename to README.md index 29eab98..5a8d0fa 100644 --- a/README.markdown +++ b/README.md @@ -132,7 +132,7 @@ A Handler module is expected to export the following functions: + `run(Bridge)` - Bridge will be an initialized instance of a SimpleBridge object, and the last step of the run will be the return value of - `BridgeX:build_response()` + `sbw:build_response(Bridge)` + `ws_init(Bridge)` - Called when a websocket connection is initialized. + Return Values: + `ok` - Everything went okay, proceed with the connection. @@ -280,10 +280,9 @@ inconvenient to have to include the `simple_bridge.hrl` header in your application's modules. The safer and more portable approach is to use the `sb_uploaded_file` module provided by Simple Bridge. -As with the Bridge module above, all `sb_uploaded_file` objects can be referenced in either of two ways: +As with the Bridge module above, all `sb_uploaded_file` objects can be referenced by: - + Standard Erlang Calls: `sb_uploaded_file:function_name(File)` - + Parameter Module Style Calls: `File:function_name()` + + `sb_uploaded_file:function_name(File)` `sb_uploaded_file` exports the following functions: @@ -358,7 +357,7 @@ The Bridge modules export the following functions: Finally, you build the response to send to your HTTP server with the -`build_response/0` function. +`sbw:build_response/1` function. * **sbw:build_response(Bridge)** - Create a response tuple that you can hand off to your HTTP server. @@ -461,7 +460,7 @@ We can be found on: If you wish to contribute to SimpleBridge's development, check out our [contribution -guidelines](https://github.com/nitrogen/nitrogen/blob/master/CONTRIB.markdown). +guidelines](https://github.com/nitrogen/nitrogen/blob/master/CONTRIB.md). ## License and Copyright @@ -471,4 +470,4 @@ been maintained by [Jesse Gumm](http://jessegumm.com) since 2011. Simple Bridge is copyright 2008-2023 Rusty Klophaus and Jesse Gumm. Licensed under the [MIT -License](https://github.com/nitrogen/simple_bridge/blob/master/LICENSE.markdown) +License](https://github.com/nitrogen/simple_bridge/blob/master/LICENSE.md) diff --git a/rebar.config b/rebar.config index 83db118..407ab7f 100644 --- a/rebar.config +++ b/rebar.config @@ -19,7 +19,7 @@ {ex_doc, [ {source_url, <<"https://github.com/nitrogen/simple_bridge">>}, - {extras, [<<"README.markdown">>, <<"CHANGELOG.markdown">>, <<"LICENSE.markdown">>]}, + {extras, [<<"README.md">>, <<"CHANGELOG.md">>, <<"LICENSE.md">>, <<"CONTRIB.md">>]}, {main, <<"readme">>} ]}. diff --git a/src/simple_bridge_util.erl b/src/simple_bridge_util.erl index ba12572..76780b1 100644 --- a/src/simple_bridge_util.erl +++ b/src/simple_bridge_util.erl @@ -192,8 +192,8 @@ binarize_header(Header) when is_list(Header) -> %% list, it will be easier to check for existence, and shouldn't require all %% this conversion that's being done right here. %% -%% Checks if `Header` exists as a key in `HeaderList` -%% if it doesn't, inserts it with the value `Value` +%% Checks if Header exists as a key in HeaderList +%% if it doesn't, inserts it with the provided Value. -spec ensure_header(header_list(), {header_key(), term()}) -> header_list(). ensure_header(HeaderList,{Header,Value}) -> ensure_header(HeaderList,Header,Value).