ezframe 0.0.1 → 0.0.3
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 +4 -4
- data/.gitignore +1 -0
- data/README.md +11 -4
- data/app_template/asset/image/favicon.ico +0 -0
- data/app_template/asset/js/ezframe.js +288 -0
- data/app_template/config/generic.yml +3 -0
- data/app_template/config/materialize.yml +5 -0
- data/{example/chat → app_template}/config.ru +2 -10
- data/app_template/pages/basic.rb +5 -0
- data/exe/create_table.rb +1 -0
- data/exe/setup.rb +15 -0
- data/ezframe.gemspec +3 -4
- data/lib/ezframe/auth.rb +15 -12
- data/lib/ezframe/column_set.rb +68 -28
- data/lib/ezframe/column_type.rb +231 -68
- data/lib/ezframe/config.rb +4 -0
- data/lib/ezframe/controller.rb +20 -10
- data/lib/ezframe/database.rb +10 -3
- data/lib/ezframe/ht.rb +167 -0
- data/lib/ezframe/html.rb +28 -4
- data/lib/ezframe/japanese_utils.rb +40 -0
- data/lib/ezframe/{pages.rb → loader.rb} +3 -0
- data/lib/ezframe/materialize.rb +55 -20
- data/lib/ezframe/model.rb +0 -2
- data/lib/ezframe/page_base.rb +18 -12
- data/lib/ezframe/page_kit.rb +12 -33
- data/lib/ezframe/template.rb +20 -15
- data/lib/ezframe/util.rb +5 -0
- data/lib/ezframe/version.rb +1 -1
- data/lib/ezframe.rb +5 -4
- metadata +27 -70
- data/example/auth/Gemfile +0 -8
- data/example/auth/asset/css/materialize.min.css +0 -13
- data/example/auth/asset/js/common.js +0 -200
- data/example/auth/asset/js/htmlgen.js +0 -79
- data/example/auth/columns/user.yml +0 -12
- data/example/auth/config/view_conf.yml +0 -3
- data/example/auth/config.ru +0 -26
- data/example/auth/pages/app.rb +0 -61
- data/example/auth/template/base.html +0 -12
- data/example/chat/Gemfile +0 -9
- data/example/chat/asset/css/materialize.min.css +0 -13
- data/example/chat/asset/js/common.js +0 -200
- data/example/chat/asset/js/htmlgen.js +0 -79
- data/example/chat/columns/belong.yml +0 -6
- data/example/chat/columns/channel.yml +0 -3
- data/example/chat/columns/talk.yml +0 -6
- data/example/chat/columns/user.yml +0 -12
- data/example/chat/config/view_conf.yml +0 -3
- data/example/chat/pages/app.rb +0 -59
- data/example/chat/template/base.html +0 -12
- data/example/todo/Gemfile +0 -8
- data/example/todo/asset/css/datatable.css +0 -54
- data/example/todo/asset/css/materialize.min.css +0 -13
- data/example/todo/asset/js/common.js +0 -135
- data/example/todo/asset/js/datatable.js +0 -1814
- data/example/todo/asset/js/htmlgen.js +0 -79
- data/example/todo/asset/js/init.js +0 -3
- data/example/todo/asset/js/materialize.min.js +0 -6
- data/example/todo/asset/js/mydatatable.js +0 -9
- data/example/todo/asset/js/mymaterialize.js +0 -22
- data/example/todo/columns/todo.yml +0 -9
- data/example/todo/config/view_conf.yml +0 -3
- data/example/todo/config.ru +0 -15
- data/example/todo/pages/app.rb +0 -93
- data/example/todo/template/base.html +0 -12
- data/exe/myrackup +0 -5
- data/lib/ezframe/hthash.rb +0 -116
data/lib/ezframe/html.rb
CHANGED
@@ -11,16 +11,18 @@ module Ezframe
|
|
11
11
|
|
12
12
|
tag = ht_h[:tag]
|
13
13
|
case tag
|
14
|
+
when "input"
|
15
|
+
input(ht_h)
|
14
16
|
when "select"
|
15
17
|
return select(ht_h) if ht_h[:items]
|
16
18
|
when "icon"
|
17
19
|
tag = "i"
|
18
20
|
end
|
19
21
|
opt_s, child_s = join_attributes(ht_h)
|
20
|
-
if child_s.length
|
21
|
-
return "<#{tag} #{opt_s}>\n#{child_s}\n</#{tag}>\n"
|
22
|
+
if child_s.length >= 0
|
23
|
+
return "<#{ht_h[:tag]} #{opt_s}>\n#{child_s}\n</#{ht_h[:tag]}>\n"
|
22
24
|
end
|
23
|
-
"<#{tag} #{opt_s}/>"
|
25
|
+
"<#{ht_h[:tag]} #{opt_s}/>"
|
24
26
|
end
|
25
27
|
|
26
28
|
def join_attributes(attrs)
|
@@ -48,9 +50,24 @@ module Ezframe
|
|
48
50
|
[opt_a.compact.join(" "), child_s]
|
49
51
|
end
|
50
52
|
|
53
|
+
def input(ht_h)
|
54
|
+
size = ht_h[:size]
|
55
|
+
# puts "input: size=#{size.inspect}"
|
56
|
+
if size && (size.index("x") || size.index("*"))
|
57
|
+
if /(\d+)\s*[x\*]\s*(\d+)/ =~ size
|
58
|
+
ht_h[:cols], ht_h[:rows] = $1, $2
|
59
|
+
end
|
60
|
+
ht_h[:tag] = "textarea"
|
61
|
+
ht_h[:child] = ht_h[:value]
|
62
|
+
ht_h.delete(:value)
|
63
|
+
p ht_h
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
51
67
|
def select(ht_h = {})
|
52
68
|
attr = ht_h.clone
|
53
69
|
items = attr[:items]
|
70
|
+
# puts "Html.select: #{items}"
|
54
71
|
if items.is_a?(Hash)
|
55
72
|
option_a = ht_h[:items].map do |k, v|
|
56
73
|
h = { tag: "option", value: k }
|
@@ -59,6 +76,9 @@ module Ezframe
|
|
59
76
|
h[:selected] = "selected" if selected
|
60
77
|
end
|
61
78
|
h[:child] = v
|
79
|
+
if ht_h[:default] && ht_h[:default] == v
|
80
|
+
h[:selected] = "selected"
|
81
|
+
end
|
62
82
|
h
|
63
83
|
end
|
64
84
|
elsif items.is_a?(Array)
|
@@ -67,6 +87,10 @@ module Ezframe
|
|
67
87
|
if %w[selected default].include?(v[2])
|
68
88
|
h[:selected] = "selected"
|
69
89
|
end
|
90
|
+
if ht_h[:default] && ht_h[:default] == v
|
91
|
+
h[:selected] = "selected"
|
92
|
+
end
|
93
|
+
# puts h.inspect
|
70
94
|
h
|
71
95
|
end
|
72
96
|
else
|
@@ -74,7 +98,7 @@ module Ezframe
|
|
74
98
|
end
|
75
99
|
attr[:tag] = "select"
|
76
100
|
attr[:child] = option_a
|
77
|
-
attr[:name]
|
101
|
+
attr[:name] ||= attr[:key]
|
78
102
|
attr[:final] = true
|
79
103
|
attr.delete(:items)
|
80
104
|
Html.convert(attr)
|
@@ -0,0 +1,40 @@
|
|
1
|
+
class Japanese
|
2
|
+
class << self
|
3
|
+
def convert_wareki(year)
|
4
|
+
[
|
5
|
+
["令和", 2019],
|
6
|
+
["平成", 1989],
|
7
|
+
["昭和", 1926],
|
8
|
+
["大正", 1912],
|
9
|
+
["明治", 1868],
|
10
|
+
].each do |a|
|
11
|
+
gengo, start_at = a
|
12
|
+
wareki = year - start_at + 1
|
13
|
+
if wareki > 0
|
14
|
+
wareki = "元" if wareki == 1
|
15
|
+
return "#{gengo}#{wareki}"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def is_katakana?(str)
|
21
|
+
return nil if !str || str.empty?
|
22
|
+
return /^[ァ-ン\-ー―−]+$/ =~ str
|
23
|
+
end
|
24
|
+
|
25
|
+
def is_hiragana?(str)
|
26
|
+
return nil if !str || str.empty?
|
27
|
+
return /^[ぁ-ん\-ー―−]+$/ =~ str
|
28
|
+
end
|
29
|
+
|
30
|
+
def to_hiragana(str)
|
31
|
+
return nil if !str
|
32
|
+
return str.tr("ァ-ン\-ー―−", "ぁ-ん\-ー―−")
|
33
|
+
end
|
34
|
+
|
35
|
+
def to_katakana(str)
|
36
|
+
return nil if !str
|
37
|
+
return str.tr("ぁ-ん\-ー―−", "ァ-ン\-ー―−")
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
data/lib/ezframe/materialize.rb
CHANGED
@@ -4,32 +4,25 @@ module Ezframe
|
|
4
4
|
class Materialize
|
5
5
|
class << self
|
6
6
|
def into_html_header
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
|
11
|
-
EOHEAD2
|
7
|
+
|
8
|
+
css_a = Config[:extra_css_list].map {|file| "<link href=\"#{file}\" rel=\"stylesheet\">\n" }
|
9
|
+
js_a = Config[:extra_js_list].map {|file| "<script src=\"#{file}\"></script>\n" }
|
12
10
|
|
13
11
|
css_files = Dir["./asset/css/*.css"]||[]
|
14
|
-
css_a
|
12
|
+
css_a += css_files.map do |file|
|
15
13
|
file.gsub!("./asset", "")
|
16
14
|
"<link href=\"#{file}\" rel=\"stylesheet\">\n"
|
17
15
|
end
|
18
16
|
js_files = Dir["./asset/js/*.js"]||[]
|
19
|
-
js_a
|
17
|
+
js_a += js_files.map do |file|
|
20
18
|
file.gsub!("./asset", "")
|
21
19
|
"<script src=\"#{file}\"></script>\n"
|
22
20
|
end
|
23
|
-
|
21
|
+
(css_a+js_a).join
|
24
22
|
end
|
25
23
|
|
26
24
|
def into_bottom_of_body
|
27
25
|
""
|
28
|
-
# Dir["./asset/js"].each do ||
|
29
|
-
# <<~EOBOT
|
30
|
-
# <script src="/js/htmlgen.js"></script>
|
31
|
-
# <script src="/js/common.js"></script>
|
32
|
-
# EOBOT
|
33
26
|
end
|
34
27
|
|
35
28
|
def convert(ht_h)
|
@@ -39,10 +32,14 @@ module Ezframe
|
|
39
32
|
if ht_h.kind_of?(Array)
|
40
33
|
new_h = ht_h.map { |v| convert(v) }
|
41
34
|
elsif ht_h.kind_of?(Hash)
|
35
|
+
unless ht_h[:tag]
|
36
|
+
mylog("convert: no tag: #{ht_h.inspect}")
|
37
|
+
return nil
|
38
|
+
end
|
42
39
|
case ht_h[:tag].to_sym
|
43
|
-
when :input, :select
|
44
|
-
new_h = input(ht_h) if "hidden" != ht_h[:type]
|
45
|
-
return new_h
|
40
|
+
# when :input, :select
|
41
|
+
# new_h = input(ht_h) if "hidden" != ht_h[:type]
|
42
|
+
# return new_h
|
46
43
|
when :checkbox
|
47
44
|
return checkbox(ht_h)
|
48
45
|
when :radio
|
@@ -75,10 +72,10 @@ module Ezframe
|
|
75
72
|
end
|
76
73
|
|
77
74
|
def input(ht_h)
|
78
|
-
ht_h[:
|
75
|
+
ht_h[:tag] = "input"
|
79
76
|
width_s = "s#{ht_h[:width_s] || 12}"
|
80
77
|
ht_h.delete(:witdth_s)
|
81
|
-
label = Ht.label(for: ht_h[:
|
78
|
+
label = Ht.label(class: %w[active], for: ht_h[:name], child: ht_h[:label], final: true )
|
82
79
|
cls = ["input-field", "col", width_s]
|
83
80
|
new_h = Ht.div(class: cls, child: [ht_h, label])
|
84
81
|
new_h = Ht.div(child: new_h, class: "row")
|
@@ -88,13 +85,13 @@ module Ezframe
|
|
88
85
|
def checkbox(ht_h)
|
89
86
|
ht_h[:tag] = "input"
|
90
87
|
ht_h[:type] = "checkbox"
|
91
|
-
Ht.label(child: [ht_h, { tag: "span", child: ht_h[:value] }])
|
88
|
+
return Ht.label(child: [ht_h, { tag: "span", child: ht_h[:value] }])
|
92
89
|
end
|
93
90
|
|
94
91
|
def radio(ht_h)
|
95
92
|
ht_h[:tag] = "input"
|
96
93
|
ht_h[:type] = "radio"
|
97
|
-
Ht.label(child: [ht_h, { tag: "span", child: ht_h[:label] }])
|
94
|
+
return Ht.label(child: [ht_h, { tag: "span", child: ht_h[:label] }])
|
98
95
|
end
|
99
96
|
|
100
97
|
def add_sibling(dest, elem)
|
@@ -104,6 +101,44 @@ module Ezframe
|
|
104
101
|
[dest, elem]
|
105
102
|
end
|
106
103
|
end
|
104
|
+
|
105
|
+
def loading
|
106
|
+
Ht.div(class: %w[preloader-wrapper big active], child:
|
107
|
+
Ht.div(class: %w[spinner-layer spinner-green], child: [
|
108
|
+
Ht.multi_div([%w[circle-clipper left], %w[circle]], ""),
|
109
|
+
Ht.multi_div([%w[gap-patch], %w[circle]], ""),
|
110
|
+
Ht.multi_div([%w[circle-clipper right], %w[circle]], "")
|
111
|
+
]))
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
class Collection < Array
|
116
|
+
def to_h
|
117
|
+
list = self.map do |line|
|
118
|
+
Ht.li(class: %w[collection-item], child: line)
|
119
|
+
end
|
120
|
+
return Ht.ul(class: %w[collection], child: list)
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
class Tab
|
125
|
+
def self.base_layout(link_list)
|
126
|
+
size = 12 / link_list.length
|
127
|
+
tabs = link_list.map do |link|
|
128
|
+
Ht.li(class: ["tab", "s#{size}"], child: link)
|
129
|
+
end
|
130
|
+
Ht.multi_div([%w[row], %w[col s12]], Ht.ul(class: %w[tabs], child: tabs))
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
class Card
|
135
|
+
def self.base_layout(title: "", content: "")
|
136
|
+
Ht.multi_div([%w[row], %w[col s12], %w[card blue-grey darken-1], %w[card-content white-text]],
|
137
|
+
[
|
138
|
+
Ht.span(class: %w[card-title], child: title),
|
139
|
+
Ht.p(child: content),
|
140
|
+
])
|
141
|
+
end
|
107
142
|
end
|
108
143
|
end
|
109
144
|
end
|
data/lib/ezframe/model.rb
CHANGED
data/lib/ezframe/page_base.rb
CHANGED
@@ -8,15 +8,6 @@ require_relative "util"
|
|
8
8
|
module Ezframe
|
9
9
|
class PageBase
|
10
10
|
class << self
|
11
|
-
def get_class(keys)
|
12
|
-
keys = [keys] if keys.is_a?(String)
|
13
|
-
klass = (%w[Ezframe] + keys.map { |k| k.to_camel }).join("::")
|
14
|
-
if Object.const_defined?(klass)
|
15
|
-
return Object.const_get(klass)
|
16
|
-
end
|
17
|
-
return nil
|
18
|
-
end
|
19
|
-
|
20
11
|
def decide_route(path_info)
|
21
12
|
default_class = Config[:default_page_class]||"App"
|
22
13
|
default_method = Config[:default_page_method]||"default"
|
@@ -25,11 +16,15 @@ module Ezframe
|
|
25
16
|
when 0
|
26
17
|
[get_class(default_class), default_method]
|
27
18
|
when 1
|
19
|
+
filename = path_parts[0]
|
20
|
+
if filename.index(".")
|
21
|
+
return nil
|
22
|
+
end
|
28
23
|
klass = get_class(path_parts)
|
29
24
|
if klass
|
30
25
|
return [klass, default_method]
|
31
26
|
else
|
32
|
-
return [get_class(default_class),
|
27
|
+
return [get_class(default_class), path_parts[0]]
|
33
28
|
end
|
34
29
|
else
|
35
30
|
klass = get_class(path_parts)
|
@@ -42,6 +37,16 @@ module Ezframe
|
|
42
37
|
end
|
43
38
|
end
|
44
39
|
end
|
40
|
+
|
41
|
+
def get_class(keys)
|
42
|
+
keys = [keys] if keys.is_a?(String)
|
43
|
+
klass = (%w[Ezframe] + keys.map { |k| k.to_camel }).join("::")
|
44
|
+
mylog "get_class: #{klass}"
|
45
|
+
if Object.const_defined?(klass)
|
46
|
+
return Object.const_get(klass)
|
47
|
+
end
|
48
|
+
return nil
|
49
|
+
end
|
45
50
|
end
|
46
51
|
|
47
52
|
attr_accessor :auth
|
@@ -55,7 +60,8 @@ module Ezframe
|
|
55
60
|
mylog "params=#{@params.inspect}" if @params.length > 0
|
56
61
|
@id, @key = @params[:id], @params[:key]
|
57
62
|
@env = @request.env
|
58
|
-
@session = @env["rack.
|
63
|
+
@session = @env["rack.session"]
|
64
|
+
mylog "session = #{@session.inspect}"
|
59
65
|
if request.post?
|
60
66
|
parse_json_body
|
61
67
|
mylog "json=#{@json.inspect}"
|
@@ -78,7 +84,7 @@ module Ezframe
|
|
78
84
|
into_html_header: Materialize.into_html_header,
|
79
85
|
into_bottom_of_body: Materialize.into_bottom_of_body,
|
80
86
|
}
|
81
|
-
|
87
|
+
Template.fill("template/base.html", args)
|
82
88
|
end
|
83
89
|
|
84
90
|
def parse_json_body
|
data/lib/ezframe/page_kit.rb
CHANGED
@@ -12,8 +12,12 @@ module Ezframe
|
|
12
12
|
table_a = row_a.map do |row_h|
|
13
13
|
column_set.values = row_h
|
14
14
|
id = column_set[:id].value
|
15
|
-
value_a = @attribute[:column_header].map do |key|
|
15
|
+
value_a = (@attribute[:column_header]||[]).map do |key|
|
16
16
|
col = column_set[key]
|
17
|
+
unless col
|
18
|
+
mylog "undefined key: #{key}"
|
19
|
+
next
|
20
|
+
end
|
17
21
|
checkbox_key = @attribute[:add_checkbox]
|
18
22
|
if checkbox_key && key == checkbox_key
|
19
23
|
text = add_checkbox(col)
|
@@ -25,59 +29,34 @@ module Ezframe
|
|
25
29
|
text = deco.call(key, id, text)
|
26
30
|
# mylog "deco: #{text}"
|
27
31
|
end
|
28
|
-
td
|
29
|
-
# td.update(@attribute[:onclick_rows].call(id, text)) if @attribute[:onclick_rows]
|
30
|
-
td
|
32
|
+
Ht.td(child: text)
|
31
33
|
end
|
32
|
-
tr =
|
34
|
+
tr = Ht.tr(child: value_a)
|
33
35
|
if @attribute[:onclick_rows]
|
34
36
|
tr[:id] = elem_id = "tr_#{id}"
|
35
|
-
# tr.update(@attribute[:onclick_rows].call(id))
|
36
37
|
end
|
37
38
|
tr
|
38
39
|
end
|
39
|
-
|
40
|
+
Ht.table(child: [make_header, table_a])
|
40
41
|
end
|
41
42
|
|
42
43
|
def add_checkbox(col)
|
43
|
-
|
44
|
+
Ht.checkbox(name: "checkbox_#{col.key}_#{col.value}", value: col.value, label: col.view)
|
44
45
|
end
|
45
46
|
|
46
47
|
def make_header
|
47
48
|
column_set = @attribute[:column_set]
|
48
|
-
th_a = @attribute[:column_header].map do |key|
|
49
|
+
th_a = (@attribute[:column_header]||[]).map do |key|
|
49
50
|
col = column_set[key]
|
50
51
|
if col
|
51
|
-
|
52
|
+
Ht.th(child: col.label)
|
52
53
|
else
|
53
54
|
nil
|
54
55
|
end
|
55
56
|
end
|
56
57
|
if @attribute[:add_checkbox]
|
57
58
|
end
|
58
|
-
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
|
-
class Tab
|
63
|
-
def self.base_hthash(link_list)
|
64
|
-
size = 12 / link_list.length
|
65
|
-
tabs = link_list.map do |link|
|
66
|
-
{ tag: "li", class: ["tab", "s#{size}"], child: link }
|
67
|
-
end
|
68
|
-
ul = { tag: "ul", class: %w[tabs], child: tabs }
|
69
|
-
div = { tag: "div", class: %w[row s12], child: ul }
|
70
|
-
{ tag: "div", class: %w[row], child: div }
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
|
-
class Card
|
75
|
-
def self.base_hthash(title: "", content: "")
|
76
|
-
multi_div([%w[row], %w[col s12], %w[card blue-grey darken-1], %w[card-content white-text]],
|
77
|
-
[
|
78
|
-
{ tag: "span", class: %w[card-tite], child: title },
|
79
|
-
{ tag: "p", child: content },
|
80
|
-
])
|
59
|
+
Ht.tr(child: th_a)
|
81
60
|
end
|
82
61
|
end
|
83
62
|
end
|
data/lib/ezframe/template.rb
CHANGED
@@ -1,25 +1,30 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
module
|
3
|
+
module Ezframe
|
4
4
|
class Template
|
5
|
-
|
6
|
-
|
5
|
+
class << self
|
6
|
+
def fill(filename, opts = {})
|
7
|
+
dir = File.dirname(filename)
|
8
|
+
unless File.exist?(filename)
|
9
|
+
raise "fill_template: file does not exist: #{filename}"
|
10
|
+
end
|
7
11
|
|
8
|
-
|
9
|
-
|
10
|
-
end
|
11
|
-
|
12
|
-
def self.fill_template(filename, opts = {})
|
13
|
-
dir = File.dirname(filename)
|
14
|
-
unless File.exist?(filename)
|
15
|
-
raise "fill_template: file does not exist: #{filename}"
|
12
|
+
instr = File.open(filename, &:read)
|
13
|
+
return fill_in_text(instr, opts)
|
16
14
|
end
|
17
15
|
|
18
|
-
|
19
|
-
|
20
|
-
|
16
|
+
def fill_in_text(text, opts = {})
|
17
|
+
outstr = text.gsub(/\#\{(.*)\}/) do
|
18
|
+
keyword = $1
|
19
|
+
if opts[keyword.to_sym]
|
20
|
+
opts[keyword.to_sym]
|
21
|
+
else
|
22
|
+
mylog "[WARN] no value for keyword: #{keyword}"
|
23
|
+
nil
|
24
|
+
end
|
25
|
+
end
|
26
|
+
return outstr
|
21
27
|
end
|
22
|
-
outstr
|
23
28
|
end
|
24
29
|
end
|
25
30
|
end
|
data/lib/ezframe/util.rb
CHANGED
@@ -29,6 +29,7 @@ class Hash
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def add_class(klass)
|
32
|
+
return unless klass
|
32
33
|
c = self[:class]
|
33
34
|
if !c
|
34
35
|
self[:class] = c = []
|
@@ -81,6 +82,10 @@ def multi_div(class_a, child)
|
|
81
82
|
return child
|
82
83
|
end
|
83
84
|
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
84
89
|
def mylog(msg)
|
85
90
|
File.open("log/mylog.log", "a"){|f| f.puts "#{Time.now}:[#{$$}]:#{msg}" }
|
86
91
|
end
|
data/lib/ezframe/version.rb
CHANGED
data/lib/ezframe.rb
CHANGED
@@ -1,27 +1,28 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'yaml'
|
4
|
-
require 'htmlbeautifier'
|
5
4
|
require "sequel"
|
6
5
|
require "json"
|
7
|
-
require "
|
6
|
+
require "nkf"
|
8
7
|
|
8
|
+
require_relative 'ezframe/version'
|
9
9
|
require_relative 'ezframe/util'
|
10
10
|
require_relative 'ezframe/config'
|
11
11
|
require_relative 'ezframe/controller'
|
12
|
+
require_relative 'ezframe/japanese_utils'
|
12
13
|
require_relative 'ezframe/column_set'
|
13
14
|
require_relative 'ezframe/column_type'
|
14
15
|
require_relative 'ezframe/database'
|
15
|
-
require_relative 'ezframe/
|
16
|
+
require_relative 'ezframe/ht'
|
16
17
|
require_relative 'ezframe/html'
|
17
18
|
require_relative 'ezframe/materialize'
|
18
19
|
require_relative 'ezframe/model'
|
19
20
|
require_relative 'ezframe/page_kit'
|
20
21
|
require_relative 'ezframe/page_base'
|
21
22
|
require_relative 'ezframe/template'
|
22
|
-
require_relative 'ezframe/pages'
|
23
23
|
require_relative 'ezframe/server'
|
24
24
|
require_relative 'ezframe/auth.rb'
|
25
|
+
require_relative 'ezframe/loader'
|
25
26
|
|
26
27
|
|
27
28
|
|