devise_couch 0.1.2 → 1.0.0.beta1

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.
data/Rakefile CHANGED
@@ -20,7 +20,7 @@ end
20
20
  desc 'Run Devise tests using CouchDB. Specify path to devise with DEVISE_PATH'
21
21
  Rake::TestTask.new(:test) do |test|
22
22
  ENV['DEVISE_ORM'] ||= 'couchrest_model'
23
- ENV['DEVISE_PATH'] ||= File.expand_path('./')
23
+ ENV['DEVISE_PATH'] ||= File.expand_path('../devise')
24
24
  unless File.exist?(ENV['DEVISE_PATH'])
25
25
  puts "Specify the path to devise (e.g. rake DEVISE_PATH=/path/to/devise). Not found at #{ENV['DEVISE_PATH']}"
26
26
  exit
@@ -6,33 +6,15 @@ module Devise
6
6
  extend ActiveModel::Naming
7
7
 
8
8
  module ClassMethods
9
- # Hooks for confirmable
10
- def before_create(*args)
11
- wrap_hook(:before, :create, *args)
12
- end
13
-
14
- def after_create(*args)
15
- wrap_hook(:after, :create, *args)
16
- end
17
-
18
- def before_save(*args)
19
- wrap_hook(:before, :save, *args)
20
- end
21
-
22
- def wrap_hook(action, method, *args)
9
+ def find(*args)
23
10
  options = args.extract_options!
24
-
25
- args.each do |callback|
26
- callback_method = :"#{callback}_callback_wrap"
27
- send action, method, callback_method
28
- class_eval <<-METHOD, __FILE__, __LINE__ + 1
29
- def #{callback_method}
30
- #{callback} if #{options[:if] || true}
31
- end
32
- METHOD
33
- end
11
+ conditions = options[:conditions]
12
+ by_login(:key => conditions[authentication_keys.first]).first
34
13
  end
35
14
  end
15
+
16
+ def reload
17
+ end
36
18
  end
37
19
  end
38
20
  end
@@ -1,4 +1,4 @@
1
- require 'couchrest/model/base'
1
+ require 'devise_couch'
2
2
  require 'devise/orm/couchrest_model/compatibility'
3
3
 
4
4
  module Devise
@@ -7,7 +7,7 @@ module Devise
7
7
  module Hook
8
8
  def devise_modules_hook!
9
9
  extend Schema
10
- #include Compatibility
10
+ include Compatibility
11
11
  yield
12
12
  return unless Devise.apply_schema
13
13
  devise_modules.each { |m| send(m) if respond_to?(m, true) }
@@ -1,5 +1,5 @@
1
1
  module CouchrestModel
2
2
  module Devise
3
- VERSION = "0.1.2".freeze
3
+ VERSION = "1.0.0.beta1".freeze
4
4
  end
5
5
  end
@@ -0,0 +1,2 @@
1
+ require 'couchrest_model'
2
+ require 'devise_couch/version'
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise_couch
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
4
+ prerelease: true
5
5
  segments:
6
- - 0
7
6
  - 1
8
- - 2
9
- version: 0.1.2
7
+ - 0
8
+ - 0
9
+ - beta1
10
+ version: 1.0.0.beta1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Shenouda Bertel
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-09-07 00:00:00 +02:00
18
+ date: 2010-09-15 00:00:00 +03:00
18
19
  default_executable:
19
20
  dependencies: []
20
21
 
@@ -35,6 +36,7 @@ files:
35
36
  - lib/devise_couch/version.rb
36
37
  - lib/devise/orm/couchrest_model/compatibility.rb
37
38
  - lib/devise/orm/couchrest_model.rb
39
+ - lib/devise_couch.rb
38
40
  - lib/generators/couchrest_model/devise_generator.rb
39
41
  has_rdoc: true
40
42
  homepage: http://github.com/shenoudab/devise_couch
@@ -56,11 +58,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
56
58
  required_rubygems_version: !ruby/object:Gem::Requirement
57
59
  none: false
58
60
  requirements:
59
- - - ">="
61
+ - - ">"
60
62
  - !ruby/object:Gem::Version
61
63
  segments:
62
- - 0
63
- version: "0"
64
+ - 1
65
+ - 3
66
+ - 1
67
+ version: 1.3.1
64
68
  requirements: []
65
69
 
66
70
  rubyforge_project: