osdn-client 0.0.20160304
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/osdn-client.rb +45 -0
- data/lib/osdn-client/api/default_api.rb +148 -0
- data/lib/osdn-client/api/project_api.rb +1752 -0
- data/lib/osdn-client/api/project_frs_api.rb +1033 -0
- data/lib/osdn-client/api/project_news_api.rb +673 -0
- data/lib/osdn-client/api/user_api.rb +76 -0
- data/lib/osdn-client/api_client.rb +318 -0
- data/lib/osdn-client/api_error.rb +24 -0
- data/lib/osdn-client/configuration.rb +177 -0
- data/lib/osdn-client/models/group.rb +298 -0
- data/lib/osdn-client/models/group_tool_flags.rb +236 -0
- data/lib/osdn-client/models/news.rb +206 -0
- data/lib/osdn-client/models/package.rb +198 -0
- data/lib/osdn-client/models/pong.rb +176 -0
- data/lib/osdn-client/models/rel_file.rb +256 -0
- data/lib/osdn-client/models/release.rb +228 -0
- data/lib/osdn-client/models/simple_chamber.rb +176 -0
- data/lib/osdn-client/models/simple_group.rb +176 -0
- data/lib/osdn-client/models/simple_user.rb +166 -0
- data/lib/osdn-client/models/skill.rb +176 -0
- data/lib/osdn-client/models/token.rb +186 -0
- data/lib/osdn-client/models/user.rb +272 -0
- data/lib/osdn-client/version.rb +3 -0
- data/osdn-client.gemspec +32 -0
- data/spec/api/DefaultApi_spec.rb +58 -0
- data/spec/api/ProjectApi_spec.rb +472 -0
- data/spec/api/ProjectFrsApi_spec.rb +285 -0
- data/spec/api/ProjectNewsApi_spec.rb +194 -0
- data/spec/api/UserApi_spec.rb +39 -0
- data/spec/models/GroupToolFlags_spec.rb +124 -0
- data/spec/models/Group_spec.rb +184 -0
- data/spec/models/News_spec.rb +94 -0
- data/spec/models/Package_spec.rb +84 -0
- data/spec/models/Pong_spec.rb +64 -0
- data/spec/models/RelFile_spec.rb +144 -0
- data/spec/models/Release_spec.rb +114 -0
- data/spec/models/SimpleChamber_spec.rb +64 -0
- data/spec/models/SimpleGroup_spec.rb +64 -0
- data/spec/models/SimpleUser_spec.rb +54 -0
- data/spec/models/Skill_spec.rb +64 -0
- data/spec/models/Token_spec.rb +74 -0
- data/spec/models/User_spec.rb +154 -0
- metadata +284 -0
@@ -0,0 +1,285 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
# Unit tests for OSDNClient::ProjectFrsApi
|
5
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
6
|
+
# Please update as you see appropriate
|
7
|
+
describe 'ProjectFrsApi' do
|
8
|
+
before do
|
9
|
+
# run before each test
|
10
|
+
@instance = OSDNClient::ProjectFrsApi.new
|
11
|
+
end
|
12
|
+
|
13
|
+
after do
|
14
|
+
# run after each test
|
15
|
+
end
|
16
|
+
|
17
|
+
describe 'test an instance of ProjectFrsApi' do
|
18
|
+
it 'should create an instact of ProjectFrsApi' do
|
19
|
+
@instance.should be_a(OSDNClient::ProjectFrsApi)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
# unit tests for list_packages
|
24
|
+
#
|
25
|
+
# Get package list of specified project.
|
26
|
+
# @param id_or_name numeric project id or project name
|
27
|
+
# @param [Hash] opts the optional parameters
|
28
|
+
# @return [Array<Package>]
|
29
|
+
describe 'list_packages test' do
|
30
|
+
it "should work" do
|
31
|
+
# assertion here
|
32
|
+
# should be_a()
|
33
|
+
# should be_nil
|
34
|
+
# should ==
|
35
|
+
# should_not ==
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
# unit tests for create_package
|
40
|
+
#
|
41
|
+
# Create a package.
|
42
|
+
# @param id_or_name numeric project id or project name
|
43
|
+
# @param name package name
|
44
|
+
# @param [Hash] opts the optional parameters
|
45
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
46
|
+
# @return [Package]
|
47
|
+
describe 'create_package test' do
|
48
|
+
it "should work" do
|
49
|
+
# assertion here
|
50
|
+
# should be_a()
|
51
|
+
# should be_nil
|
52
|
+
# should ==
|
53
|
+
# should_not ==
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
# unit tests for get_package
|
58
|
+
#
|
59
|
+
# Get specified package info and release list of the package.
|
60
|
+
# @param id_or_name numeric project id or project name
|
61
|
+
# @param package_id
|
62
|
+
# @param [Hash] opts the optional parameters
|
63
|
+
# @return [Package]
|
64
|
+
describe 'get_package test' do
|
65
|
+
it "should work" do
|
66
|
+
# assertion here
|
67
|
+
# should be_a()
|
68
|
+
# should be_nil
|
69
|
+
# should ==
|
70
|
+
# should_not ==
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
# unit tests for create_release
|
75
|
+
#
|
76
|
+
# Create new release in specified package.
|
77
|
+
# @param id_or_name numeric project id or project name
|
78
|
+
# @param package_id
|
79
|
+
# @param name Release name
|
80
|
+
# @param [Hash] opts the optional parameters
|
81
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
82
|
+
# @option opts [String] :time Release datetime. If you set future time, the release hide until specified time.
|
83
|
+
# @option opts [String] :release_note Release note body text.
|
84
|
+
# @option opts [String] :change_log Changelog body text.
|
85
|
+
# @return [Release]
|
86
|
+
describe 'create_release test' do
|
87
|
+
it "should work" do
|
88
|
+
# assertion here
|
89
|
+
# should be_a()
|
90
|
+
# should be_nil
|
91
|
+
# should ==
|
92
|
+
# should_not ==
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
# unit tests for delete_package
|
97
|
+
#
|
98
|
+
# Delete taret package.
|
99
|
+
# @param id_or_name numeric project id or project name
|
100
|
+
# @param package_id
|
101
|
+
# @param [Hash] opts the optional parameters
|
102
|
+
# @return [nil]
|
103
|
+
describe 'delete_package test' do
|
104
|
+
it "should work" do
|
105
|
+
# assertion here
|
106
|
+
# should be_a()
|
107
|
+
# should be_nil
|
108
|
+
# should ==
|
109
|
+
# should_not ==
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
# unit tests for update_package
|
114
|
+
#
|
115
|
+
# Update tagret package.
|
116
|
+
# @param id_or_name numeric project id or project name
|
117
|
+
# @param package_id
|
118
|
+
# @param [Hash] opts the optional parameters
|
119
|
+
# @option opts [String] :name package name
|
120
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
121
|
+
# @return [Package]
|
122
|
+
describe 'update_package test' do
|
123
|
+
it "should work" do
|
124
|
+
# assertion here
|
125
|
+
# should be_a()
|
126
|
+
# should be_nil
|
127
|
+
# should ==
|
128
|
+
# should_not ==
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
# unit tests for draft_release
|
133
|
+
#
|
134
|
+
# Get release draft in specified package. If draft is not exist, it will be created automatically.
|
135
|
+
# @param id_or_name numeric project id or project name
|
136
|
+
# @param package_id
|
137
|
+
# @param [Hash] opts the optional parameters
|
138
|
+
# @return [Release]
|
139
|
+
describe 'draft_release test' do
|
140
|
+
it "should work" do
|
141
|
+
# assertion here
|
142
|
+
# should be_a()
|
143
|
+
# should be_nil
|
144
|
+
# should ==
|
145
|
+
# should_not ==
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
# unit tests for get_release
|
150
|
+
#
|
151
|
+
# Get specified release info and file list of the release.
|
152
|
+
# @param id_or_name numeric project id or project name
|
153
|
+
# @param package_id
|
154
|
+
# @param release_id
|
155
|
+
# @param [Hash] opts the optional parameters
|
156
|
+
# @return [Release]
|
157
|
+
describe 'get_release test' do
|
158
|
+
it "should work" do
|
159
|
+
# assertion here
|
160
|
+
# should be_a()
|
161
|
+
# should be_nil
|
162
|
+
# should ==
|
163
|
+
# should_not ==
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
# unit tests for create_release_file
|
168
|
+
#
|
169
|
+
# Create new file in target release.
|
170
|
+
# @param id_or_name numeric project id or project name
|
171
|
+
# @param package_id
|
172
|
+
# @param release_id
|
173
|
+
# @param file Upload file in \"multipart/form-data\".
|
174
|
+
# @param [Hash] opts the optional parameters
|
175
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
176
|
+
# @return [RelFile]
|
177
|
+
describe 'create_release_file test' do
|
178
|
+
it "should work" do
|
179
|
+
# assertion here
|
180
|
+
# should be_a()
|
181
|
+
# should be_nil
|
182
|
+
# should ==
|
183
|
+
# should_not ==
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
187
|
+
# unit tests for delete_release
|
188
|
+
#
|
189
|
+
# Delete target release.
|
190
|
+
# @param id_or_name numeric project id or project name
|
191
|
+
# @param package_id
|
192
|
+
# @param release_id
|
193
|
+
# @param [Hash] opts the optional parameters
|
194
|
+
# @return [nil]
|
195
|
+
describe 'delete_release test' do
|
196
|
+
it "should work" do
|
197
|
+
# assertion here
|
198
|
+
# should be_a()
|
199
|
+
# should be_nil
|
200
|
+
# should ==
|
201
|
+
# should_not ==
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
# unit tests for update_release
|
206
|
+
#
|
207
|
+
# Update target release.\n(Note: If you update draft release, the release will be public automatically.)
|
208
|
+
# @param id_or_name numeric project id or project name
|
209
|
+
# @param package_id
|
210
|
+
# @param release_id
|
211
|
+
# @param [Hash] opts the optional parameters
|
212
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
213
|
+
# @option opts [String] :name Release name
|
214
|
+
# @option opts [String] :time Release datetime. If you set future time, the release hide until specified time.
|
215
|
+
# @option opts [Integer] :move_to_package_id If this parameter is specified, the release move to another package.
|
216
|
+
# @return [Release]
|
217
|
+
describe 'update_release test' do
|
218
|
+
it "should work" do
|
219
|
+
# assertion here
|
220
|
+
# should be_a()
|
221
|
+
# should be_nil
|
222
|
+
# should ==
|
223
|
+
# should_not ==
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
227
|
+
# unit tests for get_release_file
|
228
|
+
#
|
229
|
+
# Get single file object.
|
230
|
+
# @param id_or_name numeric project id or project name
|
231
|
+
# @param package_id
|
232
|
+
# @param release_id
|
233
|
+
# @param file_id
|
234
|
+
# @param [Hash] opts the optional parameters
|
235
|
+
# @return [RelFile]
|
236
|
+
describe 'get_release_file test' do
|
237
|
+
it "should work" do
|
238
|
+
# assertion here
|
239
|
+
# should be_a()
|
240
|
+
# should be_nil
|
241
|
+
# should ==
|
242
|
+
# should_not ==
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
246
|
+
# unit tests for delete_release_file
|
247
|
+
#
|
248
|
+
# Delete target file.
|
249
|
+
# @param id_or_name numeric project id or project name
|
250
|
+
# @param package_id
|
251
|
+
# @param release_id
|
252
|
+
# @param file_id
|
253
|
+
# @param [Hash] opts the optional parameters
|
254
|
+
# @return [nil]
|
255
|
+
describe 'delete_release_file test' do
|
256
|
+
it "should work" do
|
257
|
+
# assertion here
|
258
|
+
# should be_a()
|
259
|
+
# should be_nil
|
260
|
+
# should ==
|
261
|
+
# should_not ==
|
262
|
+
end
|
263
|
+
end
|
264
|
+
|
265
|
+
# unit tests for update_release_file
|
266
|
+
#
|
267
|
+
# Change visibility of target file.
|
268
|
+
# @param id_or_name numeric project id or project name
|
269
|
+
# @param package_id
|
270
|
+
# @param release_id
|
271
|
+
# @param file_id
|
272
|
+
# @param [Hash] opts the optional parameters
|
273
|
+
# @option opts [String] :visibility visibility status (public, hidden or private)
|
274
|
+
# @return [RelFile]
|
275
|
+
describe 'update_release_file test' do
|
276
|
+
it "should work" do
|
277
|
+
# assertion here
|
278
|
+
# should be_a()
|
279
|
+
# should be_nil
|
280
|
+
# should ==
|
281
|
+
# should_not ==
|
282
|
+
end
|
283
|
+
end
|
284
|
+
|
285
|
+
end
|
@@ -0,0 +1,194 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
# Unit tests for OSDNClient::ProjectNewsApi
|
5
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
6
|
+
# Please update as you see appropriate
|
7
|
+
describe 'ProjectNewsApi' do
|
8
|
+
before do
|
9
|
+
# run before each test
|
10
|
+
@instance = OSDNClient::ProjectNewsApi.new
|
11
|
+
end
|
12
|
+
|
13
|
+
after do
|
14
|
+
# run after each test
|
15
|
+
end
|
16
|
+
|
17
|
+
describe 'test an instance of ProjectNewsApi' do
|
18
|
+
it 'should create an instact of ProjectNewsApi' do
|
19
|
+
@instance.should be_a(OSDNClient::ProjectNewsApi)
|
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 ==
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
# unit tests for create_news
|
40
|
+
#
|
41
|
+
#
|
42
|
+
# @param title news title
|
43
|
+
# @param body news body in OSDN Wiki format.
|
44
|
+
# @param group_id group_id the news created in
|
45
|
+
# @param [Hash] opts the optional parameters
|
46
|
+
# @return [String]
|
47
|
+
describe 'create_news test' do
|
48
|
+
it "should work" do
|
49
|
+
# assertion here
|
50
|
+
# should be_a()
|
51
|
+
# should be_nil
|
52
|
+
# should ==
|
53
|
+
# should_not ==
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
# unit tests for get_news
|
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
|
74
|
+
#
|
75
|
+
#
|
76
|
+
# @param news_id
|
77
|
+
# @param [Hash] opts the optional parameters
|
78
|
+
# @return [nil]
|
79
|
+
describe 'delete_news test' do
|
80
|
+
it "should work" do
|
81
|
+
# assertion here
|
82
|
+
# should be_a()
|
83
|
+
# should be_nil
|
84
|
+
# should ==
|
85
|
+
# should_not ==
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
# unit tests for update_news
|
90
|
+
#
|
91
|
+
#
|
92
|
+
# @param news_id
|
93
|
+
# @param [Hash] opts the optional parameters
|
94
|
+
# @option opts [String] :title news title
|
95
|
+
# @option opts [String] :body news body in OSDN Wiki format.
|
96
|
+
# @return [News]
|
97
|
+
describe 'update_news test' do
|
98
|
+
it "should work" do
|
99
|
+
# assertion here
|
100
|
+
# should be_a()
|
101
|
+
# should be_nil
|
102
|
+
# should ==
|
103
|
+
# should_not ==
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
# unit tests for list_news_0
|
108
|
+
#
|
109
|
+
# Get news list of spscified project.
|
110
|
+
# @param id_or_name numeric project id or project name
|
111
|
+
# @param [Hash] opts the optional parameters
|
112
|
+
# @return [Array<News>]
|
113
|
+
describe 'list_news_0 test' do
|
114
|
+
it "should work" do
|
115
|
+
# assertion here
|
116
|
+
# should be_a()
|
117
|
+
# should be_nil
|
118
|
+
# should ==
|
119
|
+
# should_not ==
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
# unit tests for create_news_0
|
124
|
+
#
|
125
|
+
#
|
126
|
+
# @param id_or_name numeric project id or project name
|
127
|
+
# @param title news title
|
128
|
+
# @param body news body in OSDN Wiki format.
|
129
|
+
# @param [Hash] opts the optional parameters
|
130
|
+
# @return [String]
|
131
|
+
describe 'create_news_0 test' do
|
132
|
+
it "should work" do
|
133
|
+
# assertion here
|
134
|
+
# should be_a()
|
135
|
+
# should be_nil
|
136
|
+
# should ==
|
137
|
+
# should_not ==
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
# unit tests for get_news_0
|
142
|
+
#
|
143
|
+
# Get single news object.
|
144
|
+
# @param id_or_name numeric project id or project name
|
145
|
+
# @param news_id
|
146
|
+
# @param [Hash] opts the optional parameters
|
147
|
+
# @return [News]
|
148
|
+
describe 'get_news_0 test' do
|
149
|
+
it "should work" do
|
150
|
+
# assertion here
|
151
|
+
# should be_a()
|
152
|
+
# should be_nil
|
153
|
+
# should ==
|
154
|
+
# should_not ==
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
# unit tests for delete_news_0
|
159
|
+
#
|
160
|
+
#
|
161
|
+
# @param id_or_name numeric project id or project name
|
162
|
+
# @param news_id
|
163
|
+
# @param [Hash] opts the optional parameters
|
164
|
+
# @return [nil]
|
165
|
+
describe 'delete_news_0 test' do
|
166
|
+
it "should work" do
|
167
|
+
# assertion here
|
168
|
+
# should be_a()
|
169
|
+
# should be_nil
|
170
|
+
# should ==
|
171
|
+
# should_not ==
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
# unit tests for update_news_0
|
176
|
+
#
|
177
|
+
#
|
178
|
+
# @param news_id
|
179
|
+
# @param id_or_name numeric project id or project name
|
180
|
+
# @param [Hash] opts the optional parameters
|
181
|
+
# @option opts [String] :title news title
|
182
|
+
# @option opts [String] :body news body in OSDN Wiki format.
|
183
|
+
# @return [News]
|
184
|
+
describe 'update_news_0 test' do
|
185
|
+
it "should work" do
|
186
|
+
# assertion here
|
187
|
+
# should be_a()
|
188
|
+
# should be_nil
|
189
|
+
# should ==
|
190
|
+
# should_not ==
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
end
|