Started to study a bit about Phoenix.PubSub and added {:phoenix_pubsub, "~> 2.0"} as a dependency - using mix deps.get. But it seems the latest version is 1.1.2 and 2.0 is not available in hex.pm:
** (Mix) No matching version for phoenix_pubsub ~> 2.0 (from: mix.exs) in registry
The latest version is: 1.1.2
Should the GitHub repo be used directly? How long will it take to show up in hex.pm?
True. But at the GitHub readme under the Usage section, it says the version 2.0 should be used - same for Phoenix.PubSub.Redis which is updated to use version 2.0.
The GitHub repository shows the readme of the master branch by default and this is commonly the development branch. If 2.0 is currently being developed then that is what will be shown to you. The readme is also usually for maintainers and contributors of the library. You should look at the published documentation for the latest stable information.