harbourmaster 0.1.4 → 0.2.0

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: 39fb5b16f7061b74753bc2bf9119d48b92d582eb
4
- data.tar.gz: 3f51d62864fb133ce90c7435a85169a97a6a52d7
3
+ metadata.gz: 68c9c23f9f97549f52cdf8a1201e766e06a2285d
4
+ data.tar.gz: 0ba6cb108356d7dd972d410242df09863893d909
5
5
  SHA512:
6
- metadata.gz: 7835a63b1c6d798383910e26cea8741513f0e7a458c7fd1b25cbf32d228718d4008c3896236eab0cf3f4ca4720984b4c9c9d3999fdaf0cd119c1f0a90e76d5f9
7
- data.tar.gz: cb91e56a8a98a499a5fd7f2ac7a2598301f5a80ba2ccde1ce12dd46bc6329bac83fbce3c4abedcff3cf16c6a2b6bc0221838fe7afc73a13c4e0a5b717f51b216
6
+ metadata.gz: febf78577ddbaca086535a38a8eb4d9933862959d6cfe86f9dee39309325f03e96ff3fc58763dc191efbed7b6256ee2fc184fe7c2122bb52c53565e71406a81e
7
+ data.tar.gz: ce4d59d45949535d9bdcce9641bee3bdd390b76fe5d0301aa85fd16c17821dfdf0f3cf068958604571fe649185c97312b57d04cf9e54b06cd0f8da0e4f0e4262
@@ -8,7 +8,7 @@ resource "<%= name.camelize %>" do
8
8
 
9
9
  <%- if options["actions"].include? "index" -%>
10
10
  # get INDEX docs
11
- get "/<%= api_base_route -%>/<%= plural_name -%>" do
11
+ get "<%= api_base_route.gsub('app/controllers', '') -%>/<%= plural_name -%>" do
12
12
 
13
13
  example "Listing <%= plural_name -%>" do
14
14
  do_request
@@ -28,7 +28,7 @@ resource "<%= name.camelize %>" do
28
28
 
29
29
  <%- if options["actions"].include? "show" -%>
30
30
  # get SHOW docs
31
- get "/<%= api_base_route -%>/<%= plural_name -%>/:id" do
31
+ get "<%= api_base_route.gsub('app/controllers', '') -%>/<%= plural_name -%>/:id" do
32
32
  let(:id) { @<%= name.underscore -%>.id }
33
33
 
34
34
  example "Get a specific <%= name.underscore %>" do
@@ -41,7 +41,7 @@ resource "<%= name.camelize %>" do
41
41
 
42
42
  <%- if options["actions"].include? "create" -%>
43
43
  # post CREATE docs
44
- post "/<%= api_base_route -%>/<%= plural_name -%>" do
44
+ post "<%= api_base_route.gsub('app/controllers', '') -%>/<%= plural_name -%>" do
45
45
  example "Creating a <%= name.underscore %>" do
46
46
  do_request(<%= name.underscore %>: @<%= name.underscore -%>.attributes.except("id", "created_at").as_json)
47
47
 
@@ -51,7 +51,7 @@ resource "<%= name.camelize %>" do
51
51
  <%- end -%>
52
52
 
53
53
  <%- if options["actions"].include? "update" -%>
54
- put "/<%= api_base_route -%>/<%= plural_name -%>/:id" do
54
+ put "<%= api_base_route.gsub('app/controllers', '') -%>/<%= plural_name -%>/:id" do
55
55
  let(:id) { @<%= name.underscore -%>.id }
56
56
 
57
57
  example "Updating a specific <%= name.underscore -%>" do
@@ -63,7 +63,7 @@ resource "<%= name.camelize %>" do
63
63
  <%- end -%>
64
64
 
65
65
  <%- if options["actions"].include? "destroy" -%>
66
- delete "/<%= api_base_route -%>/<%= plural_name %>/:id" do
66
+ delete "<%= api_base_route.gsub('app/controllers', '') -%>/<%= plural_name %>/:id" do
67
67
  let(:id) { @<%= name.underscore %>.id }
68
68
 
69
69
  example "Deleting a specific <%= name.underscore %>" do
@@ -1,3 +1,3 @@
1
1
  module Harbourmaster
2
- VERSION = "0.1.4"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: harbourmaster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Isaac Norman