Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 82 lines (72 sloc) 2.239 kb
68c9fc6 @NoamB more meat TDDing the ORM part
authored
1 # require 'bundler'
07f3564 @NoamB finally started adding specs to oauth
authored
2 # -- Commented because it's slow
68c9fc6 @NoamB more meat TDDing the ORM part
authored
3 # begin
4 # Bundler.setup(:default, :development)
5 # rescue Bundler::BundlerError => e
6 # $stderr.puts e.message
7 # $stderr.puts "Run `bundle install` to install missing gems"
8 # exit e.status_code
9 # end
07f3564 @NoamB finally started adding specs to oauth
authored
10 # --
11
dfc6fc8 @NoamB Initial commit to simple_auth.
authored
12 require 'rake'
13
14 require 'jeweler'
15 Jeweler::Tasks.new do |gem|
16 # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
5fd1c29 @NoamB renamed plugin to a little more original name
authored
17 gem.name = "sorcery"
18 gem.homepage = "http://github.com/NoamB/sorcery"
dfc6fc8 @NoamB Initial commit to simple_auth.
authored
19 gem.license = "MIT"
5fd1c29 @NoamB renamed plugin to a little more original name
authored
20 gem.summary = "Magical authentication for Rails 3 applications"
5c4455f @NoamB changing default to bcrypt, adding gem dependency
authored
21 gem.description = "Provides common authentication needs such as signing in/out, activating by email and resetting password."
dfc6fc8 @NoamB Initial commit to simple_auth.
authored
22 gem.email = "nbenari@gmail.com"
b631e1d @NoamB updated README
authored
23 gem.authors = ["Noam Ben Ari"]
dfc6fc8 @NoamB Initial commit to simple_auth.
authored
24 # Include your dependencies below. Runtime dependencies are required when using your gem,
25 # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
26 # gem.add_runtime_dependency 'jabber4r', '> 0.1'
27 # gem.add_development_dependency 'rspec', '> 1.2.3'
28 end
29 Jeweler::RubygemsDotOrgTasks.new
30
31 require 'rspec/core'
32 require 'rspec/core/rake_task'
4e8b7b9 @NoamB updated the activity_logging submodule, and found a (somewhat hackish) w...
authored
33
dfc6fc8 @NoamB Initial commit to simple_auth.
authored
34 RSpec::Core::RakeTask.new(:spec) do |spec|
35 spec.pattern = FileList['spec/**/*_spec.rb']
36 end
37
38 require 'yard'
39 YARD::Rake::YardocTask.new
28590bf @NoamB adding rails 3 app to gem to test it
authored
40
0dd2b35 @NoamB merging new_config_style to master
authored
41 desc 'Default: Run all sorcery specs.'
42 task :default => :all_sorcery_specs
28590bf @NoamB adding rails 3 app to gem to test it
authored
43
0dd2b35 @NoamB merging new_config_style to master
authored
44 desc "Run all sorcery specs"
45 task :all_sorcery_specs do
71fe3f4 @banyan bundler will use if parent bundler exists already, so empty it.
banyan authored
46 # we need to be empty, otherwise bundler will use parent bundler.
47 env = {
48 'BUNDLE_GEMFILE' => nil,
bb37450 @banyan Override env as less as possible
banyan authored
49 'GEM_HOME' => nil
71fe3f4 @banyan bundler will use if parent bundler exists already, so empty it.
banyan authored
50 }
28590bf @NoamB adding rails 3 app to gem to test it
authored
51 Dir['spec/**/Rakefile'].each do |rakefile|
52 directory_name = File.dirname(rakefile)
d9beed9 @banyan pwd doesn't need it
banyan authored
53 system(env, "cd #{directory_name} && bundle && bundle exec rake")
28590bf @NoamB adding rails 3 app to gem to test it
authored
54 end
55 end
cfb5807 @NoamB fixing #30
authored
56
57 desc "Bundle all folders"
58 task :bundle do
59 sh "bundle"
9281f79 @NoamB some fixes, sinatra specs are broken
authored
60 Dir['spec', 'spec/**'].each do |dir|
cfb5807 @NoamB fixing #30
authored
61 if Dir.exists?(dir) && File.exists?(dir + "/Gemfile")
62 sh <<-CMD
63 cd #{dir}
64 bundle
65 CMD
66 end
67 end
68 end
9281f79 @NoamB some fixes, sinatra specs are broken
authored
69
70 desc "Bundle update all folders"
71 task :bundle_update do
72 sh "bundle update"
73 Dir['spec', 'spec/**'].each do |dir|
74 if Dir.exists?(dir) && File.exists?(dir + "/Gemfile")
75 sh <<-CMD
76 cd #{dir}
77 bundle update
78 CMD
79 end
80 end
81 end
Something went wrong with that request. Please try again.