sinatra_resource 0.4.18 → 0.4.19

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 CHANGED
@@ -1 +1 @@
1
- 0.4.18
1
+ 0.4.19
@@ -26,6 +26,10 @@ module DataCatalog
26
26
  base_uri = Config.environment_config["base_uri"]
27
27
  URI.join(base_uri, path).to_s
28
28
  end
29
+
30
+ def log_event(event, object)
31
+ # Application-logic could go here.
32
+ end
29
33
 
30
34
  def lookup_role(document=nil)
31
35
  api_key = lookup_api_key
@@ -362,6 +362,17 @@ module SinatraResource
362
362
  full_uri(path)
363
363
  end
364
364
 
365
+ # Do application-specific logging for +event+.
366
+ #
367
+ # Applications may override this method.
368
+ #
369
+ # @param [Symbol] event
370
+ # @param [Object] object
371
+ #
372
+ # @return [undefined]
373
+ def log_event(event, object)
374
+ end
375
+
365
376
  # Lookup the role, using +document+ if specified.
366
377
  #
367
378
  # Applications must override this method.
@@ -370,6 +370,7 @@ module SinatraResource
370
370
  error 400, convert(body_for(:invalid_params, [FILTER_KEY]))
371
371
  elsif search_string
372
372
  words = search_string.downcase.split(" ")
373
+ log_event(:search, words)
373
374
  { :_keywords => { '$all' => words } }
374
375
  elsif filter_string
375
376
  begin
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sinatra_resource}
8
- s.version = "0.4.18"
8
+ s.version = "0.4.19"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["David James"]
12
- s.date = %q{2010-04-05}
12
+ s.date = %q{2010-04-23}
13
13
  s.description = %q{A DSL for creating RESTful actions with Sinatra and MongoMapper. It embraces the Resource Oriented Architecture as explained by Leonard Richardson and Sam Ruby.}
14
14
  s.email = %q{djames@sunlightfoundation.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 18
9
- version: 0.4.18
8
+ - 19
9
+ version: 0.4.19
10
10
  platform: ruby
11
11
  authors:
12
12
  - David James
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-05 00:00:00 -04:00
17
+ date: 2010-04-23 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency