apiotics 0.1.134 → 0.1.135

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: befb6c3c29c8a3ba5698deb91a72d2f0fab620a0
4
- data.tar.gz: 4f6ff82ab99cae50d7b422bc8a074cca5e82aac8
3
+ metadata.gz: d699ef9b30e7c21d5332a184a8c383b0563e30ed
4
+ data.tar.gz: a125d2352dc93c07279d66d2fb959bdd9f1b3963
5
5
  SHA512:
6
- metadata.gz: 5223976a785387518c4a83f0c520af646fbd0708dce4548a381eeba956e5fc3fb48f80450f39eaa5866ada95453ed4aed0e1350cefe5320e3e71424b059b721d
7
- data.tar.gz: 1dba4685a85341d0e9c0b4b825c82eeaa96892cac3b96e7bd6ab7a64ea911df1aad3414501fbe38898cb356276a8feae13cb25f38a9b753bf44ecfc14ca51353
6
+ metadata.gz: 2a5468a2bb0a9d4fd38ae6a98f7124f5da2c1a3f6d676b5a14c5cbcc1053573e24bb97f3d23866b5fa2180fecc120b7fadc014effd95376499152f1db3b383d4
7
+ data.tar.gz: 9dfaa371989a77c5900a53ac06c81ea99aa5618ef5d300bdb82152673042e31fc06e49cedd69d0f4505d5e979250c82aeed7ce54ab3013db7bd3aa5c9f52565f
@@ -1,3 +1,3 @@
1
1
  module Apiotics
2
- VERSION = '0.1.134'
2
+ VERSION = '0.1.135'
3
3
  end
@@ -11,9 +11,7 @@ module <%= module_name %>
11
11
  <% unless @c == nil %><% @c[:attributes].each do |k,v| %><% unless v[:values] == "" || v[:values] == nil %>validates :<%= k.downcase.gsub(" ", "_").underscore %>, inclusion: { in: %w(<%= v[:values].join(" ") %>),
12
12
  message: "%{value} is not a valid <%= k %>" }<% end %><% unless v[:range] == "" || v[:range] == nil %>
13
13
  validates :<%= k.gsub(" ", "_").underscore %>, inclusion: { in: <%= v[:range] %>,
14
- message: "%{value} is not within the range <%= v[:range] %>" }<% end %><% if v[:type] == "enum" %>
15
- enum <%= k.gsub(" ", "_").underscore %>: <%= v[:values] %><% end %><% end %><% end %>
16
-
14
+ message: "%{value} is not within the range <%= v[:range] %>" }<% end %><% end %><% end %>
17
15
 
18
16
  def sync
19
17
  Apiotics.sync(self)
@@ -24,11 +24,16 @@
24
24
  <%%= form.simple_fields_for :<%= key.underscore.downcase %> do |fields| %>
25
25
  <% n = 0 %>
26
26
  <% Apiotics.configuration.targets[module_name][key].each do |interface| %>
27
+ <% a = Apiotics.get_attributes(module_name,key) %>
27
28
  <% if n != 0 %>
28
29
  <tr>
29
30
  <% end %>
30
31
  <td>
31
- <%%= fields.input :<%= interface %> %>
32
+ <% if a[:attributes][interface][:type] == "enum" %>
33
+ <%%= fields.input :<%= interface %>, collection: JSON.parse(<%= a[:attributes][interface][:values] %>) %> %>
34
+ <% else %>
35
+ <%%= fields.input :<%= interface %> %>
36
+ <% end %>
32
37
  </td>
33
38
  <% if n != 0 %>
34
39
  </tr>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apiotics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.134
4
+ version: 0.1.135
5
5
  platform: ruby
6
6
  authors:
7
7
  - MicroArx Corporation