diff --git a/.gemspec b/.gemspec deleted file mode 100644 index 472bce6b..00000000 --- a/.gemspec +++ /dev/null @@ -1,20 +0,0 @@ -require 'rubygems' - -SPEC = Gem::Specification.new do |s| - s.name = `cat admin/library-name`.strip - s.version = '2.1.8' - s.author = 'JanRain, Inc, Mike Mell' - s.email = 'mike.mell@nthwave.net' - s.homepage = 'https://github.com/mmell/ruby-openid' - s.platform = Gem::Platform::RUBY - s.summary = 'A library for consuming and serving OpenID identities.' - files = Dir.glob("{examples,lib,test}/**/*") - files << 'NOTICE' << 'CHANGELOG' - s.files = files.delete_if {|f| f.include?('_darcs') || f.include?('admin')} - s.require_path = 'lib' - s.autorequire = 'openid' - s.test_file = 'admin/runtests.rb' - s.has_rdoc = true - s.extra_rdoc_files = ['README','INSTALL','LICENSE','UPGRADE'] - s.rdoc_options << '--main' << 'README' -end diff --git a/Gemfile b/Gemfile new file mode 100644 index 00000000..d4cc2446 --- /dev/null +++ b/Gemfile @@ -0,0 +1,5 @@ +source "http://rubygems.org" + +gemspec + +gem "test-unit" diff --git a/Rakefile b/Rakefile new file mode 100644 index 00000000..a824512e --- /dev/null +++ b/Rakefile @@ -0,0 +1,15 @@ +require 'rake' +require 'rake/testtask' +require "bundler/gem_tasks" + +# see http://rake.rubyforge.org/classes/Rake/TestTask.html +# Run tests with: +# $ cd ruby-openid +# $ rake test +# +desc 'Run the ruby-openid tests.' +Rake::TestTask.new(:test) do |t| + t.libs += ["lib", "test"] + t.test_files = FileList['test/test_*.rb'] + t.verbose = true +end diff --git a/lib/openid.rb b/lib/openid.rb index 1024de7c..ccb3ad91 100644 --- a/lib/openid.rb +++ b/lib/openid.rb @@ -12,9 +12,11 @@ # implied. See the License for the specific language governing # permissions and limitations under the License. -module OpenID - VERSION = "2.1.8" -end - +require "openid/version" +require 'openid/store' +require 'openid/yadis' require "openid/consumer" require 'openid/server' + +module OpenID +end diff --git a/lib/openid/fetchers.rb b/lib/openid/fetchers.rb index 22c87ac3..04cbb2a6 100644 --- a/lib/openid/fetchers.rb +++ b/lib/openid/fetchers.rb @@ -111,7 +111,7 @@ def self.fetcher_use_env_http_proxy @fetcher = StandardFetcher.new(proxy_uri.host, proxy_uri.port, proxy_uri.user, proxy_uri.password) end - + class StandardFetcher USER_AGENT = "ruby-openid/#{OpenID::VERSION} (#{RUBY_PLATFORM})" diff --git a/lib/openid/store.rb b/lib/openid/store.rb new file mode 100644 index 00000000..bccade7b --- /dev/null +++ b/lib/openid/store.rb @@ -0,0 +1,10 @@ +require 'openid/store/interface' +require 'openid/store/filesystem' +require 'openid/store/memcache' +require 'openid/store/memory' +require 'openid/store/nonce' + +module OpenID + module Store + end +end \ No newline at end of file diff --git a/lib/openid/version.rb b/lib/openid/version.rb new file mode 100644 index 00000000..ea3598d8 --- /dev/null +++ b/lib/openid/version.rb @@ -0,0 +1,3 @@ +module OpenID + VERSION = "2.1.8" +end diff --git a/lib/openid/yadis.rb b/lib/openid/yadis.rb new file mode 100644 index 00000000..7834d134 --- /dev/null +++ b/lib/openid/yadis.rb @@ -0,0 +1,15 @@ +require 'openid/yadis/accept' +require 'openid/yadis/constants' +require 'openid/yadis/discovery' +require 'openid/yadis/filters' +require 'openid/yadis/htmltokenizer' +require 'openid/yadis/parsehtml' +require 'openid/yadis/services' +require 'openid/yadis/xrds' +require 'openid/yadis/xri' +require 'openid/yadis/xrires' + +module OpenID + module Yadis + end +end diff --git a/ruby-openid.gemspec b/ruby-openid.gemspec new file mode 100644 index 00000000..df9a7156 --- /dev/null +++ b/ruby-openid.gemspec @@ -0,0 +1,24 @@ +# -*- encoding: utf-8 -*- +$:.push File.expand_path("../lib", __FILE__) +require "openid/version" + +Gem::Specification.new do |s| + s.name = "ruby-openid" + s.version = OpenID::VERSION + s.authors = ["JanRain, Inc", "Mike Mell"] + s.email = ["openid@janrain.com", "mike.mell@nthwave.net"] + s.homepage = 'https://github.com/mmell/ruby-openid' + s.summary = 'A library for consuming and serving OpenID identities.' + s.description = %q{TODO: Write a gem description} + + s.rubyforge_project = "ruby-openid" + + s.files = `git ls-files`.split("\n") + s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") + s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } + s.require_paths = ["lib"] + + # specify any dependencies here; for example: + # s.add_development_dependency "rspec" + # s.add_runtime_dependency "rest-client" +end