clouder 0.5.1 → 0.5.2

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.
@@ -0,0 +1,3 @@
1
+ tȭ*$����Б� B��?���܅N��@�v��#��e �������?kZt����$e
2
+ ͍�(��+��
3
+ ���U� �V=� �9'�:Ib:�I��s���A�wȸ�\�oD7�^�{Ѣ} }�����?�0~��.��Q�E��D0DM��㝇�(�?yH�D���>��I&z��?��P3�
@@ -1,3 +1,7 @@
1
+ == 0.5.2 2010-04-04
2
+
3
+ * A one-line fix to address the new rest-client response object API. (Thanks to Larry Staton Jr.)
4
+
1
5
  == 0.5.1 2009-03-09
2
6
 
3
7
  * (timshadel) Added a simple fix to make Note.get(”/notes/“) work.
@@ -1,13 +1,18 @@
1
1
  History.txt
2
2
  Manifest.txt
3
- PostInstall.txt
4
- README.rdoc
3
+ README.txt
5
4
  Rakefile
5
+ VERSION
6
6
  lib/clouder.rb
7
7
  lib/clouder/entity.rb
8
8
  lib/clouder/rest.rb
9
9
  spec/clouder_spec.rb
10
+ spec/config.ru
10
11
  spec/entity_spec.rb
11
12
  spec/spec_helper.rb
12
13
  spec/spec.opts
13
14
  spec/config.ru
15
+ spec/spec_helper.rb
16
+ tasks/rcov.rake
17
+ tasks/rspec.rake
18
+ tasks/server.rake
@@ -91,7 +91,10 @@ exposing "*notes*".
91
91
 
92
92
  == REQUIREMENTS:
93
93
 
94
- CloudKit API (http://getcloudkit.com/rest-api.html) Checklist:
94
+ * cloudkit
95
+ * rest-client
96
+
97
+ == CloudKit API (http://getcloudkit.com/rest-api.html) Checklist:
95
98
 
96
99
  * GET /cloudkit-meta - OK!
97
100
  * OPTIONS /%uri% - OK!
@@ -110,6 +113,20 @@ CloudKit API (http://getcloudkit.com/rest-api.html) Checklist:
110
113
 
111
114
  * sudo gem install clouder
112
115
 
116
+ == TESTING:
117
+
118
+ Start the test server with (you need rack for this):
119
+
120
+ rake test
121
+
122
+ Then run the specs with:
123
+
124
+ rake spec
125
+
126
+ To have coverage report, run:
127
+
128
+ rake rcov
129
+
113
130
  == LICENSE:
114
131
 
115
132
  (The MIT License)
data/Rakefile CHANGED
@@ -1,28 +1,10 @@
1
- %w[rubygems rake rake/clean fileutils newgem rubigen].each { |f| require f }
2
- require File.dirname(__FILE__) + '/lib/clouder'
1
+ require 'hoe'
3
2
 
4
- # Generate all the Rake tasks
5
- # Run 'rake -T' to see list of generated tasks (from gem root directory)
6
- $hoe = Hoe.new('clouder', Clouder::VERSION) do |p|
7
- p.developer('Demetrius Nunes', 'demetriusnunes@gmail.com')
8
- p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
9
- # p.post_install_message = 'PostInstall.txt' # TODO remove if post-install message not required
10
- p.rubyforge_name = p.name # TODO this is default value
11
- # p.extra_deps = [
12
- # ['activesupport','>= 2.0.2'],
13
- # ]
14
- p.extra_dev_deps = [
15
- ['newgem', ">= #{::Newgem::VERSION}"]
16
- ]
17
-
18
- p.clean_globs |= %w[**/.DS_Store tmp *.log]
19
- path = (p.rubyforge_name == p.name) ? p.rubyforge_name : "\#{p.rubyforge_name}/\#{p.name}"
20
- p.remote_rdoc_dir = File.join(path.gsub(/^#{p.rubyforge_name}\/?/,''), 'rdoc')
21
- p.rsync_args = '-av --delete --ignore-errors'
3
+ Hoe.spec('clouder') do
4
+ developer 'Demetrius Nunes', 'demetriusnunes@gmail.com'
5
+ extra_deps << [ 'rest-client', '>= 0' ]
22
6
  end
23
7
 
24
- require 'newgem/tasks' # load /tasks/*.rake
25
8
  Dir['tasks/**/*.rake'].each { |t| load t }
26
9
 
27
- # TODO - want other tests/tasks run by default? Add them to the list
28
- # task :default => [:spec, :features]
10
+ task :default => :spec
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.5.2
@@ -9,7 +9,7 @@ require 'clouder/rest'
9
9
 
10
10
  # The Clouder module holds global server-wide functions.
11
11
  module Clouder
12
- VERSION = '0.5.1'
12
+ VERSION = '0.5.2'
13
13
 
14
14
  # Returns an array of URIs of the resources exposed by
15
15
  # the CloudKit server at the +uri+.
File without changes
@@ -49,7 +49,7 @@ class Rest
49
49
 
50
50
  def parse(response, opts = {})
51
51
  if response
52
- json = JSON.parse(response, opts)
52
+ json = JSON.parse(response.body, opts)
53
53
  json.extend(ResponseHeaders)
54
54
  json.headers = response.headers
55
55
  json
File without changes
File without changes
@@ -9,6 +9,18 @@ describe "Entity" do
9
9
  Note.all(:resolved => true).each { |n| n.delete }
10
10
  end
11
11
 
12
+ it "should retrieve all instances with ids" do
13
+ size = Note.all.size
14
+ notes = []
15
+ notes << Note.create(:text => "note 1")
16
+ notes << Note.create(:text => "note 2")
17
+
18
+ notes = Note.all(:resolved => true)
19
+ notes.each_with_index { |n, i|
20
+ n.id.should == notes[i].id
21
+ }
22
+ end
23
+
12
24
  it "should let each class be associated with a different uri" do
13
25
  class Comment < Clouder::Entity
14
26
  uri "http://localhost:9292/comments"
File without changes
File without changes
@@ -0,0 +1,4 @@
1
+ desc "Run the specs under spec with code coverage by rcov"
2
+ task :rcov do
3
+ `rcov -i "^lib" -x ".*" spec/*.rb`
4
+ end
@@ -0,0 +1,21 @@
1
+ begin
2
+ require 'spec'
3
+ rescue LoadError
4
+ require 'rubygems'
5
+ require 'spec'
6
+ end
7
+ begin
8
+ require 'spec/rake/spectask'
9
+ rescue LoadError
10
+ puts <<-EOS
11
+ To use rspec for testing you must install rspec gem:
12
+ gem install rspec
13
+ EOS
14
+ exit(0)
15
+ end
16
+
17
+ desc "Run the specs under spec"
18
+ Spec::Rake::SpecTask.new do |t|
19
+ t.spec_opts = ['--options', "spec/spec.opts"]
20
+ t.spec_files = FileList['spec/**/*_spec.rb']
21
+ end
@@ -0,0 +1,4 @@
1
+ desc "Run the test server"
2
+ task :server do
3
+ `rackup spec/config.ru`
4
+ end
metadata CHANGED
@@ -1,38 +1,86 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clouder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 5
8
+ - 2
9
+ version: 0.5.2
5
10
  platform: ruby
6
11
  authors:
7
12
  - Demetrius Nunes
8
13
  autorequire:
9
14
  bindir: bin
10
- cert_chain: []
15
+ cert_chain:
16
+ - |
17
+ -----BEGIN CERTIFICATE-----
18
+ MIIDPjCCAiagAwIBAgIBADANBgkqhkiG9w0BAQUFADBFMRcwFQYDVQQDDA5kZW1l
19
+ dHJpdXNudW5lczEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQB
20
+ GRYDY29tMB4XDTEwMDQwNDE2NDkxNFoXDTExMDQwNDE2NDkxNFowRTEXMBUGA1UE
21
+ AwwOZGVtZXRyaXVzbnVuZXMxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmS
22
+ JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMHx
23
+ gRYxP0vOvL8ygNCaZkH/IIKO3t0rrbgpcyIAA7sa3u4Xzqg7hUINeVTqFpsSHHZH
24
+ x99XnCHbIdtjKLTpZhqb6TrSstkRU1RN9Xvl24wxqI+BfJogYCpbd3JBQnU0tNxy
25
+ C7EjyOo385pe7ZJt+LG4a1PdtWaaCxLMpgrKo+UTR8knpGX0Ll3fBpIdVetZp/Hp
26
+ FcFLmEOVBtFfENUGrrcl4YBZAJoYfmD7x6rnvWGWWHvzqPLkqxyjQ9O2Q26oZpC0
27
+ z8K1mha6HmFeaz+nSaUOtUN4w+3gxsWkmd/1RFbLhu4RTbx0lK2uMFmQIVPljE3q
28
+ /mHHw6fvjKGA5lwKE9UCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
29
+ HQYDVR0OBBYEFI4zQJPy4gYjwTJp0PIS0dic68GWMA0GCSqGSIb3DQEBBQUAA4IB
30
+ AQBPa94XrVhsKGXqeq6iCnGSq8eqeVKi540uRX9drhvG+XjA6vUAy3PewyDdnfhS
31
+ acc85aw12DpiyRz3m3CM8KYzAGorsXS2vBy2gfOW0BcILYstmCRZjp4GQZASxcgr
32
+ pkdzntRzRDJc9o87VrZ0yw4kjc6lQFyz8cveL/+0kfbf7fTJg4vlwuf80TfIuArf
33
+ H8jcPZLAVpT0g2lDvNUD+jtMUiMjFBkd4NeQQDwNfNFKoUGUNFt2bk4gvUsBa4m1
34
+ OQwBd1iwB5eI+mXBhwgE2jJWYEg92GpQSwm4u8Zh158SNXIabwAZpzogyrmpx/nl
35
+ kmZ27z//zac0P5RP8jb94wIq
36
+ -----END CERTIFICATE-----
11
37
 
12
- date: 2009-03-09 00:00:00 -03:00
38
+ date: 2010-04-04 00:00:00 -03:00
13
39
  default_executable:
14
40
  dependencies:
15
41
  - !ruby/object:Gem::Dependency
16
- name: newgem
17
- type: :development
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
42
+ name: rest-client
43
+ prerelease: false
44
+ requirement: &id001 !ruby/object:Gem::Requirement
20
45
  requirements:
21
46
  - - ">="
22
47
  - !ruby/object:Gem::Version
23
- version: 1.2.3
24
- version:
48
+ segments:
49
+ - 0
50
+ version: "0"
51
+ type: :runtime
52
+ version_requirements: *id001
25
53
  - !ruby/object:Gem::Dependency
26
- name: hoe
54
+ name: rubyforge
55
+ prerelease: false
56
+ requirement: &id002 !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ segments:
61
+ - 2
62
+ - 0
63
+ - 4
64
+ version: 2.0.4
27
65
  type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
66
+ version_requirements: *id002
67
+ - !ruby/object:Gem::Dependency
68
+ name: hoe
69
+ prerelease: false
70
+ requirement: &id003 !ruby/object:Gem::Requirement
30
71
  requirements:
31
72
  - - ">="
32
73
  - !ruby/object:Gem::Version
33
- version: 1.8.0
34
- version:
35
- description: A Ruby client library for accessing CloudKit (http://getcloudkit.com) RESTful repositories using simple Ruby objects.
74
+ segments:
75
+ - 2
76
+ - 6
77
+ - 0
78
+ version: 2.6.0
79
+ type: :development
80
+ version_requirements: *id003
81
+ description: |-
82
+ A Ruby client library for accessing CloudKit (http://getcloudkit.com)
83
+ RESTful repositories using simple Ruby objects.
36
84
  email:
37
85
  - demetriusnunes@gmail.com
38
86
  executables: []
@@ -42,48 +90,54 @@ extensions: []
42
90
  extra_rdoc_files:
43
91
  - History.txt
44
92
  - Manifest.txt
45
- - PostInstall.txt
46
- - README.rdoc
93
+ - README.txt
47
94
  files:
48
95
  - History.txt
49
96
  - Manifest.txt
50
- - PostInstall.txt
51
- - README.rdoc
97
+ - README.txt
52
98
  - Rakefile
99
+ - VERSION
53
100
  - lib/clouder.rb
54
101
  - lib/clouder/entity.rb
55
102
  - lib/clouder/rest.rb
56
103
  - spec/clouder_spec.rb
104
+ - spec/config.ru
57
105
  - spec/entity_spec.rb
58
106
  - spec/spec_helper.rb
59
107
  - spec/spec.opts
60
- - spec/config.ru
108
+ - tasks/rcov.rake
109
+ - tasks/rspec.rake
110
+ - tasks/server.rake
61
111
  has_rdoc: true
62
112
  homepage: http://github.com/demetriusnunes/clouder
113
+ licenses: []
114
+
63
115
  post_install_message:
64
116
  rdoc_options:
65
117
  - --main
66
- - README.rdoc
118
+ - README.txt
67
119
  require_paths:
68
120
  - lib
69
121
  required_ruby_version: !ruby/object:Gem::Requirement
70
122
  requirements:
71
123
  - - ">="
72
124
  - !ruby/object:Gem::Version
125
+ segments:
126
+ - 0
73
127
  version: "0"
74
- version:
75
128
  required_rubygems_version: !ruby/object:Gem::Requirement
76
129
  requirements:
77
130
  - - ">="
78
131
  - !ruby/object:Gem::Version
132
+ segments:
133
+ - 0
79
134
  version: "0"
80
- version:
81
135
  requirements: []
82
136
 
83
137
  rubyforge_project: clouder
84
- rubygems_version: 1.3.1
138
+ rubygems_version: 1.3.6
85
139
  signing_key:
86
- specification_version: 2
140
+ specification_version: 3
87
141
  summary: A Ruby client library for accessing CloudKit (http://getcloudkit.com) RESTful repositories using simple Ruby objects.
88
142
  test_files: []
89
143
 
Binary file
File without changes