olsen 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +1 -0
- data/Gemfile.lock +1 -1
- data/lib/olsen.rb +16 -9
- data/lib/olsen/primer_plugins/Filter.plugin.rb +1 -1
- data/lib/olsen/version.rb +1 -1
- metadata +4 -4
data/CHANGELOG
CHANGED
data/Gemfile.lock
CHANGED
data/lib/olsen.rb
CHANGED
@@ -38,11 +38,14 @@ class Olsen
|
|
38
38
|
filters.respond_to? "each" \
|
39
39
|
or return value
|
40
40
|
|
41
|
-
|
41
|
+
sadie = Sadie::getCurrentSadieInstance
|
42
42
|
|
43
43
|
fhnd = "filter.#{filters[0]}"
|
44
44
|
puts "fetching filter: #{fhnd}"
|
45
|
-
|
45
|
+
|
46
|
+
sadie.isset? fhnd \
|
47
|
+
or raise "olsen error: filter(#{fhnd}) does not exist"
|
48
|
+
f = sadie.get fhnd
|
46
49
|
|
47
50
|
if filters.length > 1
|
48
51
|
rem = filters[1..(filters.length-1)]
|
@@ -71,6 +74,7 @@ class Olsen
|
|
71
74
|
end
|
72
75
|
|
73
76
|
def self.registerFilter( name, &block )
|
77
|
+
puts "registering filter: #{name}"
|
74
78
|
instance = Sadie::getCurrentSadieInstance
|
75
79
|
instance.set "filter.#{name}", block
|
76
80
|
end
|
@@ -111,7 +115,10 @@ class Olsen
|
|
111
115
|
"lib/olsen/primer_plugins"
|
112
116
|
)
|
113
117
|
if ! File.exists? plugins_dirpath # for dev
|
114
|
-
plugins_dirpath = "lib/olsen/primer_plugins"
|
118
|
+
plugins_dirpath = File.expand_path "lib/olsen/primer_plugins"
|
119
|
+
end
|
120
|
+
if ! File.exists? plugins_dirpath # for dev
|
121
|
+
plugins_dirpath = File.join "/home/fred/Source/LMSys/olsen", "lib/olsen/primer_plugins"
|
115
122
|
end
|
116
123
|
storage.addPrimerPluginsDirPath plugins_dirpath
|
117
124
|
storage.initializePrimers
|
@@ -160,12 +167,12 @@ class Olsen
|
|
160
167
|
|
161
168
|
end
|
162
169
|
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
170
|
+
# def registerFilter( filter, &block )
|
171
|
+
# defined? @filters \
|
172
|
+
# or @filters = Hash.new
|
173
|
+
#
|
174
|
+
# @filters["filter"] = block
|
175
|
+
# end
|
169
176
|
|
170
177
|
def filter( filter_name, value )
|
171
178
|
defined? @filters \
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Sadie::registerPrimerPlugin( { "match" => /\.filter.rb$/,
|
2
2
|
"accepts-block" => false,
|
3
|
-
"prime-on-init" =>
|
3
|
+
"prime-on-init" => true } ) do |sadie, key_prefix, primer_file_filepath|
|
4
4
|
|
5
5
|
# basically, just loading a ruby file
|
6
6
|
load primer_file_filepath
|
data/lib/olsen/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: olsen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-04-
|
12
|
+
date: 2012-04-21 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sadie
|
16
|
-
requirement: &
|
16
|
+
requirement: &13593940 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *13593940
|
25
25
|
description: Olsen is a reporting tool intended to be used with Sadie.
|
26
26
|
email:
|
27
27
|
- fred@landmetrics.com
|