datacatalog 0.4.10 → 0.4.11

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.10'
8
+ gem.version = '0.4.11'
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.10"
8
+ s.version = "0.4.11"
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-02-05}
12
+ s.date = %q{2010-03-12}
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 = [
@@ -65,7 +65,7 @@ Gem::Specification.new do |s|
65
65
  s.rdoc_options = ["--charset=UTF-8"]
66
66
  s.require_paths = ["lib"]
67
67
  s.rubyforge_project = %q{datacatalog}
68
- s.rubygems_version = %q{1.3.5}
68
+ s.rubygems_version = %q{1.3.6}
69
69
  s.summary = %q{Client for the National Data Catalog API}
70
70
  s.test_files = [
71
71
  "spec/about_spec.rb",
data/lib/base.rb CHANGED
@@ -84,8 +84,8 @@ module DataCatalog
84
84
  filtered_conditions = conditions.map do |k, v|
85
85
  "#{k}" + if v.is_a?(Regexp)
86
86
  %(:"#{v.source}")
87
- elsif v.is_a?(Integer)
88
- %(=#{v})
87
+ elsif v.is_a?(Integer) || v.is_a?(TrueClass) || v.is_a?(FalseClass)
88
+ %(=#{v})
89
89
  else
90
90
  %(="#{v}")
91
91
  end
data/lib/datacatalog.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'rubygems'
2
2
  require 'active_support'
3
+ require 'json'
3
4
  gem 'httparty'
4
5
  require 'httparty'
5
6
  require 'mash'
data/spec/api_key_spec.rb CHANGED
@@ -43,7 +43,7 @@ describe ApiKey do
43
43
  @api_keys.map(&:key_type).should == %w(primary application)
44
44
  end
45
45
  end
46
-
46
+
47
47
  describe ".all with conditions" do
48
48
  before do
49
49
  @user = create_user_with_2_keys
@@ -60,7 +60,7 @@ describe ApiKey do
60
60
  @api_keys.map(&:key_type).should == %w(application)
61
61
  end
62
62
  end
63
-
63
+
64
64
  describe ".create" do
65
65
  it "should create a new API key from basic params" do
66
66
  user = create_user_with_2_keys
@@ -72,7 +72,7 @@ describe ApiKey do
72
72
  api_key.key_type.should == "valet"
73
73
  end
74
74
  end
75
-
75
+
76
76
  describe ".first" do
77
77
  before do
78
78
  @user = create_user_with_2_keys
@@ -89,7 +89,7 @@ describe ApiKey do
89
89
  api_key.should be_nil
90
90
  end
91
91
  end
92
-
92
+
93
93
  describe ".get" do
94
94
  before do
95
95
  @user = create_user_with_2_keys
@@ -108,7 +108,7 @@ describe ApiKey do
108
108
  end.should raise_error(NotFound)
109
109
  end
110
110
  end
111
-
111
+
112
112
  describe ".update" do
113
113
  before do
114
114
  @user = create_user_with_2_keys
data/spec/base_spec.rb CHANGED
@@ -137,6 +137,14 @@ describe Base do
137
137
  end
138
138
  end
139
139
 
140
+ it "should work with boolean true" do
141
+ Base.filterize('is_awesome' => true).should == %(is_awesome=true)
142
+ end
143
+
144
+ it "should work with boolean false" do
145
+ Base.filterize('is_suck' => false).should == %(is_suck=false)
146
+ end
147
+
140
148
  it "should raise ArgumentError when appropriate" do
141
149
  [nil, [1]].each do |arg|
142
150
  executing { Base.filterize(arg) }.should raise_error(ArgumentError)
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datacatalog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.10
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 4
8
+ - 11
9
+ version: 0.4.11
5
10
  platform: ruby
6
11
  authors:
7
12
  - Luigi Montanez
@@ -10,69 +15,93 @@ autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
17
 
13
- date: 2010-02-05 00:00:00 -05:00
18
+ date: 2010-03-12 00:00:00 -05:00
14
19
  default_executable:
15
20
  dependencies:
16
21
  - !ruby/object:Gem::Dependency
17
22
  name: activesupport
18
- type: :runtime
19
- version_requirement:
20
- version_requirements: !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
21
25
  requirements:
22
26
  - - ">="
23
27
  - !ruby/object:Gem::Version
28
+ segments:
29
+ - 2
30
+ - 3
31
+ - 5
24
32
  version: 2.3.5
25
- version:
33
+ type: :runtime
34
+ version_requirements: *id001
26
35
  - !ruby/object:Gem::Dependency
27
36
  name: httparty
28
- type: :runtime
29
- version_requirement:
30
- version_requirements: !ruby/object:Gem::Requirement
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
31
39
  requirements:
32
40
  - - ">="
33
41
  - !ruby/object:Gem::Version
42
+ segments:
43
+ - 0
44
+ - 5
45
+ - 2
34
46
  version: 0.5.2
35
- version:
47
+ type: :runtime
48
+ version_requirements: *id002
36
49
  - !ruby/object:Gem::Dependency
37
50
  name: mash
38
- type: :runtime
39
- version_requirement:
40
- version_requirements: !ruby/object:Gem::Requirement
51
+ prerelease: false
52
+ requirement: &id003 !ruby/object:Gem::Requirement
41
53
  requirements:
42
54
  - - ">="
43
55
  - !ruby/object:Gem::Version
56
+ segments:
57
+ - 0
58
+ - 0
59
+ - 3
44
60
  version: 0.0.3
45
- version:
61
+ type: :runtime
62
+ version_requirements: *id003
46
63
  - !ruby/object:Gem::Dependency
47
64
  name: version_string
48
- type: :runtime
49
- version_requirement:
50
- version_requirements: !ruby/object:Gem::Requirement
65
+ prerelease: false
66
+ requirement: &id004 !ruby/object:Gem::Requirement
51
67
  requirements:
52
68
  - - ">="
53
69
  - !ruby/object:Gem::Version
70
+ segments:
71
+ - 0
72
+ - 1
73
+ - 0
54
74
  version: 0.1.0
55
- version:
75
+ type: :runtime
76
+ version_requirements: *id004
56
77
  - !ruby/object:Gem::Dependency
57
78
  name: jeweler
58
- type: :development
59
- version_requirement:
60
- version_requirements: !ruby/object:Gem::Requirement
79
+ prerelease: false
80
+ requirement: &id005 !ruby/object:Gem::Requirement
61
81
  requirements:
62
82
  - - ">="
63
83
  - !ruby/object:Gem::Version
84
+ segments:
85
+ - 1
86
+ - 2
87
+ - 1
64
88
  version: 1.2.1
65
- version:
89
+ type: :development
90
+ version_requirements: *id005
66
91
  - !ruby/object:Gem::Dependency
67
92
  name: rspec
68
- type: :development
69
- version_requirement:
70
- version_requirements: !ruby/object:Gem::Requirement
93
+ prerelease: false
94
+ requirement: &id006 !ruby/object:Gem::Requirement
71
95
  requirements:
72
96
  - - ">="
73
97
  - !ruby/object:Gem::Version
98
+ segments:
99
+ - 1
100
+ - 2
101
+ - 8
74
102
  version: 1.2.8
75
- version:
103
+ type: :development
104
+ version_requirements: *id006
76
105
  description: A Ruby client library for the National Data Catalog API
77
106
  email: luigi@sunlightfoundation.com
78
107
  executables: []
@@ -139,18 +168,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
139
168
  requirements:
140
169
  - - ">="
141
170
  - !ruby/object:Gem::Version
171
+ segments:
172
+ - 0
142
173
  version: "0"
143
- version:
144
174
  required_rubygems_version: !ruby/object:Gem::Requirement
145
175
  requirements:
146
176
  - - ">="
147
177
  - !ruby/object:Gem::Version
178
+ segments:
179
+ - 0
148
180
  version: "0"
149
- version:
150
181
  requirements: []
151
182
 
152
183
  rubyforge_project: datacatalog
153
- rubygems_version: 1.3.5
184
+ rubygems_version: 1.3.6
154
185
  signing_key:
155
186
  specification_version: 3
156
187
  summary: Client for the National Data Catalog API