davidmichaelkarr

Activity Graph

Page 1 of 1

2017-08-29

[01:38:12] davidmichaelkarr: Quit: Connection closed for inactivity
[16:50:35] davidmichaelkarr: has joined #ruby
[16:51:07] davidmichaelkarr: has left #ruby: ()

2017-08-28

[18:08:44] davidmichaelkarr: has joined #ruby

2017-08-11

[04:30:16] davidmichaelkarr: Quit: Connection closed for inactivity

2017-08-10

[18:41:05] davidmichaelkarr: has joined #ruby

2017-08-08

[17:30:28] davidmichaelkarr: Quit: Connection closed for inactivity

2017-08-07

[18:51:05] davidmichaelkarr: has joined #ruby

2017-08-03

[05:24:42] davidmichaelkarr: Ping timeout: 255 seconds
[05:26:22] davidmichaelkarr: has joined #ruby
[17:25:03] davidmichaelkarr: Quit: Connection closed for inactivity

2017-08-02

[23:25:42] davidmichaelkarr: has joined #ruby

2017-07-29

[09:27:40] davidmichaelkarr: Quit: Connection closed for inactivity

2017-07-27

[15:38:12] davidmichaelkarr: has joined #ruby

2017-07-23

[03:19:43] davidmichaelkarr: Quit: Connection closed for inactivity

2017-07-19

[23:48:37] davidmichaelkarr: has joined #ruby

2017-07-12

[01:46:39] davidmichaelkarr: Quit: Connection closed for inactivity

2017-07-11

[16:23:54] davidmichaelkarr: Quit: Connection closed for inactivity
[17:37:11] davidmichaelkarr: has joined #ruby

2017-07-10

[16:54:26] davidmichaelkarr: has joined #ruby

2017-07-09

[03:30:51] davidmichaelkarr: Quit: Connection closed for inactivity

2017-07-05

[17:11:22] davidmichaelkarr: has joined #ruby

2017-07-01

[03:21:29] davidmichaelkarr: Quit: Connection closed for inactivity

2017-06-29

[01:25:16] davidmichaelkarr: Quit: Connection closed for inactivity
[16:21:59] davidmichaelkarr: has joined #ruby

2017-06-28

[15:35:47] davidmichaelkarr: has joined #ruby

2017-06-27

[17:43:15] davidmichaelkarr: Quit: Connection closed for inactivity

2017-06-26

[17:33:53] davidmichaelkarr: has joined #ruby

2017-06-23

[16:03:25] davidmichaelkarr: Quit: Connection closed for inactivity

2017-06-22

[15:34:01] davidmichaelkarr: has joined #ruby

2017-06-16

[06:18:06] davidmichaelkarr: Quit: Connection closed for inactivity

2017-06-15

[18:18:36] davidmichaelkarr: has joined #ruby

2017-06-14

[06:18:15] davidmichaelkarr: Quit: Connection closed for inactivity

2017-06-13

[17:18:48] davidmichaelkarr: has joined #ruby

2017-06-09

[01:23:31] davidmichaelkarr: Quit: Connection closed for inactivity

2017-06-07

[01:12:38] davidmichaelkarr: Quit: Connection closed for inactivity
[23:34:21] davidmichaelkarr: has joined #ruby

2017-06-05

[22:23:29] davidmichaelkarr: has joined #ruby

2017-06-04

[04:47:00] davidmichaelkarr: Quit: Connection closed for inactivity

2017-06-03

[02:37:31] davidmichaelkarr: has joined #ruby

2017-06-02

[03:42:33] davidmichaelkarr: Quit: Connection closed for inactivity

2017-05-31

[19:03:04] davidmichaelkarr: has joined #ruby

2017-05-23

[18:20:31] davidmichaelkarr: Quit: Connection closed for inactivity

2017-05-22

[21:51:00] davidmichaelkarr: has joined #ruby

2017-05-16

[16:06:50] davidmichaelkarr: has joined #ruby
[22:16:17] davidmichaelkarr: Quit: Connection closed for inactivity

2017-05-14

[03:36:50] davidmichaelkarr: Quit: Connection closed for inactivity

2017-05-12

[16:37:22] davidmichaelkarr: has joined #ruby

2017-05-10

[01:36:53] davidmichaelkarr: Quit: Connection closed for inactivity

2017-05-09

[17:37:26] davidmichaelkarr: has joined #ruby

2017-05-05

[18:23:28] davidmichaelkarr: Quit: Connection closed for inactivity

2017-05-04

[18:16:52] davidmichaelkarr: has joined #ruby

2017-04-28

[01:33:24] davidmichaelkarr: Quit: Connection closed for inactivity

2017-04-27

[16:02:54] davidmichaelkarr: has joined #ruby

2017-04-26

[19:53:24] davidmichaelkarr: Quit: Connection closed for inactivity

2017-04-25

[17:59:15] davidmichaelkarr: has joined #ruby

2017-04-22

[06:43:31] davidmichaelkarr: has joined #ruby
[08:53:23] davidmichaelkarr: Quit: Connection closed for inactivity

2017-04-21

[00:03:22] davidmichaelkarr: Quit: Connection closed for inactivity

2017-04-17

[16:50:24] davidmichaelkarr: has joined #ruby

2017-04-15

[11:03:22] davidmichaelkarr: Quit: Connection closed for inactivity

2017-04-13

[15:13:33] davidmichaelkarr: Ping timeout: 264 seconds
[15:22:04] davidmichaelkarr: has joined #ruby

2017-03-20

[20:32:45] davidmichaelkarr: Ping timeout: 256 seconds
[20:34:47] davidmichaelkarr: has joined #ruby
[23:00:47] davidmichaelkarr: has joined #ruby

2017-03-12

[03:38:56] davidmichaelkarr: Ping timeout: 255 seconds
[03:40:25] davidmichaelkarr: has joined #ruby

2016-07-27

[06:50:47] davidmichaelkarr: Ping timeout: 250 seconds
[06:52:15] davidmichaelkarr: has joined #ruby

2016-07-18

[17:05:06] davidmichaelkarr: Ping timeout: 272 seconds
[17:10:10] davidmichaelkarr: has joined #ruby

2016-07-17

[19:13:56] davidmichaelkarr: has joined #ruby

2016-06-19

[18:50:20] davidmichaelkarr: has joined #ruby

2016-06-09

[05:25:06] davidmichaelkarr: Ping timeout: 260 seconds
[05:34:03] davidmichaelkarr: has joined #ruby
[18:50:52] davidmichaelkarr: Ping timeout: 264 seconds
[18:52:15] davidmichaelkarr: has joined #ruby

2016-05-24

[00:20:01] davidmichaelkarr: has joined #ruby

2016-05-23

2016-05-18

[08:45:41] davidmichaelkarr: Ping timeout: 250 seconds
[08:55:39] davidmichaelkarr: has joined #ruby

2016-05-14

[14:23:52] davidmichaelkarr: Ping timeout: 244 seconds
[14:25:58] davidmichaelkarr: has joined #ruby

2016-05-13

[16:04:03] davidmichaelkarr: has joined #ruby
[16:12:20] davidmichaelkarr: I'm trying to debug a VagrantFile used in a book (learning puppet 4). I think I'm running into issues with unexpected character handling within a HEREDOC in a Ruby script.
[16:12:35] davidmichaelkarr: The original line was this:
[16:12:37] davidmichaelkarr: sed -i -e 's#\(secure_path = .*\)$#\1:/opt/puppetlabs/bin#' /etc/sudoers
[16:13:26] davidmichaelkarr: When the script is run, I don't see an error message, but the file is not changed. I think the "#" characters are noted as comment characters by Ruby. Does that make sense?
[16:14:11] davidmichaelkarr: And the HEREDOC is initiated with this line:
[16:14:12] davidmichaelkarr: $setupscript = <<END
[16:17:45] davidmichaelkarr: jhass: So you're telling me the line should execute properly? The weird thing is, there are side effects both before and after this in the script, and they all are done, but not from this line. I then later tried running the line manually as root, and it performs the change.
[16:19:41] davidmichaelkarr: jhass: Sorry, I don't grok that.
[16:21:20] davidmichaelkarr: jhass: I think the point is, "what variable?" I'm running sed to modify a file.
[16:22:04] davidmichaelkarr: vaejor: I run it with "vagrant up".
[16:22:15] davidmichaelkarr: vaejor: Not as root.
[16:22:33] davidmichaelkarr: jhass: Ah, ok. print out the script variable. ok.
[16:23:18] davidmichaelkarr: vaejor: Yes, certainly, but the script (which I haven't shown), makes several mods to root-required files, with no complaint.
[16:25:13] davidmichaelkarr: If it matters, here's the excerpt from the VagrantFile that shows the entire script it runs.
[16:25:16] davidmichaelkarr: https://www.irccloud.com/pastebin/0LeCnbob/
[17:07:01] davidmichaelkarr: So I found a fix for my misbehaving VagrantFile script, but I'm wondering if what I found is a bug in Ruby. The original line had this string: 's#\(secure_path = .*\)$#
[17:07:27] davidmichaelkarr: When I printed out the resulting variable, it printed out 's#(secure_path = .*)$#
[17:07:44] davidmichaelkarr: It seemed to "dequote" the parens.
[17:08:25] davidmichaelkarr: So I looked in some docs and noted that the "#" can start variable interpolation, so I tried changing my heredoc terminator, adding single quotes around it, which is supposed to disable interpolation. That worked.
[17:09:00] davidmichaelkarr: The funny thing is, I'm definitely not doing variable interpolation here. Is Ruby somehow "swallowing" the backslash as an attempt to determine if there is variable interpolation happening?
[17:10:41] davidmichaelkarr: jhass: Ok, so it's not variable interpolation happening, but escaping.
[17:36:43] davidmichaelkarr: apeiros: The original script didn't quote the terminator at all. The fix was to single quote it.
[17:37:08] davidmichaelkarr: Anyway, I now have another curious issue with something from the puppet book, but I'm pretty sure this is a ruby question.
[17:38:18] davidmichaelkarr: I first noticed this unsurprising sample:
[17:38:20] davidmichaelkarr: https://gist.github.com/davidmichaelkarr/85aadf5c2fb2ffd66a3d169ae9f276f0
[17:39:07] davidmichaelkarr: However, this very similar one confuses me:
[17:39:08] davidmichaelkarr: https://gist.github.com/davidmichaelkarr/0d4926b1b5fcecda3f4783433a5e0906
[17:40:09] davidmichaelkarr: Any idea what's going on here?
[17:49:54] davidmichaelkarr: jhass: Ok, I'll ask there then.