https://www.puppet.com/community logo
Join Slack
Powered by
# voxpupuli
  • v

    VoxBot

    03/17/2023, 1:45 PM
    it allows greater flexibility, since you can also use --only to fix just a single cop
  • y

    Yury Bushmelev

    03/17/2023, 1:45 PM
    https://github.com/voxpupuli/beaker-docker/pull/75/files#diff-ee98e028c59b193d58fde56ab4daf54d43c486ae674e63d50ddf300b07943e0fR17
  • v

    VoxBot

    03/17/2023, 1:45 PM
    and I find that reviewing that is easier
  • y

    Yury Bushmelev

    03/17/2023, 1:45 PM
    well.. then I can drop it from there 🙂
  • v

    VoxBot

    03/17/2023, 1:46 PM
    and today I wanted to finish my backup work; thanks bastelfreak for triggering me on Beaker + RuboCop ;)
  • y

    Yury Bushmelev

    03/17/2023, 1:46 PM
    my idea was to improve it to fix one cop at a time.. but had no chance to update it yet
  • y

    Yury Bushmelev

    03/17/2023, 1:48 PM
    i.e.
    rake rubocop:fix_next
    to autofix one cop and make a commit
  • v

    VoxBot

    03/17/2023, 1:49 PM
    https://github.com/voxpupuli/beaker-docker/pull/93#discussion_r1140262089 I'd like your thoughts on that one
  • v

    VoxBot

    03/17/2023, 1:50 PM
    changing it to Array(docker_cmd).first would make it work, but that's actually changing the implementation
  • y

    Yury Bushmelev

    03/17/2023, 1:51 PM
    let me check
  • y

    Yury Bushmelev

    03/17/2023, 1:53 PM
    I didn’t know =~ was able to match arrays too 🤔
  • v

    VoxBot

    03/17/2023, 1:54 PM
    I don't think it can
  • v

    VoxBot

    03/17/2023, 1:54 PM
    at least in Ruby 3.2 it fails hard
  • y

    Yury Bushmelev

    03/17/2023, 1:54 PM
    how about
    host[:docker_cmd].join(' ')
    ?
  • y

    Yury Bushmelev

    03/17/2023, 1:54 PM
    just here
  • v

    VoxBot

    03/17/2023, 1:54 PM
    and in 3.1 it returns nil, probably earlier versions too
  • v

    VoxBot

    03/17/2023, 1:55 PM
    I wonder if that's correct, since you really want to check the command I think
  • y

    Yury Bushmelev

    03/17/2023, 1:55 PM
    how about
    host[:docker_cmd].join(' ')
    ?
  • y

    Yury Bushmelev

    03/17/2023, 1:55 PM
    well.. the problem here is.. it can be not the [0]th item..
  • y

    Yury Bushmelev

    03/17/2023, 1:55 PM
    I think..
  • v

    VoxBot

    03/17/2023, 1:55 PM
    so I think ['some_command', 'with_sshd'] shouldn't match
  • y

    Yury Bushmelev

    03/17/2023, 1:55 PM
    true
  • y

    Yury Bushmelev

    03/17/2023, 1:56 PM
    then we should say sshd should be in
    host[:docker_cmd][0]
  • v

    VoxBot

    03/17/2023, 1:56 PM
    exactly
  • v

    VoxBot

    03/17/2023, 1:56 PM
    which is what Array(host[:docker_cmd]).first does, but it works for both Array and String
  • y

    Yury Bushmelev

    03/17/2023, 1:56 PM
    then your solution is fine (+ changelog record)
  • v

    VoxBot

    03/17/2023, 1:57 PM
    since Array('sshd') == Array(['sshd']) == ['sshd']
  • s

    Slackbot

    03/17/2023, 1:57 PM
    This message was deleted.
    d
    r
    +2
    • 5
    • 4
  • s

    Slackbot

    03/17/2023, 1:58 PM
    This message was deleted.
    c
    • 2
    • 1
  • s

    Slackbot

    03/17/2023, 1:58 PM
    This message was deleted.
    c
    • 2
    • 1
1...365366367...648Latest