textualize 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/textualize/templates/request_specs/delete_collection-item.rb.erb +6 -7
- data/lib/textualize/templates/request_specs/get_collection-item.rb.erb +7 -8
- data/lib/textualize/templates/request_specs/get_collection.rb.erb +7 -8
- data/lib/textualize/templates/request_specs/patch_collection-item.rb.erb +6 -7
- data/lib/textualize/templates/request_specs/post_collection.rb.erb +11 -12
- data/lib/textualize/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9c70e32bf82b3847acd0669ec1b814445ee4898
|
4
|
+
data.tar.gz: 5ab0970e217faa054978efcfe7b46bc0ea13bf7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7a45d017e31940d406008be4b3c83256dcac42e5d368675c4d85447bba6be123551d45a1b06ad2cc46ea42d6b0f8ecadafbb99692882b301c808b52b4f5abc9
|
7
|
+
data.tar.gz: e12f11480d6153e91c2647e7d80ded150c3077c9b1bcb8de7276420e588b3b27efcea8a20237bf9bc7f371b9f54499ec88004134775408c69a4bb05e2a2751f0
|
@@ -3,13 +3,12 @@ require 'airborne'
|
|
3
3
|
describe 'DELETE <%= url %>' do
|
4
4
|
let!(:<%= name %>) { create(:<%= name %>) }
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
expect_status <%= response_code %>
|
6
|
+
<%= secured_by %>.each do |role|
|
7
|
+
it "returns expected json for #{role} role" do
|
8
|
+
add_header_token role
|
9
|
+
delete "<%= url %>"
|
10
|
+
expect_status <%= response_code %>
|
11
|
+
end
|
13
12
|
end
|
14
13
|
end
|
15
14
|
|
@@ -3,14 +3,13 @@ require 'airborne'
|
|
3
3
|
describe 'GET <%= url %>' do
|
4
4
|
let!(:<%= name %>) { create(:<%= name %>) }
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
expect_json_keys <%= body.data.keys %>
|
6
|
+
<%= secured_by %>.each do |role|
|
7
|
+
it "returns expected json for #{role} role" do
|
8
|
+
add_header_token role
|
9
|
+
get "<%= url %>"
|
10
|
+
expect_status <%= response_code %>
|
11
|
+
expect_json_keys <%= body.data.keys %>
|
12
|
+
end
|
14
13
|
end
|
15
14
|
end
|
16
15
|
|
@@ -3,14 +3,13 @@ require 'airborne'
|
|
3
3
|
describe 'GET <%= url %>' do
|
4
4
|
let!(:<%= name %>) { create_list(:<%= name %>, 3) }
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
expect_json_keys <%= body.data.sample.keys %>
|
6
|
+
<%= secured_by %>.each do |role|
|
7
|
+
it "returns expected json for #{role} role" do
|
8
|
+
add_header_token role
|
9
|
+
get "<%= url %>"
|
10
|
+
expect_status <%= response_code %>
|
11
|
+
expect_json_keys <%= body.data.sample.keys %>
|
12
|
+
end
|
14
13
|
end
|
15
14
|
end
|
16
15
|
|
@@ -3,12 +3,11 @@ require 'airborne'
|
|
3
3
|
describe 'PATCH <%= url %>' do
|
4
4
|
let!(:<%= name %>) { create(:<%= name %>) }
|
5
5
|
|
6
|
-
|
7
|
-
|
6
|
+
<%= secured_by %>.each do |role|
|
7
|
+
it "returns expected json for #{role} role" do
|
8
|
+
add_header_token role
|
9
|
+
patch "<%= url %>"
|
10
|
+
expect_status <%= response_code %>
|
11
|
+
end
|
8
12
|
end
|
9
|
-
|
10
|
-
it 'returns expected json' do
|
11
|
-
patch "<%= url %>"
|
12
|
-
expect_status <%= response_code %>
|
13
13
|
end
|
14
|
-
|
@@ -1,19 +1,18 @@
|
|
1
1
|
require 'airborne'
|
2
2
|
|
3
3
|
describe 'POST <%= url %>' do
|
4
|
-
before do
|
5
|
-
add_header_tokens(<%= secured_by %>)
|
6
|
-
end
|
7
4
|
|
8
|
-
|
9
|
-
|
10
|
-
<%=
|
11
|
-
|
12
|
-
|
13
|
-
"\"#{
|
14
|
-
|
15
|
-
|
16
|
-
|
5
|
+
<%= secured_by %>.each do |role|
|
6
|
+
it "returns the saved record for #{role} role" do
|
7
|
+
post "<%= url %>", {
|
8
|
+
<%= properties = JSON.parse(schema).fetch('properties');
|
9
|
+
properties.fetch('required').map { |required_param|
|
10
|
+
"\"#{required_param}\" => "\
|
11
|
+
"\"#{properties.fetch(required_param).fetch('type')}\""
|
12
|
+
}.join("\n") %>
|
13
|
+
}
|
14
|
+
expect_status <%= response_code %>
|
15
|
+
end
|
17
16
|
end
|
18
17
|
end
|
19
18
|
|
data/lib/textualize/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: textualize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Q-Centrix Dev Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|