lines-engine 0.1.14 → 0.1.16
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -86
- data/app/controllers/lines/application_controller.rb +5 -5
- data/app/helpers/lines/application_helper.rb +2 -2
- data/app/views/layouts/lines/application.html.erb +1 -1
- data/app/views/lines/shared/_navigation.html.erb +2 -2
- data/lib/lines/version.rb +1 -1
- data/spec/features/user_logs_in_spec.rb +2 -2
- data/spec/support/auth_macros.rb +7 -7
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 100fdfe0b263d92149bee9c26acc26d08a96c41a
|
|
4
|
+
data.tar.gz: d28174c5c5d2d5bc0fe4e2f9cddf999e401f8532
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3f7a9e5b4ca8f3b6164cc3569798ef58b10eb7adae89c78fd76b6d5cb45eee51e4611a967539927e07abe7d119daa4e48a8372c0dde9afc076d297c47d3cf076
|
|
7
|
+
data.tar.gz: 3086da633d6c042cd89a76857c4212820b514003cbf3e3e01ae43f0ffacf9fadc15ffbc01e5578bbb110929526a76a55932533f5580bb813db8643d4ab43664a
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
lines-engine (0.1.
|
|
4
|
+
lines-engine (0.1.16)
|
|
5
5
|
acts-as-taggable-on (~> 3.2.6, >= 3.2.6)
|
|
6
6
|
bcrypt (~> 3.1.0, >= 3.1.0)
|
|
7
7
|
carrierwave (~> 0.10.0, >= 0.10.0)
|
|
@@ -248,91 +248,6 @@ GEM
|
|
|
248
248
|
tins (1.1.0)
|
|
249
249
|
treetop (1.4.15)
|
|
250
250
|
polyglot
|
|
251
|
-
polyglot
|
|
252
|
-
polyglot
|
|
253
|
-
polyglot
|
|
254
|
-
polyglot
|
|
255
|
-
polyglot
|
|
256
|
-
polyglot
|
|
257
|
-
polyglot
|
|
258
|
-
polyglot
|
|
259
|
-
polyglot
|
|
260
|
-
polyglot
|
|
261
|
-
polyglot
|
|
262
|
-
polyglot
|
|
263
|
-
polyglot
|
|
264
|
-
polyglot
|
|
265
|
-
polyglot
|
|
266
|
-
polyglot
|
|
267
|
-
polyglot (>= 0.3.1)
|
|
268
|
-
polyglot (>= 0.3.1)
|
|
269
|
-
polyglot (>= 0.3.1)
|
|
270
|
-
polyglot (>= 0.3.1)
|
|
271
|
-
polyglot (>= 0.3.1)
|
|
272
|
-
polyglot (>= 0.3.1)
|
|
273
|
-
polyglot (>= 0.3.1)
|
|
274
|
-
polyglot (>= 0.3.1)
|
|
275
|
-
polyglot (>= 0.3.1)
|
|
276
|
-
polyglot (>= 0.3.1)
|
|
277
|
-
polyglot (>= 0.3.1)
|
|
278
|
-
polyglot (>= 0.3.1)
|
|
279
|
-
polyglot (>= 0.3.1)
|
|
280
|
-
polyglot (>= 0.3.1)
|
|
281
|
-
polyglot (>= 0.3.1)
|
|
282
|
-
polyglot (>= 0.3.1)
|
|
283
|
-
polyglot (>= 0.3.1)
|
|
284
|
-
polyglot (>= 0.3.1)
|
|
285
|
-
polyglot (>= 0.3.1)
|
|
286
|
-
polyglot (>= 0.3.1)
|
|
287
|
-
polyglot (>= 0.3.1)
|
|
288
|
-
polyglot (>= 0.3.1)
|
|
289
|
-
polyglot (>= 0.3.1)
|
|
290
|
-
polyglot (>= 0.3.1)
|
|
291
|
-
polyglot (>= 0.3.1)
|
|
292
|
-
polyglot (>= 0.3.1)
|
|
293
|
-
polyglot (>= 0.3.1)
|
|
294
|
-
polyglot (>= 0.3.1)
|
|
295
|
-
polyglot (>= 0.3.1)
|
|
296
|
-
polyglot (>= 0.3.1)
|
|
297
|
-
polyglot (>= 0.3.1)
|
|
298
|
-
polyglot (>= 0.3.1)
|
|
299
|
-
polyglot (>= 0.3.1)
|
|
300
|
-
polyglot (>= 0.3.1)
|
|
301
|
-
polyglot (>= 0.3.1)
|
|
302
|
-
polyglot (>= 0.3.1)
|
|
303
|
-
polyglot (>= 0.3.1)
|
|
304
|
-
polyglot (>= 0.3.1)
|
|
305
|
-
polyglot (>= 0.3.1)
|
|
306
|
-
polyglot (>= 0.3.1)
|
|
307
|
-
polyglot (>= 0.3.1)
|
|
308
|
-
polyglot (>= 0.3.1)
|
|
309
|
-
polyglot (>= 0.3.1)
|
|
310
|
-
polyglot (>= 0.3.1)
|
|
311
|
-
polyglot (>= 0.3.1)
|
|
312
|
-
polyglot (>= 0.3.1)
|
|
313
|
-
polyglot (>= 0.3.1)
|
|
314
|
-
polyglot (>= 0.3.1)
|
|
315
|
-
polyglot (>= 0.3.1)
|
|
316
|
-
polyglot (>= 0.3.1)
|
|
317
|
-
polyglot (>= 0.3.1)
|
|
318
|
-
polyglot (>= 0.3.1)
|
|
319
|
-
polyglot (>= 0.3.1)
|
|
320
|
-
polyglot (>= 0.3.1)
|
|
321
|
-
polyglot (>= 0.3.1)
|
|
322
|
-
polyglot (>= 0.3.1)
|
|
323
|
-
polyglot (>= 0.3.1)
|
|
324
|
-
polyglot (>= 0.3.1)
|
|
325
|
-
polyglot (>= 0.3.1)
|
|
326
|
-
polyglot (>= 0.3.1)
|
|
327
|
-
polyglot (>= 0.3.1)
|
|
328
|
-
polyglot (>= 0.3.1)
|
|
329
|
-
polyglot (>= 0.3.1)
|
|
330
|
-
polyglot (>= 0.3.1)
|
|
331
|
-
polyglot (>= 0.3.1)
|
|
332
|
-
polyglot (>= 0.3.1)
|
|
333
|
-
polyglot (>= 0.3.1)
|
|
334
|
-
polyglot (>= 0.3.1)
|
|
335
|
-
polyglot (>= 0.3.1)
|
|
336
251
|
polyglot (>= 0.3.1)
|
|
337
252
|
tzinfo (1.1.0)
|
|
338
253
|
thread_safe (~> 0.1)
|
|
@@ -3,15 +3,15 @@ module Lines
|
|
|
3
3
|
|
|
4
4
|
private
|
|
5
5
|
|
|
6
|
-
# sets the
|
|
7
|
-
def
|
|
8
|
-
@
|
|
6
|
+
# sets the current_lines_user if one exists in session
|
|
7
|
+
def current_lines_user
|
|
8
|
+
@current_lines_user ||= User.find(session[:user_id]) if session[:user_id]
|
|
9
9
|
end
|
|
10
|
-
helper_method :
|
|
10
|
+
helper_method :current_lines_user
|
|
11
11
|
|
|
12
12
|
# checks if current user is authorized. Redirects to login_url if not
|
|
13
13
|
def authorize
|
|
14
|
-
redirect_to login_url, alert: "Not authorized" if
|
|
14
|
+
redirect_to login_url, alert: "Not authorized" if current_lines_user.nil?
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
end
|
|
@@ -57,8 +57,8 @@ module Lines
|
|
|
57
57
|
end
|
|
58
58
|
html = content_tag(:div, id: 'navbar') do
|
|
59
59
|
content_tag(:div, class: 'navbar-inner') do
|
|
60
|
-
if
|
|
61
|
-
content_tag(:span, link_to('', admin_articles_path), class: 'backlink', title: 'Dashboard') + content_tag(:span, action_link, class: 'actionlink') + content_tag(:span, class: 'buttons', &block) + content_tag(:span, link_to('Logout', logout_path), class: 'logout') + content_tag(:span, "Logged in as #{
|
|
60
|
+
if current_lines_user
|
|
61
|
+
content_tag(:span, link_to('', admin_articles_path), class: 'backlink', title: 'Dashboard') + content_tag(:span, action_link, class: 'actionlink') + content_tag(:span, class: 'buttons', &block) + content_tag(:span, link_to('Logout', logout_path), class: 'logout') + content_tag(:span, "Logged in as #{current_lines_user.email}", class: 'logged-in-as')
|
|
62
62
|
else
|
|
63
63
|
content_tag(:span, link_to('', lines.root_path), class: 'backlink') + content_tag(:span, action_link, class: 'actionlink')
|
|
64
64
|
end
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<a class="brand" href="/admin"><%= CONFIG[:title_short] %></a>
|
|
5
5
|
|
|
6
6
|
<ul class="user-info">
|
|
7
|
-
<% if
|
|
8
|
-
<li><%=
|
|
7
|
+
<% if current_lines_user %>
|
|
8
|
+
<li><%= current_lines_user.email %></li>
|
|
9
9
|
<li><a href="<%= logout_path %>">Logout</a></li>
|
|
10
10
|
<% end %>
|
|
11
11
|
</ul>
|
data/lib/lines/version.rb
CHANGED
|
@@ -8,7 +8,7 @@ feature 'user logs in' do
|
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
scenario 'with invalid email' do
|
|
11
|
-
@
|
|
11
|
+
@_current_lines_user = FactoryGirl.create(:user)
|
|
12
12
|
visit lines.login_path
|
|
13
13
|
fill_in "Email", with: "invalid_email"
|
|
14
14
|
fill_in "Password", with: 'sekret'
|
|
@@ -18,7 +18,7 @@ feature 'user logs in' do
|
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
scenario 'with blank password' do
|
|
21
|
-
@
|
|
21
|
+
@_current_lines_user = FactoryGirl.create(:user, email: 'valid@example.com')
|
|
22
22
|
visit lines.login_path
|
|
23
23
|
fill_in "Email", with: "valid@example.com"
|
|
24
24
|
fill_in "Password", with: ''
|
data/spec/support/auth_macros.rb
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
module AuthMacros
|
|
2
2
|
|
|
3
3
|
def log_in(attributes = {})
|
|
4
|
-
@
|
|
4
|
+
@_current_lines_user = FactoryGirl.create(:user, attributes)
|
|
5
5
|
visit lines.login_path
|
|
6
|
-
fill_in "Email", with: @
|
|
7
|
-
fill_in "Password", with: @
|
|
6
|
+
fill_in "Email", with: @_current_lines_user.email
|
|
7
|
+
fill_in "Password", with: @_current_lines_user.password
|
|
8
8
|
click_button "Login"
|
|
9
9
|
page.should have_content "Logged in"
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
def authorize(attributes = {})
|
|
13
|
-
@
|
|
14
|
-
controller.stub(:
|
|
13
|
+
@current_lines_user = FactoryGirl.create(:user, attributes)
|
|
14
|
+
controller.stub(:current_lines_user).and_return(@current_lines_user)
|
|
15
15
|
controller.stub(:authorize).and_return(true)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
def
|
|
19
|
-
@
|
|
18
|
+
def current_lines_user
|
|
19
|
+
@current_lines_user
|
|
20
20
|
end
|
|
21
21
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lines-engine
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.16
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Opoloo GbR
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-09-
|
|
11
|
+
date: 2014-09-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: orm_adapter
|
|
@@ -832,7 +832,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
832
832
|
version: '0'
|
|
833
833
|
requirements: []
|
|
834
834
|
rubyforge_project:
|
|
835
|
-
rubygems_version: 2.2.
|
|
835
|
+
rubygems_version: 2.2.0
|
|
836
836
|
signing_key:
|
|
837
837
|
specification_version: 4
|
|
838
838
|
summary: LINES is the open source blog platform you have been waiting for
|