confluence-client 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY CHANGED
@@ -1,3 +1,7 @@
1
+ 2011-05-03 v0.0.7
2
+ - Improved error reporting
3
+ - Better validation of space keys in 'Confluence::Client#add_space'
4
+
1
5
  2011-04-08 v0.0.6
2
6
  - Added 'Client#add_permission_to_space'
3
7
  - Added 'Client#remove_permission_from_space'
@@ -121,8 +121,8 @@ module Confluence # :nodoc:
121
121
  raise ArgumentError if url.nil? || url.empty?
122
122
  url += '/rpc/xmlrpc' unless url =~ /\/rpc\/xmlrpc$/
123
123
  @server = XMLRPC::Client.new2(url)
124
- @server.timeout = 305 # XXX
125
- @confluence = @server.proxy_async('confluence1') # XXX
124
+ #@server.timeout = 305 # XXX
125
+ @confluence = @server.proxy('confluence1') # XXX
126
126
 
127
127
  @error = nil
128
128
  @password = nil
@@ -172,8 +172,12 @@ module Confluence # :nodoc:
172
172
  # +name+:: Name of space.
173
173
  # +description+:: Description for space.
174
174
  def add_space(key, name, description)
175
- space = addSpace( { 'key' => key, 'name' => name, 'description' => description } )
176
- return space if ok?
175
+ if key =~ /^[a-zA-Z0-9]*$/
176
+ space = addSpace( { 'key' => key, 'name' => name, 'description' => description } )
177
+ return space if ok?
178
+ else
179
+ @error = 'space keys may only contain [a-zA-Z0-9]'
180
+ end
177
181
  nil
178
182
  end
179
183
 
@@ -327,6 +331,7 @@ module Confluence # :nodoc:
327
331
  # +txt+:: Exception text to clean up.
328
332
  def tidy_exception(txt)
329
333
  txt.gsub!( /^java.lang.Exception: com.atlassian.confluence.rpc.RemoteException:\s+/, '' )
334
+ txt ||= 'unknown exception'
330
335
  end
331
336
 
332
337
  end # class Client
@@ -1,5 +1,5 @@
1
1
  module Confluence
2
2
  class Client
3
- VERSION = '0.0.6'
3
+ VERSION = '0.0.7'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,35 +1,39 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: confluence-client
3
- version: !ruby/object:Gem::Version
4
- version: 0.0.6
3
+ version: !ruby/object:Gem::Version
5
4
  prerelease:
5
+ version: 0.0.7
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Blair Christensen
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-04-08 00:00:00.000000000 -05:00
12
+
13
+ date: 2011-05-03 00:00:00 -05:00
13
14
  default_executable:
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
16
17
  name: rspec
17
- requirement: &2157796140 !ruby/object:Gem::Requirement
18
+ prerelease: false
19
+ requirement: &id001 !ruby/object:Gem::Requirement
18
20
  none: false
19
- requirements:
20
- - - ! '>='
21
- - !ruby/object:Gem::Version
21
+ requirements:
22
+ - - ">="
23
+ - !ruby/object:Gem::Version
22
24
  version: 2.5.0
23
25
  type: :development
24
- prerelease: false
25
- version_requirements: *2157796140
26
+ version_requirements: *id001
26
27
  description: Ruby client for the Confluence XML::RPC API
27
- email:
28
+ email:
28
29
  - blair.christensen@gmail.com
29
30
  executables: []
31
+
30
32
  extensions: []
33
+
31
34
  extra_rdoc_files: []
32
- files:
35
+
36
+ files:
33
37
  - .gitignore
34
38
  - Gemfile
35
39
  - HISTORY
@@ -43,28 +47,31 @@ files:
43
47
  has_rdoc: true
44
48
  homepage: https://github.com/blairc/confluence-client
45
49
  licenses: []
50
+
46
51
  post_install_message:
47
52
  rdoc_options: []
48
- require_paths:
53
+
54
+ require_paths:
49
55
  - lib
50
- required_ruby_version: !ruby/object:Gem::Requirement
56
+ required_ruby_version: !ruby/object:Gem::Requirement
51
57
  none: false
52
- requirements:
53
- - - ! '>='
54
- - !ruby/object:Gem::Version
55
- version: '0'
56
- required_rubygems_version: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: "0"
62
+ required_rubygems_version: !ruby/object:Gem::Requirement
57
63
  none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: "0"
62
68
  requirements: []
69
+
63
70
  rubyforge_project: confluence-client
64
- rubygems_version: 1.6.0
71
+ rubygems_version: 1.6.2
65
72
  signing_key:
66
73
  specification_version: 3
67
74
  summary: Ruby client for the Confluence XML::RPC API
68
- test_files:
75
+ test_files:
69
76
  - spec/confluence_spec.rb
70
77
  - spec/spec_helper.rb