wadl 0.3.0 → 0.3.1.pre1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 502bdfe2423d3d6020d35cfd788adcdb5711af80
4
- data.tar.gz: 8e38d68bc3a3574ed72cc86c4146ad964135925d
3
+ metadata.gz: 3d354b61e4f78949b820f81bafd9cf67a151c609
4
+ data.tar.gz: 703da45e4134f0b86d6207229af2f1f54dceb6e6
5
5
  SHA512:
6
- metadata.gz: 60ed00a1f22ed3d648900ae3a56b7470bf985b15d9811f250a0c45154305c4e2b8671477a5cf5bf98d50d0ae6908f5736ad61799082d29db01f471ce3b3568d2
7
- data.tar.gz: 2f2acd870930374c2f3a8986478106cb06f4c7795392ca71a05717882abda265813dc80073be744f79c6899e175257de2a348d414ca0e3df5fe20f340dd91fe3
6
+ metadata.gz: 3b2bb97cfad57a442ba3471ebc76f612c0d9b54f95881dc7f51968c2905582f969b36721abd7c036430a5de89661e119e20167c674bc98981b9cc0fa60d2f4bc
7
+ data.tar.gz: d0539b0d84a7e6a9b2ef7ed34a04ad37c9a6b8c0f85a1f0e97710e64b58f2a5a986ab84a7465f3ef0e6ebe183c22ae4c77d9c6aa411da13add36e639591bdcbe
data/README CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  == VERSION
4
4
 
5
- This documentation refers to wadl version 0.3.0
5
+ This documentation refers to wadl version 0.3.1
6
6
 
7
7
 
8
8
  == DESCRIPTION
@@ -61,7 +61,7 @@ Travis CI:: https://travis-ci.org/blackwinter/wadl
61
61
  == LICENSE AND COPYRIGHT
62
62
 
63
63
  Copyright (C) 2006-2008 Leonard Richardson
64
- Copyright (C) 2010-2014 Jens Wille
64
+ Copyright (C) 2010-2015 Jens Wille
65
65
 
66
66
  wadl is free software: you can redistribute it and/or modify it under
67
67
  the terms of the GNU Affero General Public License as published by the
data/Rakefile CHANGED
@@ -14,8 +14,8 @@ begin
14
14
  license: %q{AGPL-3.0},
15
15
  homepage: :blackwinter,
16
16
  dependencies: {
17
- 'cyclops' => ['~> 0.0', '>= 0.0.4'],
18
- 'mime-types' => '~> 2.4',
17
+ 'cyclops' => '~> 0.2',
18
+ 'mime-types' => '~> 2.6',
19
19
  'safe_yaml' => '~> 1.0'
20
20
  },
21
21
 
@@ -4,7 +4,7 @@
4
4
  # A component of wadl, the super cheap Ruby WADL client. #
5
5
  # #
6
6
  # Copyright (C) 2006-2008 Leonard Richardson #
7
- # Copyright (C) 2010-2014 Jens Wille #
7
+ # Copyright (C) 2010-2015 Jens Wille #
8
8
  # #
9
9
  # Authors: #
10
10
  # Leonard Richardson <leonardr@segfault.org> (Original author) #
@@ -32,7 +32,8 @@ module WADL
32
32
 
33
33
  in_document 'method'
34
34
  as_collection 'http_methods'
35
- has_required :id, :name
35
+ has_attributes :id
36
+ has_required :name
36
37
  has_one RequestFormat
37
38
  has_many ResponseFormat
38
39
  may_be_reference
data/lib/wadl/version.rb CHANGED
@@ -4,13 +4,13 @@ module WADL
4
4
 
5
5
  MAJOR = 0
6
6
  MINOR = 3
7
- TINY = 0
7
+ TINY = 1
8
8
 
9
9
  class << self
10
10
 
11
11
  # Returns array representation.
12
12
  def to_a
13
- [MAJOR, MINOR, TINY]
13
+ [MAJOR, MINOR, TINY] << 'pre1'
14
14
  end
15
15
 
16
16
  # Short-cut for version string.
data/test/wadl_test.rb CHANGED
@@ -348,6 +348,52 @@ class ResponseFormatTest < WADLTest
348
348
 
349
349
  end
350
350
 
351
+ class EmbeddedMethodTest < WADLTest
352
+
353
+ def setup
354
+ @wadl = wadl(<<-EOT)
355
+ <resources base="http://www.example.com/">
356
+ <resource id="top" path="palette">
357
+ <method name="GET">
358
+ <request></request>
359
+ <response>
360
+ <representation mediaType="application/json"/>
361
+ </response>
362
+ </method>
363
+ </resource>
364
+ <resource id="bottom" path="palette">
365
+ <method name="GET">
366
+ <request></request>
367
+ <response>
368
+ <representation mediaType="application/json"/>
369
+ </response>
370
+ <response>
371
+ <representation mediaType="text/xml"/>
372
+ </response>
373
+ </method>
374
+ </resource>
375
+ </resources>
376
+ EOT
377
+ end
378
+
379
+ def test_find_method
380
+ graphic = @wadl.find_resource('top').find_method_by_http_method(:get)
381
+ representations = graphic.response.representations
382
+
383
+ assert_equal(1, representations.size)
384
+ assert_equal('application/json', representations.first.mediaType)
385
+
386
+ graphic = @wadl.find_resource('bottom').find_method_by_http_method(:get)
387
+ responses = graphic.responses
388
+
389
+ assert_equal(2, responses.size)
390
+ assert_equal(%w[application/json text/xml], responses.map { |response|
391
+ response.representations.first.mediaType
392
+ })
393
+ end
394
+
395
+ end
396
+
351
397
  class AuthTest < WADLTest
352
398
 
353
399
  def setup
metadata CHANGED
@@ -1,15 +1,36 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wadl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1.pre1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leonard Richardson
8
8
  - Jens Wille
9
9
  autorequire:
10
10
  bindir: bin
11
- cert_chain: []
12
- date: 2014-11-28 00:00:00.000000000 Z
11
+ cert_chain:
12
+ - |
13
+ -----BEGIN CERTIFICATE-----
14
+ MIIDMDCCAhigAwIBAgIBADANBgkqhkiG9w0BAQUFADA+MQswCQYDVQQDDAJ3dzEb
15
+ MBkGCgmSJomT8ixkARkWC2JsYWNrd2ludGVyMRIwEAYKCZImiZPyLGQBGRYCZGUw
16
+ HhcNMTMwMTMxMDkyMjIyWhcNMTQwMTMxMDkyMjIyWjA+MQswCQYDVQQDDAJ3dzEb
17
+ MBkGCgmSJomT8ixkARkWC2JsYWNrd2ludGVyMRIwEAYKCZImiZPyLGQBGRYCZGUw
18
+ ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDVXmfa6rbTwKOvtuGoROc1
19
+ I4qZjgLX0BA4WecYB97PjwLJmJ1hRvf9JulVCJYYmt5ZEPPXbgi9xLbcp6ofGmnC
20
+ i68/kbhcz20/fRUtIJ2phU3ypQTEd2pFddpL7SR2FxLkzvvg5E6nslGn7o2erDpO
21
+ 8sm610A3xsgT/eNIr9QA7k4pHh18X1KvZKmmQR4/AjVyKmKawzauKUoHHepjvjVs
22
+ s0pVoM7UmOmrS4SafQ3OwUo37f19CVdN2/FW7z3e5+iYhKxdIFdhniX9iDWtA3Jn
23
+ 7oUOtiolhCRK4P/c30UjTCDkRkOldsWciFUasROJ5VAV2SVv7FtGHoQLDZ/++tRr
24
+ AgMBAAGjOTA3MAkGA1UdEwQCMAAwHQYDVR0OBBYEFIAPWU4BEoYUe82hY/0EkoGd
25
+ Oo/WMAsGA1UdDwQEAwIEsDANBgkqhkiG9w0BAQUFAAOCAQEAf2YnB0mj42of22dA
26
+ MimgJCAEgB3H5aHbZ6B5WVnFvrC2UUnhP+/kLj/6UgOfqcasy4Xh62NVGuNrf7rF
27
+ 7NMN87XwexGuU2GCpIMUd6VCTA7zMP2OWuXEcba7jT5OtiI55buO0J4CRtyeX1XF
28
+ qwlGgx4ItcGhMTlDFXj3IkpeVtjD8O7yWE21bHf9lLURmqK/r9KjoxrrVi7+cESJ
29
+ H19TDW3R9p594jCl1ykPs3dz/0Bk+r1HTd35Yw+yBbyprSJb4S7OcRRHCryuo09l
30
+ NBGyZvOBuqUp0xostWSk0dfxyn/YQ7eqvQRGBhK1VGa7Tg/KYqnemDE57+VOXrua
31
+ 59wzaA==
32
+ -----END CERTIFICATE-----
33
+ date: 2015-12-21 00:00:00.000000000 Z
13
34
  dependencies:
14
35
  - !ruby/object:Gem::Dependency
15
36
  name: cyclops
@@ -17,34 +38,28 @@ dependencies:
17
38
  requirements:
18
39
  - - "~>"
19
40
  - !ruby/object:Gem::Version
20
- version: '0.0'
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: 0.0.4
41
+ version: '0.2'
24
42
  type: :runtime
25
43
  prerelease: false
26
44
  version_requirements: !ruby/object:Gem::Requirement
27
45
  requirements:
28
46
  - - "~>"
29
47
  - !ruby/object:Gem::Version
30
- version: '0.0'
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 0.0.4
48
+ version: '0.2'
34
49
  - !ruby/object:Gem::Dependency
35
50
  name: mime-types
36
51
  requirement: !ruby/object:Gem::Requirement
37
52
  requirements:
38
53
  - - "~>"
39
54
  - !ruby/object:Gem::Version
40
- version: '2.4'
55
+ version: '2.6'
41
56
  type: :runtime
42
57
  prerelease: false
43
58
  version_requirements: !ruby/object:Gem::Requirement
44
59
  requirements:
45
60
  - - "~>"
46
61
  - !ruby/object:Gem::Version
47
- version: '2.4'
62
+ version: '2.6'
48
63
  - !ruby/object:Gem::Dependency
49
64
  name: safe_yaml
50
65
  requirement: !ruby/object:Gem::Requirement
@@ -68,7 +83,7 @@ dependencies:
68
83
  version: '0.8'
69
84
  - - ">="
70
85
  - !ruby/object:Gem::Version
71
- version: 0.8.0
86
+ version: 0.8.3
72
87
  type: :development
73
88
  prerelease: false
74
89
  version_requirements: !ruby/object:Gem::Requirement
@@ -78,7 +93,7 @@ dependencies:
78
93
  version: '0.8'
79
94
  - - ">="
80
95
  - !ruby/object:Gem::Version
81
- version: 0.8.0
96
+ version: 0.8.3
82
97
  - !ruby/object:Gem::Dependency
83
98
  name: rake
84
99
  requirement: !ruby/object:Gem::Requirement
@@ -169,7 +184,7 @@ metadata: {}
169
184
  post_install_message:
170
185
  rdoc_options:
171
186
  - "--title"
172
- - wadl Application documentation (v0.3.0)
187
+ - wadl Application documentation (v0.3.1.pre1)
173
188
  - "--charset"
174
189
  - UTF-8
175
190
  - "--line-numbers"
@@ -185,12 +200,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
185
200
  version: 1.9.3
186
201
  required_rubygems_version: !ruby/object:Gem::Requirement
187
202
  requirements:
188
- - - ">="
203
+ - - ">"
189
204
  - !ruby/object:Gem::Version
190
- version: '0'
205
+ version: 1.3.1
191
206
  requirements: []
192
207
  rubyforge_project:
193
- rubygems_version: 2.4.4
208
+ rubygems_version: 2.5.1
194
209
  signing_key:
195
210
  specification_version: 4
196
211
  summary: Super cheap Ruby WADL client.