code-ruby 1.5.1 → 1.5.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/Gemfile.lock +44 -29
- data/VERSION +1 -1
- data/code-ruby.gemspec +2 -0
- data/lib/code/concerns/shared.rb +4 -0
- data/lib/code/object/boolean.rb +2 -1
- data/lib/code/object/global.rb +3 -0
- data/lib/code/object/list.rb +38 -1
- data/lib/code/object/range.rb +7 -0
- data/lib/code/object/smtp.rb +87 -0
- data/lib/code/object/time.rb +98 -0
- data/lib/code-ruby.rb +1 -0
- data/spec/code_spec.rb +16 -0
- metadata +31 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58d866d9e727af5cd21ef84470e4c1d1ca184c50404487dbf9b0dd723285df75
|
4
|
+
data.tar.gz: ed804eeaabb172c04f01d37b30279ab108824aeeda15d844f45d9efdd53dbde2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22ff4dfc9525012aad11aafb6aa26489ce4ffec24c9d28b9dd1a0d0009766874b54345ddd4b5aa554fc67db095dbf090920d87926837877bb1df912a049499ea
|
7
|
+
data.tar.gz: d0c237a243258c2c9ea6fac040d7515aba786e73752754d6abba32f62658647623620008b250a943c144b38b79c6310cc6b94d15fe2aaf4f2fee4806d4d71da4
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
code-ruby (1.5.
|
4
|
+
code-ruby (1.5.3)
|
5
5
|
activesupport
|
6
6
|
base64
|
7
7
|
bigdecimal
|
@@ -9,7 +9,9 @@ PATH
|
|
9
9
|
dorian-arguments
|
10
10
|
json
|
11
11
|
language-ruby
|
12
|
+
mail
|
12
13
|
net-http
|
14
|
+
net-smtp
|
13
15
|
nokogiri
|
14
16
|
uri
|
15
17
|
zeitwerk
|
@@ -41,15 +43,16 @@ GEM
|
|
41
43
|
thor (~> 1.0)
|
42
44
|
cmdparse (3.0.7)
|
43
45
|
concurrent-ruby (1.3.5)
|
44
|
-
connection_pool (2.5.
|
46
|
+
connection_pool (2.5.3)
|
45
47
|
crack (1.0.0)
|
46
48
|
bigdecimal
|
47
49
|
rexml
|
48
|
-
csv (3.3.
|
50
|
+
csv (3.3.4)
|
51
|
+
date (3.4.1)
|
49
52
|
did-you-mean (0.1.1)
|
50
53
|
levenshtein (>= 0.2.0)
|
51
|
-
diff-lcs (1.6.
|
52
|
-
dorian (2.6.
|
54
|
+
diff-lcs (1.6.2)
|
55
|
+
dorian (2.6.4)
|
53
56
|
csv
|
54
57
|
dorian-arguments
|
55
58
|
dorian-eval
|
@@ -76,7 +79,7 @@ GEM
|
|
76
79
|
dorian-to_struct (2.0.2)
|
77
80
|
drb (2.2.1)
|
78
81
|
geom2d (0.4.1)
|
79
|
-
git (3.0.
|
82
|
+
git (3.0.2)
|
80
83
|
activesupport (>= 5.0)
|
81
84
|
addressable (~> 2.8)
|
82
85
|
process_executer (~> 1.3)
|
@@ -86,25 +89,30 @@ GEM
|
|
86
89
|
thor
|
87
90
|
tilt
|
88
91
|
hashdiff (1.1.2)
|
89
|
-
hexapdf (1.
|
92
|
+
hexapdf (1.3.0)
|
90
93
|
cmdparse (~> 3.0, >= 3.0.3)
|
91
94
|
geom2d (~> 0.4, >= 0.4.1)
|
92
95
|
openssl (>= 2.2.1)
|
93
96
|
strscan (>= 3.1.2)
|
94
97
|
i18n (1.14.7)
|
95
98
|
concurrent-ruby (~> 1.0)
|
96
|
-
json (2.
|
97
|
-
language-ruby (1.
|
99
|
+
json (2.12.0)
|
100
|
+
language-ruby (1.2.0)
|
98
101
|
dorian-arguments
|
99
102
|
zeitwerk
|
100
|
-
language_server-protocol (3.17.0.
|
103
|
+
language_server-protocol (3.17.0.5)
|
101
104
|
levenshtein (0.2.2)
|
102
105
|
libv8-node (23.6.1.0)
|
103
106
|
libv8-node (23.6.1.0-arm64-darwin)
|
104
107
|
libv8-node (23.6.1.0-x86_64-linux)
|
105
108
|
lint_roller (1.1.0)
|
106
109
|
logger (1.7.0)
|
107
|
-
|
110
|
+
mail (2.8.1)
|
111
|
+
mini_mime (>= 0.1.1)
|
112
|
+
net-imap
|
113
|
+
net-pop
|
114
|
+
net-smtp
|
115
|
+
mini_mime (1.1.5)
|
108
116
|
mini_racer (0.18.1)
|
109
117
|
libv8-node (~> 23.6.1.0)
|
110
118
|
minitest (5.25.5)
|
@@ -112,30 +120,36 @@ GEM
|
|
112
120
|
ruby2_keywords (~> 0.0.1)
|
113
121
|
net-http (0.6.0)
|
114
122
|
uri
|
115
|
-
|
116
|
-
|
123
|
+
net-imap (0.5.8)
|
124
|
+
date
|
125
|
+
net-protocol
|
126
|
+
net-pop (0.1.2)
|
127
|
+
net-protocol
|
128
|
+
net-protocol (0.2.2)
|
129
|
+
timeout
|
130
|
+
net-smtp (0.5.1)
|
131
|
+
net-protocol
|
132
|
+
nokogiri (1.18.8-arm64-darwin)
|
117
133
|
racc (~> 1.4)
|
118
|
-
nokogiri (1.18.
|
119
|
-
racc (~> 1.4)
|
120
|
-
nokogiri (1.18.7-x86_64-linux-gnu)
|
134
|
+
nokogiri (1.18.8-x86_64-linux-gnu)
|
121
135
|
racc (~> 1.4)
|
122
136
|
openssl (3.3.0)
|
123
137
|
ostruct (0.6.1)
|
124
|
-
parallel (1.
|
125
|
-
parser (3.3.
|
138
|
+
parallel (1.27.0)
|
139
|
+
parser (3.3.8.0)
|
126
140
|
ast (~> 2.4.1)
|
127
141
|
racc
|
128
142
|
prettier_print (1.2.1)
|
129
143
|
prism (1.4.0)
|
130
144
|
process_executer (1.3.0)
|
131
|
-
public_suffix (6.0.
|
145
|
+
public_suffix (6.0.2)
|
132
146
|
racc (1.8.1)
|
133
|
-
rack (3.1.
|
147
|
+
rack (3.1.14)
|
134
148
|
rack-protection (4.1.1)
|
135
149
|
base64 (>= 0.1.0)
|
136
150
|
logger (>= 1.6.0)
|
137
151
|
rack (>= 3.0.0, < 4)
|
138
|
-
rack-session (2.1.
|
152
|
+
rack-session (2.1.1)
|
139
153
|
base64 (>= 0.1.0)
|
140
154
|
rack (>= 3.0.0)
|
141
155
|
rainbow (3.1.1)
|
@@ -149,14 +163,14 @@ GEM
|
|
149
163
|
rspec-mocks (~> 3.13.0)
|
150
164
|
rspec-core (3.13.3)
|
151
165
|
rspec-support (~> 3.13.0)
|
152
|
-
rspec-expectations (3.13.
|
166
|
+
rspec-expectations (3.13.4)
|
153
167
|
diff-lcs (>= 1.2.0, < 2.0)
|
154
168
|
rspec-support (~> 3.13.0)
|
155
|
-
rspec-mocks (3.13.
|
169
|
+
rspec-mocks (3.13.4)
|
156
170
|
diff-lcs (>= 1.2.0, < 2.0)
|
157
171
|
rspec-support (~> 3.13.0)
|
158
|
-
rspec-support (3.13.
|
159
|
-
rubocop (1.75.
|
172
|
+
rspec-support (3.13.3)
|
173
|
+
rubocop (1.75.6)
|
160
174
|
json (~> 2.3)
|
161
175
|
language_server-protocol (~> 3.17.0.2)
|
162
176
|
lint_roller (~> 1.1.0)
|
@@ -167,7 +181,7 @@ GEM
|
|
167
181
|
rubocop-ast (>= 1.44.0, < 2.0)
|
168
182
|
ruby-progressbar (~> 1.7)
|
169
183
|
unicode-display_width (>= 2.4.0, < 4.0)
|
170
|
-
rubocop-ast (1.44.
|
184
|
+
rubocop-ast (1.44.1)
|
171
185
|
parser (>= 3.3.7.2)
|
172
186
|
prism (~> 1.4)
|
173
187
|
rubocop-capybara (2.22.1)
|
@@ -189,7 +203,7 @@ GEM
|
|
189
203
|
rubocop-rake (0.7.1)
|
190
204
|
lint_roller (~> 1.1)
|
191
205
|
rubocop (>= 1.72.1)
|
192
|
-
rubocop-rspec (3.
|
206
|
+
rubocop-rspec (3.6.0)
|
193
207
|
lint_roller (~> 1.1)
|
194
208
|
rubocop (~> 1.72, >= 1.72.1)
|
195
209
|
rubocop-rspec_rails (2.31.0)
|
@@ -207,7 +221,7 @@ GEM
|
|
207
221
|
rack-protection (= 4.1.1)
|
208
222
|
rack-session (>= 2.0.0, < 3)
|
209
223
|
tilt (~> 2.0)
|
210
|
-
strscan (3.1.
|
224
|
+
strscan (3.1.5)
|
211
225
|
syntax_tree (6.2.0)
|
212
226
|
prettier_print (>= 1.2.0)
|
213
227
|
syntax_tree-haml (4.0.3)
|
@@ -222,6 +236,7 @@ GEM
|
|
222
236
|
unicode-display_width (>= 1.1.1, < 4)
|
223
237
|
thor (1.3.2)
|
224
238
|
tilt (2.6.0)
|
239
|
+
timeout (0.4.3)
|
225
240
|
tzinfo (2.0.6)
|
226
241
|
concurrent-ruby (~> 1.0)
|
227
242
|
unicode-display_width (3.1.4)
|
@@ -240,7 +255,7 @@ GEM
|
|
240
255
|
|
241
256
|
PLATFORMS
|
242
257
|
arm64-darwin-23
|
243
|
-
|
258
|
+
arm64-darwin-24
|
244
259
|
x86_64-linux
|
245
260
|
|
246
261
|
DEPENDENCIES
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.5.
|
1
|
+
1.5.3
|
data/code-ruby.gemspec
CHANGED
@@ -20,7 +20,9 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.add_dependency "dorian-arguments"
|
21
21
|
s.add_dependency "json"
|
22
22
|
s.add_dependency "language-ruby"
|
23
|
+
s.add_dependency "mail"
|
23
24
|
s.add_dependency "net-http"
|
25
|
+
s.add_dependency "net-smtp"
|
24
26
|
s.add_dependency "nokogiri"
|
25
27
|
s.add_dependency "uri"
|
26
28
|
s.add_dependency "zeitwerk"
|
data/lib/code/concerns/shared.rb
CHANGED
data/lib/code/object/boolean.rb
CHANGED
@@ -4,7 +4,8 @@ class Code
|
|
4
4
|
class Object
|
5
5
|
class Boolean < ::Code::Object
|
6
6
|
def initialize(*args, **_kargs, &_block)
|
7
|
-
self.raw =
|
7
|
+
self.raw =
|
8
|
+
(args.first.is_an?(Object) ? args.first.truthy? : !!args.first)
|
8
9
|
end
|
9
10
|
|
10
11
|
def call(**args)
|
data/lib/code/object/global.rb
CHANGED
@@ -138,6 +138,9 @@ class Code
|
|
138
138
|
when "Http"
|
139
139
|
sig(args) { Object.repeat }
|
140
140
|
code_arguments.any? ? Http.new(*code_arguments.raw) : Class.new(Http)
|
141
|
+
when "Smtp"
|
142
|
+
sig(args) { Object.repeat }
|
143
|
+
code_arguments.any? ? Smtp.new(*code_arguments.raw) : Class.new(Smtp)
|
141
144
|
when "Json"
|
142
145
|
sig(args) { Object.repeat }
|
143
146
|
code_arguments.any? ? Json.new(*code_arguments.raw) : Class.new(Json)
|
data/lib/code/object/list.rb
CHANGED
@@ -30,6 +30,9 @@ class Code
|
|
30
30
|
when "<<", "append"
|
31
31
|
sig(args) { Object }
|
32
32
|
code_append(code_value)
|
33
|
+
when "-", "minus"
|
34
|
+
sig(args) { List }
|
35
|
+
code_minus(code_value)
|
33
36
|
when "any?"
|
34
37
|
sig(args) { Function.maybe }
|
35
38
|
code_any?(code_value, **globals)
|
@@ -50,7 +53,13 @@ class Code
|
|
50
53
|
code_shuffle
|
51
54
|
when "flatten"
|
52
55
|
sig(args) { Integer.maybe }
|
53
|
-
code_flatten
|
56
|
+
code_flatten(code_value)
|
57
|
+
when "pop"
|
58
|
+
sig(args) { Integer.maybe }
|
59
|
+
code_pop(code_value)
|
60
|
+
when "shift"
|
61
|
+
sig(args) { Integer.maybe }
|
62
|
+
code_shift(code_value)
|
54
63
|
when "include?"
|
55
64
|
sig(args) { Object }
|
56
65
|
code_include?(code_value)
|
@@ -142,6 +151,12 @@ class Code
|
|
142
151
|
self
|
143
152
|
end
|
144
153
|
|
154
|
+
def code_minus(other)
|
155
|
+
code_other = other.to_code
|
156
|
+
|
157
|
+
List.new(raw - code_other.raw)
|
158
|
+
end
|
159
|
+
|
145
160
|
def code_detect(argument, **globals)
|
146
161
|
code_argument = argument.to_code
|
147
162
|
|
@@ -214,6 +229,28 @@ class Code
|
|
214
229
|
)
|
215
230
|
end
|
216
231
|
|
232
|
+
def code_pop(n = nil)
|
233
|
+
code_n = n.to_code
|
234
|
+
n = code_n.raw
|
235
|
+
|
236
|
+
if code_n.nothing?
|
237
|
+
raw.pop || Nothing.new
|
238
|
+
else
|
239
|
+
List.new(raw.pop(n))
|
240
|
+
end
|
241
|
+
end
|
242
|
+
|
243
|
+
def code_shift(n = nil)
|
244
|
+
code_n = n.to_code
|
245
|
+
n = code_n.raw
|
246
|
+
|
247
|
+
if code_n.nothing?
|
248
|
+
raw.shift || Nothing.new
|
249
|
+
else
|
250
|
+
List.new(raw.shift(n))
|
251
|
+
end
|
252
|
+
end
|
253
|
+
|
217
254
|
def code_include?(other)
|
218
255
|
code_other = other.to_code
|
219
256
|
|
data/lib/code/object/range.rb
CHANGED
@@ -60,6 +60,9 @@ class Code
|
|
60
60
|
when "step"
|
61
61
|
sig(args) { Integer | Decimal }
|
62
62
|
code_step(code_value)
|
63
|
+
when "sample"
|
64
|
+
sig(args)
|
65
|
+
code_sample
|
63
66
|
when "to_list"
|
64
67
|
sig(args)
|
65
68
|
code_to_list
|
@@ -182,6 +185,10 @@ class Code
|
|
182
185
|
def code_to_list
|
183
186
|
List.new(raw.to_a)
|
184
187
|
end
|
188
|
+
|
189
|
+
def code_sample
|
190
|
+
code_to_list.code_sample
|
191
|
+
end
|
185
192
|
end
|
186
193
|
end
|
187
194
|
end
|
@@ -0,0 +1,87 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class Code
|
4
|
+
class Object
|
5
|
+
class Smtp < Dictionary
|
6
|
+
def call(**args)
|
7
|
+
code_operator = args.fetch(:operator, nil).to_code
|
8
|
+
code_arguments = args.fetch(:arguments, []).to_code
|
9
|
+
code_value = code_arguments.code_first
|
10
|
+
|
11
|
+
case code_operator.to_s
|
12
|
+
when "send"
|
13
|
+
sig(args) do
|
14
|
+
{
|
15
|
+
from: String.maybe,
|
16
|
+
to: String.maybe,
|
17
|
+
subject: String.maybe,
|
18
|
+
body: String.maybe,
|
19
|
+
body_text: String.maybe,
|
20
|
+
body_html: String.maybe
|
21
|
+
}
|
22
|
+
end
|
23
|
+
|
24
|
+
code_send(
|
25
|
+
from: code_value.code_get("from"),
|
26
|
+
to: code_value.code_get("to"),
|
27
|
+
subject: code_value.code_get("subject"),
|
28
|
+
body: code_value.code_get("body"),
|
29
|
+
body_text: code_value.code_get("body_text"),
|
30
|
+
body_html: code_value.code_get("body_html"),
|
31
|
+
)
|
32
|
+
else
|
33
|
+
super
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def code_send(
|
38
|
+
from: nil,
|
39
|
+
to: nil,
|
40
|
+
subject: nil,
|
41
|
+
body: nil,
|
42
|
+
body_text: nil,
|
43
|
+
body_html: nil
|
44
|
+
)
|
45
|
+
code_from = from.to_code
|
46
|
+
code_to = to.to_code
|
47
|
+
code_subject = subject.to_code
|
48
|
+
code_body = body.to_code
|
49
|
+
code_body_text = body_text.to_code
|
50
|
+
code_body_html = body_html.to_code
|
51
|
+
|
52
|
+
mail = Mail.new
|
53
|
+
mail.from = code_from.to_s
|
54
|
+
mail.to = code_to.to_s
|
55
|
+
mail.subject = code_subject.to_s
|
56
|
+
|
57
|
+
text_part = Mail::Part.new
|
58
|
+
text_part.content_type = 'text/plain; charset=UTF-8'
|
59
|
+
text_part.body = code_body_text.to_s.presence || code_body.to_s
|
60
|
+
|
61
|
+
html_part = Mail::Part.new
|
62
|
+
html_part.content_type = 'text/html; charset=UTF-8'
|
63
|
+
html_part.body = code_body_html.to_s
|
64
|
+
|
65
|
+
mail.content_type = 'multipart/alternative'
|
66
|
+
mail.add_part(text_part)
|
67
|
+
mail.add_part(html_part) if code_body_html.to_s.present?
|
68
|
+
|
69
|
+
mail.delivery_method(
|
70
|
+
:smtp,
|
71
|
+
{
|
72
|
+
address: code_get("address").to_s,
|
73
|
+
port: code_get("port").to_i,
|
74
|
+
user_name: code_get("user_name").to_s,
|
75
|
+
password: code_get("password").to_s,
|
76
|
+
authentication: code_get("authentication").to_s,
|
77
|
+
enable_starttls_auto: code_get("enable_starttls_auto").truthy?,
|
78
|
+
},
|
79
|
+
)
|
80
|
+
|
81
|
+
mail.deliver!
|
82
|
+
|
83
|
+
Nothing.new
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
data/lib/code/object/time.rb
CHANGED
@@ -71,6 +71,27 @@ class Code
|
|
71
71
|
when "seconds"
|
72
72
|
sig(args)
|
73
73
|
code_seconds
|
74
|
+
when "monday?"
|
75
|
+
sig(args)
|
76
|
+
code_monday?
|
77
|
+
when "tuesday?"
|
78
|
+
sig(args)
|
79
|
+
code_tuesday?
|
80
|
+
when "wednesday?"
|
81
|
+
sig(args)
|
82
|
+
code_wednesday?
|
83
|
+
when "thursday?"
|
84
|
+
sig(args)
|
85
|
+
code_thursday?
|
86
|
+
when "friday?"
|
87
|
+
sig(args)
|
88
|
+
code_friday?
|
89
|
+
when "saturday?"
|
90
|
+
sig(args)
|
91
|
+
code_saturday?
|
92
|
+
when "sunday?"
|
93
|
+
sig(args)
|
94
|
+
code_sunday?
|
74
95
|
when "format"
|
75
96
|
sig(args) { String }
|
76
97
|
code_format(code_value)
|
@@ -158,6 +179,34 @@ class Code
|
|
158
179
|
code_now.code_seconds
|
159
180
|
end
|
160
181
|
|
182
|
+
def self.code_monday?
|
183
|
+
code_week_day.code_one?
|
184
|
+
end
|
185
|
+
|
186
|
+
def self.code_tuesday?
|
187
|
+
code_week_day.code_two?
|
188
|
+
end
|
189
|
+
|
190
|
+
def self.code_wednesday?
|
191
|
+
code_week_day.code_three?
|
192
|
+
end
|
193
|
+
|
194
|
+
def self.code_thursday?
|
195
|
+
code_week_day.code_four?
|
196
|
+
end
|
197
|
+
|
198
|
+
def self.code_friday?
|
199
|
+
code_week_day.code_five?
|
200
|
+
end
|
201
|
+
|
202
|
+
def self.code_saturday?
|
203
|
+
code_week_day.code_six?
|
204
|
+
end
|
205
|
+
|
206
|
+
def self.code_sunday?
|
207
|
+
code_week_day.code_zero?
|
208
|
+
end
|
209
|
+
|
161
210
|
def self.code_format(format)
|
162
211
|
code_now.code_format(format)
|
163
212
|
end
|
@@ -228,6 +277,27 @@ class Code
|
|
228
277
|
when "seconds"
|
229
278
|
sig(args)
|
230
279
|
code_seconds
|
280
|
+
when "monday?"
|
281
|
+
sig(args)
|
282
|
+
code_monday?
|
283
|
+
when "tuesday?"
|
284
|
+
sig(args)
|
285
|
+
code_tuesday?
|
286
|
+
when "wednesday?"
|
287
|
+
sig(args)
|
288
|
+
code_wednesday?
|
289
|
+
when "thursday?"
|
290
|
+
sig(args)
|
291
|
+
code_thursday?
|
292
|
+
when "friday?"
|
293
|
+
sig(args)
|
294
|
+
code_friday?
|
295
|
+
when "saturday?"
|
296
|
+
sig(args)
|
297
|
+
code_saturday?
|
298
|
+
when "sunday?"
|
299
|
+
sig(args)
|
300
|
+
code_sunday?
|
231
301
|
when "format"
|
232
302
|
sig(args) { String }
|
233
303
|
code_format(code_value)
|
@@ -322,6 +392,34 @@ class Code
|
|
322
392
|
Integer.new(raw.sec)
|
323
393
|
end
|
324
394
|
|
395
|
+
def code_monday?
|
396
|
+
code_week_day.code_one?
|
397
|
+
end
|
398
|
+
|
399
|
+
def code_tuesday?
|
400
|
+
code_week_day.code_two?
|
401
|
+
end
|
402
|
+
|
403
|
+
def code_wednesday?
|
404
|
+
code_week_day.code_three?
|
405
|
+
end
|
406
|
+
|
407
|
+
def code_thursday?
|
408
|
+
code_week_day.code_four?
|
409
|
+
end
|
410
|
+
|
411
|
+
def code_friday?
|
412
|
+
code_week_day.code_five?
|
413
|
+
end
|
414
|
+
|
415
|
+
def code_saturday?
|
416
|
+
code_week_day.code_six?
|
417
|
+
end
|
418
|
+
|
419
|
+
def code_sunday?
|
420
|
+
code_week_day.code_zero?
|
421
|
+
end
|
422
|
+
|
325
423
|
def code_format(format)
|
326
424
|
code_format = format.to_code
|
327
425
|
|
data/lib/code-ruby.rb
CHANGED
data/spec/code_spec.rb
CHANGED
@@ -5,6 +5,22 @@ require "spec_helper"
|
|
5
5
|
RSpec.describe Code do
|
6
6
|
(
|
7
7
|
%w[
|
8
|
+
Smtp
|
9
|
+
Smtp.new
|
10
|
+
Time.monday?
|
11
|
+
Time.tuesday?
|
12
|
+
Time.wednesday?
|
13
|
+
Time.thursday?
|
14
|
+
Time.friday?
|
15
|
+
Time.saturday?
|
16
|
+
Time.sunday?
|
17
|
+
Time.now.monday?
|
18
|
+
Time.now.tuesday?
|
19
|
+
Time.now.wednesday?
|
20
|
+
Time.now.thursday?
|
21
|
+
Time.now.friday?
|
22
|
+
Time.now.saturday?
|
23
|
+
Time.now.sunday?
|
8
24
|
Time.now.second
|
9
25
|
Time.now.seconds
|
10
26
|
Time.now.minute
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: code-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dorian Marié
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-05-
|
10
|
+
date: 2025-05-22 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: activesupport
|
@@ -107,6 +107,20 @@ dependencies:
|
|
107
107
|
- - ">="
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: mail
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
117
|
+
type: :runtime
|
118
|
+
prerelease: false
|
119
|
+
version_requirements: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '0'
|
110
124
|
- !ruby/object:Gem::Dependency
|
111
125
|
name: net-http
|
112
126
|
requirement: !ruby/object:Gem::Requirement
|
@@ -121,6 +135,20 @@ dependencies:
|
|
121
135
|
- - ">="
|
122
136
|
- !ruby/object:Gem::Version
|
123
137
|
version: '0'
|
138
|
+
- !ruby/object:Gem::Dependency
|
139
|
+
name: net-smtp
|
140
|
+
requirement: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '0'
|
145
|
+
type: :runtime
|
146
|
+
prerelease: false
|
147
|
+
version_requirements: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - ">="
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '0'
|
124
152
|
- !ruby/object:Gem::Dependency
|
125
153
|
name: nokogiri
|
126
154
|
requirement: !ruby/object:Gem::Requirement
|
@@ -248,6 +276,7 @@ files:
|
|
248
276
|
- lib/code/object/nothing.rb
|
249
277
|
- lib/code/object/parameter.rb
|
250
278
|
- lib/code/object/range.rb
|
279
|
+
- lib/code/object/smtp.rb
|
251
280
|
- lib/code/object/string.rb
|
252
281
|
- lib/code/object/time.rb
|
253
282
|
- lib/code/parser.rb
|