informix_rails 0.1.0 → 0.2.0

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: 583469060d3769d64c4142a18ffb7dc5dcaab1d9e5fe73644653ced2b4d004b2
4
- data.tar.gz: d2e11d5efecef1d96b524f11c68528a1e1f9552255d6f682c5b3820694fc0109
3
+ metadata.gz: 2cbee7497371cc96e325400bd25f2c7a7aca30725ce87b85e6390d6389caa302
4
+ data.tar.gz: 924d98eb97349ba1e64b943ee1c6d2dea4a9d8e52789d41ceba3492b661b8d73
5
5
  SHA512:
6
- metadata.gz: 64a43d81e056a666c3269d61e13b614ccaab86ba7d762544a4c8e3817e98730e7aefb0b2e29d18faa7fa6a0020f4f03dbdecbc5754d231eed0dfd718a5b6716d
7
- data.tar.gz: ab55ee8a06c846e86f8b16c4f0d7e3e361f9f2c1cea011a459e826ac08439b4fdcb56d823f824030f7ddca97855ef4cbf140b30c8148db00070849ea8799e667
6
+ metadata.gz: cdc245a080fcafe949b9ae7b3489bf9e6a50d452e06543401960f1efe1f3683ae9c1500fe2fb39ced60decdd3c529960f03f5f6121791612ca62949f7f536e7a
7
+ data.tar.gz: ed5b0b5e313c9da25a56a8e7292ebd61c59991dfb9107399a08a65e3848d3419c77c87441ef216b282df25dcbc55cca91953867165962716e1c7ab15e6f3f020
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- informix_rails (0.1.0)
4
+ informix_rails (0.2.0)
5
5
  rake
6
6
  rspec
7
7
  thor (~> 1.2.1)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InformixRails
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
@@ -22,7 +22,7 @@ module InformixRails
22
22
  output.each do |line|
23
23
  content += convert_line(line) unless line.strip.empty?
24
24
  end
25
- content
25
+ wrap_content(content)
26
26
  end
27
27
 
28
28
  def read(file)
@@ -55,13 +55,45 @@ module InformixRails
55
55
  end
56
56
 
57
57
  def wrap_content(content)
58
- "<div class='flex-container'>\n#{content}\n</div>\n\n"
58
+ content = wrap_form(content)
59
+ content = add_actions(content)
60
+ content = wrap_box(content)
61
+ content
62
+ end
63
+
64
+ def wrap_container(content)
65
+ "<div class='flex-container'>\n"\
66
+ "#{content}\n"\
67
+ "</div>\n\n"
68
+ end
69
+
70
+ def wrap_form(content)
71
+ "<%= form_with(model: @model, html: {autocomplete: 'off'}) do |form| %>\n"\
72
+ "#{content}"\
73
+ "<% end %>\n"
74
+ end
75
+
76
+ def wrap_box(content)
77
+ "<div class='one_box'>\n"\
78
+ "#{content}"\
79
+ "</div>\n"
80
+ end
81
+
82
+ def add_actions(content)
83
+ "#{content}"\
84
+ "<div class='item_actions'>\n"\
85
+ "Option:\n"\
86
+ "<span class='links'>\n"\
87
+ "Add\nEd\nDel\nNx\nPr\nFd\nVw\n"\
88
+ "<%= link_to_kb 'X', '/menus/main', ['x','f7'] %>\n"\
89
+ "<%= form.submit 'OK[F11]', id: 'ok', 'data-reset_form-target':'button' %>\n"\
90
+ "</span>\n"
59
91
  end
60
92
 
61
93
  def convert_line(line)
62
94
  content = split_items(line).map{ |item|
63
95
  convert_item(item)}.join("\n")
64
- wrap_content(content)
96
+ wrap_container(content)
65
97
  end
66
98
 
67
99
  def split_items(line)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: informix_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Pope