datacatalog 0.3.7 → 0.3.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/Rakefile +1 -1
- data/datacatalog.gemspec +2 -2
- data/lib/resources/comment.rb +1 -1
- data/lib/resources/document.rb +1 -1
- data/lib/resources/note.rb +1 -1
- data/lib/resources/organization.rb +8 -4
- data/lib/resources/rating.rb +1 -1
- data/lib/resources/source.rb +5 -5
- metadata +2 -2
data/Rakefile
CHANGED
@@ -5,7 +5,7 @@ begin
|
|
5
5
|
require 'jeweler'
|
6
6
|
Jeweler::Tasks.new do |gem|
|
7
7
|
gem.name = "datacatalog"
|
8
|
-
gem.version = '0.3.
|
8
|
+
gem.version = '0.3.8'
|
9
9
|
gem.rubyforge_project = "datacatalog"
|
10
10
|
gem.summary = %Q{Client for the National Data Catalog API}
|
11
11
|
gem.description = %Q{A Ruby client library for the National Data Catalog API}
|
data/datacatalog.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{datacatalog}
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.8"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Luigi Montanez", "David James"]
|
12
|
-
s.date = %q{2009-12-
|
12
|
+
s.date = %q{2009-12-02}
|
13
13
|
s.description = %q{A Ruby client library for the National Data Catalog API}
|
14
14
|
s.email = %q{luigi@sunlightfoundation.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/resources/comment.rb
CHANGED
data/lib/resources/document.rb
CHANGED
data/lib/resources/note.rb
CHANGED
@@ -13,7 +13,7 @@ module DataCatalog
|
|
13
13
|
def self.destroy(id)
|
14
14
|
one(http_delete(uri(id)))
|
15
15
|
end
|
16
|
-
|
16
|
+
|
17
17
|
def self.first(conditions={})
|
18
18
|
one(http_get(uri, :query => query_hash(conditions)).first)
|
19
19
|
end
|
@@ -21,13 +21,17 @@ module DataCatalog
|
|
21
21
|
def self.get(id)
|
22
22
|
one(http_get(uri(id)))
|
23
23
|
end
|
24
|
-
|
24
|
+
|
25
|
+
def self.search(term)
|
26
|
+
many(http_get(uri, :query => { :search => term }))
|
27
|
+
end
|
28
|
+
|
25
29
|
def self.update(id, params={})
|
26
30
|
one(http_put(uri(id), :body => params))
|
27
31
|
end
|
28
|
-
|
32
|
+
|
29
33
|
# == Helpers
|
30
|
-
|
34
|
+
|
31
35
|
def self.uri(id=nil)
|
32
36
|
"/organizations/#{id}"
|
33
37
|
end
|
data/lib/resources/rating.rb
CHANGED
data/lib/resources/source.rb
CHANGED
@@ -2,14 +2,10 @@ module DataCatalog
|
|
2
2
|
|
3
3
|
class Source < Base
|
4
4
|
|
5
|
-
def self.all(conditions={})
|
5
|
+
def self.all(conditions={})
|
6
6
|
many(http_get(uri, :query => query_hash(conditions)))
|
7
7
|
end
|
8
8
|
|
9
|
-
def self.search(term)
|
10
|
-
many(http_get(uri, :query => { :search => term.downcase }))
|
11
|
-
end
|
12
|
-
|
13
9
|
def self.create(params={})
|
14
10
|
one(http_post(uri, :body => params))
|
15
11
|
end
|
@@ -26,6 +22,10 @@ module DataCatalog
|
|
26
22
|
one(http_get(uri(id)))
|
27
23
|
end
|
28
24
|
|
25
|
+
def self.search(term)
|
26
|
+
many(http_get(uri, :query => { :search => term }))
|
27
|
+
end
|
28
|
+
|
29
29
|
def self.update(id, params={})
|
30
30
|
one(http_put(uri(id), :body => params))
|
31
31
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: datacatalog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luigi Montanez
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-12-
|
13
|
+
date: 2009-12-02 00:00:00 -05:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|