Sha256: f83ab3dfe3ecc98ca58514aff19153c37b007bd21d56cd9f5d8f02898153e8c4

Contents?: true

Size: 500 Bytes

Versions: 5

Compression:

Stored size: 500 Bytes

Contents

require 'thor'

module InlineEncryption

  class CLI < Thor

    def initialize(args=[], opts=[], config={})
      super(args, opts, config)
    end


    desc 'encrypt [DATA]', 'encrypt stuff'
    class_option :require, :aliases => ['-r'], :type => :string
    def encrypt(data)
      load_environment(options[:require]) if options[:require]

      puts InlineEncryption.encrypt(data)
    end



    protected


    def load_environment(file)
      require File.expand_path(file)
    end

  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
inline_encryption-2.0.1 lib/inline_encryption/cli.rb
inline_encryption-2.0.0 lib/inline_encryption/cli.rb
inline_encryption-1.0.5 lib/inline_encryption/cli.rb
inline_encryption-1.0.3 lib/inline_encryption/cli.rb
inline_encryption-1.0.2 lib/inline_encryption/cli.rb