simbiotes 0.1.17 → 0.1.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/simbiotes/create_model/templates/simbiotes_model.rb.erb +3 -3
- data/lib/generators/simbiotes/view/templates/index.html.erb +2 -2
- data/lib/generators/simbiotes/view/templates/show.html.erb +2 -2
- data/lib/simbiotes/configuration.rb +1 -1
- data/lib/simbiotes/extract.rb +1 -1
- data/lib/simbiotes/insert.rb +1 -1
- data/lib/simbiotes/portal.rb +2 -2
- data/lib/simbiotes/version.rb +1 -1
- data/lib/simbiotes.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb3ffac4b4b8721aca96c99f5b4f161deaff5792
|
4
|
+
data.tar.gz: 9783683c0a2d9c8c8576abd0687e0bbae5e786f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77b71a3de9221f3246ad0f2972bbaf8057f9bbfdd1a8b01fdc488434363972bc050e443b643c93bbb5441689db0dc8993a7c3ba1778f19f59100ace3db82f5af
|
7
|
+
data.tar.gz: 3989d5d8bb0fa2b24a5cdb1bd7309ee82ded6b3483be08399c2ac1781770078b85ada62ce5024351f277ea35ab405bef062656040d507498bf06e83d81bc09d3
|
@@ -35,10 +35,10 @@ module <%= module_name %>
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
interfaces.each do |k,v|
|
38
|
-
ActionCable.server.broadcast "#{self.class.parent.to_s.downcase.
|
38
|
+
ActionCable.server.broadcast "#{self.class.parent.to_s.underscore.downcase.gsub(" ", "_")}_channel",
|
39
39
|
simbiotes_instance: self.<%= module_name.underscore.downcase.gsub(" ", "_")%>.simbiotes_instance,
|
40
|
-
worker_name: self.class.parent.to_s.downcase.
|
41
|
-
model_name: self.class.name.demodulize.to_s.downcase.
|
40
|
+
worker_name: self.class.parent.to_s.underscore.downcase.gsub(" ", "_"),
|
41
|
+
model_name: self.class.name.demodulize.to_s.underscore.downcase.gsub(" ", "_"),
|
42
42
|
interface: k,
|
43
43
|
value: v
|
44
44
|
end
|
@@ -42,8 +42,8 @@
|
|
42
42
|
</td>
|
43
43
|
<% Simbiotes.configuration.targets[module_name].keys.each do |key| %>
|
44
44
|
<% Simbiotes.configuration.targets[module_name][key].each do |interface| %>
|
45
|
-
<td class='<%= module_file_name %>-<%= key.downcase %>-<%= interface %>'>
|
46
|
-
<%%= object.<%= key.downcase %>.<%= interface %> %>
|
45
|
+
<td class='<%= module_file_name %>-<%= key.underscore.downcase %>-<%= interface %>'>
|
46
|
+
<%%= object.<%= key.underscore.downcase %>.<%= interface %> %>
|
47
47
|
</td>
|
48
48
|
<% end %>
|
49
49
|
<% end %>
|
@@ -34,8 +34,8 @@
|
|
34
34
|
</td>
|
35
35
|
<% Simbiotes.configuration.targets[module_name].keys.each do |key| %>
|
36
36
|
<% Simbiotes.configuration.targets[module_name][key].each do |interface| %>
|
37
|
-
<td class='<%= module_file_name %>-<%= key.downcase %>-<%= interface %>'>
|
38
|
-
<%%= @<%= module_file_name %>.<%= key.downcase %>.<%= interface %> %>
|
37
|
+
<td class='<%= module_file_name %>-<%= key.underscore.downcase %>-<%= interface %>'>
|
38
|
+
<%%= @<%= module_file_name %>.<%= key.underscore.downcase %>.<%= interface %> %>
|
39
39
|
</td>
|
40
40
|
<% end %>
|
41
41
|
<% end %>
|
data/lib/simbiotes/extract.rb
CHANGED
@@ -39,7 +39,7 @@ module Simbiotes
|
|
39
39
|
def self.fire(object, interfaces, a, time0= nil, time1= nil)
|
40
40
|
if Simbiotes.configuration.targets[object.class.parent.to_s] != nil
|
41
41
|
k = "#{object.class.parent}::#{object.class.parent}".constantize
|
42
|
-
i = "#{object.class.parent}".demodulize.gsub(" ","_").downcase + "_id"
|
42
|
+
i = "#{object.class.parent}".demodulize.underscore.gsub(" ","_").downcase + "_id"
|
43
43
|
msg = {
|
44
44
|
"action" => a,
|
45
45
|
"instance" => k.find(object.send(i)).simbiotes_instance,
|
data/lib/simbiotes/insert.rb
CHANGED
@@ -37,7 +37,7 @@ module Simbiotes
|
|
37
37
|
klass = @class.classify.constantize
|
38
38
|
master_klass = (klass.parent.to_s + "::" + klass.parent.to_s).classify.constantize
|
39
39
|
master_record = master_klass.find_by(simbiotes_instance: @id)
|
40
|
-
@record = master_record.send(@class.demodulize.downcase)
|
40
|
+
@record = master_record.send(@class.demodulize.underscore.downcase)
|
41
41
|
#puts e
|
42
42
|
end
|
43
43
|
end
|
data/lib/simbiotes/portal.rb
CHANGED
@@ -107,7 +107,7 @@ module Simbiotes
|
|
107
107
|
subklass = (worker_name + "::" + key).constantize rescue nil
|
108
108
|
unless subklass == nil
|
109
109
|
s = subklass.new
|
110
|
-
k = worker_name.
|
110
|
+
k = worker_name.underscore.gsub(" ","_").to_s + "_id="
|
111
111
|
s.send((k).to_sym, i.id)
|
112
112
|
s.skip_extract = true
|
113
113
|
s.save(:validate => false)
|
@@ -122,7 +122,7 @@ module Simbiotes
|
|
122
122
|
def self.upload_script(worker, script)
|
123
123
|
payload = {
|
124
124
|
:multipart => true,
|
125
|
-
:script_file => File.open("#{Rails.root}/lib/scripts/simbiotes/#{worker.downcase}/#{script.downcase}.rb", 'rb'),
|
125
|
+
:script_file => File.open("#{Rails.root}/lib/scripts/simbiotes/#{worker.underscore.downcase}/#{script.underscore.downcase}.rb", 'rb'),
|
126
126
|
:public_key => Simbiotes.configuration.public_key,
|
127
127
|
:private_key => Simbiotes.configuration.private_key,
|
128
128
|
:worker_name => worker,
|
data/lib/simbiotes/version.rb
CHANGED
data/lib/simbiotes.rb
CHANGED
@@ -45,7 +45,7 @@ module Simbiotes
|
|
45
45
|
attributes = Simbiotes.configuration.targets[parent][child]
|
46
46
|
interfaces = Hash.new
|
47
47
|
attributes.each do |attribute|
|
48
|
-
interfaces[attribute.downcase.gsub(" ", "_")] = object.send(attribute.downcase.gsub(" ", "_")).to_s
|
48
|
+
interfaces[attribute.underscore.downcase.gsub(" ", "_")] = object.send(attribute.underscore.downcase.gsub(" ", "_")).to_s
|
49
49
|
end
|
50
50
|
Simbiotes::Extract.fire(object, interfaces, "get")
|
51
51
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simbiotes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MicroArx Corporation
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|