ocean-rails 5.0.1 → 5.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/ocean_scaffold/templates/controller_specs/delete_spec.rb +1 -1
- data/lib/generators/ocean_scaffold/templates/controller_specs/show_spec.rb +1 -1
- data/lib/generators/ocean_scaffold/templates/controller_specs/update_spec.rb +1 -1
- data/lib/generators/ocean_scaffold/templates/resource_routing_spec.rb +3 -3
- data/lib/generators/ocean_scaffold/templates/views/_resource.json.jbuilder +2 -2
- data/lib/generators/ocean_setup/templates/routes.rb +8 -1
- data/lib/ocean/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: b11345ea852b3c7a7b3188e237184a8ec07a1345
|
4
|
+
data.tar.gz: 982f04e8609ab9bacd4c6836bf480dab01e0342c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4fd03cbcd52af889049eb62b4f02c2a9700c6299bb8ab434cea6bd91f1acb86688775081f366ab57b1bb7ca160a1f2ef14102085442cc4ac9f7e0568e807a2dc
|
7
|
+
data.tar.gz: 5e0876b337f8c764037e057a8b77677373f51a0408ba556256b875459f394ce7292e6c838b5bd3594c4eb5fcf52eda219b9933d0621ce7bdc937db2dfb6447f6
|
@@ -27,7 +27,7 @@ describe <%= class_name.pluralize %>Controller do
|
|
27
27
|
end
|
28
28
|
|
29
29
|
it "should return a 404 when the user can't be found" do
|
30
|
-
get :show, id: -
|
30
|
+
get :show, id: "0-0-0-0-0"
|
31
31
|
response.status.should == 404
|
32
32
|
response.content_type.should == "application/json"
|
33
33
|
end
|
@@ -27,7 +27,7 @@ describe <%= class_name.pluralize %>Controller do
|
|
27
27
|
end
|
28
28
|
|
29
29
|
it "should return a 404 if the resource can't be found" do
|
30
|
-
put :update, id: -
|
30
|
+
put :update, id: "0-0-0-0-0"
|
31
31
|
response.status.should == 404
|
32
32
|
response.content_type.should == "application/json"
|
33
33
|
end
|
@@ -8,7 +8,7 @@ describe <%= class_name.pluralize %>Controller do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
it "routes to #show" do
|
11
|
-
get("/v1/<%= plural_name %>/1").should route_to("<%= plural_name %>#show", id: "1")
|
11
|
+
get("/v1/<%= plural_name %>/1-2-3-4-5").should route_to("<%= plural_name %>#show", id: "1-2-3-4-5")
|
12
12
|
end
|
13
13
|
|
14
14
|
it "routes to #create" do
|
@@ -16,11 +16,11 @@ describe <%= class_name.pluralize %>Controller do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
it "routes to #update" do
|
19
|
-
put("/v1/<%= plural_name %>/1").should route_to("<%= plural_name %>#update", id: "1")
|
19
|
+
put("/v1/<%= plural_name %>/1-2-3-4-5").should route_to("<%= plural_name %>#update", id: "1-2-3-4-5")
|
20
20
|
end
|
21
21
|
|
22
22
|
it "routes to #destroy" do
|
23
|
-
delete("/v1/<%= plural_name %>/1").should route_to("<%= plural_name %>#destroy", id: "1")
|
23
|
+
delete("/v1/<%= plural_name %>/1-2-3-4-5").should route_to("<%= plural_name %>#destroy", id: "1-2-3-4-5")
|
24
24
|
end
|
25
25
|
|
26
26
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
json.<%= singular_name %> do |json|
|
2
2
|
json._links hyperlinks(self: <%= singular_name %>_url(<%= singular_name %>),
|
3
|
-
creator:
|
4
|
-
updater:
|
3
|
+
creator: smart_api_user_url(<%= singular_name %>.created_by),
|
4
|
+
updater: smart_api_user_url(<%= singular_name %>.updated_by))
|
5
5
|
json.(<%= singular_name %>, :lock_version, :name, :description)
|
6
6
|
json.created_at <%= singular_name %>.created_at.utc.iso8601
|
7
7
|
json.updated_at <%= singular_name %>.updated_at.utc.iso8601
|
@@ -1,7 +1,14 @@
|
|
1
1
|
<%= class_name %>::Application.routes.draw do
|
2
2
|
|
3
3
|
scope "v1" do
|
4
|
-
# Put resource routes here
|
4
|
+
# Put resource routes here. Remember to add a constraints clause to each
|
5
|
+
# resource declaration to parse UUIDs rather than integers. For instance:
|
6
|
+
#
|
7
|
+
# resources :thingies, except: [:new, :edit],
|
8
|
+
# constraints: {id: /([0-9a-f]+-){4}[0-9a-f]+/}
|
9
|
+
#
|
10
|
+
|
11
|
+
|
5
12
|
|
6
13
|
end
|
7
14
|
|
data/lib/ocean/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ocean-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Bengtson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|