Sha256: cefadba1b357338064b4122ccf0b65cf4e375e7e575760668435bd23dd05dbfb

Contents?: true

Size: 497 Bytes

Versions: 6

Compression:

Stored size: 497 Bytes

Contents

module Aocli
  module Commands
    module SaveCookie
      def self.run!(options)
        Aocli::FileUtils.touch_file(Aocli::Values::CONFIG_FILE_PATH)
        File.write(Aocli::Values::CONFIG_FILE_PATH, {cookie: options[:cookie]}.to_yaml)

        puts <<~MSG
          ### Cookie saved to #{Aocli::Values::CONFIG_FILE_PATH} ###

          If you ever need to reset this cookie, you can use the save cookie command again
          or simply edit that file.
        MSG
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
aocli-1.4.5 lib/aocli/commands/save_cookie.rb
aocli-1.4.4 lib/aocli/commands/save_cookie.rb
aocli-1.4.3 lib/aocli/commands/save_cookie.rb
aocli-1.4.2 lib/aocli/commands/save_cookie.rb
aocli-1.4.1 lib/aocli/commands/save_cookie.rb
aocli-1.3.0 lib/aocli/commands/save_cookie.rb