grape_resource 0.1.10 → 0.1.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: 75ab79efc27f78c897e94a94302dfc63d92e3c029df67f7b3d595154707cdd6c
4
- data.tar.gz: 45eb79d583d8a11c61406a5e318ce3073777fa06d8452b59cdff0961e40ea934
3
+ metadata.gz: f2a590b7caeb53be862c78c6cb53e8368b0d969ffc3abe7dc4ceb5d1c69ef05a
4
+ data.tar.gz: 0f9cd8aa6e34fa763332c250174d07a2d58a42f7aed3f464b8d3095d7d142d29
5
5
  SHA512:
6
- metadata.gz: 89390cb279e86b7b62915e4b30d3093f80756646296aa67d3f1e0e6017c29e7bb1642752e1c1d94534a11bbe589f096b28dabb746ac6813e2e4022c0feebc85c
7
- data.tar.gz: b4299558cd02dccd560495cadddbf3b5e83ef736d02a3716b5d38a972b05ce71bba951e314e151e3682f1704acf450fe3da614598d88e9ee5e8debb177d32a88
6
+ metadata.gz: 737a70ed94f27147338a07fca886355aa64b813d37d6e93af775c0f9fa64d9f7a57fae269be63ccd775ce8795ca67e271cf07d4035ef231dbfd8ed99f1a78b10
7
+ data.tar.gz: 172aa721e4e13edbb4083876867ddc0f0e145978d906a84617ab7b96a8afb903f5bee3dfacf7c3d07c7acad6f01e9d406222fbdd07328cfd0135eb2130578c6f
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- grape_resource (0.1.10)
4
+ grape_resource (0.1.11)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -90,7 +90,7 @@ module GrapeResource
90
90
  123
91
91
  when "boolean"
92
92
  1
93
- when "date_time"
93
+ when "datetime"
94
94
  "2019-07-09 04:10:55"
95
95
  end
96
96
  end
@@ -24,8 +24,12 @@ class <%= GrapeResource.class_name_prefix %>::<%= name.camelize.pluralize %>::Re
24
24
  desc "Create"
25
25
  params do
26
26
  <% @entities.each do |k, v| %>remove
27
+ <% if v == "Datetime" %>remove
28
+ optional :<%= k %>, type: String, desc: 'Format is dd/mm/yyyy hh:mm:ss. Invalid date is ignored'
29
+ <% else %>remove
27
30
  optional :<%= k %>, type: <%= v %>
28
31
  <% end %>remove
32
+ <% end %>remove
29
33
  end
30
34
  post "/" do
31
35
  p = <%= name.camelize.singularize %>.new <%= name.underscore.singularize %>_params
@@ -38,8 +42,12 @@ class <%= GrapeResource.class_name_prefix %>::<%= name.camelize.pluralize %>::Re
38
42
  params do
39
43
  requires :id, type: String
40
44
  <% @entities.each do |k, v| %>remove
45
+ <% if v == "Datetime" %>remove
46
+ optional :<%= k %>, type: String, desc: 'Format is dd/mm/yyyy hh:mm:ss. Invalid date is ignored'
47
+ <% else %>remove
41
48
  optional :<%= k %>, type: <%= v %>
42
49
  <% end %>remove
50
+ <% end %>remove
43
51
  end
44
52
  put "/" do
45
53
  p = <%= name.camelize.singularize %>.find(params.id)
@@ -1,3 +1,3 @@
1
1
  module GrapeResource
2
- VERSION = "0.1.10"
2
+ VERSION = "0.1.11"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape_resource
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yunan Helmy
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2019-07-10 00:00:00.000000000 Z
12
+ date: 2019-07-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler