doorkeeper 0.6.5 → 0.6.6

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of doorkeeper might be problematic. Click here for more details.

data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.6
4
+
5
+ - enhancements
6
+ - [#187] Raise error if configuration is not set
7
+
3
8
  ## 0.6.5
4
9
 
5
10
  - enhancements
data/README.md CHANGED
@@ -33,7 +33,7 @@ For more information about the supported features, check out the related [page i
33
33
  Put this in your Gemfile:
34
34
 
35
35
  ``` ruby
36
- gem 'doorkeeper', '~> 0.6.5'
36
+ gem 'doorkeeper', '~> 0.6.6'
37
37
  ```
38
38
 
39
39
  Run the installation generator with:
@@ -1,4 +1,10 @@
1
1
  module Doorkeeper
2
+ class MissingConfiguration < StandardError
3
+ def initialize
4
+ super("Configuration for doorkeeper missing. Do you have doorkeeper initializer?")
5
+ end
6
+ end
7
+
2
8
  def self.configure(&block)
3
9
  @config = Config::Builder.new(&block).build
4
10
  enable_orm
@@ -6,7 +12,7 @@ module Doorkeeper
6
12
  end
7
13
 
8
14
  def self.configuration
9
- @config
15
+ @config || (raise MissingConfiguration.new)
10
16
  end
11
17
 
12
18
  def self.enable_orm
@@ -1,3 +1,3 @@
1
1
  module Doorkeeper
2
- VERSION = "0.6.5"
2
+ VERSION = "0.6.6"
3
3
  end
@@ -152,4 +152,19 @@ describe Doorkeeper, "configuration" do
152
152
  end
153
153
 
154
154
  end
155
+
156
+ it 'raises an exception when configuration is not set' do
157
+ old_config = Doorkeeper.configuration
158
+ Doorkeeper.module_eval do
159
+ @config = nil
160
+ end
161
+
162
+ expect do
163
+ Doorkeeper.configuration
164
+ end.to raise_error Doorkeeper::MissingConfiguration
165
+
166
+ Doorkeeper.module_eval do
167
+ @config = old_config
168
+ end
169
+ end
155
170
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doorkeeper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.5
4
+ version: 0.6.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-12-26 00:00:00.000000000 Z
13
+ date: 2013-01-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  type: :runtime
@@ -406,7 +406,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
406
406
  segments:
407
407
  - 0
408
408
  version: '0'
409
- hash: -2302651692079730283
409
+ hash: -995956839748063493
410
410
  required_rubygems_version: !ruby/object:Gem::Requirement
411
411
  none: false
412
412
  requirements:
@@ -415,7 +415,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
415
415
  segments:
416
416
  - 0
417
417
  version: '0'
418
- hash: -2302651692079730283
418
+ hash: -995956839748063493
419
419
  requirements: []
420
420
  rubyforge_project:
421
421
  rubygems_version: 1.8.24