documentation-zero 0.0.8 → 0.0.11

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
  SHA256:
3
- metadata.gz: ff0cfd8d7c31a648ac6ffb886529c5dbc3b52ec4b23cb5edff680332d6196823
4
- data.tar.gz: 3e2452da26d4e5cdc39a86e94a0ce654becfc4e1e518512c16401caf57c737d2
3
+ metadata.gz: 97fbe4b0c16b2f7245a7b77979114e7256aca1a38dae972ce1b05a5988bcaec5
4
+ data.tar.gz: e950699801c5933f0ed88c7e06dd48a4a350a71cac814c47e4a0f17277d8dc72
5
5
  SHA512:
6
- metadata.gz: 9dda90a920a2e861c89419c0a8805eded8016f7f2944d7d5e276b6e60dcb3bd52f041aa7a7b5002a3adbb0e62a2711ad60abfd02d8cc9f4c1290800675b523fc
7
- data.tar.gz: 3e3c0f3b5a7608f19d4606ef1d52b51518b82871891bb616716f4f68409c03c2f35c73fcf9246f0e27b402fd73c4ad7accfa6a31b095795f28f938d2a1780010
6
+ metadata.gz: 5641ab04a82885b693163a82e1442565cf374114b86e152e5e7b2b5839d358392d02ecaf2944390ad60d53bd3710cf171e67bce5b34b1a2361eb5b612dbb430f
7
+ data.tar.gz: f8405a25a46cbcab6f798a6fb4ccde933d7fda7cba89acce00a2846d5aa778a03e9ca4b0d5b7658fae51542e81ee1884e7a1a78f47586627149aed59666fa7e4
@@ -12,6 +12,10 @@ To make a request for all the resources on your account, append the `resources`
12
12
  curl -H "Authorization: Bearer $ACCESS_TOKEN" -H 'User-Agent: MyApp (yourname@example.com)' https://example.com/api/resources.json
13
13
  ```
14
14
 
15
+ ## Authentication
16
+
17
+ Describe your authentication here.
18
+
15
19
  ## Identifying your application
16
20
 
17
21
  You must include a `User-Agent` header with **both**:
@@ -64,6 +68,9 @@ If Rails tabler is having trouble, you will get a response with a 5xx status cod
64
68
 
65
69
  API requests may 404 due to deleted content, an inactive account, missing user permissions, etc. Detect these conditions to give your users a clear explanation about why they can't connect to Rails tabler. Do not automatically retry these requests.
66
70
 
71
+ * Inactive account. 404 Not Found response with a `Reason: Account Inactive` header. Due to an expired trial or account suspension. All API requests to an inactive account will fail, so we recommend detecting and disabling the account in your integration as well.
72
+ * Inaccessible items. 404 Not Found response. Due to a deleted item or insufficient permissions.
73
+
67
74
  ## API endpoints
68
75
 
69
76
  <!-- START API ENDPOINTS -->
@@ -78,6 +78,8 @@ This endpoint will return `204 No Content` if successful. No parameters are requ
78
78
  "title": "string",
79
79
  "content": "string",
80
80
  "published": "boolean",
81
- "user": "references",
81
+ "user_id": "integer",
82
+ "created_at": "datetime",
83
+ "updated_at": "datetime"
82
84
  }
83
85
  ```
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- documentation-zero (0.0.8)
4
+ documentation-zero (0.0.11)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -24,7 +24,7 @@ rails generate documentation:readme
24
24
  rails generate documentation:scaffold posts title:string body:text published:boolean user:references
25
25
  ```
26
26
 
27
- Add ```- [Posts](sections/posts.md)``` to API endpoints section.
27
+ Add `- [Posts](sections/posts.md)` to API endpoints section.
28
28
 
29
29
  ## Development
30
30
 
@@ -1,3 +1,3 @@
1
1
  module DocumentationZero
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.11"
3
3
  end
@@ -12,6 +12,10 @@ To make a request for all the resources on your account, append the `resources`
12
12
  curl -H "Authorization: Bearer $ACCESS_TOKEN" -H 'User-Agent: MyApp (yourname@example.com)' https://example.com/api/resources.json
13
13
  ```
14
14
 
15
+ ## Authentication
16
+
17
+ Describe your authentication here.
18
+
15
19
  ## Identifying your application
16
20
 
17
21
  You must include a `User-Agent` header with **both**:
@@ -64,6 +68,9 @@ If <%= application_name.humanize %> is having trouble, you will get a response w
64
68
 
65
69
  API requests may 404 due to deleted content, an inactive account, missing user permissions, etc. Detect these conditions to give your users a clear explanation about why they can't connect to <%= application_name.humanize %>. Do not automatically retry these requests.
66
70
 
71
+ * Inactive account. 404 Not Found response with a `Reason: Account Inactive` header. Due to an expired trial or account suspension. All API requests to an inactive account will fail, so we recommend detecting and disabling the account in your integration as well.
72
+ * Inaccessible items. 404 Not Found response. Due to a deleted item or insufficient permissions.
73
+
67
74
  ## API endpoints
68
75
 
69
76
  <!-- START API ENDPOINTS -->
@@ -2,6 +2,9 @@ module Documentation
2
2
  module Generators
3
3
  class ScaffoldGenerator < Rails::Generators::NamedBase
4
4
  argument :attributes, type: :array, default: [], banner: "field:type field:type"
5
+
6
+ class_option :timestamps, type: :boolean, default: true
7
+
5
8
  source_root File.expand_path("templates", __dir__)
6
9
 
7
10
  def copy_files
@@ -77,10 +77,16 @@ This endpoint will return `204 No Content` if successful. No parameters are requ
77
77
  <% if attribute.password_digest? -%>
78
78
  "password_digest": "string",
79
79
  <% elsif attribute.token? -%>
80
- "<%= attribute.name %>": "string",
80
+ "<%= attribute.column_name %>": "string",
81
+ <% elsif attribute.reference? -%>
82
+ "<%= attribute.column_name %>": "integer",
81
83
  <% elsif !attribute.virtual? -%>
82
- "<%= attribute.name %>": "<%= attribute.type %>",
84
+ "<%= attribute.column_name %>": "<%= attribute.type %>",
83
85
  <% end -%>
84
86
  <% end -%>
87
+ <% if options.timestamps? -%>
88
+ "created_at": "datetime",
89
+ "updated_at": "datetime"
90
+ <% end -%>
85
91
  }
86
92
  ```
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: documentation-zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nixon