osdn-client 0.0.20160304 → 0.0.20160711
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +201 -0
- data/README.md +182 -0
- data/docs/DefaultApi.md +115 -0
- data/docs/Group.md +23 -0
- data/docs/GroupToolFlags.md +17 -0
- data/docs/News.md +14 -0
- data/docs/Package.md +13 -0
- data/docs/Pong.md +11 -0
- data/docs/ProjectApi.md +1511 -0
- data/docs/ProjectFrsApi.md +888 -0
- data/docs/ProjectNewsApi.md +576 -0
- data/docs/RelFile.md +19 -0
- data/docs/Release.md +16 -0
- data/docs/SimpleChamber.md +11 -0
- data/docs/SimpleGroup.md +11 -0
- data/docs/SimpleUser.md +10 -0
- data/docs/Skill.md +11 -0
- data/docs/Token.md +12 -0
- data/docs/User.md +20 -0
- data/docs/UserApi.md +63 -0
- data/lib/osdn-client.rb +32 -9
- data/lib/osdn-client/api/default_api.rb +50 -39
- data/lib/osdn-client/api/project_api.rb +661 -773
- data/lib/osdn-client/api/project_frs_api.rb +350 -412
- data/lib/osdn-client/api/project_news_api.rb +217 -244
- data/lib/osdn-client/api/user_api.rb +35 -20
- data/lib/osdn-client/api_client.rb +74 -13
- data/lib/osdn-client/api_error.rb +23 -0
- data/lib/osdn-client/configuration.rb +45 -1
- data/lib/osdn-client/models/group.rb +103 -65
- data/lib/osdn-client/models/group_tool_flags.rb +91 -47
- data/lib/osdn-client/models/news.rb +85 -38
- data/lib/osdn-client/models/package.rb +83 -35
- data/lib/osdn-client/models/pong.rb +79 -29
- data/lib/osdn-client/models/rel_file.rb +95 -53
- data/lib/osdn-client/models/release.rb +89 -44
- data/lib/osdn-client/models/simple_chamber.rb +79 -29
- data/lib/osdn-client/models/simple_group.rb +79 -29
- data/lib/osdn-client/models/simple_user.rb +77 -26
- data/lib/osdn-client/models/skill.rb +79 -29
- data/lib/osdn-client/models/token.rb +81 -32
- data/lib/osdn-client/models/user.rb +97 -56
- data/lib/osdn-client/version.rb +24 -1
- data/osdn-client.gemspec +30 -7
- data/spec/api/default_api_spec.rb +73 -0
- data/spec/api/{ProjectApi_spec.rb → project_api_spec.rb} +187 -264
- data/spec/api/{ProjectFrsApi_spec.rb → project_frs_api_spec.rb} +103 -136
- data/spec/api/{ProjectNewsApi_spec.rb → project_news_api_spec.rb} +71 -88
- data/spec/api/user_api_spec.rb +58 -0
- data/spec/api_client_spec.rb +315 -0
- data/spec/configuration_spec.rb +48 -0
- data/spec/models/group_spec.rb +143 -0
- data/spec/models/group_tool_flags_spec.rb +107 -0
- data/spec/models/news_spec.rb +89 -0
- data/spec/models/package_spec.rb +83 -0
- data/spec/models/pong_spec.rb +71 -0
- data/spec/models/rel_file_spec.rb +119 -0
- data/spec/models/release_spec.rb +101 -0
- data/spec/models/simple_chamber_spec.rb +71 -0
- data/spec/models/simple_group_spec.rb +71 -0
- data/spec/models/simple_user_spec.rb +65 -0
- data/spec/models/skill_spec.rb +71 -0
- data/spec/models/token_spec.rb +77 -0
- data/spec/models/user_spec.rb +125 -0
- data/spec/spec_helper.rb +122 -0
- metadata +87 -59
- data/spec/api/DefaultApi_spec.rb +0 -58
- data/spec/api/UserApi_spec.rb +0 -39
- data/spec/models/GroupToolFlags_spec.rb +0 -124
- data/spec/models/Group_spec.rb +0 -184
- data/spec/models/News_spec.rb +0 -94
- data/spec/models/Package_spec.rb +0 -84
- data/spec/models/Pong_spec.rb +0 -64
- data/spec/models/RelFile_spec.rb +0 -144
- data/spec/models/Release_spec.rb +0 -114
- data/spec/models/SimpleChamber_spec.rb +0 -64
- data/spec/models/SimpleGroup_spec.rb +0 -64
- data/spec/models/SimpleUser_spec.rb +0 -54
- data/spec/models/Skill_spec.rb +0 -64
- data/spec/models/Token_spec.rb +0 -74
- data/spec/models/User_spec.rb +0 -154
data/lib/osdn-client/version.rb
CHANGED
@@ -1,3 +1,26 @@
|
|
1
|
+
=begin
|
2
|
+
#OSDN REST API v0 beta
|
3
|
+
|
4
|
+
#OSDN REST API. Currently this API is experimental release. Pelase refer documentation on https://osdn.jp/projects/osdn-codes/wiki/APIGuide and you can get client libraries from https://osdn.jp/projects/osdn-codes/releases/p14859 .
|
5
|
+
|
6
|
+
OpenAPI spec version: 0.0.20160304
|
7
|
+
Contact: admin@osdn.jp
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
you may not use this file except in compliance with the License.
|
12
|
+
You may obtain a copy of the License at
|
13
|
+
|
14
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
|
16
|
+
Unless required by applicable law or agreed to in writing, software
|
17
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
See the License for the specific language governing permissions and
|
20
|
+
limitations under the License.
|
21
|
+
|
22
|
+
=end
|
23
|
+
|
1
24
|
module OSDNClient
|
2
|
-
VERSION = "0.0.
|
25
|
+
VERSION = "0.0.20160711"
|
3
26
|
end
|
data/osdn-client.gemspec
CHANGED
@@ -1,4 +1,28 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
+
#
|
3
|
+
=begin
|
4
|
+
#OSDN REST API v0 beta
|
5
|
+
|
6
|
+
#OSDN REST API. Currently this API is experimental release. Pelase refer documentation on https://osdn.jp/projects/osdn-codes/wiki/APIGuide and you can get client libraries from https://osdn.jp/projects/osdn-codes/releases/p14859 .
|
7
|
+
|
8
|
+
OpenAPI spec version: 0.0.20160304
|
9
|
+
Contact: admin@osdn.jp
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
11
|
+
|
12
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
13
|
+
you may not use this file except in compliance with the License.
|
14
|
+
You may obtain a copy of the License at
|
15
|
+
|
16
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
17
|
+
|
18
|
+
Unless required by applicable law or agreed to in writing, software
|
19
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
20
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
21
|
+
See the License for the specific language governing permissions and
|
22
|
+
limitations under the License.
|
23
|
+
|
24
|
+
=end
|
25
|
+
|
2
26
|
$:.push File.expand_path("../lib", __FILE__)
|
3
27
|
require "osdn-client/version"
|
4
28
|
|
@@ -10,16 +34,15 @@ Gem::Specification.new do |s|
|
|
10
34
|
s.email = ["admin@osdn.jp"]
|
11
35
|
s.homepage = "https://osdn.jp/"
|
12
36
|
s.summary = "OSDN API basic client library for ruby"
|
13
|
-
s.description = ""
|
37
|
+
s.description = "OSDN REST API. Currently this API is experimental release. Pelase refer documentation on https://osdn.jp/projects/osdn-codes/wiki/APIGuide and you can get client libraries from https://osdn.jp/projects/osdn-codes/releases/p14859 . "
|
14
38
|
s.license = "MIT"
|
15
39
|
|
40
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
41
|
+
s.add_runtime_dependency 'json', '~> 1.8', '>= 1.8.3'
|
16
42
|
|
17
|
-
s.
|
18
|
-
s.
|
19
|
-
|
20
|
-
s.add_development_dependency 'rspec', '~> 3.2', '>= 3.2.0'
|
21
|
-
s.add_development_dependency 'vcr', '~> 2.9', '>= 2.9.3'
|
22
|
-
s.add_development_dependency 'webmock', '~> 1.6', '>= 1.6.2'
|
43
|
+
s.add_development_dependency 'rspec', '~> 3.4', '>= 3.4.0'
|
44
|
+
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
|
45
|
+
s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
|
23
46
|
s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
|
24
47
|
s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
|
25
48
|
s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
|
@@ -0,0 +1,73 @@
|
|
1
|
+
=begin
|
2
|
+
#OSDN REST API v0 beta
|
3
|
+
|
4
|
+
#OSDN REST API. Currently this API is experimental release. Pelase refer documentation on https://osdn.jp/projects/osdn-codes/wiki/APIGuide and you can get client libraries from https://osdn.jp/projects/osdn-codes/releases/p14859 .
|
5
|
+
|
6
|
+
OpenAPI spec version: 0.0.20160304
|
7
|
+
Contact: admin@osdn.jp
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
you may not use this file except in compliance with the License.
|
12
|
+
You may obtain a copy of the License at
|
13
|
+
|
14
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
|
16
|
+
Unless required by applicable law or agreed to in writing, software
|
17
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
See the License for the specific language governing permissions and
|
20
|
+
limitations under the License.
|
21
|
+
|
22
|
+
=end
|
23
|
+
|
24
|
+
require 'spec_helper'
|
25
|
+
require 'json'
|
26
|
+
|
27
|
+
# Unit tests for OSDNClient::DefaultApi
|
28
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
29
|
+
# Please update as you see appropriate
|
30
|
+
describe 'DefaultApi' do
|
31
|
+
before do
|
32
|
+
# run before each test
|
33
|
+
@instance = OSDNClient::DefaultApi.new
|
34
|
+
end
|
35
|
+
|
36
|
+
after do
|
37
|
+
# run after each test
|
38
|
+
end
|
39
|
+
|
40
|
+
describe 'test an instance of DefaultApi' do
|
41
|
+
it 'should create an instact of DefaultApi' do
|
42
|
+
expect(@instance).to be_instance_of(OSDNClient::DefaultApi)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# unit tests for ping
|
47
|
+
#
|
48
|
+
# return pong for test
|
49
|
+
# @param [Hash] opts the optional parameters
|
50
|
+
# @return [Pong]
|
51
|
+
describe 'ping test' do
|
52
|
+
it "should work" do
|
53
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
# unit tests for token
|
58
|
+
#
|
59
|
+
# Get access token by access code.
|
60
|
+
# @param client_id Your application ID
|
61
|
+
# @param client_secret Your application secret (key)
|
62
|
+
# @param [Hash] opts the optional parameters
|
63
|
+
# @option opts [String] :grant_type \"authorization_code\" or \"refresh_token\"
|
64
|
+
# @option opts [String] :code Set auth code issued by https://osdn.jp/account/oauth2ui/authorize for grant_type=authorization_code
|
65
|
+
# @option opts [String] :refresh_token Set refresh token to update access token.
|
66
|
+
# @return [Token]
|
67
|
+
describe 'token test' do
|
68
|
+
it "should work" do
|
69
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
end
|
@@ -1,3 +1,26 @@
|
|
1
|
+
=begin
|
2
|
+
#OSDN REST API v0 beta
|
3
|
+
|
4
|
+
#OSDN REST API. Currently this API is experimental release. Pelase refer documentation on https://osdn.jp/projects/osdn-codes/wiki/APIGuide and you can get client libraries from https://osdn.jp/projects/osdn-codes/releases/p14859 .
|
5
|
+
|
6
|
+
OpenAPI spec version: 0.0.20160304
|
7
|
+
Contact: admin@osdn.jp
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
you may not use this file except in compliance with the License.
|
12
|
+
You may obtain a copy of the License at
|
13
|
+
|
14
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
|
16
|
+
Unless required by applicable law or agreed to in writing, software
|
17
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
See the License for the specific language governing permissions and
|
20
|
+
limitations under the License.
|
21
|
+
|
22
|
+
=end
|
23
|
+
|
1
24
|
require 'spec_helper'
|
2
25
|
require 'json'
|
3
26
|
|
@@ -16,23 +39,7 @@ describe 'ProjectApi' do
|
|
16
39
|
|
17
40
|
describe 'test an instance of ProjectApi' do
|
18
41
|
it 'should create an instact of ProjectApi' do
|
19
|
-
@instance.
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
# unit tests for list_news
|
24
|
-
#
|
25
|
-
#
|
26
|
-
# @param [Hash] opts the optional parameters
|
27
|
-
# @option opts [Integer] :group_id filter by group ID
|
28
|
-
# @return [Array<News>]
|
29
|
-
describe 'list_news test' do
|
30
|
-
it "should work" do
|
31
|
-
# assertion here
|
32
|
-
# should be_a()
|
33
|
-
# should be_nil
|
34
|
-
# should ==
|
35
|
-
# should_not ==
|
42
|
+
expect(@instance).to be_instance_of(OSDNClient::ProjectApi)
|
36
43
|
end
|
37
44
|
end
|
38
45
|
|
@@ -46,186 +53,136 @@ describe 'ProjectApi' do
|
|
46
53
|
# @return [String]
|
47
54
|
describe 'create_news test' do
|
48
55
|
it "should work" do
|
49
|
-
# assertion here
|
50
|
-
# should be_a()
|
51
|
-
# should be_nil
|
52
|
-
# should ==
|
53
|
-
# should_not ==
|
56
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
54
57
|
end
|
55
58
|
end
|
56
59
|
|
57
|
-
# unit tests for
|
58
|
-
#
|
59
|
-
# Get single news object.
|
60
|
-
# @param news_id
|
61
|
-
# @param [Hash] opts the optional parameters
|
62
|
-
# @return [News]
|
63
|
-
describe 'get_news test' do
|
64
|
-
it "should work" do
|
65
|
-
# assertion here
|
66
|
-
# should be_a()
|
67
|
-
# should be_nil
|
68
|
-
# should ==
|
69
|
-
# should_not ==
|
70
|
-
end
|
71
|
-
end
|
72
|
-
|
73
|
-
# unit tests for delete_news
|
60
|
+
# unit tests for create_news_0
|
74
61
|
#
|
75
62
|
#
|
76
|
-
# @param
|
63
|
+
# @param id_or_name numeric project id or project name
|
64
|
+
# @param title news title
|
65
|
+
# @param body news body in OSDN Wiki format.
|
77
66
|
# @param [Hash] opts the optional parameters
|
78
|
-
# @return [
|
79
|
-
describe '
|
67
|
+
# @return [String]
|
68
|
+
describe 'create_news_0 test' do
|
80
69
|
it "should work" do
|
81
|
-
# assertion here
|
82
|
-
# should be_a()
|
83
|
-
# should be_nil
|
84
|
-
# should ==
|
85
|
-
# should_not ==
|
70
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
86
71
|
end
|
87
72
|
end
|
88
73
|
|
89
|
-
# unit tests for
|
90
|
-
#
|
74
|
+
# unit tests for create_package
|
91
75
|
#
|
92
|
-
#
|
76
|
+
# Create a package.
|
77
|
+
# @param id_or_name numeric project id or project name
|
78
|
+
# @param name package name
|
93
79
|
# @param [Hash] opts the optional parameters
|
94
|
-
# @option opts [String] :
|
95
|
-
# @
|
96
|
-
|
97
|
-
describe 'update_news test' do
|
80
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
81
|
+
# @return [Package]
|
82
|
+
describe 'create_package test' do
|
98
83
|
it "should work" do
|
99
|
-
# assertion here
|
100
|
-
# should be_a()
|
101
|
-
# should be_nil
|
102
|
-
# should ==
|
103
|
-
# should_not ==
|
84
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
104
85
|
end
|
105
86
|
end
|
106
87
|
|
107
|
-
# unit tests for
|
88
|
+
# unit tests for create_release
|
108
89
|
#
|
109
|
-
#
|
90
|
+
# Create new release in specified package.
|
110
91
|
# @param id_or_name numeric project id or project name
|
92
|
+
# @param package_id
|
93
|
+
# @param name Release name
|
111
94
|
# @param [Hash] opts the optional parameters
|
112
|
-
# @
|
113
|
-
|
95
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
96
|
+
# @option opts [String] :time Release datetime. If you set future time, the release hide until specified time.
|
97
|
+
# @option opts [String] :release_note Release note body text.
|
98
|
+
# @option opts [String] :change_log Changelog body text.
|
99
|
+
# @return [Release]
|
100
|
+
describe 'create_release test' do
|
114
101
|
it "should work" do
|
115
|
-
# assertion here
|
116
|
-
# should be_a()
|
117
|
-
# should be_nil
|
118
|
-
# should ==
|
119
|
-
# should_not ==
|
102
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
120
103
|
end
|
121
104
|
end
|
122
105
|
|
123
|
-
# unit tests for
|
106
|
+
# unit tests for create_release_file
|
124
107
|
#
|
125
|
-
#
|
108
|
+
# Create new file in target release.
|
126
109
|
# @param id_or_name numeric project id or project name
|
110
|
+
# @param package_id
|
111
|
+
# @param release_id
|
112
|
+
# @param file Upload file in \"multipart/form-data\".
|
127
113
|
# @param [Hash] opts the optional parameters
|
128
|
-
# @
|
129
|
-
|
114
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
115
|
+
# @return [RelFile]
|
116
|
+
describe 'create_release_file test' do
|
130
117
|
it "should work" do
|
131
|
-
# assertion here
|
132
|
-
# should be_a()
|
133
|
-
# should be_nil
|
134
|
-
# should ==
|
135
|
-
# should_not ==
|
118
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
136
119
|
end
|
137
120
|
end
|
138
121
|
|
139
|
-
# unit tests for
|
122
|
+
# unit tests for delete_news
|
140
123
|
#
|
141
|
-
#
|
142
|
-
# @param
|
143
|
-
# @param name package name
|
124
|
+
#
|
125
|
+
# @param news_id
|
144
126
|
# @param [Hash] opts the optional parameters
|
145
|
-
# @
|
146
|
-
|
147
|
-
describe 'create_package test' do
|
127
|
+
# @return [nil]
|
128
|
+
describe 'delete_news test' do
|
148
129
|
it "should work" do
|
149
|
-
# assertion here
|
150
|
-
# should be_a()
|
151
|
-
# should be_nil
|
152
|
-
# should ==
|
153
|
-
# should_not ==
|
130
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
154
131
|
end
|
155
132
|
end
|
156
133
|
|
157
|
-
# unit tests for
|
134
|
+
# unit tests for delete_news_0
|
135
|
+
#
|
158
136
|
#
|
159
|
-
# Get specified package info and release list of the package.
|
160
137
|
# @param id_or_name numeric project id or project name
|
161
|
-
# @param
|
138
|
+
# @param news_id
|
162
139
|
# @param [Hash] opts the optional parameters
|
163
|
-
# @return [
|
164
|
-
describe '
|
140
|
+
# @return [nil]
|
141
|
+
describe 'delete_news_0 test' do
|
165
142
|
it "should work" do
|
166
|
-
# assertion here
|
167
|
-
# should be_a()
|
168
|
-
# should be_nil
|
169
|
-
# should ==
|
170
|
-
# should_not ==
|
143
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
171
144
|
end
|
172
145
|
end
|
173
146
|
|
174
|
-
# unit tests for
|
147
|
+
# unit tests for delete_package
|
175
148
|
#
|
176
|
-
#
|
149
|
+
# Delete taret package.
|
177
150
|
# @param id_or_name numeric project id or project name
|
178
151
|
# @param package_id
|
179
|
-
# @param name Release name
|
180
152
|
# @param [Hash] opts the optional parameters
|
181
|
-
# @
|
182
|
-
|
183
|
-
# @option opts [String] :release_note Release note body text.
|
184
|
-
# @option opts [String] :change_log Changelog body text.
|
185
|
-
# @return [Release]
|
186
|
-
describe 'create_release test' do
|
153
|
+
# @return [nil]
|
154
|
+
describe 'delete_package test' do
|
187
155
|
it "should work" do
|
188
|
-
# assertion here
|
189
|
-
# should be_a()
|
190
|
-
# should be_nil
|
191
|
-
# should ==
|
192
|
-
# should_not ==
|
156
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
193
157
|
end
|
194
158
|
end
|
195
159
|
|
196
|
-
# unit tests for
|
160
|
+
# unit tests for delete_release
|
197
161
|
#
|
198
|
-
# Delete
|
162
|
+
# Delete target release.
|
199
163
|
# @param id_or_name numeric project id or project name
|
200
164
|
# @param package_id
|
165
|
+
# @param release_id
|
201
166
|
# @param [Hash] opts the optional parameters
|
202
167
|
# @return [nil]
|
203
|
-
describe '
|
168
|
+
describe 'delete_release test' do
|
204
169
|
it "should work" do
|
205
|
-
# assertion here
|
206
|
-
# should be_a()
|
207
|
-
# should be_nil
|
208
|
-
# should ==
|
209
|
-
# should_not ==
|
170
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
210
171
|
end
|
211
172
|
end
|
212
173
|
|
213
|
-
# unit tests for
|
174
|
+
# unit tests for delete_release_file
|
214
175
|
#
|
215
|
-
#
|
176
|
+
# Delete target file.
|
216
177
|
# @param id_or_name numeric project id or project name
|
217
178
|
# @param package_id
|
179
|
+
# @param release_id
|
180
|
+
# @param file_id
|
218
181
|
# @param [Hash] opts the optional parameters
|
219
|
-
# @
|
220
|
-
|
221
|
-
# @return [Package]
|
222
|
-
describe 'update_package test' do
|
182
|
+
# @return [nil]
|
183
|
+
describe 'delete_release_file test' do
|
223
184
|
it "should work" do
|
224
|
-
# assertion here
|
225
|
-
# should be_a()
|
226
|
-
# should be_nil
|
227
|
-
# should ==
|
228
|
-
# should_not ==
|
185
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
229
186
|
end
|
230
187
|
end
|
231
188
|
|
@@ -238,89 +195,71 @@ describe 'ProjectApi' do
|
|
238
195
|
# @return [Release]
|
239
196
|
describe 'draft_release test' do
|
240
197
|
it "should work" do
|
241
|
-
# assertion here
|
242
|
-
# should be_a()
|
243
|
-
# should be_nil
|
244
|
-
# should ==
|
245
|
-
# should_not ==
|
198
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
246
199
|
end
|
247
200
|
end
|
248
201
|
|
249
|
-
# unit tests for
|
202
|
+
# unit tests for get_news
|
250
203
|
#
|
251
|
-
# Get
|
204
|
+
# Get single news object.
|
205
|
+
# @param news_id
|
206
|
+
# @param [Hash] opts the optional parameters
|
207
|
+
# @return [News]
|
208
|
+
describe 'get_news test' do
|
209
|
+
it "should work" do
|
210
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
# unit tests for get_news_0
|
215
|
+
#
|
216
|
+
# Get single news object.
|
252
217
|
# @param id_or_name numeric project id or project name
|
253
|
-
# @param
|
254
|
-
# @param release_id
|
218
|
+
# @param news_id
|
255
219
|
# @param [Hash] opts the optional parameters
|
256
|
-
# @return [
|
257
|
-
describe '
|
220
|
+
# @return [News]
|
221
|
+
describe 'get_news_0 test' do
|
258
222
|
it "should work" do
|
259
|
-
# assertion here
|
260
|
-
# should be_a()
|
261
|
-
# should be_nil
|
262
|
-
# should ==
|
263
|
-
# should_not ==
|
223
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
264
224
|
end
|
265
225
|
end
|
266
226
|
|
267
|
-
# unit tests for
|
227
|
+
# unit tests for get_package
|
268
228
|
#
|
269
|
-
#
|
229
|
+
# Get specified package info and release list of the package.
|
270
230
|
# @param id_or_name numeric project id or project name
|
271
231
|
# @param package_id
|
272
|
-
# @param release_id
|
273
|
-
# @param file Upload file in \"multipart/form-data\".
|
274
232
|
# @param [Hash] opts the optional parameters
|
275
|
-
# @
|
276
|
-
|
277
|
-
describe 'create_release_file test' do
|
233
|
+
# @return [Package]
|
234
|
+
describe 'get_package test' do
|
278
235
|
it "should work" do
|
279
|
-
# assertion here
|
280
|
-
# should be_a()
|
281
|
-
# should be_nil
|
282
|
-
# should ==
|
283
|
-
# should_not ==
|
236
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
284
237
|
end
|
285
238
|
end
|
286
239
|
|
287
|
-
# unit tests for
|
240
|
+
# unit tests for get_project
|
288
241
|
#
|
289
|
-
#
|
242
|
+
# Get project info.
|
290
243
|
# @param id_or_name numeric project id or project name
|
291
|
-
# @param package_id
|
292
|
-
# @param release_id
|
293
244
|
# @param [Hash] opts the optional parameters
|
294
|
-
# @return [
|
295
|
-
describe '
|
245
|
+
# @return [Group]
|
246
|
+
describe 'get_project test' do
|
296
247
|
it "should work" do
|
297
|
-
# assertion here
|
298
|
-
# should be_a()
|
299
|
-
# should be_nil
|
300
|
-
# should ==
|
301
|
-
# should_not ==
|
248
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
302
249
|
end
|
303
250
|
end
|
304
251
|
|
305
|
-
# unit tests for
|
252
|
+
# unit tests for get_release
|
306
253
|
#
|
307
|
-
#
|
254
|
+
# Get specified release info and file list of the release.
|
308
255
|
# @param id_or_name numeric project id or project name
|
309
256
|
# @param package_id
|
310
257
|
# @param release_id
|
311
258
|
# @param [Hash] opts the optional parameters
|
312
|
-
# @option opts [String] :visibility visibility status (public, hidden or private)
|
313
|
-
# @option opts [String] :name Release name
|
314
|
-
# @option opts [String] :time Release datetime. If you set future time, the release hide until specified time.
|
315
|
-
# @option opts [Integer] :move_to_package_id If this parameter is specified, the release move to another package.
|
316
259
|
# @return [Release]
|
317
|
-
describe '
|
260
|
+
describe 'get_release test' do
|
318
261
|
it "should work" do
|
319
|
-
# assertion here
|
320
|
-
# should be_a()
|
321
|
-
# should be_nil
|
322
|
-
# should ==
|
323
|
-
# should_not ==
|
262
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
324
263
|
end
|
325
264
|
end
|
326
265
|
|
@@ -335,137 +274,121 @@ describe 'ProjectApi' do
|
|
335
274
|
# @return [RelFile]
|
336
275
|
describe 'get_release_file test' do
|
337
276
|
it "should work" do
|
338
|
-
# assertion here
|
339
|
-
# should be_a()
|
340
|
-
# should be_nil
|
341
|
-
# should ==
|
342
|
-
# should_not ==
|
277
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
343
278
|
end
|
344
279
|
end
|
345
280
|
|
346
|
-
# unit tests for
|
281
|
+
# unit tests for list_news
|
282
|
+
#
|
347
283
|
#
|
348
|
-
# Delete target file.
|
349
|
-
# @param id_or_name numeric project id or project name
|
350
|
-
# @param package_id
|
351
|
-
# @param release_id
|
352
|
-
# @param file_id
|
353
284
|
# @param [Hash] opts the optional parameters
|
354
|
-
# @
|
355
|
-
|
285
|
+
# @option opts [Integer] :group_id filter by group ID
|
286
|
+
# @return [Array<News>]
|
287
|
+
describe 'list_news test' do
|
356
288
|
it "should work" do
|
357
|
-
# assertion here
|
358
|
-
# should be_a()
|
359
|
-
# should be_nil
|
360
|
-
# should ==
|
361
|
-
# should_not ==
|
289
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
362
290
|
end
|
363
291
|
end
|
364
292
|
|
365
|
-
# unit tests for
|
293
|
+
# unit tests for list_news_0
|
366
294
|
#
|
367
|
-
#
|
295
|
+
# Get news list of spscified project.
|
368
296
|
# @param id_or_name numeric project id or project name
|
369
|
-
# @param package_id
|
370
|
-
# @param release_id
|
371
|
-
# @param file_id
|
372
297
|
# @param [Hash] opts the optional parameters
|
373
|
-
# @
|
374
|
-
|
375
|
-
describe 'update_release_file test' do
|
298
|
+
# @return [Array<News>]
|
299
|
+
describe 'list_news_0 test' do
|
376
300
|
it "should work" do
|
377
|
-
# assertion here
|
378
|
-
# should be_a()
|
379
|
-
# should be_nil
|
380
|
-
# should ==
|
381
|
-
# should_not ==
|
301
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
382
302
|
end
|
383
303
|
end
|
384
304
|
|
385
|
-
# unit tests for
|
305
|
+
# unit tests for list_packages
|
386
306
|
#
|
387
|
-
# Get
|
307
|
+
# Get package list of specified project.
|
388
308
|
# @param id_or_name numeric project id or project name
|
389
309
|
# @param [Hash] opts the optional parameters
|
390
|
-
# @return [Array<
|
391
|
-
describe '
|
310
|
+
# @return [Array<Package>]
|
311
|
+
describe 'list_packages test' do
|
392
312
|
it "should work" do
|
393
|
-
# assertion here
|
394
|
-
# should be_a()
|
395
|
-
# should be_nil
|
396
|
-
# should ==
|
397
|
-
# should_not ==
|
313
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
398
314
|
end
|
399
315
|
end
|
400
316
|
|
401
|
-
# unit tests for
|
317
|
+
# unit tests for update_news
|
402
318
|
#
|
403
319
|
#
|
404
|
-
# @param
|
405
|
-
# @param title news title
|
406
|
-
# @param body news body in OSDN Wiki format.
|
320
|
+
# @param news_id
|
407
321
|
# @param [Hash] opts the optional parameters
|
408
|
-
# @
|
409
|
-
|
322
|
+
# @option opts [String] :title news title
|
323
|
+
# @option opts [String] :body news body in OSDN Wiki format.
|
324
|
+
# @return [News]
|
325
|
+
describe 'update_news test' do
|
410
326
|
it "should work" do
|
411
|
-
# assertion here
|
412
|
-
# should be_a()
|
413
|
-
# should be_nil
|
414
|
-
# should ==
|
415
|
-
# should_not ==
|
327
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
416
328
|
end
|
417
329
|
end
|
418
330
|
|
419
|
-
# unit tests for
|
331
|
+
# unit tests for update_news_0
|
332
|
+
#
|
420
333
|
#
|
421
|
-
# Get single news object.
|
422
|
-
# @param id_or_name numeric project id or project name
|
423
334
|
# @param news_id
|
335
|
+
# @param id_or_name numeric project id or project name
|
424
336
|
# @param [Hash] opts the optional parameters
|
337
|
+
# @option opts [String] :title news title
|
338
|
+
# @option opts [String] :body news body in OSDN Wiki format.
|
425
339
|
# @return [News]
|
426
|
-
describe '
|
340
|
+
describe 'update_news_0 test' do
|
427
341
|
it "should work" do
|
428
|
-
# assertion here
|
429
|
-
# should be_a()
|
430
|
-
# should be_nil
|
431
|
-
# should ==
|
432
|
-
# should_not ==
|
342
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
433
343
|
end
|
434
344
|
end
|
435
345
|
|
436
|
-
# unit tests for
|
437
|
-
#
|
346
|
+
# unit tests for update_package
|
438
347
|
#
|
348
|
+
# Update tagret package.
|
439
349
|
# @param id_or_name numeric project id or project name
|
440
|
-
# @param
|
350
|
+
# @param package_id
|
441
351
|
# @param [Hash] opts the optional parameters
|
442
|
-
# @
|
443
|
-
|
352
|
+
# @option opts [String] :name package name
|
353
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
354
|
+
# @return [Package]
|
355
|
+
describe 'update_package test' do
|
444
356
|
it "should work" do
|
445
|
-
# assertion here
|
446
|
-
# should be_a()
|
447
|
-
# should be_nil
|
448
|
-
# should ==
|
449
|
-
# should_not ==
|
357
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
450
358
|
end
|
451
359
|
end
|
452
360
|
|
453
|
-
# unit tests for
|
361
|
+
# unit tests for update_release
|
454
362
|
#
|
363
|
+
# Update target release. (Note: If you update draft release, the release will be public automatically.)
|
364
|
+
# @param id_or_name numeric project id or project name
|
365
|
+
# @param package_id
|
366
|
+
# @param release_id
|
367
|
+
# @param [Hash] opts the optional parameters
|
368
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
369
|
+
# @option opts [String] :name Release name
|
370
|
+
# @option opts [String] :time Release datetime. If you set future time, the release hide until specified time.
|
371
|
+
# @option opts [Integer] :move_to_package_id If this parameter is specified, the release move to another package.
|
372
|
+
# @return [Release]
|
373
|
+
describe 'update_release test' do
|
374
|
+
it "should work" do
|
375
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
376
|
+
end
|
377
|
+
end
|
378
|
+
|
379
|
+
# unit tests for update_release_file
|
455
380
|
#
|
456
|
-
#
|
381
|
+
# Change visibility of target file.
|
457
382
|
# @param id_or_name numeric project id or project name
|
383
|
+
# @param package_id
|
384
|
+
# @param release_id
|
385
|
+
# @param file_id
|
458
386
|
# @param [Hash] opts the optional parameters
|
459
|
-
# @option opts [String] :
|
460
|
-
# @
|
461
|
-
|
462
|
-
describe 'update_news_0 test' do
|
387
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
388
|
+
# @return [RelFile]
|
389
|
+
describe 'update_release_file test' do
|
463
390
|
it "should work" do
|
464
|
-
# assertion here
|
465
|
-
# should be_a()
|
466
|
-
# should be_nil
|
467
|
-
# should ==
|
468
|
-
# should_not ==
|
391
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
469
392
|
end
|
470
393
|
end
|
471
394
|
|