super_tools 0.0.7 → 0.0.8

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: 23ab3145121a1328b037bf853039e4115ac92629
4
- data.tar.gz: 04b5e71f0f34df059751464ef110134690ec40d6
3
+ metadata.gz: d443bafc6745fef2db08921770d63a6f26e9a635
4
+ data.tar.gz: b65a9f068b176d23dab5e66826f74fa270d58a39
5
5
  SHA512:
6
- metadata.gz: 1b896b48cc2c64a98c60ff8b38017e5d813d129b55ec8049b78e25db585ad59cea1a19d018d593ef6d98fc80b8977a4feab252a05c39ee6a48cb445d8d9d63dd
7
- data.tar.gz: 33c5d969561f0657062c5993942e4a0b611608af017e1fe70087adcb1c5a03598b62446766a101737deb3bf59679657dd85f44a9de2fee1f2ecd0ed17c965cff
6
+ metadata.gz: c110a2136900c69371e368b8e67ed065f024eb61bf503591c4621ed73fda104699aacc898d603ac622f27b6385f0e708227d9cf3762f479eb6478bb4da5c799b
7
+ data.tar.gz: 0c6cb619ccd948e8def86bac5600060a10d56062fa2e951e5666dea81db9f61d26960d4e33169707939f76b4e8a7a0e2f1b8bfa0b26523d6f8e3d352b450c702
data/Gemfile.lock CHANGED
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- super_tools (0.0.5)
4
+ super_tools (0.0.8)
5
5
  dry-logic (~> 0.4.2)
6
6
  dry-types (~> 0.13.2)
7
7
  fast_excel
8
8
  forwardable
9
9
  iconv
10
10
  nokogiri (>= 1.6, <= 1.9.1)
11
- rails (>= 4, <= 5)
11
+ rails (>= 4)
12
12
  reform (~> 2.2.4)
13
13
  reform-rails
14
14
  roo
@@ -21,44 +21,48 @@ PATH
21
21
  GEM
22
22
  remote: https://rubygems.org/
23
23
  specs:
24
- actioncable (5.0.0)
25
- actionpack (= 5.0.0)
26
- nio4r (~> 1.2)
27
- websocket-driver (~> 0.6.1)
28
- actionmailer (5.0.0)
29
- actionpack (= 5.0.0)
30
- actionview (= 5.0.0)
31
- activejob (= 5.0.0)
24
+ actioncable (5.2.3)
25
+ actionpack (= 5.2.3)
26
+ nio4r (~> 2.0)
27
+ websocket-driver (>= 0.6.1)
28
+ actionmailer (5.2.3)
29
+ actionpack (= 5.2.3)
30
+ actionview (= 5.2.3)
31
+ activejob (= 5.2.3)
32
32
  mail (~> 2.5, >= 2.5.4)
33
33
  rails-dom-testing (~> 2.0)
34
- actionpack (5.0.0)
35
- actionview (= 5.0.0)
36
- activesupport (= 5.0.0)
34
+ actionpack (5.2.3)
35
+ actionview (= 5.2.3)
36
+ activesupport (= 5.2.3)
37
37
  rack (~> 2.0)
38
- rack-test (~> 0.6.3)
38
+ rack-test (>= 0.6.3)
39
39
  rails-dom-testing (~> 2.0)
40
40
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
41
- actionview (5.0.0)
42
- activesupport (= 5.0.0)
41
+ actionview (5.2.3)
42
+ activesupport (= 5.2.3)
43
43
  builder (~> 3.1)
44
- erubis (~> 2.7.0)
44
+ erubi (~> 1.4)
45
45
  rails-dom-testing (~> 2.0)
46
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
47
- activejob (5.0.0)
48
- activesupport (= 5.0.0)
46
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
47
+ activejob (5.2.3)
48
+ activesupport (= 5.2.3)
49
49
  globalid (>= 0.3.6)
50
- activemodel (5.0.0)
51
- activesupport (= 5.0.0)
52
- activerecord (5.0.0)
53
- activemodel (= 5.0.0)
54
- activesupport (= 5.0.0)
55
- arel (~> 7.0)
56
- activesupport (5.0.0)
50
+ activemodel (5.2.3)
51
+ activesupport (= 5.2.3)
52
+ activerecord (5.2.3)
53
+ activemodel (= 5.2.3)
54
+ activesupport (= 5.2.3)
55
+ arel (>= 9.0)
56
+ activestorage (5.2.3)
57
+ actionpack (= 5.2.3)
58
+ activerecord (= 5.2.3)
59
+ marcel (~> 0.3.1)
60
+ activesupport (5.2.3)
57
61
  concurrent-ruby (~> 1.0, >= 1.0.2)
58
- i18n (~> 0.7)
62
+ i18n (>= 0.7, < 2)
59
63
  minitest (~> 5.1)
60
64
  tzinfo (~> 1.1)
61
- arel (7.1.4)
65
+ arel (9.0.0)
62
66
  axiom-types (0.1.1)
63
67
  descendants_tracker (~> 0.0.4)
64
68
  ice_nine (~> 0.11.0)
@@ -74,7 +78,7 @@ GEM
74
78
  declarative-option (0.1.0)
75
79
  descendants_tracker (0.0.4)
76
80
  thread_safe (~> 0.3, >= 0.3.1)
77
- disposable (0.4.4)
81
+ disposable (0.4.5)
78
82
  declarative (>= 0.0.9, < 1.0.0)
79
83
  declarative-builder (< 0.2.0)
80
84
  declarative-option (< 0.2.0)
@@ -100,16 +104,16 @@ GEM
100
104
  dry-equalizer (~> 0.2)
101
105
  dry-inflector (~> 0.1, >= 0.1.2)
102
106
  dry-logic (~> 0.4, >= 0.4.2)
103
- elasticsearch (6.3.0)
104
- elasticsearch-api (= 6.3.0)
105
- elasticsearch-transport (= 6.3.0)
106
- elasticsearch-api (6.3.0)
107
+ elasticsearch (7.0.0)
108
+ elasticsearch-api (= 7.0.0)
109
+ elasticsearch-transport (= 7.0.0)
110
+ elasticsearch-api (7.0.0)
107
111
  multi_json
108
- elasticsearch-transport (6.3.0)
112
+ elasticsearch-transport (7.0.0)
109
113
  faraday
110
114
  multi_json
111
115
  equalizer (0.0.11)
112
- erubis (2.7.0)
116
+ erubi (1.8.0)
113
117
  faraday (0.15.4)
114
118
  multipart-post (>= 1.2, < 3)
115
119
  fast_excel (0.2.6)
@@ -119,7 +123,7 @@ GEM
119
123
  globalid (0.4.2)
120
124
  activesupport (>= 4.2.0)
121
125
  hashie (3.6.0)
122
- i18n (0.9.5)
126
+ i18n (1.5.1)
123
127
  concurrent-ruby (~> 1.0)
124
128
  ice_nine (0.11.2)
125
129
  iconv (1.0.8)
@@ -128,41 +132,45 @@ GEM
128
132
  nokogiri (>= 1.5.9)
129
133
  mail (2.7.1)
130
134
  mini_mime (>= 0.1.1)
135
+ marcel (0.3.3)
136
+ mimemagic (~> 0.3.2)
131
137
  method_source (0.9.2)
138
+ mimemagic (0.3.3)
132
139
  mini_mime (1.0.1)
133
140
  mini_portile2 (2.4.0)
134
141
  minitest (5.11.3)
135
142
  multi_json (1.13.1)
136
143
  multipart-post (2.0.0)
137
- nio4r (1.2.1)
144
+ nio4r (2.3.1)
138
145
  nokogiri (1.9.1)
139
146
  mini_portile2 (~> 2.4.0)
140
147
  rack (2.0.7)
141
- rack-test (0.6.3)
142
- rack (>= 1.0)
143
- rails (5.0.0)
144
- actioncable (= 5.0.0)
145
- actionmailer (= 5.0.0)
146
- actionpack (= 5.0.0)
147
- actionview (= 5.0.0)
148
- activejob (= 5.0.0)
149
- activemodel (= 5.0.0)
150
- activerecord (= 5.0.0)
151
- activesupport (= 5.0.0)
152
- bundler (>= 1.3.0, < 2.0)
153
- railties (= 5.0.0)
148
+ rack-test (1.1.0)
149
+ rack (>= 1.0, < 3)
150
+ rails (5.2.3)
151
+ actioncable (= 5.2.3)
152
+ actionmailer (= 5.2.3)
153
+ actionpack (= 5.2.3)
154
+ actionview (= 5.2.3)
155
+ activejob (= 5.2.3)
156
+ activemodel (= 5.2.3)
157
+ activerecord (= 5.2.3)
158
+ activestorage (= 5.2.3)
159
+ activesupport (= 5.2.3)
160
+ bundler (>= 1.3.0)
161
+ railties (= 5.2.3)
154
162
  sprockets-rails (>= 2.0.0)
155
163
  rails-dom-testing (2.0.3)
156
164
  activesupport (>= 4.2.0)
157
165
  nokogiri (>= 1.6)
158
166
  rails-html-sanitizer (1.0.4)
159
167
  loofah (~> 2.2, >= 2.2.2)
160
- railties (5.0.0)
161
- actionpack (= 5.0.0)
162
- activesupport (= 5.0.0)
168
+ railties (5.2.3)
169
+ actionpack (= 5.2.3)
170
+ activesupport (= 5.2.3)
163
171
  method_source
164
172
  rake (>= 0.8.7)
165
- thor (>= 0.18.1, < 2.0)
173
+ thor (>= 0.19.0, < 2.0)
166
174
  rake (10.5.0)
167
175
  reform (2.2.4)
168
176
  disposable (>= 0.4.1)
@@ -209,7 +217,7 @@ GEM
209
217
  equalizer (~> 0.0, >= 0.0.9)
210
218
  warehouse_items (0.3.0)
211
219
  activesupport
212
- websocket-driver (0.6.5)
220
+ websocket-driver (0.7.0)
213
221
  websocket-extensions (>= 0.1.0)
214
222
  websocket-extensions (0.1.3)
215
223
 
data/lib/super_tools.rb CHANGED
@@ -46,6 +46,8 @@ require 'super_interaction/command'
46
46
  require 'super_interaction/controller_helper'
47
47
  # FORMATTER
48
48
  require 'super_logger/formatter'
49
+ # Values
50
+ require 'super_value/base'
49
51
 
50
52
  module SuperTools
51
53
  end
@@ -1,3 +1,3 @@
1
1
  module SuperTools
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
@@ -0,0 +1,39 @@
1
+ module SuperValue
2
+ class Base
3
+ include ActiveSupport::Callbacks
4
+ cattr_accessor :model_name
5
+ define_callbacks :init
6
+
7
+ class << self
8
+ def init(model_name)
9
+ self.model_name = model_name
10
+ self.send(:attr_accessor, model_name)
11
+ define_method :initialize do |model|
12
+ run_callbacks :init do
13
+ self.send("#{model_name}=", model)
14
+ end
15
+ end
16
+ end
17
+
18
+ def property(method_name)
19
+ delegate method_name, to: model_name
20
+ end
21
+
22
+ def before_init(method_name=nil, &block)
23
+ if block_given?
24
+ set_callback :init, :before, &block
25
+ else
26
+ set_callback :init, :before, method_name
27
+ end
28
+ end
29
+
30
+ def after_init(method_name=nil, &block)
31
+ if block_given?
32
+ set_callback :init, :after, &block
33
+ else
34
+ set_callback :init, :after, method_name
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: super_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - eddie
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-04-22 00:00:00.000000000 Z
11
+ date: 2019-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -329,6 +329,7 @@ files:
329
329
  - lib/super_table/view_helpers.rb
330
330
  - lib/super_tools.rb
331
331
  - lib/super_tools/version.rb
332
+ - lib/super_value/base.rb
332
333
  - lib/super_zipcode/taiwan.rb
333
334
  - super_tools.gemspec
334
335
  homepage: https://github.com/superlanding/super_tools