authstrategies 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NmMxNWM2NDI3YWFhYmIzNjZkYTM3MTYwOGRjOTg3NThkZmM5NTM3MA==
4
+ MGY1ZDIxMDhhYWMxZmJiYmZiOWU5NzM4Y2EyZmY3NDA0NjBmYzRlYg==
5
5
  data.tar.gz: !binary |-
6
- NTQyNDgzY2E2ZGYwM2UxNGQxODc4ZTExNmYxZTY5ZGU0MmU2ZDFhZg==
6
+ MGUwMDE5ZDc0YTQ5ZGViNjZiNTczNmQxMWJlMTJlNTNlM2UwOWMxZQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YTExZWRhMTNmZmNmOTJlN2Q1NWM3MDAxZjI1ZDc0NzEzZWVkOWJlNjNmOWFk
10
- OGM0YWE0MzM0NGU0YzNhZTI2YjQ3MjY4NmYyZjZlMzBlM2EwMjliNjlkOWY1
11
- YjMwNTBkYzZjZGY2OWEwYzZiMjc4YjY2OTA4ZjQ5N2FjNzNjMGU=
9
+ NTk0MWUxOGU1MzRmMDk5YzhiYzAxMWQ3NWMwOWUxNzNhN2E4NzkxY2YxZWQ5
10
+ NjEyNGVkNDFiMWYxNTQzNDc5NDczYjUxYmEwZGQwOGY1YTllNzExMGEwNTc2
11
+ OTUwYzQ1NGZiYWNhYTU3ZTNhYzA3Y2Q1ZTMwZjVlYjE3YTY1ZTM=
12
12
  data.tar.gz: !binary |-
13
- NjEzMjI1YjliZWViZDU2Y2FlNzRkZTUxYWZjMmJmNDI3NjZhOWNiYzRlNGZj
14
- MDc0OWQ1MDQ5MzQ3ODc3ZTRiNGIwMjRhNjI3NDNhYWNiMTQ4ZGFkNzM4MGJi
15
- ODAyZTEyMjkwODNlYjExZjk0ZWRiOTE2MTEzOGQ4ZDkyZTMwMWU=
13
+ YzI2NjViNzJlMzhkMzQ0NTljMGM1NDM5MjAyNDdiNDE2Mjk0NmQ3OWFjNmM0
14
+ ZGJlNTJjYjY0MmNlYWViODk0ZTQzZDFhM2ZlZmU2YjRmYmY2NmQwNDU4YmFl
15
+ ZGUyNWRmMDc2Y2FmMjUyMjdlNDYzZDRmM2MyZWI0ZThlNmNhOTk=
@@ -3,6 +3,8 @@ require "warden"
3
3
  require "rack-flash"
4
4
  require "sinatra/base"
5
5
  require "active_record"
6
+ require "authstrategies/helpers"
7
+ require "authstrategies/user"
6
8
 
7
9
  module Authstrategies
8
10
  private
@@ -39,7 +41,7 @@ module Authstrategies
39
41
  manager.default_strategies :password
40
42
  end
41
43
 
42
- Warden::Strategies.add(:password, Strategies::PasswordStrategy)
44
+ Warden::Strategies.add(:password, PasswordStrategy)
43
45
 
44
46
  app.get '/login/?' do
45
47
  redirect '/' if authenticated?
@@ -93,6 +95,3 @@ module Authstrategies
93
95
  register Base
94
96
  end
95
97
  end
96
-
97
- require "authstrategies/helpers"
98
- require "authstrategies/user"
@@ -1,3 +1,3 @@
1
1
  module Authstrategies
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -0,0 +1,8 @@
1
+ <%= flash[:error] %>
2
+ <%= flash[:notice] %>
3
+ <form action="login" method="post">
4
+ <p>Username:<input type="text" name="email" /></p>
5
+ <p>Password:<input type="password" name="password" /></p>
6
+ <p>Remember Me: <input type="radio" name="remember_me" /></p>
7
+ <p><input type="submit" name="Submit" /></p>
8
+ </form>
@@ -0,0 +1,8 @@
1
+ <%= flash[:error] %>
2
+ <%= flash[:notice] %>
3
+ <form action="signup" method="post">
4
+ <p>E-mail:<input type="text" name="email" /></p>
5
+ <p>Password:<input type="password" name="password" /></p>
6
+ <p>Confirm password:<input type="password" name="password_confirmation" /></p>
7
+ <input type="submit" value="Register!" />
8
+ </form>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authstrategies
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dobromir Ivanov
@@ -125,6 +125,8 @@ files:
125
125
  - lib/authstrategies.rb
126
126
  - lib/authstrategies/helpers.rb
127
127
  - lib/authstrategies/version.rb
128
+ - lib/views/login.erb
129
+ - lib/views/signup.erb
128
130
  homepage: ''
129
131
  licenses:
130
132
  - MIT