Skip to content

Commit

Permalink
cleaner gemspec
Browse files Browse the repository at this point in the history
  • Loading branch information
binarylogic committed Jun 1, 2012
1 parent d3840ae commit 20f4f9f
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 44 deletions.
11 changes: 1 addition & 10 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,2 @@
source :rubygems

gem 'activesupport', '~> 2.3.0'
gem 'activerecord', '~> 2.3.0'

group :test do
gem 'bcrypt-ruby'
gem 'rake'
gem 'debugger'
gem 'sqlite3'
end
gemspec
19 changes: 8 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@
PATH
remote: .
specs:
authlogic (2.1.8)
activerecord (~> 2.3.0)
activesupport (~> 2.3.0)

GEM
remote: http://rubygems.org/
specs:
activerecord (2.3.14)
activesupport (= 2.3.14)
activesupport (2.3.14)
bcrypt-ruby (3.0.1)
columnize (0.3.6)
debugger (1.1.3)
columnize (>= 0.3.1)
debugger-linecache (~> 1.1.1)
debugger-ruby_core_source (~> 1.1.2)
debugger-linecache (1.1.1)
debugger-ruby_core_source (>= 1.1.1)
debugger-ruby_core_source (1.1.3)
rake (0.9.2.2)
sqlite3 (1.3.6)

PLATFORMS
ruby

DEPENDENCIES
activerecord (~> 2.3.0)
activesupport (~> 2.3.0)
authlogic!
bcrypt-ruby
debugger
rake
sqlite3
Binary file added authlogic-2.1.8.gem
Binary file not shown.
5 changes: 4 additions & 1 deletion authlogic.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)

Gem::Specification.new do |s|
s.name = "authlogic"
s.version = "2.1.7"
s.version = "2.1.8"
s.platform = Gem::Platform::RUBY
s.authors = ["Ben Johnson"]
s.email = ["bjohnson@binarylogic.com"]
Expand All @@ -13,6 +13,9 @@ Gem::Specification.new do |s|

s.add_dependency 'activerecord', '~> 2.3.0'
s.add_dependency 'activesupport', '~> 2.3.0'
s.add_development_dependency 'rake'
s.add_development_dependency 'bcrypt-ruby'
s.add_development_dependency 'sqlite3'

s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
Expand Down
43 changes: 21 additions & 22 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
require "test/unit"
require "rubygems"
require "ruby-debug"
require "active_record"
require "active_record/fixtures"

Expand All @@ -27,25 +26,25 @@ def [](key)
ActiveRecord::Base.configurations = true
ActiveRecord::Schema.define(:version => 1) do
create_table :companies do |t|
t.datetime :created_at
t.datetime :created_at
t.datetime :updated_at
t.string :name
t.boolean :active
end

create_table :projects do |t|
t.datetime :created_at
t.datetime :created_at
t.datetime :updated_at
t.string :name
end

create_table :projects_users, :id => false do |t|
t.integer :project_id
t.integer :user_id
end

create_table :users do |t|
t.datetime :created_at
t.datetime :created_at
t.datetime :updated_at
t.integer :lock_version, :default => 0
t.integer :company_id
Expand All @@ -69,9 +68,9 @@ def [](key)
t.boolean :approved, :default => true
t.boolean :confirmed, :default => true
end

create_table :employees do |t|
t.datetime :created_at
t.datetime :created_at
t.datetime :updated_at
t.integer :company_id
t.string :email
Expand All @@ -87,19 +86,19 @@ def [](key)
t.string :current_login_ip
t.string :last_login_ip
end

create_table :affiliates do |t|
t.datetime :created_at
t.datetime :created_at
t.datetime :updated_at
t.integer :company_id
t.string :username
t.string :pw_hash
t.string :pw_salt
t.string :persistence_token
end

create_table :ldapers do |t|
t.datetime :created_at
t.datetime :created_at
t.datetime :updated_at
t.string :ldap_login
t.string :persistence_token
Expand Down Expand Up @@ -127,7 +126,7 @@ class ActiveSupport::TestCase
self.pre_loaded_fixtures = false
fixtures :all
setup :activate_authlogic

private
def password_for(user)
case user
Expand All @@ -137,7 +136,7 @@ def password_for(user)
"zackrocks"
end
end

def http_basic_auth_for(user = nil, &block)
unless user.blank?
controller.http_user = user.login
Expand All @@ -146,36 +145,36 @@ def http_basic_auth_for(user = nil, &block)
yield
controller.http_user = controller.http_password = nil
end

def set_cookie_for(user, id = nil)
controller.cookies["user_credentials"] = {:value => user.persistence_token, :expires => nil}
end

def unset_cookie
controller.cookies["user_credentials"] = nil
end

def set_params_for(user, id = nil)
controller.params["user_credentials"] = user.single_access_token
end

def unset_params
controller.params["user_credentials"] = nil
end

def set_request_content_type(type)
controller.request_content_type = type
end

def unset_request_content_type
controller.request_content_type = nil
end

def set_session_for(user, id = nil)
controller.session["user_credentials"] = user.persistence_token
controller.session["user_credentials_id"] = user.id
end

def unset_session
controller.session["user_credentials"] = controller.session["user_credentials_id"] = nil
end
Expand Down

0 comments on commit 20f4f9f

Please sign in to comment.