openstax_utilities 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -22,8 +22,7 @@ module OpenStax
|
|
|
22
22
|
# authentication, typically used when code is deployed during development
|
|
23
23
|
# and it is not yet ready for public consumption.
|
|
24
24
|
#
|
|
25
|
-
#
|
|
26
|
-
#
|
|
25
|
+
# @example Basic usage
|
|
27
26
|
# class ApplicationController < ActionController::Base
|
|
28
27
|
# protect_beta :username => 'bob',
|
|
29
28
|
# :password => '123'
|
|
@@ -31,10 +30,10 @@ module OpenStax
|
|
|
31
30
|
# @param :username The authentication username; default value is a random hex string
|
|
32
31
|
# @param :password The authentication password; default value is a random hex string
|
|
33
32
|
# @param :enable_always The default is the authentication is only enabled
|
|
34
|
-
#
|
|
35
|
-
#
|
|
33
|
+
# in production, setting this to true will make it effective in all
|
|
34
|
+
# environments
|
|
36
35
|
# @param :message If given, this message will be displayed in the browser's
|
|
37
|
-
#
|
|
36
|
+
# authentication dialog box.
|
|
38
37
|
#
|
|
39
38
|
def self.protect_beta(options={})
|
|
40
39
|
# Just here for documentation purposes, see code above
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
class SecurityTransgression < StandardError; end
|
|
2
|
+
class AbstractMethodCalled < StandardError; end
|
|
3
|
+
class NotYetImplemented < StandardError; end
|
|
4
|
+
class IllegalArgument < StandardError; end
|
|
5
|
+
class IllegalState < StandardError; end
|
|
6
|
+
class IllegalOperation < StandardError; end
|
data/lib/openstax_utilities.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: openstax_utilities
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2013-
|
|
12
|
+
date: 2013-05-13 00:00:00.000000000 Z
|
|
13
13
|
dependencies: []
|
|
14
14
|
description: Utilities for OpenStax web sites
|
|
15
15
|
email:
|
|
@@ -21,6 +21,7 @@ files:
|
|
|
21
21
|
- lib/openstax/utilities/access.rb
|
|
22
22
|
- lib/openstax/utilities/development.rb
|
|
23
23
|
- lib/openstax/utilities/engine.rb
|
|
24
|
+
- lib/openstax/utilities/exceptions.rb
|
|
24
25
|
- lib/openstax/utilities/settings.rb
|
|
25
26
|
- lib/openstax/utilities/version.rb
|
|
26
27
|
- lib/openstax_utilities.rb
|