di-simple_auth 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :minor: 3
3
- :patch: 4
3
+ :patch: 5
4
4
  :major: 0
@@ -0,0 +1,60 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{di-simple_auth}
8
+ s.version = "0.3.5"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Dieinzige"]
12
+ s.date = %q{2010-03-24}
13
+ s.description = %q{ longer description of your gem}
14
+ s.email = %q{dieinzige@me.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".gitignore",
22
+ "LICENSE",
23
+ "README.rdoc",
24
+ "Rakefile",
25
+ "VERSION.yml",
26
+ "di-simple_auth.gemspec",
27
+ "lib/simple_auth.rb",
28
+ "lib/simple_auth/authenticated.rb",
29
+ "lib/simple_auth/authentication.rb",
30
+ "simple_auth.gemspec",
31
+ "test/helper.rb",
32
+ "test/test_simple_auth.rb"
33
+ ]
34
+ s.homepage = %q{http://github.com/Dieinzige/simple_auth}
35
+ s.rdoc_options = ["--charset=UTF-8"]
36
+ s.require_paths = ["lib"]
37
+ s.rubygems_version = %q{1.3.6}
38
+ s.summary = %q{one-line summary of your gem}
39
+ s.test_files = [
40
+ "test/helper.rb",
41
+ "test/test_simple_auth.rb"
42
+ ]
43
+
44
+ if s.respond_to? :specification_version then
45
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
46
+ s.specification_version = 3
47
+
48
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
49
+ s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
50
+ s.add_runtime_dependency(%q<bcrypt-ruby>, [">= 0"])
51
+ else
52
+ s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
53
+ s.add_dependency(%q<bcrypt-ruby>, [">= 0"])
54
+ end
55
+ else
56
+ s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
57
+ s.add_dependency(%q<bcrypt-ruby>, [">= 0"])
58
+ end
59
+ end
60
+
@@ -52,9 +52,9 @@ module SimpleAuth
52
52
  #
53
53
  # @return [true,false]
54
54
  def permission_exist?
55
- if params[:token] && _permission_token = params[:token][12..-1]
56
- _invoice_token = params[:token][0..11]
57
- _invoice = Invoice.find_by_token(_invoice_token)
55
+ if params[:token] && _permission_token = params[:token][32..-1]
56
+ _invoice_token = params[:token][0..31]
57
+ _invoice = Invoice.find(_invoice_token)
58
58
  _permission = Permission.find_by_token(_permission_token)
59
59
  _invoice && _permission
60
60
  end
@@ -122,7 +122,7 @@ module SimpleAuth
122
122
  end
123
123
 
124
124
  def permission_from_token(invoice)
125
- if params[:token] && _token = params[:token][12..-1]
125
+ if params[:token] && _token = params[:token][32..-1]
126
126
  ::Permission.find_by_token(_token)
127
127
  elsif current_user && invoice
128
128
  current_user.permissions(invoice).max_by{|v| v.index }
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 4
9
- version: 0.3.4
8
+ - 5
9
+ version: 0.3.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Dieinzige
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-03-15 00:00:00 +03:00
17
+ date: 2010-03-24 00:00:00 +03:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -57,6 +57,7 @@ files:
57
57
  - README.rdoc
58
58
  - Rakefile
59
59
  - VERSION.yml
60
+ - di-simple_auth.gemspec
60
61
  - lib/simple_auth.rb
61
62
  - lib/simple_auth/authenticated.rb
62
63
  - lib/simple_auth/authentication.rb