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.
- checksums.yaml +4 -4
- data/ChangeLog.md +0 -38
- data/Gemfile +1 -2
- data/README.md +7 -0
- data/lib/command/setting.rb +5 -20
- data/lib/command/version.rb +2 -1
- data/lib/command/web.rb +7 -64
- data/lib/downloader.rb +1 -4
- data/lib/narou.rb +0 -20
- data/lib/novelconverter.rb +1 -1
- data/lib/version.rb +1 -1
- data/lib/web/appserver.rb +15 -67
- data/lib/web/public/resources/narou.library.js +12 -93
- data/lib/web/public/resources/narou.ui.js +52 -152
- data/lib/web/pushserver.rb +3 -14
- data/lib/web/views/about.haml +85 -0
- data/lib/web/views/{_diff_list.haml → diff_list.haml} +0 -0
- data/lib/web/views/{_edit_replace_txt.haml → edit_replace_txt.haml} +4 -4
- data/lib/web/views/help.haml +2 -2
- data/lib/web/views/index.haml +2 -13
- data/lib/web/views/layout.haml +2 -3
- data/lib/web/views/novels/setting.haml +3 -14
- data/lib/web/views/settings.haml +2 -2
- data/lib/web/views/style.scss +11 -44
- data/narou.gemspec +3 -4
- data/narou.rb +8 -7
- data/preset/ncode.syosetu.com/n8725k/converter.rb +1 -1
- data/spec/generator/convert_spec_gen.rb +0 -2
- metadata +7 -10
- data/lib/web/views/_about.haml +0 -188
- data/lib/web/views/_rebooting.haml +0 -18
- data/preset/ncode.syosetu.com/n5115cq/converter.rb +0 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70f7f7b7209627370ad63d4870e25254e904434c
|
4
|
+
data.tar.gz: 8df9999d62fcac1dc06c4dd4ab063b7cdecfa2dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff21146250d516906112510e453ba9113375a04f257d456a67ff73a834676aa3f35cbd6275822cc95cf7394aa977891c144147a4752849764006ad1fed417858
|
7
|
+
data.tar.gz: b7c5211400fc11eaa6d8512a36dfc211f68149f5a3dfa203be3ea8d3eef0d1fae885dfea87824c21169bb342384d7ddfe89c3f6966b497e4cc09fe1169f6cdc1
|
data/ChangeLog.md
CHANGED
@@ -2,50 +2,12 @@
|
|
2
2
|
更新履歴 - ChangeLog
|
3
3
|
====================
|
4
4
|
|
5
|
-
2.9.0 : develop
|
6
|
-
------------------
|
7
|
-
#### WEB UI
|
8
|
-
- メニュー(歯車アイコン)に「サーバを再起動」を追加しました。WEB UIから直接WEB
|
9
|
-
UIサーバを再起動できるようになります
|
10
|
-
- 「Narou.rbについて」ダイアログで最新バージョンを確認できた場合に、その場で
|
11
|
-
システムの更新及び再起動が出来るようになりました
|
12
|
-
- 小説リスト部分で右クリックすることで個別メニューを呼び出せるようになりました
|
13
|
-
- 各小説をそれぞれ個別に更新出来るボタンを追加しました
|
14
|
-
- 一部のボタンのアイコンを変更しました
|
15
|
-
- 個別メニューから「更新」した場合は、凍結状態に関わらず更新出来るようになり
|
16
|
-
ました
|
17
|
-
- ツールチップを表示してしばらくしたら自動で閉じるようにしました
|
18
|
-
- タグの並び順をソートするようにしました
|
19
|
-
- 「表示」メニューに「変換設定ページは新規タブで開く」を追加しました
|
20
|
-
|
21
|
-
#### 追加機能
|
22
|
-
- `narou setting 変数名` コマンドで現在の設定値を確認出来るようになりました。
|
23
|
-
(例 `narou s device`)
|
24
|
-
- 変換プリセットを追加しました
|
25
|
-
- n5115cq 最果てのパラディン
|
26
|
-
|
27
|
-
#### 仕様変更
|
28
|
-
- 変換処理で body や introduction 等を処理して最後に subtitle を変換していた
|
29
|
-
のを先に subtitle を処理するように変更しました
|
30
|
-
- converter.rb でサブタイトルで本文の処理内容を調整したい場合に今までの処理順
|
31
|
-
では不可能だったため
|
32
|
-
|
33
|
-
#### 修正
|
34
|
-
- Windows において、WEB UI の「Narou.rbについて」ダイアログで最新バージョンの
|
35
|
-
確認に失敗する場合がある問題に対応しました
|
36
|
-
- WEB UI の小説リストの項目を入れ替えた後に各種ボタンが反応しなくなるのを修正
|
37
|
-
- 凍結済み小説を強制更新した際に凍結が解除されてしまう場合があったのを修正
|
38
|
-
- thin などがすでにインストール済みの場合に narou web コマンドで WEB UI サーバ
|
39
|
-
を起動できない場合があるので、必ず WEBrick で起動するようにしました
|
40
|
-
|
41
|
-
|
42
5
|
2.8.3 : 2016/03/01
|
43
6
|
------------------
|
44
7
|
#### HotFix
|
45
8
|
- ノクターン・ムーンライト・ミッドナイトノベルズの認証方法変更に対応しました
|
46
9
|
+ 404エラーがでて凍結されてしまった場合、凍結を解除したあと再度更新して下さい
|
47
10
|
|
48
|
-
|
49
11
|
2.8.2 : 2016/02/05
|
50
12
|
------------------
|
51
13
|
#### HotFix
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -37,6 +37,13 @@ Narou.rb ― 「小説家になろう」「小説を読もう!」ダウンロ
|
|
37
37
|
更新履歴 - ChangeLog
|
38
38
|
--------------------
|
39
39
|
|
40
|
+
2.8.3 : 2016/03/01
|
41
|
+
------------------
|
42
|
+
#### HotFix
|
43
|
+
- ノクターン・ムーンライト・ミッドナイトノベルズの認証方法変更に対応しました
|
44
|
+
+ 404エラーがでて凍結されてしまった場合、凍結を解除したあと再度更新して下さい
|
45
|
+
|
46
|
+
|
40
47
|
2.8.2 : 2016/02/05
|
41
48
|
------------------
|
42
49
|
#### HotFix
|
data/lib/command/setting.rb
CHANGED
@@ -38,17 +38,11 @@ module Command
|
|
38
38
|
|
39
39
|
@opt.separator <<-EOS
|
40
40
|
|
41
|
-
これ以外にも設定出来る項目があります。確認する場合は
|
42
|
-
narou setting -a コマンドを参照して下さい
|
43
|
-
|
44
41
|
Examples:
|
45
|
-
narou setting --list
|
46
|
-
narou setting convert.no-open=true
|
47
|
-
narou setting convert.no-epub=
|
48
|
-
narou setting
|
49
|
-
|
50
|
-
narou s convert.copy-to=C:/dropbox/mobi
|
51
|
-
# パスにスペースが含まれる場合はダブルクウォーテーションで囲う
|
42
|
+
narou setting --list
|
43
|
+
narou setting convert.no-open=true
|
44
|
+
narou setting convert.no-epub= # 右辺に何も書かないとその設定を削除できる
|
45
|
+
narou setting convert.copy-to=C:/dropbox/mobi
|
52
46
|
narou s convert.copy-to="C:\\Documents and Settings\\user\\epub"
|
53
47
|
|
54
48
|
Options:
|
@@ -140,15 +134,6 @@ module Command
|
|
140
134
|
deleted
|
141
135
|
end
|
142
136
|
|
143
|
-
def output_value(name, settings)
|
144
|
-
scope = get_scope_of_variable_name(name)
|
145
|
-
if scope
|
146
|
-
puts settings[scope][name]
|
147
|
-
else
|
148
|
-
output_error("#{name} という変数は存在しません", name)
|
149
|
-
end
|
150
|
-
end
|
151
|
-
|
152
137
|
def execute(argv)
|
153
138
|
super
|
154
139
|
if @options["burn"]
|
@@ -173,7 +158,7 @@ module Command
|
|
173
158
|
next
|
174
159
|
end
|
175
160
|
if value.nil?
|
176
|
-
|
161
|
+
output_error("書式が間違っています。#{name}=値 のように書いて下さい", name)
|
177
162
|
next
|
178
163
|
end
|
179
164
|
scope = get_scope_of_variable_name(name)
|
data/lib/command/version.rb
CHANGED
@@ -14,7 +14,8 @@ module Command
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def self.create_version_string
|
17
|
-
|
17
|
+
cv_path = File.expand_path("commitversion", Narou.get_script_dir)
|
18
|
+
commitversion = File.exist?(cv_path) ? File.read(cv_path) : `git describe --always`.strip + "(develop)"
|
18
19
|
"#{::Version} build #{commitversion}"
|
19
20
|
end
|
20
21
|
end
|
data/lib/command/web.rb
CHANGED
@@ -69,35 +69,7 @@ module Command
|
|
69
69
|
end
|
70
70
|
|
71
71
|
def execute(argv)
|
72
|
-
|
73
|
-
@rebooted = !!argv.delete("--reboot")
|
74
|
-
super
|
75
|
-
boot
|
76
|
-
else
|
77
|
-
argv << "--backtrace" if $display_backtrace
|
78
|
-
argv << "--no-color" if $disable_color
|
79
|
-
argv << "--boot"
|
80
|
-
argv_copy = argv.dup
|
81
|
-
begin
|
82
|
-
loop do
|
83
|
-
if $development
|
84
|
-
system(RbConfig.ruby, "-x", $0, "web", *argv)
|
85
|
-
else
|
86
|
-
system("narou", "web", *argv)
|
87
|
-
end
|
88
|
-
break unless $?.exitstatus == Narou::EXIT_REQUEST_REBOOT
|
89
|
-
argv = argv_copy.dup
|
90
|
-
argv.push("--no-browser", "--reboot")
|
91
|
-
end
|
92
|
-
rescue Interrupt => e
|
93
|
-
# 中断されてコンソールへの入力が可能になってから、WEBrick が終了するまで
|
94
|
-
# タイムラグがあって表示がごちゃまぜになるので、終わるのを少し待つ
|
95
|
-
sleep 3
|
96
|
-
end
|
97
|
-
end
|
98
|
-
end
|
99
|
-
|
100
|
-
def boot
|
72
|
+
super
|
101
73
|
require_relative "../web/all"
|
102
74
|
confirm_of_first
|
103
75
|
params = Narou::AppServer.create_address(@options["port"])
|
@@ -111,20 +83,18 @@ module Command
|
|
111
83
|
puts
|
112
84
|
|
113
85
|
push_server.run
|
114
|
-
|
115
|
-
|
116
|
-
|
86
|
+
unless @options["no-browser"]
|
87
|
+
Thread.new do
|
88
|
+
sleep 0.2 until Narou::AppServer.running?
|
89
|
+
Helper.open_browser(address)
|
90
|
+
end
|
91
|
+
end
|
117
92
|
$stdout = Narou::StreamingLogger.new(push_server)
|
118
93
|
ProgressBar.push_server = push_server
|
119
94
|
Narou::AppServer.push_server = push_server
|
120
95
|
Narou::Worker.instance.start
|
121
|
-
send_hello_message
|
122
|
-
|
123
96
|
Narou::AppServer.run!
|
124
97
|
push_server.quit
|
125
|
-
if Narou::AppServer.request_reboot?
|
126
|
-
exit Narou::EXIT_REQUEST_REBOOT
|
127
|
-
end
|
128
98
|
rescue Errno::EADDRINUSE => e
|
129
99
|
Helper.open_browser(address) unless @options["no-browser"]
|
130
100
|
STDOUT.puts <<-EOS
|
@@ -137,33 +107,6 @@ module Command
|
|
137
107
|
EOS
|
138
108
|
exit Narou::EXIT_ERROR_CODE
|
139
109
|
end
|
140
|
-
|
141
|
-
def open_browser_when_server_boot(address)
|
142
|
-
return if @options["no-browser"]
|
143
|
-
Thread.new do
|
144
|
-
sleep 0.2 until Narou::AppServer.running?
|
145
|
-
Helper.open_browser(address)
|
146
|
-
end
|
147
|
-
end
|
148
|
-
|
149
|
-
def send_rebooted_event_when_connection_recover(push_server)
|
150
|
-
return unless @rebooted
|
151
|
-
Thread.new do |th|
|
152
|
-
timeout = Time.now + 20
|
153
|
-
# WebSocketのコネクションが回復するまで待つ
|
154
|
-
until push_server.connections.count != 0
|
155
|
-
sleep 0.2
|
156
|
-
th.kill if Time.now > timeout
|
157
|
-
end
|
158
|
-
puts "<yellow>再起動が完了しました。</yellow>".termcolor
|
159
|
-
push_server.send_all(:"server.rebooted")
|
160
|
-
end
|
161
|
-
end
|
162
|
-
|
163
|
-
def send_hello_message
|
164
|
-
puts "<white>Narou.rb version #{::Version}</white>".termcolor
|
165
|
-
end
|
166
|
-
|
167
110
|
end
|
168
111
|
end
|
169
112
|
|
data/lib/downloader.rb
CHANGED
@@ -782,7 +782,7 @@ class Downloader
|
|
782
782
|
$stdout.silence do
|
783
783
|
Command::Tag.execute!(%W(#{@id} --add 404 --color white --no-overwrite-color))
|
784
784
|
end
|
785
|
-
Command::Freeze.execute!([@id
|
785
|
+
Command::Freeze.execute!([@id])
|
786
786
|
end
|
787
787
|
else
|
788
788
|
@stream.error "何らかの理由により目次が取得できませんでした(#{e.message})"
|
@@ -1112,9 +1112,6 @@ class Downloader
|
|
1112
1112
|
end
|
1113
1113
|
sleep(WAITING_TIME_FOR_503)
|
1114
1114
|
retry
|
1115
|
-
elsif e.message =~ /^404/
|
1116
|
-
@stream.error "#{url} がダウンロード出来ませんでした。時間をおいて再度試してみてください"
|
1117
|
-
exit Narou::EXIT_ERROR_CODE
|
1118
1115
|
else
|
1119
1116
|
raise
|
1120
1117
|
end
|
data/lib/narou.rb
CHANGED
@@ -21,7 +21,6 @@ module Narou
|
|
21
21
|
GLOBAL_REPLACE_NAME = "replace.txt"
|
22
22
|
EXIT_ERROR_CODE = 127
|
23
23
|
EXIT_INTERRUPT = 126
|
24
|
-
EXIT_REQUEST_REBOOT = 125
|
25
24
|
|
26
25
|
UPDATE_SORT_KEYS = {
|
27
26
|
"id" => "ID", "last_update" => "更新日", "title" => "タイトル", "author" => "作者名",
|
@@ -276,24 +275,5 @@ module Narou
|
|
276
275
|
type == 2 ? "短編" : "連載"
|
277
276
|
end
|
278
277
|
|
279
|
-
#
|
280
|
-
# Narou.rb gem の最新バージョン番号を取得する
|
281
|
-
#
|
282
|
-
# rubygems公式APIによる取得は、WindowsでのSSL証明書問題で取得出来ない
|
283
|
-
# 環境があるため、gemコマンド経由で取得する
|
284
|
-
#
|
285
|
-
def latest_version
|
286
|
-
response = `gem search ^narou$`.split("\n")
|
287
|
-
if response.last =~ /\Anarou \((.+?)\)\z/
|
288
|
-
$1
|
289
|
-
end
|
290
|
-
end
|
291
|
-
|
292
|
-
def commit_version
|
293
|
-
cv_path = File.expand_path("commitversion", get_script_dir)
|
294
|
-
File.read(cv_path) if File.exist?(cv_path)
|
295
|
-
end
|
296
|
-
memoize :commit_version
|
297
|
-
|
298
278
|
end
|
299
279
|
end
|
data/lib/novelconverter.rb
CHANGED
@@ -623,7 +623,6 @@ class NovelConverter
|
|
623
623
|
section["chapter"] = @converter.convert(section["chapter"], "chapter")
|
624
624
|
end
|
625
625
|
@inspector.subtitle = section["subtitle"]
|
626
|
-
section["subtitle"] = @converter.convert(section["subtitle"], "subtitle")
|
627
626
|
element = section["element"]
|
628
627
|
data_type = element.delete("data_type") || "text"
|
629
628
|
element.each do |text_type, elm_text|
|
@@ -633,6 +632,7 @@ class NovelConverter
|
|
633
632
|
end
|
634
633
|
element[text_type] = @converter.convert(elm_text, text_type)
|
635
634
|
end
|
635
|
+
section["subtitle"] = @converter.convert(section["subtitle"], "subtitle")
|
636
636
|
sections << section
|
637
637
|
end
|
638
638
|
@use_dakuten_font = @converter.use_dakuten_font
|
data/lib/version.rb
CHANGED
data/lib/web/appserver.rb
CHANGED
@@ -6,8 +6,10 @@
|
|
6
6
|
require "socket"
|
7
7
|
require "sinatra/base"
|
8
8
|
require "sinatra/json"
|
9
|
-
|
10
|
-
require "
|
9
|
+
if $debug
|
10
|
+
require "sinatra/reloader"
|
11
|
+
require "pry"
|
12
|
+
end
|
11
13
|
require "tilt/erubis"
|
12
14
|
require "tilt/haml"
|
13
15
|
require "tilt/sass"
|
@@ -23,7 +25,7 @@ module Narou::ServerHelpers
|
|
23
25
|
# タグをHTMLで装飾する
|
24
26
|
#
|
25
27
|
def decorate_tags(tags)
|
26
|
-
tags.
|
28
|
+
tags.map do |tag|
|
27
29
|
%!<span class="tag label label-#{Command::Tag.get_color(tag)}" data-tag="#{escape_html(tag)}">#{escape_html(tag)}</span>!
|
28
30
|
end.join(" ")
|
29
31
|
end
|
@@ -104,13 +106,9 @@ module Narou::ServerHelpers
|
|
104
106
|
end
|
105
107
|
|
106
108
|
class Narou::AppServer < Sinatra::Base
|
107
|
-
register Sinatra::Reloader if $
|
109
|
+
register Sinatra::Reloader if $debug
|
108
110
|
helpers Narou::ServerHelpers
|
109
111
|
|
110
|
-
@@request_reboot = false
|
111
|
-
@@already_update_system = false
|
112
|
-
@@gem_update_last_log = ""
|
113
|
-
|
114
112
|
configure do
|
115
113
|
set :app_file, __FILE__
|
116
114
|
set :erb, trim: "-"
|
@@ -121,31 +119,13 @@ class Narou::AppServer < Sinatra::Base
|
|
121
119
|
Command::Version.create_version_string
|
122
120
|
end
|
123
121
|
|
124
|
-
set :environment, :production unless $
|
125
|
-
set :server, :webrick
|
126
|
-
|
127
|
-
if $debug
|
128
|
-
use BetterErrors::Middleware
|
129
|
-
BetterErrors.application_root = Narou.get_script_dir
|
130
|
-
end
|
122
|
+
set :environment, :production unless $debug
|
131
123
|
end
|
132
124
|
|
133
125
|
def self.push_server=(server)
|
134
126
|
@@push_server = server
|
135
127
|
end
|
136
128
|
|
137
|
-
def self.push_server
|
138
|
-
@@push_server
|
139
|
-
end
|
140
|
-
|
141
|
-
def self.request_reboot
|
142
|
-
@@request_reboot = true
|
143
|
-
end
|
144
|
-
|
145
|
-
def self.request_reboot?
|
146
|
-
@@request_reboot
|
147
|
-
end
|
148
|
-
|
149
129
|
#
|
150
130
|
# サーバのアドレスを生成
|
151
131
|
#
|
@@ -311,7 +291,7 @@ class Narou::AppServer < Sinatra::Base
|
|
311
291
|
get "/about" do
|
312
292
|
@narourb_version = settings.version
|
313
293
|
@ruby_version = build_ruby_version
|
314
|
-
haml :
|
294
|
+
haml :about, layout: false
|
315
295
|
end
|
316
296
|
|
317
297
|
post "/shutdown" do
|
@@ -319,36 +299,6 @@ class Narou::AppServer < Sinatra::Base
|
|
319
299
|
"シャットダウンしました。再起動するまで操作は出来ません"
|
320
300
|
end
|
321
301
|
|
322
|
-
post "/reboot" do
|
323
|
-
self.class.request_reboot
|
324
|
-
self.class.quit!
|
325
|
-
haml :_rebooting, layout: false
|
326
|
-
end
|
327
|
-
|
328
|
-
post "/update_system" do
|
329
|
-
Thread.new do
|
330
|
-
buffer = `gem update --no-document narou`
|
331
|
-
@@gem_update_last_log = buffer.strip!
|
332
|
-
if buffer =~ /Nothing to update\z/
|
333
|
-
@@push_server.send_all("server.update.nothing" => buffer)
|
334
|
-
elsif buffer.include?("Gems updated: narou")
|
335
|
-
@@already_update_system = true
|
336
|
-
@@push_server.send_all("server.update.success" => buffer)
|
337
|
-
else
|
338
|
-
@@push_server.send_all("server.update.failure" => buffer)
|
339
|
-
end
|
340
|
-
end
|
341
|
-
end
|
342
|
-
|
343
|
-
post "/gem_update_last_log" do
|
344
|
-
content_type "text/plain"
|
345
|
-
@@gem_update_last_log
|
346
|
-
end
|
347
|
-
|
348
|
-
post "/check_already_update_system" do
|
349
|
-
json({ result: @@already_update_system })
|
350
|
-
end
|
351
|
-
|
352
302
|
before "/novels/:id/*" do
|
353
303
|
@id = params[:id]
|
354
304
|
not_found unless @id =~ /^\d+$/
|
@@ -426,16 +376,12 @@ class Narou::AppServer < Sinatra::Base
|
|
426
376
|
ext = device ? device.ebook_file_ext : ".epub"
|
427
377
|
path = Narou.get_ebook_file_path(@id, ext)
|
428
378
|
if File.exist?(path)
|
429
|
-
send_file(path, filename: File.basename(path)
|
379
|
+
send_file(path, filename: File.basename(path))
|
430
380
|
else
|
431
381
|
not_found
|
432
382
|
end
|
433
383
|
end
|
434
384
|
|
435
|
-
not_found do
|
436
|
-
"not found"
|
437
|
-
end
|
438
|
-
|
439
385
|
# -------------------------------------------------------------------------------
|
440
386
|
# API's
|
441
387
|
# -------------------------------------------------------------------------------
|
@@ -465,7 +411,7 @@ class Narou::AppServer < Sinatra::Base
|
|
465
411
|
tags.include?("end") ? "完結" : nil,
|
466
412
|
tags.include?("404") ? "削除" : nil,
|
467
413
|
].compact.join(", "),
|
468
|
-
download: %!<a href="/novels/#{id}/download" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-
|
414
|
+
download: %!<a href="/novels/#{id}/download" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-book"></span></a>!,
|
469
415
|
frozen: Narou.novel_frozen?(id),
|
470
416
|
new_arrivals_date: data["new_arrivals_date"].tap { |m| break m.to_i if m },
|
471
417
|
general_lastup: data["general_lastup"].tap { |m| break m.to_i if m }
|
@@ -583,7 +529,7 @@ class Narou::AppServer < Sinatra::Base
|
|
583
529
|
target = params["target"] or return ""
|
584
530
|
id = Downloader.get_id_by_target(target) or return ""
|
585
531
|
@list = Command::Diff.new.get_diff_list(id)
|
586
|
-
haml :
|
532
|
+
haml :diff_list, layout: false
|
587
533
|
end
|
588
534
|
|
589
535
|
post "/api/diff_clean" do
|
@@ -620,7 +566,7 @@ class Narou::AppServer < Sinatra::Base
|
|
620
566
|
get "/api/tag_list" do
|
621
567
|
result = '<div><span class="tag label label-default" data-tag="">タグ検索を解除</span></div>'
|
622
568
|
tagname_list = Command::Tag.get_tag_list.keys
|
623
|
-
tagname_list.
|
569
|
+
tagname_list.each do |tagname|
|
624
570
|
result << "<div>#{decorate_tags([tagname])} " \
|
625
571
|
"<span class='select-color-button' data-target-tag='#{h tagname}'>" \
|
626
572
|
"<span class='#{Command::Tag.get_color(tagname)}'>a</span></span></div>"
|
@@ -737,7 +683,9 @@ class Narou::AppServer < Sinatra::Base
|
|
737
683
|
end
|
738
684
|
|
739
685
|
get "/api/version/latest.json" do
|
740
|
-
json
|
686
|
+
open("https://rubygems.org/api/v1/versions/narou/latest.json?#{Time.now.to_i}") do |fp|
|
687
|
+
fp.read
|
688
|
+
end
|
741
689
|
end
|
742
690
|
|
743
691
|
# -------------------------------------------------------------------------------
|