confluencer 0.4.8 → 0.5.0
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.
- data/.document +1 -1
- data/LICENSE +1 -1
- data/{README → README.rdoc} +1 -1
- data/Rakefile +3 -3
- data/VERSION +1 -1
- data/confluencer.gemspec +9 -7
- data/lib/confluence/blog_entry.rb +12 -1
- data/spec/confluence/blog_entry_spec.rb +92 -0
- metadata +12 -10
data/.document
CHANGED
data/LICENSE
CHANGED
data/{README → README.rdoc}
RENAMED
data/Rakefile
CHANGED
@@ -7,9 +7,9 @@ begin
|
|
7
7
|
gem.name = "confluencer"
|
8
8
|
gem.summary = %Q{Useful classes to manage Confluence.}
|
9
9
|
gem.description = %Q{ActiveRecord-like classes to access Confluence through XMLRPC.}
|
10
|
-
gem.email = "
|
11
|
-
gem.homepage = "http://github.com/
|
12
|
-
gem.authors = ["
|
10
|
+
gem.email = "github@secretsaucepartners.com"
|
11
|
+
gem.homepage = "http://github.com/sspinc/confluencer"
|
12
|
+
gem.authors = ["Secret Sauce Partners, Inc."]
|
13
13
|
gem.add_development_dependency "rspec", ">= 1.3.0"
|
14
14
|
gem.add_runtime_dependency "log4r", ">= 1.1.7"
|
15
15
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.5.0
|
data/confluencer.gemspec
CHANGED
@@ -5,23 +5,23 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{confluencer}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.5.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = ["
|
12
|
-
s.date = %q{2010-
|
11
|
+
s.authors = ["Secret Sauce Partners, Inc."]
|
12
|
+
s.date = %q{2010-06-02}
|
13
13
|
s.description = %q{ActiveRecord-like classes to access Confluence through XMLRPC.}
|
14
|
-
s.email = %q{
|
14
|
+
s.email = %q{github@secretsaucepartners.com}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE",
|
17
|
-
"README"
|
17
|
+
"README.rdoc"
|
18
18
|
]
|
19
19
|
s.files = [
|
20
20
|
".document",
|
21
21
|
".gitignore",
|
22
22
|
".rvmrc",
|
23
23
|
"LICENSE",
|
24
|
-
"README",
|
24
|
+
"README.rdoc",
|
25
25
|
"Rakefile",
|
26
26
|
"VERSION",
|
27
27
|
"confluencer.gems",
|
@@ -42,6 +42,7 @@ Gem::Specification.new do |s|
|
|
42
42
|
"script/console_init.rb",
|
43
43
|
"spec/confluence.yaml.example",
|
44
44
|
"spec/confluence/attachment_spec.rb",
|
45
|
+
"spec/confluence/blog_entry_spec.rb",
|
45
46
|
"spec/confluence/bookmark_spec.rb",
|
46
47
|
"spec/confluence/client_spec.rb",
|
47
48
|
"spec/confluence/page_spec.rb",
|
@@ -53,13 +54,14 @@ Gem::Specification.new do |s|
|
|
53
54
|
"spec/spec.opts",
|
54
55
|
"spec/spec_helper.rb"
|
55
56
|
]
|
56
|
-
s.homepage = %q{http://github.com/
|
57
|
+
s.homepage = %q{http://github.com/sspinc/confluencer}
|
57
58
|
s.rdoc_options = ["--charset=UTF-8"]
|
58
59
|
s.require_paths = ["lib"]
|
59
60
|
s.rubygems_version = %q{1.3.7}
|
60
61
|
s.summary = %q{Useful classes to manage Confluence.}
|
61
62
|
s.test_files = [
|
62
63
|
"spec/confluence/attachment_spec.rb",
|
64
|
+
"spec/confluence/blog_entry_spec.rb",
|
63
65
|
"spec/confluence/bookmark_spec.rb",
|
64
66
|
"spec/confluence/client_spec.rb",
|
65
67
|
"spec/confluence/page_spec.rb",
|
@@ -8,11 +8,22 @@ module Confluence
|
|
8
8
|
record_attr_accessor :publishDate
|
9
9
|
record_attr_accessor :url
|
10
10
|
|
11
|
+
def store
|
12
|
+
# reinitialize blog entry after storing it
|
13
|
+
initialize(client.storeBlogEntry(self.to_hash))
|
14
|
+
end
|
15
|
+
|
16
|
+
def remove
|
17
|
+
client.removePage(self.entry_id)
|
18
|
+
end
|
19
|
+
|
11
20
|
private
|
12
21
|
|
13
22
|
def self.find_criteria(args)
|
14
23
|
if args.key? :id
|
15
|
-
self.new(client.
|
24
|
+
self.new(client.getBlogEntry(args[:id]))
|
25
|
+
elsif args.key? :space
|
26
|
+
client.getBlogEntries(args[:space]).collect { |summary| BlogEntry.find(:id => summary["id"]) }
|
16
27
|
end
|
17
28
|
end
|
18
29
|
end
|
@@ -0,0 +1,92 @@
|
|
1
|
+
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
2
|
+
|
3
|
+
describe Confluence::BlogEntry do
|
4
|
+
include SessionHelperMethods
|
5
|
+
|
6
|
+
after(:each) do
|
7
|
+
new_session do
|
8
|
+
Confluence::BlogEntry.find(:space => config[:space]).each do |blog_entry|
|
9
|
+
blog_entry.remove
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def create_test_entry
|
15
|
+
Confluence::BlogEntry.new :space => config[:space], :title => config[:entry_title], :content => "foobar"
|
16
|
+
end
|
17
|
+
|
18
|
+
|
19
|
+
it "should add a new blog entry to Confluence" do
|
20
|
+
new_session do
|
21
|
+
# create blog entry
|
22
|
+
# with_discardable_blog_entry :space => config[:space] do |blog_entry|
|
23
|
+
#
|
24
|
+
# end
|
25
|
+
|
26
|
+
blog_entry = create_test_entry
|
27
|
+
|
28
|
+
blog_entry.entry_id.should be_nil
|
29
|
+
|
30
|
+
# store blog entry
|
31
|
+
blog_entry.store
|
32
|
+
|
33
|
+
# verify blog entry was stored
|
34
|
+
blog_entry.entry_id.should_not be_nil
|
35
|
+
blog_entry.url.should_not be_nil
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
it "should find a blog entry in Confluence by id" do
|
40
|
+
new_session do
|
41
|
+
# create blog entry
|
42
|
+
blog_entry = create_test_entry
|
43
|
+
|
44
|
+
# store blog entry
|
45
|
+
blog_entry.store
|
46
|
+
|
47
|
+
# store entry_id
|
48
|
+
@entry_id = blog_entry.entry_id
|
49
|
+
end
|
50
|
+
|
51
|
+
new_session do
|
52
|
+
blog_entry = Confluence::BlogEntry.find :id => @entry_id
|
53
|
+
|
54
|
+
blog_entry.should_not be_nil
|
55
|
+
blog_entry.entry_id.should == @entry_id
|
56
|
+
blog_entry.content.should == "foobar"
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
it "should find all blog entries in Confluence" do
|
61
|
+
new_session do
|
62
|
+
# create blog entry
|
63
|
+
blog_entry = create_test_entry
|
64
|
+
|
65
|
+
# store blog entry
|
66
|
+
blog_entry.store
|
67
|
+
end
|
68
|
+
|
69
|
+
new_session do
|
70
|
+
blog_entries = Confluence::BlogEntry.find :space => config[:space]
|
71
|
+
|
72
|
+
blog_entries.should_not be_nil
|
73
|
+
blog_entries.should_not be_empty
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
it "should remove a blog entry from Confluence" do
|
78
|
+
new_session do
|
79
|
+
# create blog entry
|
80
|
+
blog_entry = create_test_entry
|
81
|
+
|
82
|
+
# store blog entry
|
83
|
+
blog_entry.store
|
84
|
+
|
85
|
+
# store entry_id
|
86
|
+
@entry_id = blog_entry.entry_id
|
87
|
+
|
88
|
+
# remove blog entry
|
89
|
+
blog_entry.remove.should be_true
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
metadata
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: confluencer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 5
|
9
|
+
- 0
|
10
|
+
version: 0.5.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
|
-
-
|
13
|
+
- Secret Sauce Partners, Inc.
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-06-02 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -51,20 +51,20 @@ dependencies:
|
|
51
51
|
type: :runtime
|
52
52
|
version_requirements: *id002
|
53
53
|
description: ActiveRecord-like classes to access Confluence through XMLRPC.
|
54
|
-
email:
|
54
|
+
email: github@secretsaucepartners.com
|
55
55
|
executables: []
|
56
56
|
|
57
57
|
extensions: []
|
58
58
|
|
59
59
|
extra_rdoc_files:
|
60
60
|
- LICENSE
|
61
|
-
- README
|
61
|
+
- README.rdoc
|
62
62
|
files:
|
63
63
|
- .document
|
64
64
|
- .gitignore
|
65
65
|
- .rvmrc
|
66
66
|
- LICENSE
|
67
|
-
- README
|
67
|
+
- README.rdoc
|
68
68
|
- Rakefile
|
69
69
|
- VERSION
|
70
70
|
- confluencer.gems
|
@@ -85,6 +85,7 @@ files:
|
|
85
85
|
- script/console_init.rb
|
86
86
|
- spec/confluence.yaml.example
|
87
87
|
- spec/confluence/attachment_spec.rb
|
88
|
+
- spec/confluence/blog_entry_spec.rb
|
88
89
|
- spec/confluence/bookmark_spec.rb
|
89
90
|
- spec/confluence/client_spec.rb
|
90
91
|
- spec/confluence/page_spec.rb
|
@@ -96,7 +97,7 @@ files:
|
|
96
97
|
- spec/spec.opts
|
97
98
|
- spec/spec_helper.rb
|
98
99
|
has_rdoc: true
|
99
|
-
homepage: http://github.com/
|
100
|
+
homepage: http://github.com/sspinc/confluencer
|
100
101
|
licenses: []
|
101
102
|
|
102
103
|
post_install_message:
|
@@ -131,6 +132,7 @@ specification_version: 3
|
|
131
132
|
summary: Useful classes to manage Confluence.
|
132
133
|
test_files:
|
133
134
|
- spec/confluence/attachment_spec.rb
|
135
|
+
- spec/confluence/blog_entry_spec.rb
|
134
136
|
- spec/confluence/bookmark_spec.rb
|
135
137
|
- spec/confluence/client_spec.rb
|
136
138
|
- spec/confluence/page_spec.rb
|