Sha256: b7f484ad5045088b316ee83493c1d340132fd8b5ff8b4c6330636d9303a88ae8

Contents?: true

Size: 296 Bytes

Versions: 4

Compression:

Stored size: 296 Bytes

Contents

# frozen_string_literal: true
require 'bundler/setup'
require 'decode_this'

def encode(payload)
  config = Huyettings.new(File.expand_path('spec/fixtures/config.yml'), :test)
  private_key = OpenSSL::PKey::RSA.new(File.read(config.path))
  JWT.encode(payload, private_key, config.algorithm)
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
decode_this-0.1.3 spec/spec_helper.rb
decode_this-0.1.2 spec/spec_helper.rb
decode_this-0.1.1 spec/spec_helper.rb
decode_this-0.1.0 spec/spec_helper.rb