Module: Tagstand
- Defined in:
- lib/tagstand.rb,
lib/tagstand/tag.rb,
lib/tagstand/tap.rb,
lib/tagstand/user.rb,
lib/tagstand/version.rb
Defined Under Namespace
Classes: BadRequest, ClientError, NotFound, ServerError, Tag, Tagstand, TagstandError, Tap, Unauthorized, Unavailable, User
Constant Summary collapse
- VERSION =
"0.0.1"
Class Method Summary collapse
-
.api_key=(api_key) ⇒ Object
Allow Tagstand.api_key = “…”.
- .base_uri=(uri) ⇒ Object
-
.disable ⇒ Object
Allows the initializer to turn off actually communicating to the REST service for certain environments Requires fakeweb gem to be installed.
Class Method Details
.api_key=(api_key) ⇒ Object
Allow Tagstand.api_key = “…”
18 19 20 |
# File 'lib/tagstand.rb', line 18 def api_key=(api_key) Tagstand.api_key = api_key end |
.base_uri=(uri) ⇒ Object
22 23 24 |
# File 'lib/tagstand.rb', line 22 def base_uri=(uri) Tagstand.base_uri uri end |
.disable ⇒ Object
Allows the initializer to turn off actually communicating to the REST service for certain environments Requires fakeweb gem to be installed
28 29 30 |
# File 'lib/tagstand.rb', line 28 def disable FakeWeb.register_uri(:any, %r|#{Regexp.escape(Tagstand.base_uri)}|, :body => '{"Disabled":true}', :content_type => 'application/json; charset=utf-8') end |