out_put 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a4c73462fff9d9db2b30ec89b34b7e9ad841ce75
4
- data.tar.gz: 858911a1f597b1f29629e332e3acfbd905b9abca
3
+ metadata.gz: cfe49bd74dc6b5bd2ecd57c23f198e9e508d024e
4
+ data.tar.gz: f4803fdb613ff6b3453ee218d1c9fcc66eea5051
5
5
  SHA512:
6
- metadata.gz: 824ec546f4cb9ab74e4dc86b78f64c6375a6955a99a70c77c1144ca8daf8dc5b9490ef820b89988e6728f5ede7658e9db6c4a4601e1c86c8b2376b8e14988260
7
- data.tar.gz: 9a7bd278c95b91123f83dec372701ce9d90fa46a32f0cbb50e5ddbf373020864dbb9e30cbab4a879343e46afb358be188a0875328a4c97bd6fa8341ab5015b5c
6
+ metadata.gz: f7d6f4e328f15e0ee282f2ee0499550ace14b59fc5752f97a4a880a10ffa8d237dfe5bc7ea499125a41fcd9727cc9064886b2c3798bd954b43af3d0cd2577775
7
+ data.tar.gz: db0b8ab7835fb4c92a11578770cec0a44637ca0a170d619297f9614411a8892570c9c539a1b0f9329c930744953c762ee2e41da05e3bd86d0a0c550d755133fb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- out_put (2.0.0)
4
+ out_put (2.1.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -18,7 +18,7 @@ And then execute:
18
18
 
19
19
  ## Usage
20
20
 
21
- ### Config
21
+ ### Config (it's optional)
22
22
 
23
23
  initializers: `out_put.rb`
24
24
 
@@ -29,9 +29,11 @@ OutPut::Config.tap do |config|
29
29
  end
30
30
  ```
31
31
 
32
+ `project_code` (defaults to 0) + `code` will be the final code
33
+
32
34
  ### Basic
33
35
 
34
- if your controller does **not** inherit from `ActionController::API`:
36
+ Add this line in your (base) controller:
35
37
 
36
38
  ```ruby
37
39
  include OutPut
@@ -1,3 +1,3 @@
1
1
  module OutPut
2
- VERSION = '2.0.0'
2
+ VERSION = '2.1.0'
3
3
  end
data/lib/out_put.rb CHANGED
@@ -30,72 +30,3 @@ module OutPut
30
30
  data
31
31
  end
32
32
  end
33
-
34
- ActionController::API.include OutPut
35
-
36
- __END__
37
-
38
- curl -s https://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv | \
39
- ruby -ne 'm = /^(\d{3}),(?!Unassigned|\(Unused\))([^,]+)/.match($_) and \
40
- puts "#{m[1]} => \x27#{m[2].strip}\x27,"'
41
-
42
- 100 => 'Continue',
43
- 101 => 'Switching Protocols',
44
- 102 => 'Processing',
45
- 103 => 'Early Hints',
46
- 200 => 'OK',
47
- 201 => 'Created',
48
- 202 => 'Accepted',
49
- 203 => 'Non-Authoritative Information',
50
- 204 => 'No Content',
51
- 205 => 'Reset Content',
52
- 206 => 'Partial Content',
53
- 207 => 'Multi-Status',
54
- 208 => 'Already Reported',
55
- 226 => 'IM Used',
56
- 300 => 'Multiple Choices',
57
- 301 => 'Moved Permanently',
58
- 302 => 'Found',
59
- 303 => 'See Other',
60
- 304 => 'Not Modified',
61
- 305 => 'Use Proxy',
62
- 307 => 'Temporary Redirect',
63
- 308 => 'Permanent Redirect',
64
- 400 => 'Bad Request',
65
- 401 => 'Unauthorized',
66
- 402 => 'Payment Required',
67
- 403 => 'Forbidden',
68
- 404 => 'Not Found',
69
- 405 => 'Method Not Allowed',
70
- 406 => 'Not Acceptable',
71
- 407 => 'Proxy Authentication Required',
72
- 408 => 'Request Timeout',
73
- 409 => 'Conflict',
74
- 410 => 'Gone',
75
- 411 => 'Length Required',
76
- 412 => 'Precondition Failed',
77
- 413 => 'Payload Too Large',
78
- 414 => 'URI Too Long',
79
- 415 => 'Unsupported Media Type',
80
- 416 => 'Range Not Satisfiable',
81
- 417 => 'Expectation Failed',
82
- 421 => 'Misdirected Request',
83
- 422 => 'Unprocessable Entity',
84
- 423 => 'Locked',
85
- 424 => 'Failed Dependency',
86
- 426 => 'Upgrade Required',
87
- 428 => 'Precondition Required',
88
- 429 => 'Too Many Requests',
89
- 431 => 'Request Header Fields Too Large',
90
- 451 => 'Unavailable For Legal Reasons',
91
- 500 => 'Internal Server Error',
92
- 501 => 'Not Implemented',
93
- 502 => 'Bad Gateway',
94
- 503 => 'Service Unavailable',
95
- 504 => 'Gateway Timeout',
96
- 505 => 'HTTP Version Not Supported',
97
- 506 => 'Variant Also Negotiates',
98
- 507 => 'Insufficient Storage',
99
- 508 => 'Loop Detected',
100
- 510 => 'Not Extended',
101
- 511 => 'Network Authentication Required',
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: out_put
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - zhandao