sinatra_resource 0.4.19 → 0.4.20
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/examples/datacatalog/lib/resource.rb +1 -1
- data/lib/builder.rb +2 -0
- data/lib/builder/helpers.rb +2 -2
- data/lib/builder/mongo_helpers.rb +0 -1
- data/sinatra_resource.gemspec +2 -2
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.20
|
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
|
data/lib/builder/helpers.rb
CHANGED
@@ -367,10 +367,10 @@ module SinatraResource
|
|
367
367
|
# Applications may override this method.
|
368
368
|
#
|
369
369
|
# @param [Symbol] event
|
370
|
-
# @param [
|
370
|
+
# @param [Hash] params
|
371
371
|
#
|
372
372
|
# @return [undefined]
|
373
|
-
def log_event(event,
|
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
|
data/sinatra_resource.gemspec
CHANGED
@@ -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.
|
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-
|
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
|
-
-
|
9
|
-
version: 0.4.
|
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-
|
17
|
+
date: 2010-04-26 00:00:00 -04:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|