informix_rails 0.1.0 → 0.3.2

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
  SHA256:
3
- metadata.gz: 583469060d3769d64c4142a18ffb7dc5dcaab1d9e5fe73644653ced2b4d004b2
4
- data.tar.gz: d2e11d5efecef1d96b524f11c68528a1e1f9552255d6f682c5b3820694fc0109
3
+ metadata.gz: 13d5a9446d218b2cb7e72c441c6a817ccff8dc8929dcecb81f1bb2371b3cfdb2
4
+ data.tar.gz: a7d37bbbdfe98a994d278764a817f6c19ce60a3f837e542bc4d9d08e330e763e
5
5
  SHA512:
6
- metadata.gz: 64a43d81e056a666c3269d61e13b614ccaab86ba7d762544a4c8e3817e98730e7aefb0b2e29d18faa7fa6a0020f4f03dbdecbc5754d231eed0dfd718a5b6716d
7
- data.tar.gz: ab55ee8a06c846e86f8b16c4f0d7e3e361f9f2c1cea011a459e826ac08439b4fdcb56d823f824030f7ddca97855ef4cbf140b30c8148db00070849ea8799e667
6
+ metadata.gz: '027494e1d7c4af8b404ab6bce4f8446d8d019123b339954bce7d0b9ae365da3f8969ae3f5f7a7be20f13f441608f08686cf42b566aa4e95421004a43191ff6e0'
7
+ data.tar.gz: 2422d43d0bc38737a7dd111fe7ad65477800fae116456c8c04beef7790b1ef1634937bf4031e41605ccba590b59e9850aeb25333efb0996870d433278fbc97aa
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.3.2)
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.3.2"
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,46 @@ 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 = add_actions(content)
59
+ content = wrap_box(content)
60
+ content = wrap_form(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"\
91
+ "</div>\n"
59
92
  end
60
93
 
61
94
  def convert_line(line)
62
95
  content = split_items(line).map{ |item|
63
96
  convert_item(item)}.join("\n")
64
- wrap_content(content)
97
+ wrap_container(content)
65
98
  end
66
99
 
67
100
  def split_items(line)
metadata CHANGED
@@ -1,14 +1,14 @@
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.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Pope
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-16 00:00:00.000000000 Z
11
+ date: 2022-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor