datacatalog 0.4.14 → 0.4.15

Sign up to get free protection for your applications and to get access to all the features.
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.4.14'
8
+ gem.version = '0.4.15'
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.4.14"
8
+ s.version = "0.4.15"
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{2010-04-28}
12
+ s.date = %q{2010-04-30}
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 = [
@@ -33,8 +33,8 @@ Gem::Specification.new do |s|
33
33
  "lib/resources/document.rb",
34
34
  "lib/resources/download.rb",
35
35
  "lib/resources/favorite.rb",
36
- "lib/resources/importers.rb",
37
- "lib/resources/imports.rb",
36
+ "lib/resources/import.rb",
37
+ "lib/resources/importer.rb",
38
38
  "lib/resources/note.rb",
39
39
  "lib/resources/organization.rb",
40
40
  "lib/resources/rating.rb",
@@ -6,22 +6,26 @@ module DataCatalog
6
6
  cursor(uri, query_hash(conditions))
7
7
  end
8
8
 
9
- def self.get(id)
10
- one(http_get(uri(id)))
11
- end
12
-
13
9
  def self.create(params={})
14
10
  one(http_post(uri, :body => params))
15
11
  end
16
12
 
17
- def self.update(id, params={})
18
- one(http_put(uri(id), :body => params))
19
- end
20
-
21
13
  def self.destroy(id)
22
14
  one(http_delete(uri(id)))
23
15
  end
24
16
 
17
+ def self.first(conditions={})
18
+ _first(http_get(uri, :query => query_hash(conditions)))
19
+ end
20
+
21
+ def self.get(id)
22
+ one(http_get(uri(id)))
23
+ end
24
+
25
+ def self.update(id, params={})
26
+ one(http_put(uri(id), :body => params))
27
+ end
28
+
25
29
  # == Helpers
26
30
 
27
31
  def self.uri(id=nil)
@@ -6,22 +6,26 @@ module DataCatalog
6
6
  cursor(uri, query_hash(conditions))
7
7
  end
8
8
 
9
- def self.get(id)
10
- one(http_get(uri(id)))
11
- end
12
-
13
9
  def self.create(params={})
14
10
  one(http_post(uri, :body => params))
15
11
  end
16
12
 
17
- def self.update(id, params={})
18
- one(http_put(uri(id), :body => params))
19
- end
20
-
21
13
  def self.destroy(id)
22
14
  one(http_delete(uri(id)))
23
15
  end
24
16
 
17
+ def self.first(conditions={})
18
+ _first(http_get(uri, :query => query_hash(conditions)))
19
+ end
20
+
21
+ def self.get(id)
22
+ one(http_get(uri(id)))
23
+ end
24
+
25
+ def self.update(id, params={})
26
+ one(http_put(uri(id), :body => params))
27
+ end
28
+
25
29
  # == Helpers
26
30
 
27
31
  def self.uri(id=nil)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 14
9
- version: 0.4.14
8
+ - 15
9
+ version: 0.4.15
10
10
  platform: ruby
11
11
  authors:
12
12
  - Luigi Montanez
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-04-28 00:00:00 -04:00
18
+ date: 2010-04-30 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -128,8 +128,8 @@ files:
128
128
  - lib/resources/document.rb
129
129
  - lib/resources/download.rb
130
130
  - lib/resources/favorite.rb
131
- - lib/resources/importers.rb
132
- - lib/resources/imports.rb
131
+ - lib/resources/import.rb
132
+ - lib/resources/importer.rb
133
133
  - lib/resources/note.rb
134
134
  - lib/resources/organization.rb
135
135
  - lib/resources/rating.rb