authpwn_rails 0.15.3 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c6719080b86f274594a57d3736066da719c014a2
4
- data.tar.gz: a29c73989fafec440e2a5f0ff7136fffa0c61ddd
3
+ metadata.gz: 9d18966634c93c4285ec281995bf5c346d0299ee
4
+ data.tar.gz: 2e6b7635d173a2c2f9777729aeb38042b08856b1
5
5
  SHA512:
6
- metadata.gz: f39686f3fe9d96375aacf85f10192d0e0bb3a76bad5059a820229c40dc76f3d9cd34e61a8cbac4689f3808423e0266906ca5884e1363eedc82ac69ce0f80e561
7
- data.tar.gz: f781ce4ed9fc990e028818c140efc71fd5ae1f7ee7655e4819c55803793e63a06e68bac7dd66ebf67a2a9cd014a535f7a095b963ce6e911585e085214ec7466e
6
+ metadata.gz: c625046e4189a3e7e2beff07784e57b2963e97bcc9837b5d12f5d89155d10b6a839bdddc6467b59cae9449783181c272190f5a809831946fc393aa75f452a0d3
7
+ data.tar.gz: 1c94a67996c30916e425d0f0628bb71b560d2ae841595590b02420697eaf88a2b304142333a0ca6be075063bbed5029a97ed8e67e104c38bcfc1ff641ce2404c
data/Gemfile CHANGED
@@ -2,7 +2,7 @@ source 'https://rubygems.org'
2
2
 
3
3
  gem 'fbgraph_rails', '>= 0.2.2'
4
4
 
5
- gem 'rails', '>= 3.2.16'
5
+ gem 'rails', '>= 3.2.17'
6
6
 
7
7
  group :development do
8
8
  gem 'bundler', '>= 1.3.5'
data/Gemfile.lock CHANGED
@@ -1,25 +1,25 @@
1
1
  GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
- actionmailer (4.0.2)
5
- actionpack (= 4.0.2)
4
+ actionmailer (4.0.3)
5
+ actionpack (= 4.0.3)
6
6
  mail (~> 2.5.4)
7
- actionpack (4.0.2)
8
- activesupport (= 4.0.2)
7
+ actionpack (4.0.3)
8
+ activesupport (= 4.0.3)
9
9
  builder (~> 3.1.0)
10
10
  erubis (~> 2.7.0)
11
11
  rack (~> 1.5.2)
12
12
  rack-test (~> 0.6.2)
13
- activemodel (4.0.2)
14
- activesupport (= 4.0.2)
13
+ activemodel (4.0.3)
14
+ activesupport (= 4.0.3)
15
15
  builder (~> 3.1.0)
16
- activerecord (4.0.2)
17
- activemodel (= 4.0.2)
16
+ activerecord (4.0.3)
17
+ activemodel (= 4.0.3)
18
18
  activerecord-deprecated_finders (~> 1.0.2)
19
- activesupport (= 4.0.2)
19
+ activesupport (= 4.0.3)
20
20
  arel (~> 4.0.0)
21
21
  activerecord-deprecated_finders (1.0.3)
22
- activesupport (4.0.2)
22
+ activesupport (4.0.3)
23
23
  i18n (~> 0.6, >= 0.6.4)
24
24
  minitest (~> 4.2)
25
25
  multi_json (~> 1.3)
@@ -77,7 +77,7 @@ GEM
77
77
  mail (2.5.4)
78
78
  mime-types (~> 1.16)
79
79
  treetop (~> 1.4.8)
80
- metaclass (0.0.2)
80
+ metaclass (0.0.3)
81
81
  mime-types (1.25.1)
82
82
  mini_portile (0.5.2)
83
83
  minitest (4.7.5)
@@ -96,21 +96,21 @@ GEM
96
96
  multi_xml (~> 0.5)
97
97
  rack (~> 1.2)
98
98
  pg (0.17.1)
99
- polyglot (0.3.3)
99
+ polyglot (0.3.4)
100
100
  rack (1.5.2)
101
101
  rack-test (0.6.2)
102
102
  rack (>= 1.0)
103
- rails (4.0.2)
104
- actionmailer (= 4.0.2)
105
- actionpack (= 4.0.2)
106
- activerecord (= 4.0.2)
107
- activesupport (= 4.0.2)
103
+ rails (4.0.3)
104
+ actionmailer (= 4.0.3)
105
+ actionpack (= 4.0.3)
106
+ activerecord (= 4.0.3)
107
+ activesupport (= 4.0.3)
108
108
  bundler (>= 1.3.0, < 2.0)
109
- railties (= 4.0.2)
109
+ railties (= 4.0.3)
110
110
  sprockets-rails (~> 2.0.0)
111
- railties (4.0.2)
112
- actionpack (= 4.0.2)
113
- activesupport (= 4.0.2)
111
+ railties (4.0.3)
112
+ actionpack (= 4.0.3)
113
+ activesupport (= 4.0.3)
114
114
  rake (>= 0.8.7)
115
115
  thor (>= 0.18.1, < 2.0)
116
116
  rake (10.1.1)
@@ -347,7 +347,7 @@ GEM
347
347
  multi_json
348
348
  simplecov-html (~> 0.8.0)
349
349
  simplecov-html (0.8.0)
350
- sprockets (2.10.1)
350
+ sprockets (2.11.0)
351
351
  hike (~> 1.2)
352
352
  multi_json (~> 1.0)
353
353
  rack (~> 1.0)
@@ -376,7 +376,7 @@ DEPENDENCIES
376
376
  mocha (>= 0.14.0)
377
377
  mysql2 (>= 0.3.14)
378
378
  pg (>= 0.17.0)
379
- rails (>= 3.2.16)
379
+ rails (>= 3.2.17)
380
380
  rubysl
381
381
  rubysl-bundler
382
382
  rubysl-rake
data/Gemfile.rails3 CHANGED
@@ -2,15 +2,15 @@ source 'https://rubygems.org'
2
2
 
3
3
  gem 'fbgraph_rails', '>= 0.2.2'
4
4
 
5
- gem 'rails', '~> 3.2.16'
5
+ gem 'rails', '~> 3.2.17'
6
6
 
7
7
  group :development do
8
- gem 'bundler', '>= 1.3.5'
9
- gem 'mocha', '>= 0.14.0'
10
- gem 'jeweler', '>= 1.8.8'
8
+ gem 'bundler', '>= 1.5.3'
9
+ gem 'mocha', '>= 1.0.0'
10
+ gem 'jeweler', '>= 2.0.1'
11
11
  gem 'simplecov', '>= 0'
12
- gem 'mysql2', '>= 0.3.14'
13
- gem 'pg', '>= 0.17.0'
12
+ gem 'mysql2', '>= 0.3.15'
13
+ gem 'pg', '>= 0.17.1'
14
14
  gem 'sqlite3', '>= 1.3.8'
15
15
  gem 'rubysl', platforms: [:rbx]
16
16
  gem 'rubysl-bundler', platforms: [:rbx]
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.15.3
1
+ 0.16.0
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "authpwn_rails"
8
- s.version = "0.15.3"
8
+ s.version = "0.16.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Victor Costan"]
12
- s.date = "2014-02-14"
12
+ s.date = "2014-02-20"
13
13
  s.description = "Works with Facebook."
14
14
  s.email = "victor@costan.us"
15
15
  s.extra_rdoc_files = [
@@ -100,6 +100,7 @@ Gem::Specification.new do |s|
100
100
  "test/helpers/autoload_path.rb",
101
101
  "test/helpers/db_setup.rb",
102
102
  "test/helpers/fbgraph.rb",
103
+ "test/helpers/i18n.rb",
103
104
  "test/helpers/rails.rb",
104
105
  "test/helpers/rails_undo.rb",
105
106
  "test/helpers/routes.rb",
@@ -128,7 +129,7 @@ Gem::Specification.new do |s|
128
129
 
129
130
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
130
131
  s.add_runtime_dependency(%q<fbgraph_rails>, [">= 0.2.2"])
131
- s.add_runtime_dependency(%q<rails>, [">= 3.2.16"])
132
+ s.add_runtime_dependency(%q<rails>, [">= 3.2.17"])
132
133
  s.add_development_dependency(%q<bundler>, [">= 1.3.5"])
133
134
  s.add_development_dependency(%q<mocha>, [">= 0.14.0"])
134
135
  s.add_development_dependency(%q<jeweler>, [">= 1.8.8"])
@@ -141,7 +142,7 @@ Gem::Specification.new do |s|
141
142
  s.add_development_dependency(%q<rubysl-rake>, [">= 0"])
142
143
  else
143
144
  s.add_dependency(%q<fbgraph_rails>, [">= 0.2.2"])
144
- s.add_dependency(%q<rails>, [">= 3.2.16"])
145
+ s.add_dependency(%q<rails>, [">= 3.2.17"])
145
146
  s.add_dependency(%q<bundler>, [">= 1.3.5"])
146
147
  s.add_dependency(%q<mocha>, [">= 0.14.0"])
147
148
  s.add_dependency(%q<jeweler>, [">= 1.8.8"])
@@ -155,7 +156,7 @@ Gem::Specification.new do |s|
155
156
  end
156
157
  else
157
158
  s.add_dependency(%q<fbgraph_rails>, [">= 0.2.2"])
158
- s.add_dependency(%q<rails>, [">= 3.2.16"])
159
+ s.add_dependency(%q<rails>, [">= 3.2.17"])
159
160
  s.add_dependency(%q<bundler>, [">= 1.3.5"])
160
161
  s.add_dependency(%q<mocha>, [">= 0.14.0"])
161
162
  s.add_dependency(%q<jeweler>, [">= 1.8.8"])
@@ -6,13 +6,13 @@
6
6
  <p>
7
7
  You should inform the user that they are logged in as
8
8
  <%= current_user.exuid %> and suggest them to
9
- <%= link_to 'Log out', session_path, method: :delete %> and log in as a
9
+ <%= link_to 'sign out', session_path, method: :delete %> and sign in as a
10
10
  different user.
11
11
  </p>
12
12
  <% else %>
13
13
  <p>
14
14
  The user will only see this if JavaScript is disabled. Ask them to
15
- <%= link_to 'Log in', new_session_path %>.
15
+ <%= link_to 'sign in', new_session_path %>.
16
16
  </p>
17
17
  <script type="text/javascript">
18
18
  window.location = "<%= new_session_path %>";
@@ -1,5 +1,5 @@
1
1
  <p>
2
2
  This view gets displayed when the user is logged in. Right now,
3
3
  user <%= current_user.exuid %> is logged in. You should allow the user to
4
- <%= link_to 'Log out', session_path, method: :delete %>.
4
+ <%= link_to 'sign out', session_path, method: :delete %>.
5
5
  </p>
@@ -7,7 +7,7 @@
7
7
 
8
8
  <% if @redirect_url %>
9
9
  <p>
10
- We need you to log in before we can show you the page that you are trying to
10
+ We need you to sign in before we can show you the page that you are trying to
11
11
  view.
12
12
  </p>
13
13
  <% end %>
@@ -17,7 +17,7 @@
17
17
  <%= f.label :email, 'Email Address' %><br />
18
18
  <span class="value">
19
19
  <%= f.email_field :email, autofocus: true, required: true,
20
- placeholder: 'your@email.com' %>
20
+ placeholder: 'your@email.com' %>
21
21
  </span>
22
22
  </div>
23
23
 
@@ -29,9 +29,10 @@
29
29
  </div>
30
30
 
31
31
  <div class="actions">
32
- <%= f.button 'Log in', name: 'login', value: 'requested' %>
33
- <%= f.button 'Reset Password', name: 'reset_password',
34
- value: 'requested', formaction: reset_password_session_path %>
32
+ <%= f.button 'Sign In', type: 'submit', name: 'login',
33
+ value: 'requested' %>
34
+ <%= f.button 'Reset Password', type: 'submit', name: 'reset_password',
35
+ value: 'requested', formaction: reset_password_session_path %>
35
36
  </div>
36
37
  <% if @redirect_url %>
37
38
  <%= hidden_field_tag :redirect_url, @redirect_url %>
@@ -44,6 +44,6 @@
44
44
  </section>
45
45
 
46
46
  <div class="actions">
47
- <%= f.submit 'Change Password' %>
47
+ <%= f.button 'Change Password', type: 'submit' %>
48
48
  </div>
49
49
  <% end %>
@@ -1,5 +1,5 @@
1
1
  <p>
2
2
  This view gets displayed when the user is not logged in. Entice the user to
3
3
  sign up for your application, and allow them to
4
- <%= link_to 'Log in', new_session_path %>.
4
+ <%= link_to 'sign in', new_session_path %>.
5
5
  </p>
@@ -13,7 +13,7 @@ class SessionControllerTest < ActionController::TestCase
13
13
  get :show
14
14
 
15
15
  assert_equal @user, assigns(:user)
16
- assert_select 'a[href="/session"][data-method="delete"]', 'Log out'
16
+ assert_select 'a[href="/session"][data-method="delete"]', 'sign out'
17
17
  end
18
18
 
19
19
  test "user login works and purges old sessions" do
@@ -40,7 +40,7 @@ class SessionControllerTest < ActionController::TestCase
40
40
  get :show
41
41
 
42
42
  assert_equal User.count, assigns(:user_count)
43
- assert_select 'a', 'Log in'
43
+ assert_select 'a', 'sign in'
44
44
  end
45
45
 
46
46
  test "user not logged in with JSON request" do
@@ -56,8 +56,8 @@ class SessionControllerTest < ActionController::TestCase
56
56
  assert_select 'form[action=?]', session_path do
57
57
  assert_select 'input[name=?]', 'session[email]'
58
58
  assert_select 'input[name=?]', 'session[password]'
59
- assert_select 'button[name="login"]'
60
- assert_select 'button[name="reset_password"]'
59
+ assert_select 'button[name="login"][type="submit"]'
60
+ assert_select 'button[name="reset_password"][type="submit"]'
61
61
  end
62
62
  end
63
63
 
@@ -85,7 +85,7 @@ class SessionControllerTest < ActionController::TestCase
85
85
  assert_select 'input[name="old_password"]'
86
86
  assert_select 'input[name=?]', 'credential[password]'
87
87
  assert_select 'input[name=?]', 'credential[password_confirmation]'
88
- assert_select 'input[type=submit]'
88
+ assert_select 'button[type="submit"]'
89
89
  end
90
90
  end
91
91
 
@@ -100,7 +100,7 @@ class SessionControllerTest < ActionController::TestCase
100
100
  assert_select 'input[name="old_password"]', count: 0
101
101
  assert_select 'input[name=?]', 'credential[password]'
102
102
  assert_select 'input[name=?]', 'credential[password_confirmation]'
103
- assert_select 'input[type=submit]'
103
+ assert_select 'button[type="submit"]'
104
104
  end
105
105
  end
106
106
 
@@ -210,7 +210,7 @@ class CookieControllerTest < ActionController::TestCase
210
210
  get :bouncer
211
211
  assert_response :forbidden
212
212
  assert_template 'session/forbidden'
213
- assert_select 'a[href="/session"][data-method="delete"]', 'Log out'
213
+ assert_select 'a[href="/session"][data-method="delete"]', 'sign out'
214
214
  end
215
215
 
216
216
  test "valid user_id bounced in json" do
@@ -6,13 +6,13 @@
6
6
  <p>
7
7
  You should inform the user that they are logged in as
8
8
  <%= current_user.exuid %> and suggest them to
9
- <%= link_to 'Log out', session_path, :method => :delete %> and log in as a
10
- different user.
9
+ <%= link_to 'sign out', session_path, method: :delete %> and sign in as a
10
+ different user.
11
11
  </p>
12
12
  <% else %>
13
13
  <p>
14
14
  The user will only see this if JavaScript is disabled. Ask them to
15
- <%= link_to 'Log in', new_session_path %>.
15
+ <%= link_to 'sign in', new_session_path %>.
16
16
  </p>
17
17
  <script type="text/javascript">
18
18
  window.location = "<%= new_session_path %>";
@@ -1,5 +1,5 @@
1
1
  <p>
2
- This view gets displayed when the user is logged in. Right now,
2
+ This view gets displayed when the user is logged in. Right now,
3
3
  user <%= current_user.exuid %> is logged in. You should allow the user to
4
- <%= link_to 'Log out', session_path, :method => :delete %>.
4
+ <%= link_to 'Log out', session_path, method: :delete %>.
5
5
  </p>
@@ -1,32 +1,39 @@
1
- <p>This is a sample login form. You should customize it for your users.</p>
2
-
3
1
  <% if flash[:notice] %>
4
2
  <p class="notice"><%= flash[:notice] %></p>
5
3
  <% end %>
4
+ <% if flash[:alert] %>
5
+ <p class="alert"><%= flash[:alert] %></p>
6
+ <% end %>
6
7
 
7
8
  <% if @redirect_url %>
8
9
  <p>
9
- We need you to log in before we can show you the page that you are trying to
10
+ We need you to sign in before we can show you the page that you are trying to
10
11
  view.
11
12
  </p>
12
13
  <% end %>
13
14
 
14
- <%= form_tag session_path do %>
15
+ <%= form_for @session, url: session_path do |f| %>
15
16
  <div class="field">
16
- <%= label_tag :email, 'Email Address' %><br />
17
- <%= email_field_tag :email, @email %>
17
+ <%= f.label :email, 'Email Address' %><br />
18
+ <span class="value">
19
+ <%= f.email_field :email, autofocus: true, required: true,
20
+ placeholder: 'your@email.com' %>
21
+ </span>
18
22
  </div>
19
-
23
+
20
24
  <div class="field">
21
- <%= label_tag :password %><br />
22
- <%= password_field_tag :password %>
25
+ <%= f.label :password %><br />
26
+ <span class="value">
27
+ <%= f.password_field :password %>
28
+ </span>
23
29
  </div>
24
-
30
+
25
31
  <div class="actions">
26
- <%= submit_tag 'Log in' %>
27
-
28
- <% if @redirect_url %>
29
- <%= hidden_field_tag :redirect_url, @redirect_url %>
30
- <% end %>
32
+ <%= f.button 'Sign In', name: 'login', value: 'requested' %>
33
+ <%= f.button 'Reset Password', name: 'reset_password',
34
+ value: 'requested', formaction: reset_password_session_path %>
31
35
  </div>
36
+ <% if @redirect_url %>
37
+ <%= hidden_field_tag :redirect_url, @redirect_url %>
38
+ <% end %>
32
39
  <% end %>
@@ -1,4 +1,23 @@
1
- <%= form_for @credential, :url => change_password_session_path do |f| %>
1
+ <h1>Password Change</h1>
2
+
3
+ <% if flash[:notice] %>
4
+ <p class="notice"><%= flash[:notice] %></p>
5
+ <% end %>
6
+ <% if flash[:alert] %>
7
+ <p class="alert"><%= flash[:alert] %></p>
8
+ <% end %>
9
+
10
+ <% if @credential.updated_at %>
11
+ <p class="password_age_notice">
12
+ Your have been using the same password for
13
+ <span class="password_age">
14
+ <%= time_ago_in_words @credential.updated_at, include_seconds: true %>.
15
+ </span>
16
+ </p>
17
+ <% end %>
18
+
19
+ <%= form_for @credential, url: change_password_session_path,
20
+ as: :credential, method: :post do |f| %>
2
21
  <section class="fields">
3
22
  <% unless @credential.new_record? %>
4
23
  <div class="field">
@@ -8,23 +27,23 @@
8
27
  </span>
9
28
  </div>
10
29
  <% end %>
11
-
30
+
12
31
  <div class="field">
13
32
  <%= f.label :password, 'New Password' %><br />
14
33
  <span class="value">
15
34
  <%= f.password_field :password %>
16
- </span
35
+ </span>
17
36
  </div>
18
37
 
19
38
  <div class="field">
20
39
  <%= f.label :password_confirmation, 'Re-enter New Password' %><br />
21
40
  <span class="value">
22
41
  <%= f.password_field :password_confirmation %>
23
- </span
42
+ </span>
24
43
  </div>
25
44
  </section>
26
-
27
- <p class="action">
28
- <%= submit_tag 'Log in' %>
29
- </p>
45
+
46
+ <div class="actions">
47
+ <%= f.submit 'Change Password' %>
48
+ </div>
30
49
  <% end %>
@@ -1,5 +1,5 @@
1
1
  <p>
2
2
  This view gets displayed when the user is not logged in. Entice the user to
3
3
  sign up for your application, and allow them to
4
- <%= link_to 'Log in', new_session_path %>.
4
+ <%= link_to 'sign in', new_session_path %>.
5
5
  </p>
@@ -0,0 +1 @@
1
+ I18n.config.enforce_available_locales = true
@@ -41,7 +41,7 @@ class HttpBasicControllerTest < ActionController::TestCase
41
41
  set_http_basic_user @user, 'pa55w0rd'
42
42
  get :show
43
43
  assert_equal @user, assigns(:current_user)
44
-
44
+
45
45
  jane_id = if defined? ActiveRecord::FixtureSet
46
46
  ActiveRecord::FixtureSet.identify :jane
47
47
  else
@@ -105,7 +105,7 @@ class HttpBasicControllerTest < ActionController::TestCase
105
105
  get :bouncer
106
106
  assert_response :forbidden
107
107
  assert_template 'session/forbidden'
108
- assert_select 'a[href="/session"][data-method="delete"]', 'Log out'
108
+ assert_select 'a[href="/session"][data-method="delete"]', 'sign out'
109
109
  end
110
110
 
111
111
  test "valid user bounced in json" do
data/test/test_helper.rb CHANGED
@@ -22,6 +22,7 @@ require 'helpers/action_mailer.rb'
22
22
  require 'helpers/autoload_path.rb'
23
23
  require 'helpers/db_setup.rb'
24
24
  require 'helpers/fbgraph.rb'
25
+ require 'helpers/i18n.rb'
25
26
  require 'helpers/rails.rb'
26
27
  require 'helpers/routes.rb'
27
28
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authpwn_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.3
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Costan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-14 00:00:00.000000000 Z
11
+ date: 2014-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fbgraph_rails
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - '>='
32
32
  - !ruby/object:Gem::Version
33
- version: 3.2.16
33
+ version: 3.2.17
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '>='
39
39
  - !ruby/object:Gem::Version
40
- version: 3.2.16
40
+ version: 3.2.17
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -269,6 +269,7 @@ files:
269
269
  - test/helpers/autoload_path.rb
270
270
  - test/helpers/db_setup.rb
271
271
  - test/helpers/fbgraph.rb
272
+ - test/helpers/i18n.rb
272
273
  - test/helpers/rails.rb
273
274
  - test/helpers/rails_undo.rb
274
275
  - test/helpers/routes.rb