Skip to content

Commit

Permalink
Merge pull request #116 from cmcaine/spelling-is-hard
Browse files Browse the repository at this point in the history
Rename "probabilty" -> "probability"
  • Loading branch information
jpsamaroo authored Dec 7, 2020
2 parents 26eba1f + e3b2b52 commit fba4f3b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "Mux"
uuid = "a975b10e-0019-58db-a62f-e48ff68538c9"
version = "0.7.3"
version = "0.7.4"

[deps]
AssetRegistry = "bf4720bc-e11a-5d0c-854e-bdca1663c893"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ using Mux
Mux.defaults,
page(respond("<h1>Hello World!</h1>")),
page("/about",
probabilty(0.1, respond("<h1>Boo!</h1>")),
probability(0.1, respond("<h1>Boo!</h1>")),
respond("<h1>About Me</h1>")),
page("/user/:user", req -> "<h1>Hello, $(req[:params][:user])!</h1>"),
Mux.notfound())
Expand Down Expand Up @@ -169,7 +169,7 @@ mux(branch(_ -> rand() < 0.1, respond("Hello")),
We can also define a function to wrap the branch

```jl
probabilty(x, app) = branch(_ -> rand() < x, app)
probability(x, app) = branch(_ -> rand() < x, app)
```

### Utilities
Expand Down
6 changes: 4 additions & 2 deletions src/routing.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import HTTP

export method, GET, route, page, probabilty, query
export method, GET, route, page, probability, query

# Request type

Expand Down Expand Up @@ -67,4 +67,6 @@ query(q::Dict{<:AbstractString, <:AbstractString}, app...) =

# Misc

probabilty(x, app...) = branch(_->rand()<x, app...)
probability(x, app...) = branch(_->rand()<x, app...)
# Old typo
@deprecate probabilty(x, app...) probability(x, app...)

2 comments on commit fba4f3b

@jpsamaroo
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/25971

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.7.4 -m "<description of version>" fba4f3b436fe382a9f9dd8e6186fd6a6f4309aea
git push origin v0.7.4

Please sign in to comment.