Skip to content

Commit

Permalink
feat: console with client
Browse files Browse the repository at this point in the history
  • Loading branch information
ksol committed Feb 11, 2024
1 parent 82c8d36 commit 6f3bbc7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 11 additions & 1 deletion bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,20 @@
require "bundler/setup"
require "scalingo"

begin
require "dotenv"
Dotenv.load(".env.local")
rescue LoadError
puts("dotenv not available - no .env.local loading")
end

# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.

# (If you use this, don't forget to add pry to your Gemfile!)
require "pry"

Pry.start
client = Scalingo::Client.new
client.authenticate_with(access_token: ENV["SCALINGO_API_TOKEN"]) if ENV["SCALINGO_API_TOKEN"].present?

Pry.start(binding, quiet: true)
1 change: 1 addition & 0 deletions scalingo.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Gem::Specification.new do |s|
s.add_dependency "multi_json", ">= 1.0.3", "~> 1.0"

s.add_development_dependency "bundler", "~> 2.0"
s.add_development_dependency "dotenv"
s.add_development_dependency "rake", "~> 13.0"
s.add_development_dependency "rspec", "~> 3.0"
s.add_development_dependency "standard", "~> 1.32"
Expand Down

0 comments on commit 6f3bbc7

Please sign in to comment.