confluence-soap 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/VERSION +1 -1
- data/confluence-soap.gemspec +2 -2
- data/lib/confluence-soap.rb +9 -2
- data/spec/confluence-soap_spec.rb +23 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04288c8b8c82b09384b32940b3e02867c297eb3c
|
4
|
+
data.tar.gz: 491c4e80e6cf0ac97f4a83abe55e1bad6901802a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02739de58951db7bd6f0f0d10d6f26275dd813bdde33776af409ef8d730653cc70affdb0646b401cc2cf7d16d6f4b87957a3a59424bd6a9bf58fa0170dd222d2
|
7
|
+
data.tar.gz: 2b804c88c24c7aa28a5b4b64bc82b390d27df80e890ec3e7750435ccd1382db6e69ac7ce369f61524317396c5b37d3e0a435c176d65ab4b7da0303175751bb53
|
data/README.md
CHANGED
@@ -31,7 +31,7 @@ against, as running the specs will delete all pages in that space.
|
|
31
31
|
* Fork the project.
|
32
32
|
* Start a feature/bugfix branch.
|
33
33
|
* Commit and push until you are happy with your contribution.
|
34
|
-
* Make sure to add tests for it
|
34
|
+
* Make sure to add tests for it: `bundle exec rake`. This is important so I don't break it in a future version unintentionally.
|
35
35
|
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
36
36
|
|
37
37
|
### Credits
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.10
|
data/confluence-soap.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "confluence-soap"
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.10"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ping Yu", "Eric Himmelreich"]
|
12
|
-
s.date = "2014-
|
12
|
+
s.date = "2014-07-16"
|
13
13
|
s.description = ""
|
14
14
|
s.email = ["ping@intridea.com", "eric@intridea.com"]
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/confluence-soap.rb
CHANGED
@@ -77,15 +77,22 @@ class ConfluenceSoap
|
|
77
77
|
Page.from_hash(parse_response(:store_page, response))
|
78
78
|
end
|
79
79
|
|
80
|
-
def update_page(page)
|
80
|
+
def update_page(page, options = {minorEdit: true})
|
81
81
|
response = execute do
|
82
82
|
client.call(:update_page,
|
83
|
-
auth_message({in1: page.to_soap, in2:
|
83
|
+
auth_message({in1: page.to_soap, in2: options }))
|
84
84
|
end
|
85
85
|
|
86
86
|
Page.from_hash(parse_response(:update_page, response))
|
87
87
|
end
|
88
88
|
|
89
|
+
def convert_wiki_to_storage_format(text)
|
90
|
+
response = execute do
|
91
|
+
client.call(:convert_wiki_to_storage_format, auth_message({in1: text}))
|
92
|
+
end
|
93
|
+
parse_response(:convert_wiki_to_storage_format, response)
|
94
|
+
end
|
95
|
+
|
89
96
|
def remove_page(page_id)
|
90
97
|
response = execute do
|
91
98
|
client.call(:remove_page, auth_message({in1: page_id}))
|
@@ -125,6 +125,29 @@ describe ConfluenceSoap do
|
|
125
125
|
end
|
126
126
|
end
|
127
127
|
|
128
|
+
describe '#update_page_with_options' do
|
129
|
+
it 'should store page given specified options with savon' do
|
130
|
+
ignore_request do
|
131
|
+
@page = subject.get_pages(space).first
|
132
|
+
end
|
133
|
+
|
134
|
+
VCR.use_cassette(:update_page) do
|
135
|
+
@page.content = 'my edits'
|
136
|
+
options = {minorEdit: true, versionComment: 'uploaded by confluence-soap'}
|
137
|
+
subject.update_page(@page, options).should be_instance_of(ConfluenceSoap::Page)
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
describe '#convert_wiki_to_storage_format' do
|
143
|
+
it 'should covert wiki to Confluence storage format' do
|
144
|
+
ignore_request do
|
145
|
+
subject.convert_wiki_to_storage_format('h2. Heading')
|
146
|
+
.should == '<h2>Heading</h2>'
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
128
151
|
describe '#search' do
|
129
152
|
it 'should search with savon' do
|
130
153
|
VCR.use_cassette(:search_without_results) do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: confluence-soap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ping Yu
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-07-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: savon
|