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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5d18ef9985f5eb47f5aeb698353bc6640046f645
4
- data.tar.gz: 9abbddd5eeb3bccf5b62f5083358449f7decb478
3
+ metadata.gz: b11345ea852b3c7a7b3188e237184a8ec07a1345
4
+ data.tar.gz: 982f04e8609ab9bacd4c6836bf480dab01e0342c
5
5
  SHA512:
6
- metadata.gz: e56cf525959cd6d2cd35c12410a08358ad9ed2c8af664fa7ad67b6fa813991054c4e86b3d824091d0a9bf54dc759f1a596ceed28cad1ce3d4667bed2aa700d24
7
- data.tar.gz: b76cc473a32dd662ec5e44741d8516446a4679e6f7dacf9c3046a6fae32227d3613e18015374e8bca9733789b88db892f6ba0776459a16cac6ab2fc4c18c6e0d
6
+ metadata.gz: 4fd03cbcd52af889049eb62b4f02c2a9700c6299bb8ab434cea6bd91f1acb86688775081f366ab57b1bb7ca160a1f2ef14102085442cc4ac9f7e0568e807a2dc
7
+ data.tar.gz: 5e0876b337f8c764037e057a8b77677373f51a0408ba556256b875459f394ce7292e6c838b5bd3594c4eb5fcf52eda219b9933d0621ce7bdc937db2dfb6447f6
@@ -32,7 +32,7 @@ describe <%= class_name.pluralize %>Controller do
32
32
  end
33
33
 
34
34
  it "should return a 404 when the <%= class_name %> can't be found" do
35
- delete :destroy, id: -1
35
+ delete :destroy, id: "0-0-0-0-0"
36
36
  response.status.should == 404
37
37
  end
38
38
 
@@ -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: -1
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: -1
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: api_user_url(<%= singular_name %>.created_by),
4
- updater: api_user_url(<%= singular_name %>.updated_by))
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
@@ -1,3 +1,3 @@
1
1
  module Ocean
2
- VERSION = "5.0.1"
2
+ VERSION = "5.0.2"
3
3
  end
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.1
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-18 00:00:00.000000000 Z
11
+ date: 2015-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus