Sha256: f61bbcc24dd962ea213f5dd3ecee53b54741c5a8b06d5f7d7c7f02c81d8102a7

Contents?: true

Size: 237 Bytes

Versions: 49

Compression:

Stored size: 237 Bytes

Contents

#!/usr/bin/env ruby

content = IO.read(ARGV[0])

content.gsub!(/Doing.settings((\[.*?\])+)/) do
  m = Regexp.last_match
  keypath = m[0].scan(/\['([^\]]+)'\]/).map { |e| e[0] }.join('.')
  "Doing.setting('#{keypath}')"
end

puts content

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
doing-2.1.86 scripts/setting_replace.rb
doing-2.1.85 scripts/setting_replace.rb
doing-2.1.84 scripts/setting_replace.rb
doing-2.1.83 scripts/setting_replace.rb
doing-2.1.82 scripts/setting_replace.rb
doing-2.1.81 scripts/setting_replace.rb
doing-2.1.80 scripts/setting_replace.rb
doing-2.1.79 scripts/setting_replace.rb
doing-2.1.78 scripts/setting_replace.rb
doing-2.1.77 scripts/setting_replace.rb
doing-2.1.76 scripts/setting_replace.rb
doing-2.1.75 scripts/setting_replace.rb
doing-2.1.74 scripts/setting_replace.rb
doing-2.1.73 scripts/setting_replace.rb
doing-2.1.72 scripts/setting_replace.rb
doing-2.1.69 scripts/setting_replace.rb
doing-2.1.68 scripts/setting_replace.rb
doing-2.1.66 scripts/setting_replace.rb
doing-2.1.65 scripts/setting_replace.rb
doing-2.1.64 scripts/setting_replace.rb