Skip to content

Commit b5e1e96

Browse files
committed
5 Reconstruction the directory structure
1 parent 40cd8b7 commit b5e1e96

File tree

6 files changed

+5
-3
lines changed

6 files changed

+5
-3
lines changed

bookmarker.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
#!/usr/bin/env ruby
22
# -*- coding: utf-8 -*-
33
$:.unshift File.join(File.dirname(__FILE__))
4+
$:.unshift File.join(File.dirname(__FILE__), 'lib')
5+
$:.unshift File.join(File.dirname(__FILE__), 'plugins')
46

57
require "feed_parser"
68
require "hb"
79
require 'active_record'
810

911
user = []
10-
IO.foreach(File.join(File.dirname(__FILE__), "user.txt")) {|u|
12+
IO.foreach(File.join(File.dirname(__FILE__), 'config', 'user.txt')) {|u|
1113
user << u
1214
}
1315

@@ -19,7 +21,7 @@
1921

2022
ActiveRecord::Base.establish_connection(
2123
:adapter => "sqlite3",
22-
:database => "./bookmark.db"
24+
:database => "./db/bookmark.db"
2325
)
2426

2527
class Bookmark < ActiveRecord::Base
@@ -33,7 +35,7 @@ class Bookmark < ActiveRecord::Base
3335
end
3436

3537
bookmark = Bookmark.find(:all)
36-
IO.foreach(File.join(File.dirname(__FILE__), "feeds.txt")) {|feed|
38+
IO.foreach(File.join(File.dirname(__FILE__), 'config', 'feeds.txt')) {|feed|
3739
begin
3840
t = Time.now.strftime("%Y/%m/%d %X")
3941
puts "#{t} [info] Parsing #{feed}"
File renamed without changes.
File renamed without changes.

db/.gitkeep

Whitespace-only changes.
File renamed without changes.

hb.rb renamed to plugins/hb.rb

File renamed without changes.

0 commit comments

Comments
 (0)