Skip to content

Commit

Permalink
Updated gemspec & switched to latest recaptcha gem
Browse files Browse the repository at this point in the history
  • Loading branch information
BDQ committed Dec 23, 2010
1 parent 90b50c2 commit 115d240
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 75 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.swp
spec/test_app
22 changes: 3 additions & 19 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
require 'rubygems'
require 'rake'
require 'rake/testtask'
require 'rake/packagetask'
require 'rake/gempackagetask'

spec = eval(File.read('spree_email_to_friend.gemspec'))

Rake::GemPackageTask.new(spec) do |p|
p.gem_spec = spec
end

desc "Release to gemcutter"
task :release => :package do
require 'rake/gemcutter'
Rake::Gemcutter::Tasks.new(spec).define
Rake::Task['gem:push'].invoke
end

desc "Default Task"
task :default => [ :spec ]
Expand All @@ -37,10 +22,9 @@ task :test_app do
def tweak_gemfile
append_file 'Gemfile' do
<<-gems
gem 'spree_core', :path => '#{File.join(SPREE_PATH, 'core')}'
gem 'spree_auth', :path => '#{File.join(SPREE_PATH, 'auth')}'
gem 'recaptcha', :require => 'recaptcha/rails', :git => 'git://github.com/rfc2822/recaptcha.git', :branch => 'rails3'
gem 'spree_email_to_friend', :path => '../..'
gem 'spree_core', :path => '#{File.join(SPREE_PATH, 'core')}'
gem 'spree_auth', :path => '#{File.join(SPREE_PATH, 'auth')}'
gem 'spree_email_to_friend', :path => '#{File.dirname(__FILE__)}'
gems
end
end
Expand Down
1 change: 1 addition & 0 deletions lib/spree_email_to_friend.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require 'spree_core'
require 'spree_email_to_friend_hooks'
require 'recaptcha/rails'

module SpreeEmailToFriend
class Engine < Rails::Engine
Expand Down
11 changes: 0 additions & 11 deletions spec/helpers/email_sender_helper_spec.rb

This file was deleted.

57 changes: 24 additions & 33 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,37 +1,28 @@
unless defined? SPREE_ROOT
ENV["RAILS_ENV"] = "test"
case
when ENV["SPREE_ENV_FILE"]
require ENV["SPREE_ENV_FILE"]
when File.dirname(__FILE__) =~ %r{vendor/SPREE/vendor/extensions}
require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../../../")}/config/environment"
else
require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../")}/config/environment"
end
end
require "#{SPREE_ROOT}/spec/spec_helper"
# This file is copied to ~/spec when you run 'ruby script/generate rspec'
# from the project root directory.
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../test_app/config/environment", __FILE__)
require 'rspec/rails'

if File.directory?(File.dirname(__FILE__) + "/scenarios")
Scenario.load_paths.unshift File.dirname(__FILE__) + "/scenarios"
end
if File.directory?(File.dirname(__FILE__) + "/matchers")
Dir[File.dirname(__FILE__) + "/matchers/*.rb"].each {|file| require file }
end
# Requires supporting files with custom matchers and macros, etc,
# in ./support/ and its subdirectories.
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}

Spec::Runner.configure do |config|
# config.use_transactional_fixtures = true
# config.use_instantiated_fixtures = false
# config.fixture_path = RAILS_ROOT + '/spec/fixtures'

# You can declare fixtures for each behaviour like this:
# describe "...." do
# fixtures :table_a, :table_b
#
# Alternatively, if you prefer to declare them only once, you can
# do so here, like so ...
RSpec.configure do |config|
# == Mock Framework
#
# config.global_fixtures = :table_a, :table_b
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
#
# If you declare global fixtures, be aware that they will be declared
# for all of your examples, even those that don't use them.
end
# config.mock_with :mocha
# config.mock_with :flexmock
# config.mock_with :rr
config.mock_with :rspec

config.fixture_path = "#{::Rails.root}/spec/fixtures"

# If you're not using ActiveRecord, or you'd prefer not to run each of your
# examples within a transaction, comment the following line or assign false
# instead of true.
config.use_transactional_fixtures = true
end

21 changes: 9 additions & 12 deletions spree_email_to_friend.gemspec
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = 'spree_email_to_friend'
s.version = '0.30.0.beta2'
s.version = '1.0.0'
s.summary = 'Spree extension to send product recommendations to friends'
#s.description = 'Add (optional) gem description here'
s.homepage = 'https://github.com/calas/spree-email-to-friend'
s.required_ruby_version = '>= 1.8.7'

s.author = 'Jorge Calás Lozano, Roman Smirnov'
# s.email = 'roman@railsdog.com'
# s.homepage = 'http://www.rubyonrails.org'
# s.rubyforge_project = 'actionmailer'
s.author = 'Jorge Calás Lozano, Roman Smirnov'

s.files = Dir['CHANGELOG', 'README.md', 'LICENSE', 'lib/**/*', 'app/**/*']
s.require_path = 'lib'
s.requirements << 'none'
s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.require_paths = ["lib"]

s.has_rdoc = true

s.add_dependency('spree_core', '>= 0.30.0.beta2')
s.add_dependency('spree_auth', '>= 0.30.0.beta2')
s.add_dependency('recaptcha')
s.add_dependency('spree_core', '>= 0.30.1')
s.add_dependency('spree_auth', '>= 0.30.1')
s.add_dependency('recaptcha', '>= 0.3.1')
end

0 comments on commit 115d240

Please sign in to comment.