zoanthid 0.1.0 → 0.1.1
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 +4 -4
- data/CHANGES.md +5 -1
- data/lib/zoanthid/version.rb +1 -1
- metadata +1 -2
- data/lib/api_spec.rb +0 -52
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49690abea7d3246fb8df6100ccdfa69feee81aa7
|
4
|
+
data.tar.gz: 4fd32c1ca35cef13cfc0b26ce9267afd20181552
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3227461bfd117bcaecd629182dd9bc2cb3803edcdf87eec174b1a9f850303fd1fa7d64359eab073a007f0e7f222bdb64885ba421519d5cf9c54a2451c55b96b
|
7
|
+
data.tar.gz: 5a6ab77445fb436f231869c309d54ff4920c0b4191122d74d283f8e108d6a25fb1b944354fed815f55cad5d8aef36c0708de3b027a0a577e5ac43d9b29d25a11
|
data/CHANGES.md
CHANGED
data/lib/zoanthid/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zoanthid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Hamill
|
@@ -124,7 +124,6 @@ files:
|
|
124
124
|
- LICENSE.txt
|
125
125
|
- README.md
|
126
126
|
- Rakefile
|
127
|
-
- lib/api_spec.rb
|
128
127
|
- lib/zoanthid.rb
|
129
128
|
- lib/zoanthid/browser.rb
|
130
129
|
- lib/zoanthid/dsl.rb
|
data/lib/api_spec.rb
DELETED
@@ -1,52 +0,0 @@
|
|
1
|
-
module HALSpec
|
2
|
-
module DSL
|
3
|
-
def app
|
4
|
-
::Rails.application
|
5
|
-
end
|
6
|
-
|
7
|
-
def client
|
8
|
-
@client ||= Faraday.new do |client|
|
9
|
-
client.adapter :rack, app
|
10
|
-
client.headers['Accept'] = 'application/hal+json'
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
%w(get post put delete head patch).each do |verb|
|
15
|
-
define_method verb do |*args, &block|
|
16
|
-
Cetacean.new(client.send verb, *args, &block)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
module ExampleGroup
|
22
|
-
extend ActiveSupport::Concern
|
23
|
-
|
24
|
-
DEFAULT_HOST = "www.example.com"
|
25
|
-
|
26
|
-
included do
|
27
|
-
metadata[:type] = :hal
|
28
|
-
|
29
|
-
app = ::Rails.application
|
30
|
-
if app.respond_to?(:routes)
|
31
|
-
include app.routes.url_helpers if app.routes.respond_to?(:url_helpers)
|
32
|
-
include app.routes.mounted_helpers if app.routes.respond_to?(:mounted_helpers)
|
33
|
-
|
34
|
-
if respond_to?(:default_url_options)
|
35
|
-
default_url_options[:host] ||= ::HALSpec::ExampleGroup::DEFAULT_HOST
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
RSpec.configure do |config|
|
43
|
-
config.include(
|
44
|
-
HALSpec::ExampleGroup,
|
45
|
-
type: :hal,
|
46
|
-
example_group: ->(example_group, metadata) do
|
47
|
-
metadata[:type].nil? && config.escaped_path(%w[spec hal]) =~ example_group[:file_path]
|
48
|
-
end
|
49
|
-
)
|
50
|
-
|
51
|
-
config.include HALSpec::DSL, type: :hal
|
52
|
-
end
|