This commit is contained in:
Erik Michaels-Ober 2011-04-22 10:49:23 -05:00
Родитель 63b11f330d
Коммит 1d100ab8e9
22 изменённых файлов: 135 добавлений и 115 удалений

Просмотреть файл

@ -6,4 +6,3 @@ gemspec :path => 'oa-enterprise'
gemspec :path => 'oa-more' gemspec :path => 'oa-more'
gemspec :path => 'oa-oauth' gemspec :path => 'oa-oauth'
gemspec :path => 'oa-openid' gemspec :path => 'oa-openid'
gemspec :path => 'omniauth'

151
Rakefile
Просмотреть файл

@ -1,29 +1,72 @@
require 'rake' OMNIAUTH_GEMS = %w(oa-basic oa-core oa-oauth oa-openid oa-enterprise oa-more)
require File.expand_path('../omniauth/lib/omniauth/version', __FILE__)
begin
require 'term/ansicolor'
include Term::ANSIColor
rescue LoadError
def cyan; '' end
def blue; '' end
def clear; '' end
def green; '' end
def red; '' end
end
OMNIAUTH_GEMS = %w(oa-basic oa-core oa-oauth oa-openid oa-enterprise oa-more omniauth)
def each_gem(action, &block) def each_gem(action, &block)
OMNIAUTH_GEMS.each_with_index do |dir, i| OMNIAUTH_GEMS.each do |gem|
print blue, "\n\n== ", cyan, dir, blue, " ", action, clear, "\n\n" puts "#{gem} #{action}"
Dir.chdir(dir) do Dir.chdir(gem) do
block.call(dir) yield
end end
end end
end end
desc 'Run specs for all of the gems.' def version
File.read("VERSION").strip
end
def bump_version(position)
v = version.split('.').map{|s| s.to_i}
v[position] += 1
write_version(*v)
end
def write_version(major, minor, patch)
v = version.split('.').map{|s| s.to_i}
v[0] = major unless major.nil?
v[1] = minor unless minor.nil?
v[2] = patch unless patch.nil?
File.open("VERSION", 'w') do |f|
f.write v.join('.')
end
each_gem('is writing version file...') do
File.open("VERSION", 'w') do |f|
f.write v.join('.')
end
end
display_version
end
def display_version
puts "Version is now #{version}"
end
desc "Display the current version"
task :version do
display_version
end
namespace :version do
desc "Write version with MAJOR, MINOR, and PATCH level env variables."
task :write do
write_version(ENV['MAJOR'], ENV['MINOR'], ENV['PATCH'])
end
namespace :bump do
desc "Increment the major version"
task :major do
bump_version(0)
end
desc "Increment the minor version"
task :minor do
bump_version(1)
end
desc "Increment the patch version"
task :patch do
bump_version(2)
end
end
end
desc "Run specs for all of the gems"
task :spec do task :spec do
error_gems = [] error_gems = []
each_gem('specs are running...') do |gem| each_gem('specs are running...') do |gem|
@ -34,10 +77,10 @@ task :spec do
puts puts
if error_gems.any? if error_gems.any?
puts "#{red}#{error_gems.size} gems with failing specs: #{error_gems.join(', ')}#{clear}" puts "#{error_gems.size} gems with failing specs: #{error_gems.join(', ')}"
exit(1) exit(1)
else else
puts "#{green}All gems passed specs.#{clear}" puts "All gems passed specs."
end end
end end
@ -45,63 +88,71 @@ desc "Release all gems to gemcutter and create a tag"
task :release => ['tag', 'clean', 'build', 'publish'] task :release => ['tag', 'clean', 'build', 'publish']
task :tag do task :tag do
system("git tag v#{Omniauth::VERSION}") system("git tag v#{version.join}")
system('git push origin --tags') system('git push origin --tags')
end end
task :publish do task :publish do
each_gem('is releasing to Rubygems...') do each_gem('is releasing to Rubygems...') do
system('gem push pkg/*.gem') system("gem push pkg/#{gem}-#{version.join}.gem")
end end
system("gem push pkg/omniauth-#{version.join}.gem")
end
def build_gem
system('gem build omniauth.gemspec')
FileUtils.mkdir_p('pkg')
FileUtils.mv("omniauth-#{version}.gem", 'pkg')
end
def install_gem
system("gem install pkg/omniauth-#{version}.gem")
end end
desc "Build gem files for all projects" desc "Build gem files for all projects"
task :build do task :build do
each_gem('is building gems...') do each_gem('is building...') do
system('rake build') system('rake build')
end end
build_gem
end end
desc "Install gems for all projects" desc "Install gems for all projects"
task :install do task :install do
each_gem('is installing gems...') do each_gem('is installing...') do
system('rake install') system('rake install')
end end
build_gem
install_gem
end end
desc "Clean pkg and other stuff" desc "Clean pkg and other stuff"
task :clean do task :clean do
OMNIAUTH_GEMS.each do |dir| OMNIAUTH_GEMS.each do |gem|
Dir.chdir(dir) do Dir.chdir(gem) do
%w(tmp pkg coverage dist).each{|d| FileUtils.rm_rf d} %w(tmp pkg coverage dist).each do |directory|
FileUtils.rm_rf directory
end
end
%w(tmp pkg coverage dist).each do |directory|
FileUtils.rm_rf directory
end end
end end
Dir["**/*.gem"].each { |gem| FileUtils.rm_rf gem } Dir["**/*.gem"].each do |gem|
FileUtils.rm_rf gem
end
end end
task :default => :spec task :default => :spec
task :test => :spec task :test => :spec
begin namespace :doc do
require 'yard' require 'yard'
YARD::Rake::YardocTask.new(:doc) do |t| YARD::Rake::YardocTask.new do |task|
t.files = OMNIAUTH_GEMS.inject([]){|a,g| a = a + ["#{g}/lib/**/*.rb"]; a} + ['README.markdown'] task.files = OMNIAUTH_GEMS.map{|gem| ["#{gem}/lib/**/*.rb"]} + ['README.markdown', 'LICENSE']
end task.options = [
'--markup', 'markdown',
namespace :doc do '--markup-provider', 'maruku',
YARD::Rake::YardocTask.new(:pages) do |t| ]
t.files = OMNIAUTH_GEMS.inject([]){|a,g| a = a + ["#{g}/lib/**/*.rb"]; a} + ['README.markdown']
end
namespace :pages do
desc 'Generate and publish YARD docs to GitHub pages.'
task :publish => ['doc:pages'] do
Dir.chdir(File.dirname(__FILE__) + '/../omniauth.doc') do
system("git add .")
system("git add -u")
system("git push origin gh-pages")
end
end
end
end end
end end

1
VERSION Normal file
Просмотреть файл

@ -0,0 +1 @@
0.2.4

Просмотреть файл

1
oa-basic/VERSION Normal file
Просмотреть файл

@ -0,0 +1 @@
0.2.4

Просмотреть файл

@ -1,9 +1,10 @@
# -*- encoding: utf-8 -*- # -*- encoding: utf-8 -*-
require File.expand_path('../../omniauth/lib/omniauth/version', __FILE__) version = File.read("VERSION").strip
Gem::Specification.new do |gem| Gem::Specification.new do |gem|
gem.add_runtime_dependency 'oa-core', Omniauth::VERSION.dup gem.add_runtime_dependency 'oa-core', version
gem.add_runtime_dependency 'rest-client', '~> 1.6.0' gem.add_runtime_dependency 'rest-client', '~> 1.6.0'
gem.add_development_dependency 'maruku', '~> 0.6'
gem.add_development_dependency 'simplecov', '~> 0.4' gem.add_development_dependency 'simplecov', '~> 0.4'
gem.add_development_dependency 'rack-test', '~> 0.5' gem.add_development_dependency 'rack-test', '~> 0.5'
gem.add_development_dependency 'rake', '~> 0.8' gem.add_development_dependency 'rake', '~> 0.8'
@ -11,7 +12,7 @@ Gem::Specification.new do |gem|
gem.add_development_dependency 'webmock', '~> 1.6' gem.add_development_dependency 'webmock', '~> 1.6'
gem.add_development_dependency 'yard', '~> 0.6' gem.add_development_dependency 'yard', '~> 0.6'
gem.name = 'oa-basic' gem.name = 'oa-basic'
gem.version = Omniauth::VERSION.dup gem.version = version
gem.summary = %q{HTTP Basic strategies for OmniAuth.} gem.summary = %q{HTTP Basic strategies for OmniAuth.}
gem.description = %q{HTTP Basic strategies for OmniAuth.} gem.description = %q{HTTP Basic strategies for OmniAuth.}
gem.email = ['michael@intridea.com', 'sferik@gmail.com'] gem.email = ['michael@intridea.com', 'sferik@gmail.com']

1
oa-core/VERSION Normal file
Просмотреть файл

@ -0,0 +1 @@
0.2.4

Просмотреть файл

@ -1,14 +1,15 @@
# -*- encoding: utf-8 -*- # -*- encoding: utf-8 -*-
require File.expand_path('../../omniauth/lib/omniauth/version', __FILE__) version = File.read("VERSION").strip
Gem::Specification.new do |gem| Gem::Specification.new do |gem|
gem.add_development_dependency 'maruku', '~> 0.6'
gem.add_development_dependency 'simplecov', '~> 0.4' gem.add_development_dependency 'simplecov', '~> 0.4'
gem.add_development_dependency 'rack-test', '~> 0.5' gem.add_development_dependency 'rack-test', '~> 0.5'
gem.add_development_dependency 'rake', '~> 0.8' gem.add_development_dependency 'rake', '~> 0.8'
gem.add_development_dependency 'rspec', '~> 2.5' gem.add_development_dependency 'rspec', '~> 2.5'
gem.add_development_dependency 'yard', '~> 0.6' gem.add_development_dependency 'yard', '~> 0.6'
gem.name = 'oa-core' gem.name = 'oa-core'
gem.version = Omniauth::VERSION.dup gem.version = version
gem.summary = %q{HTTP Basic strategies for OmniAuth.} gem.summary = %q{HTTP Basic strategies for OmniAuth.}
gem.description = %q{HTTP Basic strategies for OmniAuth.} gem.description = %q{HTTP Basic strategies for OmniAuth.}
gem.email = ['michael@intridea.com', 'sferik@gmail.com'] gem.email = ['michael@intridea.com', 'sferik@gmail.com']

1
oa-enterprise/VERSION Normal file
Просмотреть файл

@ -0,0 +1 @@
0.2.4

Просмотреть файл

@ -1,13 +1,14 @@
# -*- encoding: utf-8 -*- # -*- encoding: utf-8 -*-
require File.expand_path('../../omniauth/lib/omniauth/version', __FILE__) version = File.read("VERSION").strip
Gem::Specification.new do |gem| Gem::Specification.new do |gem|
gem.add_runtime_dependency 'addressable', '2.2.4' gem.add_runtime_dependency 'addressable', '2.2.4'
gem.add_runtime_dependency 'oa-core', Omniauth::VERSION.dup gem.add_runtime_dependency 'oa-core', version
gem.add_runtime_dependency 'nokogiri', '~> 1.4.2' gem.add_runtime_dependency 'nokogiri', '~> 1.4.2'
gem.add_runtime_dependency 'net-ldap', '~> 0.2.2' gem.add_runtime_dependency 'net-ldap', '~> 0.2.2'
gem.add_runtime_dependency 'rubyntlm', '~> 0.1.1' gem.add_runtime_dependency 'rubyntlm', '~> 0.1.1'
gem.add_runtime_dependency 'pyu-ruby-sasl', '~> 0.0.3.1' gem.add_runtime_dependency 'pyu-ruby-sasl', '~> 0.0.3.1'
gem.add_development_dependency 'maruku', '~> 0.6'
gem.add_development_dependency 'simplecov', '~> 0.4' gem.add_development_dependency 'simplecov', '~> 0.4'
gem.add_development_dependency 'rack-test', '~> 0.5' gem.add_development_dependency 'rack-test', '~> 0.5'
gem.add_development_dependency 'rake', '~> 0.8' gem.add_development_dependency 'rake', '~> 0.8'
@ -15,7 +16,7 @@ Gem::Specification.new do |gem|
gem.add_development_dependency 'webmock', '~> 1.6' gem.add_development_dependency 'webmock', '~> 1.6'
gem.add_development_dependency 'yard', '~> 0.6' gem.add_development_dependency 'yard', '~> 0.6'
gem.name = 'oa-enterprise' gem.name = 'oa-enterprise'
gem.version = Omniauth::VERSION.dup gem.version = version
gem.summary = %q{Enterprise strategies for OmniAuth.} gem.summary = %q{Enterprise strategies for OmniAuth.}
gem.description = %q{Enterprise strategies for OmniAuth.} gem.description = %q{Enterprise strategies for OmniAuth.}
gem.email = ['james.a.rosen@gmail.com', 'ping@intridea.com', 'michael@intridea.com', 'sferik@gmail.com'] gem.email = ['james.a.rosen@gmail.com', 'ping@intridea.com', 'michael@intridea.com', 'sferik@gmail.com']

1
oa-more/VERSION Normal file
Просмотреть файл

@ -0,0 +1 @@
0.2.4

Просмотреть файл

@ -1,11 +1,12 @@
# -*- encoding: utf-8 -*- # -*- encoding: utf-8 -*-
require File.expand_path('../../omniauth/lib/omniauth/version', __FILE__) version = File.read("VERSION").strip
Gem::Specification.new do |gem| Gem::Specification.new do |gem|
gem.add_dependency 'oa-core', Omniauth::VERSION.dup gem.add_dependency 'oa-core', version
gem.add_dependency 'rest-client', '~> 1.6.0' gem.add_dependency 'rest-client', '~> 1.6.0'
gem.add_dependency 'multi_json', '~> 0.0.2' gem.add_dependency 'multi_json', '~> 0.0.2'
gem.add_development_dependency 'json_pure', '~> 1.5' gem.add_development_dependency 'json_pure', '~> 1.5'
gem.add_development_dependency 'maruku', '~> 0.6'
gem.add_development_dependency 'rake', '~> 0.8' gem.add_development_dependency 'rake', '~> 0.8'
gem.add_development_dependency 'rack-test', '~> 0.5' gem.add_development_dependency 'rack-test', '~> 0.5'
gem.add_development_dependency 'rspec', '~> 2.5' gem.add_development_dependency 'rspec', '~> 2.5'
@ -13,7 +14,7 @@ Gem::Specification.new do |gem|
gem.add_development_dependency 'webmock', '~> 1.6' gem.add_development_dependency 'webmock', '~> 1.6'
gem.add_development_dependency 'yard', '~> 0.6' gem.add_development_dependency 'yard', '~> 0.6'
gem.name = 'oa-more' gem.name = 'oa-more'
gem.version = Omniauth::VERSION.dup gem.version = version
gem.summary = %q{Additional strategies for OmniAuth.} gem.summary = %q{Additional strategies for OmniAuth.}
gem.description = %q{Additional strategies for OmniAuth.} gem.description = %q{Additional strategies for OmniAuth.}
gem.email = 'michael@intridea.com' gem.email = 'michael@intridea.com'

1
oa-oauth/VERSION Normal file
Просмотреть файл

@ -0,0 +1 @@
0.2.4

Просмотреть файл

@ -1,21 +1,22 @@
# -*- encoding: utf-8 -*- # -*- encoding: utf-8 -*-
require File.expand_path('../../omniauth/lib/omniauth/version', __FILE__) version = File.read("VERSION").strip
Gem::Specification.new do |gem| Gem::Specification.new do |gem|
gem.add_runtime_dependency 'oa-core', Omniauth::VERSION.dup gem.add_runtime_dependency 'oa-core', version
gem.add_runtime_dependency 'multi_json', '>= 0.0.5' gem.add_runtime_dependency 'multi_json', '>= 0.0.5'
gem.add_runtime_dependency 'nokogiri', '~> 1.4.2' gem.add_runtime_dependency 'nokogiri', '~> 1.4.2'
gem.add_runtime_dependency 'oauth', '~> 0.4.0' gem.add_runtime_dependency 'oauth', '~> 0.4.0'
gem.add_runtime_dependency 'faraday', '~> 0.6.1' gem.add_runtime_dependency 'faraday', '~> 0.6.1'
gem.add_runtime_dependency 'oauth2', '~> 0.4.1' gem.add_runtime_dependency 'oauth2', '~> 0.4.1'
gem.add_development_dependency 'evernote', '~> 0.9' gem.add_development_dependency 'evernote', '~> 0.9'
gem.add_development_dependency 'maruku', '~> 0.6'
gem.add_development_dependency 'rack-test', '~> 0.5' gem.add_development_dependency 'rack-test', '~> 0.5'
gem.add_development_dependency 'rake', '~> 0.8' gem.add_development_dependency 'rake', '~> 0.8'
gem.add_development_dependency 'rspec', '~> 2.5' gem.add_development_dependency 'rspec', '~> 2.5'
gem.add_development_dependency 'webmock', '~> 1.6' gem.add_development_dependency 'webmock', '~> 1.6'
gem.add_development_dependency 'yard', '~> 0.6' gem.add_development_dependency 'yard', '~> 0.6'
gem.name = 'oa-oauth' gem.name = 'oa-oauth'
gem.version = Omniauth::VERSION.dup gem.version = version
gem.summary = %q{OAuth strategies for OmniAuth.} gem.summary = %q{OAuth strategies for OmniAuth.}
gem.description = %q{OAuth strategies for OmniAuth.} gem.description = %q{OAuth strategies for OmniAuth.}
gem.email = ['michael@intridea.com', 'sferik@gmail.com'] gem.email = ['michael@intridea.com', 'sferik@gmail.com']

1
oa-openid/VERSION Normal file
Просмотреть файл

@ -0,0 +1 @@
0.2.4

Просмотреть файл

@ -1,17 +1,18 @@
# -*- encoding: utf-8 -*- # -*- encoding: utf-8 -*-
require File.expand_path('../../omniauth/lib/omniauth/version', __FILE__) version = File.read("VERSION").strip
Gem::Specification.new do |gem| Gem::Specification.new do |gem|
gem.add_dependency 'oa-core', Omniauth::VERSION.dup gem.add_dependency 'oa-core', version
gem.add_dependency 'rack-openid', '~> 1.3.1' gem.add_dependency 'rack-openid', '~> 1.3.1'
gem.add_dependency 'ruby-openid-apps-discovery' gem.add_dependency 'ruby-openid-apps-discovery', '~> 1.2.0'
gem.add_development_dependency 'maruku', '~> 0.6'
gem.add_development_dependency 'rack-test', '~> 0.5' gem.add_development_dependency 'rack-test', '~> 0.5'
gem.add_development_dependency 'rake', '~> 0.8' gem.add_development_dependency 'rake', '~> 0.8'
gem.add_development_dependency 'rspec', '~> 2.5' gem.add_development_dependency 'rspec', '~> 2.5'
gem.add_development_dependency 'webmock', '~> 1.6' gem.add_development_dependency 'webmock', '~> 1.6'
gem.add_development_dependency 'yard', '~> 0.6' gem.add_development_dependency 'yard', '~> 0.6'
gem.name = 'oa-openid' gem.name = 'oa-openid'
gem.version = Omniauth::VERSION.dup gem.version = version
gem.summary = %q{OpenID strategies for OmniAuth.} gem.summary = %q{OpenID strategies for OmniAuth.}
gem.description = %q{OpenID strategies for OmniAuth.} gem.description = %q{OpenID strategies for OmniAuth.}
gem.email = ['michael@intridea.com', 'sferik@gmail.com'] gem.email = ['michael@intridea.com', 'sferik@gmail.com']

Просмотреть файл

@ -1,12 +1,12 @@
# -*- encoding: utf-8 -*- # -*- encoding: utf-8 -*-
require File.expand_path('../../omniauth/lib/omniauth/version', __FILE__) version = File.read("VERSION").strip
Gem::Specification.new do |gem| Gem::Specification.new do |gem|
%w(oa-core oa-oauth oa-basic oa-openid oa-enterprise oa-more).each do |subgem| %w(oa-core oa-oauth oa-basic oa-openid oa-enterprise oa-more).each do |subgem|
gem.add_runtime_dependency subgem, Omniauth::VERSION.dup gem.add_runtime_dependency subgem, version
end end
gem.name = 'omniauth' gem.name = 'omniauth'
gem.version = Omniauth::VERSION.dup gem.version = version
gem.summary = %q{Rack middleware for standardized multi-provider authentication.} gem.summary = %q{Rack middleware for standardized multi-provider authentication.}
gem.description = %q{OmniAuth is an authentication framework that that separates the concept of authentiation from the concept of identity, providing simple hooks for any application to have one or multiple authentication providers for a user.} gem.description = %q{OmniAuth is an authentication framework that that separates the concept of authentiation from the concept of identity, providing simple hooks for any application to have one or multiple authentication providers for a user.}
gem.email = ['michael@intridea.com', 'sferik@gmail.com'] gem.email = ['michael@intridea.com', 'sferik@gmail.com']

Просмотреть файл

Просмотреть файл

@ -1,19 +0,0 @@
Copyright (c) 2010-2011 Michael Bleigh and Intridea, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Просмотреть файл

@ -1,17 +0,0 @@
= OmniAuth
Description goes here.
== Note on Patches/Pull Requests
* Fork the project.
* Make your feature addition or bug fix.
* Add tests for it. This is important so I don't break it in a
future version unintentionally.
* Commit, do not mess with rakefile, version, or history.
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
* Send me a pull request. Bonus points for topic branches.
== Copyright
Copyright (c) 2010 Michael Bleigh. See LICENSE for details.

Просмотреть файл

@ -1,2 +0,0 @@
require 'bundler'
Bundler::GemHelper.install_tasks

Просмотреть файл

@ -1,5 +0,0 @@
module Omniauth
# The version of the gem
VERSION = '0.2.4'.freeze unless defined?(::Omniauth::VERSION)
end