From 4d915f90e53f00d9b67e5f72237ebbd971e273f4 Mon Sep 17 00:00:00 2001 From: Markus Koller Date: Thu, 3 Nov 2016 16:58:29 +0100 Subject: [PATCH] chore: Add gem helper scripts --- Gemfile | 3 +-- bin/console | 9 +++++++++ bin/setup | 8 ++++++++ doorkeeper-openid_connect.gemspec | 3 +++ lib/doorkeeper/openid_connect.rb | 1 + 5 files changed, 22 insertions(+), 2 deletions(-) create mode 100755 bin/console create mode 100755 bin/setup diff --git a/Gemfile b/Gemfile index 955ab8f..14ec6a5 100644 --- a/Gemfile +++ b/Gemfile @@ -1,8 +1,7 @@ -ENV['rails'] ||= '4.2.0' - source 'https://rubygems.org' # use Rails version specified by environment +ENV['rails'] ||= '4.2.0' gem 'rails', "~> #{ENV['rails']}" gemspec diff --git a/bin/console b/bin/console new file mode 100755 index 0000000..68067dd --- /dev/null +++ b/bin/console @@ -0,0 +1,9 @@ +#!/usr/bin/env ruby + +require 'bundler/setup' +Bundler.require :default + +require 'doorkeeper/openid_connect' + +require 'pry' +Pry.start diff --git a/bin/setup b/bin/setup new file mode 100755 index 0000000..dce67d8 --- /dev/null +++ b/bin/setup @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +set -euo pipefail +IFS=$'\n\t' +set -vx + +bundle install + +# Do any other automated setup that you need to do here diff --git a/doorkeeper-openid_connect.gemspec b/doorkeeper-openid_connect.gemspec index a2bceed..c847571 100644 --- a/doorkeeper-openid_connect.gemspec +++ b/doorkeeper-openid_connect.gemspec @@ -18,7 +18,10 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ['lib'] + spec.required_ruby_version = ">= 2.1" + spec.add_runtime_dependency 'doorkeeper', '~> 4.0' + #spec.add_runtime_dependency 'activemodel', '~> 4.0' spec.add_runtime_dependency 'json-jwt', '~> 1.6.5' spec.add_development_dependency 'rspec-rails' diff --git a/lib/doorkeeper/openid_connect.rb b/lib/doorkeeper/openid_connect.rb index c9f2b91..ef48c3f 100644 --- a/lib/doorkeeper/openid_connect.rb +++ b/lib/doorkeeper/openid_connect.rb @@ -1,4 +1,5 @@ require 'doorkeeper' +require 'active_model' require 'json/jwt' require 'doorkeeper/openid_connect/claims_builder'