narou 2.8.3 → 2.8.3.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of narou might be problematic. Click here for more details.

@@ -1,188 +0,0 @@
1
- :javascript
2
- +function() {
3
- var action = new Narou.Action;
4
-
5
- function getCurrentVersion() {
6
- var dfd = jQuery.Deferred();
7
- $.ajax({
8
- type: "GET",
9
- url: "/api/version/current.json",
10
- dataType: "json",
11
- success: function(json) {
12
- $("#current-version").text(json.version);
13
- dfd.resolve(json.version);
14
- },
15
- error: function() {
16
- dfd.reject();
17
- }
18
- });
19
- return dfd;
20
- }
21
-
22
- function getLatestVersion() {
23
- var dfd = jQuery.Deferred();
24
- $.ajax({
25
- type: "GET",
26
- url: "/api/version/latest.json",
27
- dataType: "json",
28
- success: function(json) {
29
- $("#latest-version").text(json.version);
30
- dfd.resolve(json.version);
31
- },
32
- error: function() {
33
- dfd.reject();
34
- }
35
- });
36
- return dfd;
37
- }
38
-
39
- function updateButtonHandler() {
40
- var dfd = jQuery.Deferred();
41
- $("#version-update-button").one("click", function(e) {
42
- e.preventDefault();
43
- $(this).hide();
44
- $("#fail-update-system").hide();
45
- dfd.resolve();
46
- });
47
- return dfd;
48
- }
49
-
50
- function callUpdateSystem() {
51
- var dfd = jQuery.Deferred();
52
- $("#version-updating").show();
53
- $("#gem-result-log").hide();
54
- action.updateSystem(function(result, log) {
55
- $("#version-updating").hide();
56
- $("#gem-result-log").text(log);
57
- if (result == "success")
58
- dfd.resolve();
59
- else
60
- dfd.reject(result);
61
- });
62
- return dfd;
63
- }
64
-
65
- function rebootButtonHandler() {
66
- $("#gem-result-log").addClass("large").show();
67
- $("#reboot-button")
68
- .show()
69
- .on("click", function(e) {
70
- action.rebootDialog();
71
- });
72
- }
73
-
74
- function failUpdateSystem(result) {
75
- if (result == "failure") {
76
- $("#fail-update-system").show();
77
- $("#gem-result-log").show();
78
- updateSysmteProcess();
79
- }
80
- else if (result == "nothing") {
81
- $("#nothing-to-update").show();
82
- }
83
- }
84
-
85
- function updateSysmteProcess() {
86
- $("#version-update-button").show();
87
- updateButtonHandler()
88
- .then(callUpdateSystem)
89
- .then(rebootButtonHandler)
90
- .fail(failUpdateSystem);
91
- }
92
-
93
- $result = $("#result-of-version-checking");
94
- $result.children("div").hide();
95
-
96
- $("#version-update-button").hide();
97
- $("#reboot-button").hide();
98
- $("#version-updating").hide();
99
- $("#fail-update-system").hide();
100
- $("#nothing-to-update").hide();
101
- $("#gem-result-log").hide();
102
-
103
- action.checkUpdatedSystem({
104
- // まだgemのアップデートは行われていないので、バージョンチェックからはじめる
105
- not_updated: function() {
106
- $result.children(".checking").show();
107
-
108
- $.when(
109
- getCurrentVersion(),
110
- getLatestVersion()
111
- )
112
- .done(function(current_version, latest_version) {
113
- $result.children(".checking").hide();
114
- if (latest_version > current_version) {
115
- $("#latest-version").text(latest_version);
116
- $result.children(".need-an-update").show();
117
- }
118
- else {
119
- $result.children(".version-is-latest").show();
120
- }
121
- })
122
- .fail(function() {
123
- $result.children(".checking").hide();
124
- $result.children(".error").show();
125
- });
126
-
127
- updateSysmteProcess();
128
- },
129
-
130
- // すでにgemをアップデート済みなので、再起動ボタンを最初から表示する
131
- already_updated: function(log) {
132
- $result.children(".need-an-update").show();
133
- $("#latest-version-found").hide();
134
- $("#reboot-button").show();
135
- $("#gem-result-log").text(log);
136
- rebootButtonHandler();
137
- }
138
- });
139
-
140
- }();
141
-
142
- %div.link-to-changelog-in-about
143
- %a.btn.btn-default.btn-sm(href="https://github.com/whiteleaf7/narou/blob/master/ChangeLog.md" target="_blank")
144
- 更新履歴
145
- %span.glyphicon.glyphicon-new-window
146
-
147
- %div(style="text-align:center")
148
- %h1
149
- %strong Narou.rb
150
- %div
151
- Version #{@narourb_version}
152
- %div
153
- Copyright 2013 whiteleaf. All rights reserved.
154
- #result-of-version-checking(style="margin-top:10px")
155
- .checking
156
- %span.rotate-progress
157
- %span.icon
158
- %span.text アップデートを確認しています...
159
- .version-is-latest
160
- %p
161
- %span.glyphicon.glyphicon-thumbs-up.text-primary
162
- Narou.rb は最新版です。
163
- .need-an-update
164
- %p
165
- %span#latest-version-found
166
- %span.glyphicon.glyphicon-exclamation-sign.text-primary
167
- 新しいバージョン(<span id="latest-version"></span>)が見つかりました。<br>
168
- %a#version-update-button.btn.btn-primary.btn-sm
169
- %b Narou.rb を更新する
170
- %span#version-updating
171
- %span.rotate-progress
172
- %span.icon
173
- %span.text 更新しています。
174
- %a#reboot-button.btn.btn-success.btn-sm
175
- %b 再起動して更新を反映する
176
- %span#nothing-to-update.text-success
177
- Narou.rb はすでに最新版です。
178
- %p#fail-update-system.text-danger
179
- Narou.rb の更新に失敗しました。
180
- .error
181
- %span.text-danger
182
- 最新バージョンの取得に失敗しました。
183
-
184
- %pre#gem-result-log.log-box
185
-
186
- .well.well-sm(style="font-size:80%; margin-top: 10px")
187
- #{@ruby_version}<br>
188
- #{env["HTTP_USER_AGENT"]}
@@ -1,18 +0,0 @@
1
- :javascript
2
- var busy = $("#rebooting-busy");
3
- busy.text(".");
4
- setInterval(function() {
5
- busy.text(busy.text() + ".");
6
- if (busy.text().length == 6) {
7
- busy.text(".");
8
- }
9
- }, 500);
10
-
11
- %p
12
- サーバを再起動しています<span id="rebooting-busy"></span>
13
- %p
14
- 再起動が完了したら自動的にページがリロードされます。
15
- %p
16
- しばらく待ってもリロードされない場合は
17
- %a(href="/") こちら
18
- をクリックするかブラウザのリロードボタンを押してみてください。
@@ -1,30 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
-
3
- #
4
- # 対象小説情報
5
- # タイトル: 最果てのパラディン
6
- # 作者: 柳野かなた
7
- # URL: http://ncode.syosetu.com/n5115cq/
8
- #
9
- # 詳細については http://bit.ly/1vTEH04 を参照して下さい
10
- #
11
- converter "n5115cq 最果てのパラディン" do
12
- # 各種変換処理がされる「前」の生データに対しての変換処理を記述
13
- def before(io, text_type)
14
- super
15
- if text_type == "body"
16
- io.string.gsub!("|《命ず》、《ネー・》", "|《命ず》《ネー・》、")
17
- io.string.gsub!(/[||]《([^《》]+)》《((?:\p{Hiragana}|\p{Katakana}|[・ー])+)》/) do |match|
18
- @inspector.info("ルビを調整\n" + match)
19
- "|≪#{$1}≫《#{$2}》"
20
- end
21
- end
22
- io
23
- end
24
-
25
- # 各種変換処理がされた「後」のデータに対しての変換処理を記述
26
- def after(io, text_type)
27
- super
28
- io
29
- end
30
- end