From 9fbe188b3e7fae6410007cb6c9230f801a9820b7 Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Sat, 16 Mar 2019 16:30:50 +0100 Subject: [PATCH 1/3] Turn examples/README into markdown [ci skip] --- examples/{README => README.md} | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) rename examples/{README => README.md} (78%) diff --git a/examples/README b/examples/README.md similarity index 78% rename from examples/README rename to examples/README.md index 71aa30d7..71a2aeac 100644 --- a/examples/README +++ b/examples/README.md @@ -3,30 +3,35 @@ OpenID library. Make sure you have properly installed the library before running the examples. These examples are a great place to start in integrating OpenID into your application. -==Rails example +## Rails example -The rails_openid contains a fully functional OpenID server and relying +The `rails_openid` directory contains a fully functional OpenID server and relying party, and acts as a starting point for implementing your own production rails server. You'll need the latest version of Ruby on Rails installed, and then: - cd rails_openid - ./script/server +```shell +cd rails_openid +./script/server +``` Open a web browser to http://localhost:3000/ and follow the instructions. The relevant code to work from when writing your Rails OpenID Relying Party is: + rails_openid/app/controllers/consumer_controller.rb + If you are working on an OpenID provider, check out + rails_openid/app/controllers/server_controller.rb Since the library and examples are Apache-licensed, don't be shy about copy-and-paste. -==Rails ActiveRecord OpenIDStore plugin +## Rails ActiveRecord OpenIDStore plugin For various reasons you may want or need to deploy your ruby openid -consumer/server using an SQL based store. The active_record_openid_store +consumer/server using an SQL based store. The `active_record_openid_store` is a plugin that makes using an SQL based store simple. Follow the README inside the plugin's dir for usage. From 0dfeb8200d443690c2db65074380ae319b172096 Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Sat, 16 Mar 2019 16:35:27 +0100 Subject: [PATCH 2/3] Refer to examples/README.md in INSTALL.md - [ci skip] --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 79be34c5..dfa6a234 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -44,4 +44,4 @@ Go into the test directory and execute the `runtests.rb` script. * Run `consumer.rb` in the examples directory. * Get started writing your own consumer using OpenID::Consumer * Write your own server with `OpenID::Server` -* Use the `OpenIDLoginGenerator`! Read `example/README` for more info. +* Use the `OpenIDLoginGenerator`! Read `example/README.md` for more info. From 1a8389dccfe58e731d8efd6d54b3deb03e0eb10d Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Sat, 16 Mar 2019 16:40:25 +0100 Subject: [PATCH 3/3] Modernize language in INSTALL.md [ci skip] --- INSTALL.md | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index dfa6a234..8a20b178 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,21 +1,23 @@ # Ruby OpenID Library Installation -## Rubygems Installation +## Install as a gem -Rubygems is a tool for installing ruby libraries and their -dependancies. If you have rubygems installed, simply: +`ruby-openid` is distributed on [RubyGems](https://rubygems.org/). +Install it: gem install ruby-openid +This is probably what you need. + ## Manual Installation -Unpack the archive and run setup.rb to install: +Unpack the archive and run `setup.rb` to install: ruby setup.rb -setup.rb installs the library into your system ruby. If don't want to +`setup.rb` installs the library into your system ruby. If don't want to add openid to you system ruby, you may instead add the `lib` directory of -the extracted tarball to your RUBYLIB environment variable: +the extracted tarball to your `RUBYLIB` environment variable: $ export RUBYLIB=${RUBYLIB}:/path/to/ruby-openid/lib @@ -27,21 +29,13 @@ Make sure everything installed ok: irb$> require "openid" => true -Or, if you installed via rubygems: - - $> irb - irb$> require "rubygems" - => true - irb$> require_gem "ruby-openid" - => true - ## Run the test suite Go into the test directory and execute the `runtests.rb` script. ## Next steps -* Run `consumer.rb` in the examples directory. -* Get started writing your own consumer using OpenID::Consumer +* Run `consumer.rb` in the `examples/` directory. +* Get started writing your own consumer using `OpenID::Consumer` * Write your own server with `OpenID::Server` -* Use the `OpenIDLoginGenerator`! Read `example/README.md` for more info. +* Use the `OpenIDLoginGenerator`! Read `examples/README.md` for more info.