muck-raker 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/config/muck_raker_environment.rb +8 -4
- data/lib/muck_raker/tasks.rb +19 -16
- data/muck-raker.gemspec +1 -1
- data/raker/lib/aggregatord.jar +0 -0
- data/raker/lib/recommenderd.jar +0 -0
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.8
|
@@ -1,4 +1,4 @@
|
|
1
|
-
ENV['RAILS_ENV']
|
1
|
+
ENV['RAILS_ENV'] = (ENV['RAILS_ENV'] || 'development').dup
|
2
2
|
dir = File.dirname(__FILE__)
|
3
3
|
SOLR_PATH = File.expand_path("#{dir}/../solr") unless defined? SOLR_PATH
|
4
4
|
|
@@ -16,12 +16,16 @@ unless defined? SOLR_CONFIG_PATH
|
|
16
16
|
end
|
17
17
|
|
18
18
|
unless defined? RAILS_DB_CONFIG
|
19
|
-
|
19
|
+
if ENV['RAILS_ENV'] == 'production'
|
20
|
+
RAILS_DB_CONFIG = File.join(RAILS_ROOT, '..', '..', 'shared', 'config', 'database.yml')
|
21
|
+
else
|
22
|
+
RAILS_DB_CONFIG = File.join(RAILS_ROOT, 'config', 'database.yml')
|
23
|
+
end
|
20
24
|
end
|
21
25
|
unless defined? FEED_ARCHIVE_PATH
|
22
|
-
if ENV['RAILS_ENV']
|
26
|
+
if ENV['RAILS_ENV'] == 'production'
|
23
27
|
FEED_ARCHIVE_PATH = File.join(RAILS_ROOT, '..', '..', 'shared', 'feed_archive')
|
24
|
-
elsif ENV['RAILS_ENV']
|
28
|
+
elsif ENV['RAILS_ENV'] == 'development'
|
25
29
|
FEED_ARCHIVE_PATH = File.join(RAILS_ROOT, '..', 'feed_archive')
|
26
30
|
else
|
27
31
|
FEED_ARCHIVE_PATH = File.join(RAILS_ROOT, '..', 'feed_archive')
|
data/lib/muck_raker/tasks.rb
CHANGED
@@ -69,36 +69,38 @@ module MuckRaker
|
|
69
69
|
system "rsync -ruv #{path}/config/solr ./config"
|
70
70
|
end
|
71
71
|
|
72
|
-
desc "
|
73
|
-
task :
|
72
|
+
desc "Harvest without recommending"
|
73
|
+
task :harvest => :environment do
|
74
74
|
require File.expand_path("#{File.dirname(__FILE__)}/../../config/muck_raker_environment")
|
75
75
|
separator = (RUBY_PLATFORM =~ /(win|w)32$/ ? ';' : ':')
|
76
|
+
puts "RAILS_ENV=" + ENV['RAILS_ENV']
|
76
77
|
Dir.chdir(File.join(File.dirname(__FILE__), '../../', 'raker', 'lib')) do
|
77
78
|
jars = Dir['*.jar'].join(separator)
|
78
|
-
options = "-Dsolr.solr.home=\"#{SOLR_CONFIG_PATH}\" -Dsolr.data.dir=\"#{SOLR_DATA_PATH}\" -DRAILS_DB_CONFIG=\"#{RAILS_DB_CONFIG}\" -DLOG_FILE_PREFIX=\"#{LOG_FILE_PREFIX}\" "
|
79
|
-
options << "-DDEBUG " unless
|
80
|
-
options << "-DLOG_TO_CONSOLE " unless
|
79
|
+
options = "-Dsolr.solr.home=\"#{SOLR_CONFIG_PATH}\" -Dsolr.data.dir=\"#{SOLR_DATA_PATH}\" -DRAILS_ENV=#{ENV['RAILS_ENV']} -DRAILS_DB_CONFIG=\"#{RAILS_DB_CONFIG}\" -DLOG_FILE_PREFIX=\"#{LOG_FILE_PREFIX}\" "
|
80
|
+
options << "-DDEBUG=true " unless ENV['DEBUG'] == 'false'
|
81
|
+
options << "-DLOG_TO_CONSOLE=true " unless ENV['DEBUG'] == 'false'
|
81
82
|
options << "-DFEED_ARCHIVE_PATH=\"#{FEED_ARCHIVE_PATH}\" "
|
82
83
|
classpath = "-classpath #{jars}#{separator}. "
|
83
|
-
javaclass = "edu.usu.cosl.
|
84
|
+
javaclass = "edu.usu.cosl.aggregatord.Harvester"
|
84
85
|
cmd = "java " + options + classpath + javaclass
|
85
86
|
puts ("Executing: " + cmd) if ENV['DEBUG']
|
86
87
|
exec cmd
|
87
88
|
end
|
88
89
|
end
|
89
90
|
|
90
|
-
desc "
|
91
|
-
task :
|
91
|
+
desc "Start the recommender daemon process"
|
92
|
+
task :start => :environment do
|
92
93
|
require File.expand_path("#{File.dirname(__FILE__)}/../../config/muck_raker_environment")
|
93
94
|
separator = (RUBY_PLATFORM =~ /(win|w)32$/ ? ';' : ':')
|
95
|
+
puts "RAILS_ENV=" + ENV['RAILS_ENV']
|
94
96
|
Dir.chdir(File.join(File.dirname(__FILE__), '../../', 'raker', 'lib')) do
|
95
97
|
jars = Dir['*.jar'].join(separator)
|
96
|
-
options = "-Dsolr.solr.home=\"#{SOLR_CONFIG_PATH}\" -Dsolr.data.dir=\"#{SOLR_DATA_PATH}\" -DRAILS_DB_CONFIG=\"#{RAILS_DB_CONFIG}\" -DLOG_FILE_PREFIX=\"#{LOG_FILE_PREFIX}\" "
|
97
|
-
options << "-DDEBUG " unless
|
98
|
-
options << "-DLOG_TO_CONSOLE " unless
|
98
|
+
options = "-Dsolr.solr.home=\"#{SOLR_CONFIG_PATH}\" -Dsolr.data.dir=\"#{SOLR_DATA_PATH}\" -DRAILS_ENV=#{ENV['RAILS_ENV']} -DRAILS_DB_CONFIG=\"#{RAILS_DB_CONFIG}\" -DLOG_FILE_PREFIX=\"#{LOG_FILE_PREFIX}\" "
|
99
|
+
options << "-DDEBUG=true " unless ENV['DEBUG'] == 'false'
|
100
|
+
options << "-DLOG_TO_CONSOLE=true " unless ENV['DEBUG'] == 'false'
|
99
101
|
options << "-DFEED_ARCHIVE_PATH=\"#{FEED_ARCHIVE_PATH}\" "
|
100
102
|
classpath = "-classpath #{jars}#{separator}. "
|
101
|
-
javaclass = "edu.usu.cosl.
|
103
|
+
javaclass = "edu.usu.cosl.recommenderd.Recommenderd"
|
102
104
|
cmd = "java " + options + classpath + javaclass
|
103
105
|
puts ("Executing: " + cmd) if ENV['DEBUG']
|
104
106
|
exec cmd
|
@@ -109,14 +111,15 @@ module MuckRaker
|
|
109
111
|
task :recommend => :environment do
|
110
112
|
require File.expand_path("#{File.dirname(__FILE__)}/../../config/muck_raker_environment")
|
111
113
|
separator = (RUBY_PLATFORM =~ /(win|w)32$/ ? ';' : ':')
|
114
|
+
puts "RAILS_ENV=" + ENV['RAILS_ENV']
|
112
115
|
Dir.chdir(File.join(File.dirname(__FILE__), '../../', 'raker', 'lib')) do
|
113
116
|
jars = Dir['*.jar'].join(separator)
|
114
|
-
options = "-Dsolr.solr.home=\"#{SOLR_CONFIG_PATH}\" -Dsolr.data.dir=\"#{SOLR_DATA_PATH}\" -DRAILS_DB_CONFIG=\"#{RAILS_DB_CONFIG}\" -DLOG_FILE_PREFIX=\"#{LOG_FILE_PREFIX}\" "
|
115
|
-
options << "-DDEBUG " unless
|
116
|
-
options << "-DLOG_TO_CONSOLE " unless
|
117
|
+
options = "-Dsolr.solr.home=\"#{SOLR_CONFIG_PATH}\" -Dsolr.data.dir=\"#{SOLR_DATA_PATH}\" -DRAILS_ENV=#{ENV['RAILS_ENV']} -DRAILS_DB_CONFIG=\"#{RAILS_DB_CONFIG}\" -DLOG_FILE_PREFIX=\"#{LOG_FILE_PREFIX}\" "
|
118
|
+
options << "-DDEBUG=true " unless ENV['DEBUG'] == 'false'
|
119
|
+
options << "-DLOG_TO_CONSOLE=true " unless ENV['DEBUG'] == 'false'
|
117
120
|
options << "-DFEED_ARCHIVE_PATH=\"#{FEED_ARCHIVE_PATH}\" "
|
118
121
|
classpath = "-classpath #{jars}#{separator}. "
|
119
|
-
javaclass = "edu.usu.cosl.recommenderd.
|
122
|
+
javaclass = "edu.usu.cosl.recommenderd.Recommenderd "
|
120
123
|
cmdlineoption = "skip_harvest "
|
121
124
|
cmd = "java " + options + classpath + javaclass + cmdlineoption
|
122
125
|
puts ("Executing: " + cmd) if ENV['DEBUG']
|
data/muck-raker.gemspec
CHANGED
data/raker/lib/aggregatord.jar
CHANGED
Binary file
|
data/raker/lib/recommenderd.jar
CHANGED
Binary file
|