symphonia 3.1.0 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/config/symphonia_manifest.js +2 -2
- data/app/controllers/symphonia/accounts_controller.rb +15 -15
- data/app/views/layouts/symphonia/application.html.erb +1 -1
- data/lib/generators/symphonia/setup/templates/500.html +7 -5
- data/lib/symphonia/version.rb +1 -1
- data/spec/models/attachment_spec.rb +2 -2
- data/spec/requests/attachments_controller_spec.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8399b31088e0c0ebd1514b698be2fd97940c32e8cebd2313f524b3fb3455559
|
4
|
+
data.tar.gz: f35d459eaa67c75f5c6e1fdee759f56eb37373f518f1ad1a212dc2d24386ba26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df35e4035a31df68cc8c230d0605ec6c897fa2b43f79cc5bf77a1b1e77de3b98c3674af336517d0b577c3794ef02e47eac8b011da72e3b4bb27f5020c53ad2cc
|
7
|
+
data.tar.gz: d6666bbf5cd821d6ee4e662ec7e5574bbcfd09ef63d9979c4fca32062cd5d35c36f60ceb908a281dbc567660f941550695d8433dfeaed12b8c527b5fc4eb308c
|
@@ -1,5 +1,5 @@
|
|
1
1
|
//= link_tree ../images
|
2
2
|
// link_directory ../javascripts/symphonia .js
|
3
3
|
// link_directory ../stylesheets/symphonia .css
|
4
|
-
//= link
|
5
|
-
//= link
|
4
|
+
//= link symphonia/application.js
|
5
|
+
//= link symphonia/application.css
|
@@ -24,25 +24,18 @@ module Symphonia
|
|
24
24
|
menu_item(:register)
|
25
25
|
@user.attributes = user_params
|
26
26
|
@user.status = if Symphonia.config[:self_activation_enabled]
|
27
|
-
|
27
|
+
:active
|
28
28
|
else
|
29
|
-
|
29
|
+
:pending
|
30
30
|
end
|
31
31
|
respond_to do |format|
|
32
|
-
|
33
|
-
@user.valid? && verify_recaptcha(model: @user)
|
34
|
-
else
|
35
|
-
true
|
36
|
-
end
|
37
|
-
if verified && @user.save
|
32
|
+
if @user.valid? && verify_registration && @user.save(validate: false)
|
38
33
|
Notifier.activation_user(@user).deliver_now
|
39
34
|
Notifier.user_registered(@user).deliver_now
|
40
35
|
format.html { redirect_to '/', notice: t(:text_user_registered) }
|
41
36
|
format.json { render status: :created }
|
42
37
|
else
|
43
|
-
format.html {
|
44
|
-
render action: 'register'
|
45
|
-
}
|
38
|
+
format.html { render action: 'register' }
|
46
39
|
format.json { render json: @user.errors, status: :unprocessable_entity }
|
47
40
|
end
|
48
41
|
end
|
@@ -63,9 +56,7 @@ module Symphonia
|
|
63
56
|
format.json { head :no_content }
|
64
57
|
format.js
|
65
58
|
else
|
66
|
-
format.html {
|
67
|
-
render action: 'edit'
|
68
|
-
}
|
59
|
+
format.html { render action: 'edit' }
|
69
60
|
format.json { render json: @user.errors, status: :unprocessable_entity }
|
70
61
|
end
|
71
62
|
end
|
@@ -95,7 +86,7 @@ module Symphonia
|
|
95
86
|
@user = find_account_by_token(params[:activation_code])
|
96
87
|
if @user
|
97
88
|
@user.activate!
|
98
|
-
redirect_to
|
89
|
+
redirect_to login_path, notice: t(:text_activation_success)
|
99
90
|
else
|
100
91
|
redirect_to root_path, flash: { error: t(:text_user_not_found_or_token_invalid) }
|
101
92
|
end
|
@@ -165,6 +156,15 @@ module Symphonia
|
|
165
156
|
User.find_using_perishable_token(id, 1.week)
|
166
157
|
end
|
167
158
|
|
159
|
+
# @return [Boolean]
|
160
|
+
def verify_registration
|
161
|
+
if defined?(Recaptcha)
|
162
|
+
verify_recaptcha(model: @user)
|
163
|
+
else
|
164
|
+
true
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
168
|
end
|
169
169
|
|
170
170
|
end
|
@@ -4,14 +4,15 @@
|
|
4
4
|
<meta charset="UTF-8">
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
6
|
<title>500 INTERNAL SERVER ERROR</title>
|
7
|
-
<link rel="stylesheet" href="//
|
8
|
-
<link rel="stylesheet" href="//
|
7
|
+
<link rel="stylesheet" href="//stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />
|
8
|
+
<link rel="stylesheet" href="//stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
|
9
9
|
</head>
|
10
10
|
|
11
11
|
<body>
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
<!-- This file lives in public/500.html -->
|
13
|
+
<br />
|
14
|
+
<div class="container">
|
15
|
+
<div class="row">
|
15
16
|
<p class="col-sm-6 col-md-3">
|
16
17
|
<i class="fa fa-exclamation-triangle fa-5x" id="internal_static_page_sign" style="font-size: 20em"></i>
|
17
18
|
</p>
|
@@ -33,5 +34,6 @@
|
|
33
34
|
</ul>
|
34
35
|
</div>
|
35
36
|
</div>
|
37
|
+
</div>
|
36
38
|
</body>
|
37
39
|
</html>
|
data/lib/symphonia/version.rb
CHANGED
@@ -15,8 +15,8 @@ describe Symphonia::Attachment do
|
|
15
15
|
|
16
16
|
context 'images' do
|
17
17
|
let(:image) { FactoryBot.create(:image) }
|
18
|
-
it '#create' do
|
18
|
+
it '#create', pending: "When `identify` missing" do
|
19
19
|
expect { image }.to change(described_class, :count).by 1
|
20
20
|
end
|
21
21
|
end
|
22
|
-
end
|
22
|
+
end
|
@@ -12,7 +12,7 @@ describe Symphonia::AttachmentsController, logged: true do
|
|
12
12
|
expect{ delete(symphonia.attachment_path(file)) }.to change(Symphonia::Attachment, :count).by -1
|
13
13
|
end
|
14
14
|
|
15
|
-
it '#reorder' do
|
15
|
+
it '#reorder', pending: "When `identify` missing" do
|
16
16
|
expect { images }.to change(Symphonia::Image, :count).by 3
|
17
17
|
patch symphonia.reorder_attachment_path images.last, 1
|
18
18
|
expect(response).to have_http_status :success
|
@@ -20,4 +20,4 @@ describe Symphonia::AttachmentsController, logged: true do
|
|
20
20
|
expect(imgs.first.id).to be > imgs.last.id
|
21
21
|
end
|
22
22
|
|
23
|
-
end
|
23
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: symphonia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lukas Pokorny
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|