sinatra_resource 0.4.19 → 0.4.20

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.19
1
+ 0.4.20
@@ -27,7 +27,7 @@ module DataCatalog
27
27
  URI.join(base_uri, path).to_s
28
28
  end
29
29
 
30
- def log_event(event, object)
30
+ def log_event(event, params)
31
31
  # Application-logic could go here.
32
32
  end
33
33
 
data/lib/builder.rb CHANGED
@@ -72,6 +72,7 @@ module SinatraResource
72
72
  document_count = document_count_for_get_many(model, resource_config, nil, nil)
73
73
  page_count = calculate_page_count(document_count, ITEMS_PER_PAGE)
74
74
  resources = build_resources(documents, resource_config, page, page_count, document_count, ITEMS_PER_PAGE)
75
+ log_event(:get_many, params)
75
76
  display(:list, resources, resource_config)
76
77
  end
77
78
  else
@@ -90,6 +91,7 @@ module SinatraResource
90
91
  document_count = document_count_for_get_many(model, resource_config, parent_document, child_assoc)
91
92
  page_count = calculate_page_count(document_count, ITEMS_PER_PAGE)
92
93
  resources = build_resources(documents, resource_config, page, page_count, document_count, ITEMS_PER_PAGE)
94
+ log_event(:get_many, params)
93
95
  display(:list, resources, resource_config, parent_id)
94
96
  end
95
97
  end
@@ -367,10 +367,10 @@ module SinatraResource
367
367
  # Applications may override this method.
368
368
  #
369
369
  # @param [Symbol] event
370
- # @param [Object] object
370
+ # @param [Hash] params
371
371
  #
372
372
  # @return [undefined]
373
- def log_event(event, object)
373
+ def log_event(event, params)
374
374
  end
375
375
 
376
376
  # Lookup the role, using +document+ if specified.
@@ -370,7 +370,6 @@ 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)
374
373
  { :_keywords => { '$all' => words } }
375
374
  elsif filter_string
376
375
  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.19"
8
+ s.version = "0.4.20"
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-23}
12
+ s.date = %q{2010-04-26}
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
- - 19
9
- version: 0.4.19
8
+ - 20
9
+ version: 0.4.20
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-23 00:00:00 -04:00
17
+ date: 2010-04-26 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency