rabbit-slide-kenhys-tokyodebian-debbugs-soap-20170520 2017.05.20.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7c53d3447446e260731decc63fd92b4ed596f9e2
4
+ data.tar.gz: b7387c57ecec9ec73c9d8fe8483cf3e814bf1630
5
+ SHA512:
6
+ metadata.gz: 5cac9153370b119accf4e29a34e3d4b66e58b003144307e94eb66c43a062709da7b3df8efdf9976ed4ea9b375efe2007173037bcb95a33b2e23ed3e94ecc72df
7
+ data.tar.gz: f421492d8edc751f16ab12c82f702025b06a29cafd3386056f3ae9de4d0207b850305f3b198c2881e4d546abe7bdddc3eea6d8a821e46d2ec70f5dcf4a207693
data/.rabbit ADDED
@@ -0,0 +1 @@
1
+ debbugs-soap.rab
@@ -0,0 +1,24 @@
1
+ # Debbugsとの付き合い方:SOAP編
2
+
3
+ 2017年5月20日に開催された東京エリアDebian勉強会の発表資料です。
4
+
5
+ ## 作者向け
6
+
7
+ ### 表示
8
+
9
+ rake
10
+
11
+ ### 公開
12
+
13
+ rake publish
14
+
15
+ ## 閲覧者向け
16
+
17
+ ### インストール
18
+
19
+ gem install rabbit-slide-kenhys-tokyodebian-debbugs-soap-20170520
20
+
21
+ ### 表示
22
+
23
+ rabbit rabbit-slide-kenhys-tokyodebian-debbugs-soap-20170520.gem
24
+
@@ -0,0 +1,17 @@
1
+ require "rabbit/task/slide"
2
+
3
+ # Edit ./config.yaml to customize meta data
4
+
5
+ spec = nil
6
+ Rabbit::Task::Slide.new do |task|
7
+ spec = task.spec
8
+ # spec.files += Dir.glob("doc/**/*.*")
9
+ # spec.files -= Dir.glob("private/**/*.*")
10
+ # spec.add_runtime_dependency("YOUR THEME")
11
+ end
12
+
13
+ desc "Tag #{spec.version}"
14
+ task :tag do
15
+ sh("git", "tag", "-a", spec.version.to_s, "-m", "Publish #{spec.version}")
16
+ sh("git", "push", "--tags")
17
+ end
@@ -0,0 +1,22 @@
1
+ ---
2
+ id: tokyodebian-debbugs-soap-20170520
3
+ base_name: debbugs-soap
4
+ tags:
5
+ - rabbit
6
+ - debbugs
7
+ presentation_date:
8
+ version: 2017.05.20.1
9
+ licenses:
10
+ - CC-BY-SA-4.0
11
+ slideshare_id:
12
+ speaker_deck_id:
13
+ ustream_id:
14
+ vimeo_id:
15
+ youtube_id:
16
+ author:
17
+ markup_language: :rd
18
+ name: Kentaro Hayashi
19
+ email: kenhys@gmail.com
20
+ rubygems_user: kenhys
21
+ slideshare_user:
22
+ speaker_deck_user:
@@ -0,0 +1,367 @@
1
+ = Debbugsとの\nつきあいかた
2
+
3
+ : subtitle
4
+ SOAP編
5
+ : author
6
+ Kentaro Hayashi
7
+ : institution
8
+ ClearCode Inc.
9
+ : content-source
10
+ 東京エリアDebian勉強会
11
+ : date
12
+ 2017-05-20
13
+ : allotted-time
14
+ 15m
15
+ : theme
16
+ .
17
+
18
+ = 自己紹介(1)
19
+
20
+ # image
21
+ # relative-height = 40
22
+ # src = https://pbs.twimg.com/profile_images/2290018079/cvcy12slbeva80jboxzf_400x400.png
23
+
24
+ * Twitter/GitHub: @kenhys
25
+ * 所属: ((*トラックポイント・ソフトドーム派*))
26
+
27
+ = 自己紹介(2)
28
+
29
+ # image
30
+ # relative-height = 60
31
+ # src = images/track-points.png
32
+
33
+ * トラックポイント・ソフトドーム派
34
+
35
+ = 参考画像の出典
36
+
37
+ # image
38
+ # relative-height = 80
39
+ # src = images/irasutoya.png
40
+
41
+ * http://www.irasutoya.com/
42
+
43
+ = パッケージ関連の活動
44
+
45
+ * groonga (全文検索エンジン)
46
+ * groonga-normalizer-mysql
47
+ * libhinawa
48
+ * fcitx-imlist
49
+ * hal-flash (Flashを延命させるアレ)
50
+ * growl-for-linux
51
+
52
+ = 閑話休題
53
+
54
+ (('tag:center'))
55
+ そろそろ本題に
56
+
57
+ = 本日の話題
58
+
59
+ * Debbugsとのつきあいかた:SOAP編
60
+
61
+ = 本日の話題
62
+
63
+ * Debbugsとのつきあいかた((*:SOAP編*))
64
+
65
+ = 話さないこと
66
+
67
+ * Debbugsのふつうの使い方
68
+
69
+ = Debbugsとは?
70
+
71
+ # image
72
+ # relative-height = 100
73
+ # src = images/debbugs-debbugs.png
74
+
75
+ = Debbugsとは?
76
+
77
+ * 1994年 Ian Jackson氏が開発を始めた\n
78
+ Issueトラッキングシステム
79
+ * GNOMEやKDEもかつて採用していた\n
80
+ →Bugzillaへ移行した
81
+
82
+ = ふつうの人のバグ報告(1)
83
+
84
+ # image
85
+ # relative-height = 80
86
+ # src = images/reportbug.png
87
+
88
+ * Reportbug!
89
+
90
+ = ふつうの人のバグ報告(2)
91
+
92
+ # image
93
+ # relative-height = 80
94
+ # src = images/reportbug-ng.png
95
+
96
+ * Reportbug-NG!
97
+
98
+ = Debbugsのよいところ
99
+
100
+ * メールで気軽にバグ報告
101
+ * 報告にログインとか不要
102
+ * 一見さんをカジュアルに殺せる初見殺し機能搭載
103
+
104
+ = Debbugsの見方
105
+
106
+ # image
107
+ # relative-height = 80
108
+ # src = images/debbugs-status.png
109
+
110
+ * [重要度|タグ|状態]
111
+
112
+ = Debbugsの重要度
113
+
114
+ * m: minor
115
+ * w: wishlist
116
+ * n: normal
117
+ * S: serious
118
+ * G: grave
119
+
120
+ = Debbugsのタグ
121
+
122
+ * +: patch
123
+ * ☹: wontfix
124
+ * M: moreinfo
125
+ * P: pending
126
+
127
+ = Debbugsの状態
128
+
129
+ * ♔: blocks
130
+ * ☣: affects
131
+ * ☺: fixed
132
+
133
+ = なぜDebbugsに興味を?
134
+
135
+ * 社内のグループチャットがZulip
136
+ * https://zulip.org/
137
+ * Zulipのbotにdebbugsをサポートさせたい
138
+ * https://github.com/okkez/pragmatic-bot
139
+ * バグ報告のURLを貼り付けたらbotに処理させたい
140
+
141
+ = botに処理させるには?
142
+
143
+ * bugs.d.oをスクレイピング?
144
+ * もっといいやりかたはない?
145
+
146
+ = SOAP!
147
+
148
+ * https://wiki.debian.org/DebbugsSoapInterface
149
+
150
+ = サンプルコードもあるよ
151
+
152
+ require 'soap/rpc/driver'
153
+
154
+ host = "bugs.debian.org"
155
+ port = 80
156
+ server="http://#{host}:#{port}/cgi-bin/soap.cgi"
157
+ ns = 'Debbugs/SOAP/'
158
+ drv = SOAP::RPC::Driver.new(server, ns)
159
+ drv.wiredump_dev = STDOUT if $DEBUG
160
+ drv.add_method('get_status','bugnumber')
161
+ drv.add_method('get_bugs','keyparam')
162
+
163
+ p drv.get_status(drv.get_bugs(['package', 'pbuilder', 'severity', 'wishlist']))
164
+
165
+ * Ruby 1.8 or ((*修正済みsoap4r*))じゃないと動かない
166
+
167
+ = Rubyの事情
168
+
169
+ * soap4rはもともとRuby 1.8にバンドル
170
+ * Ruby 1.9ではバンドルされなくなった
171
+ * soap4rはメンテされなくなった
172
+ * 雨後の筍 soap4r
173
+
174
+ = 雨後の筍 soap4r
175
+
176
+ * soap4r-ng (2.0.3)
177
+ * soap4r-r19 (1.5.9) Ruby1.9対応版
178
+ * soap4r-ruby1.9 (2.0.5) Ruby1.9対応版
179
+ * soap4r-ruby19 (1.5.9) Ruby1.9対応版
180
+
181
+ = soapXr
182
+
183
+ * soap2r (1.5.8) soap4rの後にリリース
184
+ * soap5r (2.0.3)
185
+
186
+ = upstream on Debian
187
+
188
+ * ruby-soap4r
189
+ * https://github.com/noeticpenguin/soap4r-noeticpenguin
190
+
191
+ = 混沌とした世界
192
+
193
+ * あまり踏み込まないほうがよい予感
194
+
195
+ = SOAPを使うには
196
+
197
+ * ポイント:WSDL
198
+
199
+ = WSDL
200
+
201
+ * Web Services Description Language
202
+ * Webサービス記述言語
203
+ * XMLでインターフェースを定義する
204
+ * WSDLを元にSOAPで通信
205
+
206
+ = DebbugsのWSDL
207
+
208
+ * https://wiki.debian.org/DebbugsSoapInterface
209
+ * ((*一切言及はない*))
210
+ * どうなってるの?
211
+
212
+ = WSDLを探せ
213
+
214
+ # image
215
+ # relative-height = 70
216
+ # src = images/debbugs-wsdl-found.png
217
+
218
+ * Emacs使いはdebbugs.el
219
+ * https://elpa.gnu.org/packages/debbugs.html
220
+
221
+ = Debbugs.wsdl
222
+
223
+ * Debbugs用のWSDL
224
+ * debian.orgとgnu.orgのdebbugsで使える
225
+
226
+ = WSDLの構造
227
+
228
+ * <wsdl:definitions>の子要素として定義
229
+ * <wsdl:types>
230
+ * <wsdl:message>
231
+ * <wsdl:portType>
232
+ * <wsdl:binding>
233
+ * <wsdl:service>
234
+
235
+ = <wsdl:types>
236
+
237
+
238
+ <complexType name="ArrayOfBugNumber">
239
+ <complexContent>
240
+ <restriction base="soapenc:Array">
241
+ <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:int[]"/>
242
+ </restriction>
243
+ </complexContent>
244
+ </complexType>
245
+
246
+ * データ型の定義をする
247
+ * 例:バグ番号の配列を定義
248
+
249
+ = <wsdl:message>
250
+
251
+ <wsdl:message name="get_statusRequest">
252
+ <wsdl:part name="bugs" type="types:ArrayOfBugNumber"/>
253
+ </wsdl:message>
254
+ <wsdl:message name="get_statusResponse">
255
+ <wsdl:part name="s-gensym3" type="apachens:Map"/>
256
+ </wsdl:message>
257
+
258
+ * データの抽象的な定義
259
+ * 例:ステータス取得時にやりとりするデータの定義
260
+
261
+ = <wsdl:portType>
262
+
263
+ * 操作の定義 <wsl:operation>を含む
264
+
265
+ <wsdl:portType name="Debbugs/SOAP">
266
+ <wsdl:operation name="get_status" parameterOrder="bugs">
267
+ ...
268
+ </wsdl:operation>
269
+ <wsdl:operation name="get_bug_log" parameterOrder="bugnumber">
270
+ ...
271
+ </wsdl:operation>
272
+ </wsdl:portType>
273
+
274
+ = <wsdl:operation>
275
+
276
+ <wsdl:operation name="get_status" parameterOrder="bugs">
277
+ <wsdl:input message="tns:get_statusRequest">
278
+ <soap:body
279
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
280
+ namespace="urn:Debbugs/SOAP"
281
+ use="encoded"/>
282
+ </wsdl:input>
283
+ <wsdl:output message="tns:get_statusResponse">
284
+ <soap:body
285
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
286
+ namespace="urn:Debbugs/SOAP"
287
+ use="encoded"/>
288
+ </wsdl:output>
289
+ </wsdl:operation>
290
+
291
+ * 操作の入出力を定義
292
+ * 例:ステータス取得時の入出力を定義
293
+
294
+ = <wsdl:binding>
295
+
296
+ * portTypeで定義した操作のプロトコルを指定
297
+
298
+ <wsdl:binding name="Debbugs/SOAP/BINDING" type="tns:Debbugs/SOAP">
299
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
300
+ <wsdl:operation name="get_status">
301
+ ...
302
+ </wsdl:operation>
303
+ </wsdl:binding>
304
+
305
+ = <wsdl:service>
306
+
307
+ * 通信先を定義
308
+
309
+ <wsdl:service name="Debbugs/SOAP/SERVICE">
310
+ <wsdl:port binding="tns:Debbugs/SOAP/BINDING" name="gnu.org">
311
+ <wsdlsoap:address location="http://debbugs.gnu.org/cgi/soap.cgi"/>
312
+ </wsdl:port>
313
+ <wsdl:port binding="tns:Debbugs/SOAP/BINDING" name="debian.org">
314
+ <wsdlsoap:address location="http://bugs.debian.org/cgi-bin/soap.cgi"/>
315
+ </wsdl:port>
316
+ </wsdl:service>
317
+
318
+ = 実践:debbugs
319
+
320
+ * 実際にSOAPでやりとりしてみるには
321
+
322
+ = 何を使う?
323
+
324
+ * savon
325
+ * http://savonrb.com/
326
+ * RubyのSOAP clientライブラリー
327
+
328
+ = savonの使い方
329
+
330
+ * require "savon"
331
+ * WSDLからクライアントのインスタンス作成
332
+ * callでdebbugsのメソッドを呼ぶ
333
+ * レスポンスを表示する
334
+
335
+ = savonクライアント
336
+
337
+ client = Savon.client(wsdl: "(WSDLのURL)",
338
+ endpoint: "http://bugs.debian.org/cgi-bin/soap.cgi",
339
+ namespace: "Debbugs/SOAP")
340
+
341
+ * クライアント作成
342
+
343
+ = メソッドを呼ぶ
344
+
345
+ # fetch status of pbuilder specific bugs
346
+ response = client.call(:get_status) do
347
+ message(bugs: ["807406", "837812"])
348
+ end
349
+
350
+ * 例: get_statusメソッドを呼ぶ
351
+
352
+ = レスポンスを表示する
353
+
354
+ bugs = response.body[:get_status_response][:s_gensym3][:item]
355
+ bugs.each do |bug|
356
+ item = bug[:value]
357
+ puts "#{bug[:key]}:#{item[:pending]}:#{item[:subject]}"
358
+ end
359
+ #=>
360
+ 807406:pending:pbuilder: drop all the 'xenial' (...)
361
+ 837812:pending:[pbuilder] New hook improving dpkgi
362
+
363
+ = まとめ
364
+
365
+ * debbugsにはSOAPインターフェースがある
366
+ * Debbug.wsdlはdebbugs.el方面から入手せよ
367
+ * Rubyから使うならsoap4r(修正版) or savonを使え
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1 @@
1
+ include_theme("debian")
metadata ADDED
@@ -0,0 +1,76 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rabbit-slide-kenhys-tokyodebian-debbugs-soap-20170520
3
+ version: !ruby/object:Gem::Version
4
+ version: 2017.05.20.1
5
+ platform: ruby
6
+ authors:
7
+ - Kentaro Hayashi
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-05-20 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rabbit
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 2.0.2
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 2.0.2
27
+ description: 2017年5月20日に開催された東京エリアDebian勉強会の発表資料です。
28
+ email:
29
+ - kenhys@gmail.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - ".rabbit"
35
+ - README.md
36
+ - Rakefile
37
+ - config.yaml
38
+ - debbugs-soap-interface-not-work.png
39
+ - debbugs-soap.rab
40
+ - images/computer_trackpoint_classicdome.png
41
+ - images/computer_trackpoint_softdome.png
42
+ - images/computer_trackpoint_softrim.png
43
+ - images/debbugs-debbugs.png
44
+ - images/debbugs-status.png
45
+ - images/debbugs-wsdl-found.png
46
+ - images/irasutoya.png
47
+ - images/reportbug-ng.png
48
+ - images/reportbug.png
49
+ - images/track-points.png
50
+ - pdf/tokyodebian-debbugs-soap-20170520-debbugs-soap.pdf
51
+ - theme.rb
52
+ homepage: http://slide.rabbit-shocker.org/authors/kenhys/tokyodebian-debbugs-soap-20170520/
53
+ licenses:
54
+ - CC-BY-SA-4.0
55
+ metadata: {}
56
+ post_install_message:
57
+ rdoc_options: []
58
+ require_paths:
59
+ - lib
60
+ required_ruby_version: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: '0'
65
+ required_rubygems_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ requirements: []
71
+ rubyforge_project:
72
+ rubygems_version: 2.6.11
73
+ signing_key:
74
+ specification_version: 4
75
+ summary: Debbugsとの付き合い方:SOAP編
76
+ test_files: []