README.md in rack-jquery_ui-2.2.0 vs README.md in rack-jquery_ui-3.0.0

- old
+ new

@@ -20,15 +20,17 @@ * Add `use Rack::JQueryUI` to your middleware stack. * Put this in the head of your layout (the example is Haml but you can use whatever you like) %head - = Rack::JQueryUI.cdn + = Rack::JQueryUI.cdn env +where `env` is the Rack env. + Now you have the script tags to Media Temple's CDN in the head (you can also use Google or Microsoft, or Cloudflare, see the docs). -It also adds in a bit of javascript that will load in a locally kept version of jQuery, just incase the CDN is unreachable. The script will use the "/js/jquery-ui/1.10.3/jquery-ui.min.js" path (or, instead of 1.10.3, whatever is in {Rack::JQuery::VERSION}). You can change the "/js" bit if you like (see the docs). +It also adds in a bit of javascript that will load in a locally kept version of jQuery UI, just in case the CDN is unreachable. The script will use the "/js/jquery-ui/1.10.3/jquery-ui.min.js" path (or, instead of 1.10.3, whatever is in {Rack::JQueryUI::VERSION}). You can change the "/js" bit if you like (see the docs). That was easy. ### Note ### @@ -39,21 +41,21 @@ I made a mistake and pushed out a version of the library where not all the CDNs supported the version of jQuery UI it was using. Embarrassing. To stop this happening again I've added more checks, but there's also a choice for the library user. If you've picked a CDN to use, something like this: %head - = Rack::JQueryUI.cdn :microsoft + = Rack::JQueryUI.cdn env, :organisation => :microsoft -and it doesn't support the jQuery UI version, then it will silently use the default CDN (usually Google's, but it will change depending on who supports what). +and it doesn't support the jQuery UI version, then it will silently use the default CDN (usually Media Temple's, but it will change depending on who supports what). If you'd prefer an exception to be raised you can either do this: use Rack::JQueryUI, :raise => true or %head - = Rack::JQueryUI.cdn :microsoft, :raise => true + = Rack::JQueryUI.cdn env, :organisation => :microsoft, :raise => true the second way will always override the first. ### Version numbers ###