backlog4r 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/backlog4r/admin.rb +8 -0
- data/lib/backlog4r/client.rb +32 -0
- data/lib/backlog4r/user.rb +8 -0
- data/lib/backlog4r/version.rb +1 -1
- data/lib/backlog4r.rb +3 -44
- data/spec/admin_spec.rb +11 -0
- data/spec/client_spec.rb +11 -0
- data/spec/user_spec.rb +11 -0
- metadata +10 -7
- data/spec/backlog_admin_spec.rb +0 -11
- data/spec/backlog_spec.rb +0 -11
- data/spec/backlog_user_spec.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b96eedc12b088d142e5691b61e5a31cc0474d9cb
|
4
|
+
data.tar.gz: 13693c229e6db8a8c1e33f6a50a28731ece70b50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1c08c52baa7b46f6afc282bc2ce6d467e59a9195d75b718ebd9e622c50f1c0d225ca87949775cbc2eb315903cb585827cbb5a07627b488e2b79ee166d038ac8
|
7
|
+
data.tar.gz: 74ba4ca0051a56beb193cb05df3050108cb4afcaec8bd8dc5484896548c5746e16d529dddc7a23071bc06f1151104707c96cd2dceeae960ec2677923da7fbc84
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require "backlog4r/version"
|
2
|
+
require "uri"
|
3
|
+
require "xmlrpc/client"
|
4
|
+
require "active_support/core_ext"
|
5
|
+
|
6
|
+
module Backlog4r
|
7
|
+
class Client < XMLRPC::Client::Proxy
|
8
|
+
def initialize(space_name, user_id, password, prefix)
|
9
|
+
space_uri = URI.parse("https://#{space_name}.backlog.jp/XML-RPC")
|
10
|
+
proxy_host = proxy_port = nil
|
11
|
+
use_ssl = true
|
12
|
+
timeout = 5
|
13
|
+
|
14
|
+
server = XMLRPC::Client.new(space_uri.host,
|
15
|
+
space_uri.path,
|
16
|
+
space_uri.port,
|
17
|
+
proxy_host,
|
18
|
+
proxy_port,
|
19
|
+
user_id,
|
20
|
+
password,
|
21
|
+
use_ssl,
|
22
|
+
timeout,
|
23
|
+
)
|
24
|
+
super(server, prefix)
|
25
|
+
end
|
26
|
+
|
27
|
+
def method_missing(action, *args)
|
28
|
+
action = action.to_s.camelize(:lower).to_sym
|
29
|
+
super
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/lib/backlog4r/version.rb
CHANGED
data/lib/backlog4r.rb
CHANGED
@@ -1,44 +1,3 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require "active_support/core_ext"
|
5
|
-
|
6
|
-
module Backlog4r
|
7
|
-
class Backlog < XMLRPC::Client::Proxy
|
8
|
-
def initialize(space_name, user_id, password, prefix)
|
9
|
-
space_uri = URI.parse("https://#{space_name}.backlog.jp/XML-RPC")
|
10
|
-
proxy_host = proxy_port = nil
|
11
|
-
use_ssl = true
|
12
|
-
timeout = 5
|
13
|
-
|
14
|
-
server = XMLRPC::Client.new(space_uri.host,
|
15
|
-
space_uri.path,
|
16
|
-
space_uri.port,
|
17
|
-
proxy_host,
|
18
|
-
proxy_port,
|
19
|
-
user_id,
|
20
|
-
password,
|
21
|
-
use_ssl,
|
22
|
-
timeout,
|
23
|
-
)
|
24
|
-
super(server, prefix)
|
25
|
-
end
|
26
|
-
|
27
|
-
def method_missing(action, *args)
|
28
|
-
action = action.to_s.camelize(:lower).to_sym
|
29
|
-
super
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
class BacklogUser < Backlog
|
34
|
-
def initialize(space_name, user_id, password)
|
35
|
-
super(space_name, user_id, password, 'backlog')
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
class BacklogAdmin < Backlog
|
40
|
-
def initialize(space_name, user_id, password)
|
41
|
-
super(space_name, user_id, password, 'backlog.admin')
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
1
|
+
require 'backlog4r/client'
|
2
|
+
require 'backlog4r/user'
|
3
|
+
require 'backlog4r/admin'
|
data/spec/admin_spec.rb
ADDED
data/spec/client_spec.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
require "backlog4r"
|
3
|
+
|
4
|
+
describe Backlog4r::Client do
|
5
|
+
context "when initialized valid conditions" do
|
6
|
+
subject { Backlog4r::Client.new("space", "user", "pass", "prefix") }
|
7
|
+
|
8
|
+
it { should be_an_instance_of Backlog4r::Client }
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
data/spec/user_spec.rb
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: backlog4r
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Keisuke Futonaka
|
@@ -108,11 +108,14 @@ files:
|
|
108
108
|
- Rakefile
|
109
109
|
- backlog4r.gemspec
|
110
110
|
- lib/backlog4r.rb
|
111
|
+
- lib/backlog4r/admin.rb
|
112
|
+
- lib/backlog4r/client.rb
|
113
|
+
- lib/backlog4r/user.rb
|
111
114
|
- lib/backlog4r/version.rb
|
112
|
-
- spec/
|
113
|
-
- spec/
|
114
|
-
- spec/backlog_user_spec.rb
|
115
|
+
- spec/admin_spec.rb
|
116
|
+
- spec/client_spec.rb
|
115
117
|
- spec/spec_helper.rb
|
118
|
+
- spec/user_spec.rb
|
116
119
|
homepage: ''
|
117
120
|
licenses:
|
118
121
|
- MIT
|
@@ -138,7 +141,7 @@ signing_key:
|
|
138
141
|
specification_version: 4
|
139
142
|
summary: WebAPI interface for backlog.jp
|
140
143
|
test_files:
|
141
|
-
- spec/
|
142
|
-
- spec/
|
143
|
-
- spec/backlog_user_spec.rb
|
144
|
+
- spec/admin_spec.rb
|
145
|
+
- spec/client_spec.rb
|
144
146
|
- spec/spec_helper.rb
|
147
|
+
- spec/user_spec.rb
|
data/spec/backlog_admin_spec.rb
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
require "backlog4r"
|
3
|
-
|
4
|
-
describe Backlog4r::BacklogAdmin do
|
5
|
-
context "when initialized valid conditions" do
|
6
|
-
subject { Backlog4r::BacklogAdmin.new("space", "user", "pass") }
|
7
|
-
|
8
|
-
it { should be_an_instance_of Backlog4r::BacklogAdmin }
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
data/spec/backlog_spec.rb
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
require "backlog4r"
|
3
|
-
|
4
|
-
describe Backlog4r::Backlog do
|
5
|
-
context "when initialized valid conditions" do
|
6
|
-
subject { Backlog4r::Backlog.new("space", "user", "pass", "prefix") }
|
7
|
-
|
8
|
-
it { should be_an_instance_of Backlog4r::Backlog }
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
data/spec/backlog_user_spec.rb
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
require "backlog4r"
|
3
|
-
|
4
|
-
describe Backlog4r::BacklogUser do
|
5
|
-
context "when initialized valid conditions" do
|
6
|
-
subject { Backlog4r::BacklogUser.new("space", "user", "pass") }
|
7
|
-
|
8
|
-
it { should be_an_instance_of Backlog4r::BacklogUser }
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|