turingstudio-webloc_cleaner 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/webloc_cleaner.rb +4 -2
- metadata +1 -1
data/lib/webloc_cleaner.rb
CHANGED
@@ -5,7 +5,7 @@ require 'simpleconsole'
|
|
5
5
|
require 'activesupport'
|
6
6
|
|
7
7
|
module WeblocCleaner
|
8
|
-
VERSION = '1.0.
|
8
|
+
VERSION = '1.0.3'
|
9
9
|
|
10
10
|
class Controller < SimpleConsole::Controller
|
11
11
|
def default
|
@@ -33,10 +33,12 @@ module WeblocCleaner
|
|
33
33
|
|
34
34
|
ok.each do |file|
|
35
35
|
url = webloc_url(file)
|
36
|
-
|
36
|
+
url_file = file.gsub(/\.webloc$/, '.url')
|
37
|
+
File.open(url_file, 'w') do |f|
|
37
38
|
f.write "[InternetShortcut]\r\nURL=#{url}"
|
38
39
|
end
|
39
40
|
File.delete(file)
|
41
|
+
puts %Q("#{file}" converted to "#{url_file}")
|
40
42
|
end
|
41
43
|
end
|
42
44
|
|