davejlong

Activity Graph

Page 1 of 2 | Next »

2016-04-23

[14:52:04] davejlong: has joined #ruby

2016-04-12

[15:09:50] davejlong: has joined #ruby
[15:18:36] davejlong: Having a total brain fart. Let's say I have an options hash like { trip: 1234, driver: 1890, car: 890 } and I want to validate if either driver or car key exists and also validate that they exist in my database. Is there a quick way to do that with something like a since case statement?
[15:21:23] davejlong: manveru: Sorry, I have no idea how the "since" got in there.
[15:22:24] davejlong: manveru: This is what I tried already (https://gist.github.com/davejlong/b1d6b20d0d176c8efacb60f630aa8214), but the case statement breaks out after the first match.
[15:24:39] davejlong: Is there any control flow method in Ruby that does let me write concise code like I'm looking for?
[15:26:31] davejlong: This is the flow I feel like I'll have to go with.
[15:26:33] davejlong: https://gist.github.com/davejlong/b1d6b20d0d176c8efacb60f630aa8214#file-gistfile2-rb
[15:34:13] davejlong: I think after the conditionals for your solution, I'd end up with code not too disimilar to what you have there.
[16:13:43] davejlong: Remote host closed the connection
[16:22:12] davejlong: has joined #ruby
[16:22:16] davejlong: Remote host closed the connection
[16:22:42] davejlong: has joined #ruby
[16:33:35] davejlong: has joined #ruby
[17:16:58] davejlong: has joined #ruby
[17:20:12] davejlong: Ping timeout: 276 seconds
[18:20:57] davejlong: Remote host closed the connection
[18:21:23] davejlong: has joined #ruby
[18:54:04] davejlong: has joined #ruby
[18:56:37] davejlong: Remote host closed the connection
[18:58:04] davejlong: Ping timeout: 264 seconds

2016-03-08

[03:03:41] davejlong: has joined #ruby

2016-03-07

[16:34:48] davejlong: has joined #ruby
[17:51:39] davejlong: Remote host closed the connection
[17:52:10] davejlong: has joined #ruby
[17:52:11] davejlong: Remote host closed the connection
[17:52:42] davejlong: has joined #ruby
[17:53:23] davejlong: Read error: Connection reset by peer
[17:53:39] davejlong: has joined #ruby
[17:54:14] davejlong: Read error: Connection reset by peer
[17:54:53] davejlong: has joined #ruby
[17:55:14] davejlong: Read error: Connection reset by peer
[17:55:32] davejlong: has joined #ruby
[17:56:08] davejlong: Read error: Connection reset by peer
[17:56:40] davejlong: has joined #ruby
[17:57:00] davejlong: Read error: Connection reset by peer
[17:57:45] davejlong: has joined #ruby
[17:58:05] davejlong: Read error: Connection reset by peer
[17:58:40] davejlong: has joined #ruby
[17:59:05] davejlong: Read error: Connection reset by peer
[17:59:15] davejlong: has joined #ruby
[17:59:55] davejlong: Read error: Connection reset by peer
[18:00:14] davejlong: has joined #ruby
[18:00:48] davejlong: Read error: Connection reset by peer
[18:01:08] davejlong: has joined #ruby
[18:01:51] davejlong: Read error: Connection reset by peer
[18:02:09] davejlong: has joined #ruby
[18:02:49] davejlong: Read error: Connection reset by peer
[18:03:11] davejlong: has joined #ruby
[18:03:41] davejlong: Read error: Connection reset by peer
[18:04:18] davejlong: has joined #ruby
[18:04:38] davejlong: Read error: Connection reset by peer
[18:05:11] davejlong: has joined #ruby
[18:05:46] davejlong: Read error: Connection reset by peer
[18:06:00] davejlong: has joined #ruby
[18:06:54] davejlong: Read error: Connection reset by peer
[18:07:08] davejlong: has joined #ruby
[18:07:42] davejlong: Read error: Connection reset by peer
[18:08:06] davejlong: has joined #ruby
[18:08:33] davejlong: Read error: Connection reset by peer
[18:08:47] davejlong: has joined #ruby
[18:09:24] davejlong: Read error: Connection reset by peer
[18:10:07] davejlong: has joined #ruby
[18:10:26] davejlong: Read error: Connection reset by peer
[18:10:45] davejlong: has joined #ruby
[18:11:18] davejlong: Read error: Connection reset by peer
[18:11:53] davejlong: has joined #ruby
[18:12:18] davejlong: Read error: Connection reset by peer
[18:12:47] davejlong: has joined #ruby
[18:13:16] davejlong: Read error: Connection reset by peer
[18:13:58] davejlong: has joined #ruby
[18:14:18] davejlong: Read error: Connection reset by peer
[18:14:32] davejlong: has joined #ruby
[18:15:14] davejlong: Read error: Connection reset by peer
[18:15:37] davejlong: has joined #ruby
[18:16:23] davejlong: has joined #ruby
[18:16:24] davejlong: Read error: Connection reset by peer
[18:17:00] davejlong: Read error: Connection reset by peer
[18:17:38] davejlong: has joined #ruby
[18:17:59] davejlong: Read error: Connection reset by peer
[18:19:30] davejlong: has joined #ruby
[18:20:01] davejlong: Read error: Connection reset by peer
[18:20:10] davejlong: has joined #ruby
[18:20:50] davejlong: Read error: Connection reset by peer
[18:21:11] davejlong: has joined #ruby
[18:21:48] davejlong: Read error: Connection reset by peer
[18:22:09] davejlong: has joined #ruby
[18:22:39] davejlong: Read error: Connection reset by peer
[18:23:08] davejlong: has joined #ruby
[18:23:43] davejlong: Read error: Connection reset by peer
[18:25:02] davejlong: has joined #ruby
[18:25:37] davejlong: Read error: Connection reset by peer
[18:26:08] davejlong: has joined #ruby
[18:26:29] davejlong: Read error: Connection reset by peer
[18:26:35] davejlong: has joined #ruby

2016-03-02

[20:57:27] davejlong: has joined #ruby
[21:14:46] davejlong: Remote host closed the connection
[21:16:51] davejlong: Remote host closed the connection
[21:16:51] davejlong: has joined #ruby
[21:17:01] davejlong: has joined #ruby
[21:30:42] davejlong: Remote host closed the connection
[21:41:20] davejlong: has joined #ruby

2016-01-12

[02:14:51] davejlong: has joined #ruby

2016-01-10

[01:07:43] davejlong: has joined #ruby

2016-01-08

[16:05:40] davejlong: has joined #ruby
[16:58:20] davejlong: Remote host closed the connection
[17:00:07] davejlong: has joined #ruby
[19:46:10] davejlong: Remote host closed the connection
[19:49:18] davejlong: has joined #ruby
[19:52:11] davejlong: Client Quit

2016-01-07

[16:18:43] davejlong: has joined #ruby
[17:08:59] davejlong: Remote host closed the connection
[17:45:44] davejlong: has joined #ruby
[17:45:45] davejlong: Remote host closed the connection
[17:45:52] davejlong: has joined #ruby
[19:42:58] davejlong: Remote host closed the connection
[19:43:08] davejlong: has joined #ruby
[19:53:01] davejlong: Remote host closed the connection
[19:56:18] davejlong: has joined #ruby
[21:01:47] davejlong: Remote host closed the connection
[21:06:16] davejlong: has joined #ruby

2015-12-29

[20:28:22] davejlong: has joined #ruby
[20:37:38] davejlong: Remote host closed the connection
[20:53:27] davejlong: has joined #ruby
[21:01:26] davejlong: Remote host closed the connection
[21:16:56] davejlong: has joined #ruby
[21:27:26] davejlong: Remote host closed the connection
[22:21:45] davejlong: has joined #ruby
[22:37:36] davejlong: Remote host closed the connection
[22:43:10] davejlong: has joined #ruby
[22:47:35] davejlong: Ping timeout: 260 seconds
[23:18:37] davejlong: has joined #ruby
[23:50:18] davejlong: Remote host closed the connection
[23:56:36] davejlong: has joined #ruby
[23:59:25] davejlong: Client Quit

2015-12-28

[02:23:08] davejlong: has joined #ruby

2015-12-24

[01:38:11] davejlong: has joined #ruby
[01:38:46] davejlong: Client Quit

2015-12-23

[16:51:14] davejlong: has joined #ruby
[19:16:39] davejlong: Remote host closed the connection
[19:17:19] davejlong: has joined #ruby
[19:32:09] davejlong: Remote host closed the connection
[19:37:56] davejlong: has joined #ruby
[20:15:37] davejlong: Remote host closed the connection
[20:20:17] davejlong: has joined #ruby
[20:31:34] davejlong: Remote host closed the connection
[20:43:34] davejlong: has joined #ruby
[21:20:51] davejlong: Remote host closed the connection
[21:37:27] davejlong: has joined #ruby
[21:42:26] davejlong: Ping timeout: 246 seconds

2015-12-22

[14:15:22] davejlong: has joined #ruby
[15:02:54] davejlong: has joined #ruby

2015-12-15

[17:30:35] davejlong: has joined #ruby
[18:35:56] davejlong: Remote host closed the connection
[19:09:39] davejlong: has joined #ruby

2015-12-14

[19:01:31] davejlong: has joined #ruby

2015-12-10

[19:51:52] davejlong: has joined #ruby

2015-12-09

[00:23:46] davejlong: has joined #ruby
[00:24:25] davejlong: Remote host closed the connection
[00:25:14] davejlong: has joined #ruby

2015-12-08

[18:51:16] davejlong: has joined #ruby
[19:37:16] davejlong: Remote host closed the connection
[19:38:58] davejlong: has joined #ruby
[19:58:06] davejlong: Remote host closed the connection
[20:07:34] davejlong: has joined #ruby
[20:11:40] davejlong: Remote host closed the connection

2015-11-12

[14:52:11] davejlong: has joined #ruby
[21:09:58] davejlong: Quit: leaving

2015-11-11

[14:44:48] davejlong: has joined #ruby
[14:50:59] davejlong: Quit: leaving
[14:51:27] davejlong: has joined #ruby
[22:03:42] davejlong: Quit: leaving

2015-09-02

[00:14:08] davejlong: has left #ruby: ()

2015-09-01

[14:14:32] davejlong: has joined #ruby
[14:46:11] davejlong: has joined #ruby
[16:25:17] davejlong: Remote host closed the connection
[17:25:47] davejlong: has joined #ruby
[17:29:10] davejlong: Remote host closed the connection
[17:29:16] davejlong: has joined #ruby
[18:57:00] davejlong: has joined #ruby
[19:00:12] davejlong: Ping timeout: 264 seconds
[19:01:46] davejlong: Ping timeout: 255 seconds
[19:13:56] davejlong: has joined #ruby
[19:50:34] davejlong: Remote host closed the connection
[19:50:54] davejlong: has joined #ruby
[20:22:13] davejlong: Remote host closed the connection
[23:07:05] davejlong: has joined #ruby
[23:22:43] davejlong: Remote host closed the connection
[23:23:55] davejlong: has joined #ruby
[23:31:41] davejlong: Remote host closed the connection
[23:39:38] davejlong: has joined #ruby

2015-08-31

[15:10:43] davejlong: has joined #ruby
[15:11:08] davejlong: Does anyone know of a Ruby gem similar to Forever.js that will keep a process running forever and restart automatically if it crashes?
[15:11:42] davejlong: I don't want to use something like Supervisord as this will only be for one process and I feel like Supervisord is meant for a larger scale
[15:14:43] davejlong: And of course then I find what I'm looking for. God is what I was looking for.
[15:17:08] davejlong: jhass: I am using CentOS/RHEL so I probably could use systemd. I'm just not super familiar with auto-restarting processes in systemd.
[15:57:17] davejlong: Remote host closed the connection
[15:58:32] davejlong: has joined #ruby
[15:59:54] davejlong: Remote host closed the connection
[16:02:35] davejlong: has joined #ruby
[16:16:49] davejlong: Remote host closed the connection
[17:17:20] davejlong: has joined #ruby
[17:22:22] davejlong: Remote host closed the connection
[17:22:28] davejlong: has joined #ruby
[20:14:24] davejlong: Remote host closed the connection
[20:14:51] davejlong: has joined #ruby

2015-08-13

[15:51:05] davejlong: Client Quit
[15:51:05] davejlong: has joined #ruby

2015-07-31

[13:45:08] davejlong: has joined #ruby
[13:51:15] davejlong: has joined #ruby
[13:54:25] davejlong: Ping timeout: 255 seconds
[17:35:32] davejlong: Remote host closed the connection
[17:37:54] davejlong: has joined #ruby
[17:41:46] davejlong: Client Quit

2015-07-30

[12:54:27] davejlong: has joined #ruby
[14:43:21] davejlong: Remote host closed the connection
[14:43:47] davejlong: has joined #ruby
[14:48:16] davejlong: Ping timeout: 244 seconds
[14:57:36] davejlong: has joined #ruby
[15:00:21] davejlong: has joined #ruby
[15:01:06] davejlong: Read error: Connection reset by peer
[16:16:56] davejlong: Remote host closed the connection
[17:14:01] davejlong: has joined #ruby
[19:05:40] davejlong: has joined #ruby
[19:09:13] davejlong: Ping timeout: 252 seconds

2015-07-28

[13:35:44] davejlong: has joined #ruby
[16:57:21] davejlong: Remote host closed the connection
[17:57:44] davejlong: has joined #ruby
[18:03:16] davejlong: Ping timeout: 255 seconds
[18:52:05] davejlong: has joined #ruby