datacatalog 0.4.19 → 0.4.20
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/Rakefile +1 -1
- data/datacatalog.gemspec +2 -2
- data/lib/resources/categorization.rb +4 -0
- data/lib/resources/category.rb +4 -0
- data/lib/resources/comment.rb +4 -0
- data/lib/resources/document.rb +4 -0
- data/lib/resources/download.rb +4 -0
- data/lib/resources/favorite.rb +4 -0
- data/lib/resources/note.rb +4 -0
- data/lib/resources/rating.rb +4 -0
- data/spec/spec_helper.rb +10 -7
- metadata +4 -4
data/Gemfile.lock
CHANGED
data/Rakefile
CHANGED
@@ -4,7 +4,7 @@ begin
|
|
4
4
|
require 'jeweler'
|
5
5
|
Jeweler::Tasks.new do |gem|
|
6
6
|
gem.name = "datacatalog"
|
7
|
-
gem.version = '0.4.
|
7
|
+
gem.version = '0.4.20'
|
8
8
|
gem.summary = %Q{Client for the National Data Catalog API}
|
9
9
|
gem.description = %Q{A Ruby client library for the National Data Catalog API}
|
10
10
|
gem.email = "luigi@sunlightfoundation.com"
|
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.
|
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 = ["Luigi Montanez", "David James"]
|
12
|
-
s.date = %q{2010-09-
|
12
|
+
s.date = %q{2010-09-29}
|
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/category.rb
CHANGED
data/lib/resources/comment.rb
CHANGED
data/lib/resources/document.rb
CHANGED
data/lib/resources/download.rb
CHANGED
data/lib/resources/favorite.rb
CHANGED
data/lib/resources/note.rb
CHANGED
data/lib/resources/rating.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -25,14 +25,17 @@ KLASSES = [
|
|
25
25
|
]
|
26
26
|
|
27
27
|
def clean_slate
|
28
|
-
DataCatalog::User
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
28
|
+
delete_all(DataCatalog::User) { |u| u.name != "Primary Admin" }
|
29
|
+
KLASSES.each { |klass| delete_all(klass) }
|
30
|
+
end
|
31
|
+
|
32
|
+
def delete_all(klass)
|
33
|
+
list = []
|
34
|
+
klass.all.each do |instance|
|
35
|
+
test = block_given? ? yield(instance) : true
|
36
|
+
list << instance.id if test
|
35
37
|
end
|
38
|
+
list.each { |id| klass.destroy(id) }
|
36
39
|
end
|
37
40
|
|
38
41
|
def mangle(string)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: datacatalog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 39
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 20
|
10
|
+
version: 0.4.20
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Luigi Montanez
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-09-
|
19
|
+
date: 2010-09-29 00:00:00 -04:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|