Skip to content

Commit

Permalink
Updated to 0.3.4 - supports for Devise 2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
xntrik committed Jun 26, 2013
1 parent c2d5937 commit 8cdcd6a
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 20 deletions.
13 changes: 7 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
source :rubygems
source 'https://rubygems.org'

gemspec

group :test do
gem "sqlite3"
gem 'activerecord', '~> 3.0'
gem "sqlite3", "~> 1.3.4"
gem "bson_ext", "~> 1.3"
gem "capybara", "~> 0.4.0"
gem "capybara", "~> 1.1.0"
gem 'shoulda', '~> 2.11.3'
gem 'mocha', '~> 0.9.9'
gem 'factory_girl_rails', '~> 1.0'
gem 'rspec-rails', '~> 2.5.0'
gem 'mocha', '~> 0.13.0'
gem 'factory_girl_rails', '~> 1.2'
gem 'nokogiri', '< 1.6.0', :platforms => :ruby_18
end
3 changes: 2 additions & 1 deletion README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ This is a devise[https://github.com/plataformatec/devise] extension to allow you
* Version 0.3.1 - Slight updated in the dependencies.
* Version 0.3.2 - Updated to include support for Devise 2.0.0 and above (no longer supports 1.5.3 or lower), you'll need version 0.3.1 to use older Devise
* Version 0.3.3 - Updated some of the redirect methods to proper align with Devise 2.1.0. Also tidied up some of the test routines to proper replicate Devise 2.1.0
* Version 0.3.4 - Updated test cases to function properly, and tested working with Devise 2.2 (up to at least Devise 2.2.4)

== Installation

Add the gem to your Gemfile (don't forget devise too):

* gem 'devise'
* gem 'devise_google_authenticator', '0.3.3'
* gem 'devise_google_authenticator', '0.3.4'

Don't forget to "bundle install"

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.3
0.3.4
14 changes: 8 additions & 6 deletions devise_google_authenticator.gemspec
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# -*- encoding: utf-8 -*-
$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)

Gem::Specification.new do |s|
s.name = "devise_google_authenticator"
s.version = "0.3.3"
s.version = "0.3.4"
s.authors = ["Christian Frichot"]
s.date = "2012-05-27"
s.date = "2013-06-26"
s.description = "Devise Google Authenticator Extension, for adding Google's OTP to your Rails apps!"
s.email = "xntrik@gmail.com"
s.extra_rdoc_files = [
Expand All @@ -20,12 +21,13 @@ Gem::Specification.new do |s|
s.required_ruby_version = '>= 1.8.6'
s.required_rubygems_version = '>= 1.3.6'

s.add_development_dependency('bundler', '~> 1.1.3')
s.add_development_dependency('bundler', '~> 1.3.0')

{
'rails' => ['>= 3.0.0', '<= 3.3.0'],
'devise' => ['>= 2.0.0', '<= 2.1.0'],
'rotp' => ['<= 1.3.2']
'railties' => '~> 3.0',
'actionmailer' => '~> 3.0',
'devise' => ['~> 2.2.0'],
'rotp' => ['~> 1.4.0']
}.each do |lib, version|
s.add_runtime_dependency(lib, *version)
end
Expand Down
7 changes: 7 additions & 0 deletions test/rails_app/Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

require File.expand_path('../config/application', __FILE__)
require 'rake'

RailsApp::Application.load_tasks
5 changes: 2 additions & 3 deletions test/rails_app/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@

require "action_controller/railtie"
require "action_mailer/railtie"
require "active_resource/railtie"
require "rails/test_unit/railtie"

Bundler.require(:default, DEVISE_ORM) if defined?(Bundler)

begin
require "#{DEVISE_ORM}/railtie"
rescue LoadError
end

PARENT_MODEL_CLASS = DEVISE_ORM == :active_record ? ActiveRecord::Base : Object

require "devise"
Expand All @@ -19,5 +17,6 @@
module RailsApp
class Application < Rails::Application
config.filter_parameters << :password

end
end
2 changes: 1 addition & 1 deletion test/rails_app/config/initializers/devise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@

# If true, uses the password salt as remember token. This should be turned
# to false if you are not using database authenticatable.
config.use_salt_as_remember_token = true
# config.use_salt_as_remember_token = true

# Options to be passed to the created cookie. For instance, you can set
# :secure => true in order to force SSL only cookies.
Expand Down
2 changes: 1 addition & 1 deletion test/rails_app/config/initializers/wrap_parameters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
ActiveSupport.on_load(:action_controller) do
wrap_parameters format: [:json]
wrap_parameters(:format => [:json])
end

# Disable root element in JSON by default.
Expand Down
6 changes: 5 additions & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
$:.unshift File.dirname(__FILE__)
puts "\n==> Devise.orm = #{DEVISE_ORM.inspect}"
require "rails_app/config/environment"
include Devise::TestHelpers
require "orm/#{DEVISE_ORM}"
require 'rails/test_help'
require 'capybara/rails'
Expand All @@ -13,5 +14,8 @@
ActiveSupport::Deprecation.silenced = true

class ActionDispatch::IntegrationTest
include Capybara
include Capybara::DSL
end
class ActionController::TestCase
include Devise::TestHelpers
end

0 comments on commit 8cdcd6a

Please sign in to comment.