git ssb

0+

dangerousbeans / %aPBe2k3ugtjBr4rrsU1…



Commit 85cd242425bb89f848cce3fdc24d7f8b1cc6764f

Split out gemspec so git repo can be used in a Gemfile

Aman Gupta committed on 12/20/2010, 6:51:31 PM
Parent: 6c505b307a8afcab6398a29b7198be39b9b9c711

Files changed

Gemfilechanged
Rakefilechanged
bcrypt-ruby.gemspecadded
GemfileView
@@ -1,1 +1,1 @@
1-gem 'rake-compiler', '>= 0.7.5'
1+gemspec
RakefileView
@@ -6,20 +6,8 @@
66 require 'rake/clean'
77 require 'rake/rdoctask'
88 require 'benchmark'
99
10-PKG_NAME = "bcrypt-ruby"
11-PKG_VERSION = "2.1.2"
12-PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
13-PKG_FILES = FileList[
14- '[A-Z]*',
15- 'lib/**/*.rb',
16- 'spec/**/*.rb',
17- 'ext/mri/*.c',
18- 'ext/mri/*.h',
19- 'ext/mri/*.rb',
20- 'ext/jruby/bcrypt_jruby/BCrypt.java'
21-]
2210 CLEAN.include(
2311 "ext/mri/*.o",
2412 "ext/mri/*.bundle",
2513 "ext/mri/*.so",
@@ -29,8 +17,9 @@
2917 "ext/mri/Makefile",
3018 "doc/coverage",
3119 "pkg"
3220 )
21+GEMSPEC = eval(File.read(File.expand_path("../bcrypt-ruby.gemspec", __FILE__)))
3322
3423 task :default => [:compile, :spec]
3524
3625 desc "Run all specs"
@@ -48,50 +37,24 @@
4837
4938 desc 'Generate RDoc'
5039 rd = Rake::RDocTask.new do |rdoc|
5140 rdoc.rdoc_dir = 'doc/rdoc'
52- rdoc.options << '--title' << 'bcrypt-ruby' << '--line-numbers' << '--inline-source' << '--main' << 'README'
41+ rdoc.options += GEMSPEC.rdoc_options
5342 rdoc.template = ENV['TEMPLATE'] if ENV['TEMPLATE']
54- rdoc.rdoc_files.include('README', 'COPYING', 'CHANGELOG', 'lib/**/*.rb')
43+ rdoc.rdoc_files.include(*GEMSPEC.extra_rdoc_files)
5544 end
5645
57-spec = Gem::Specification.new do |s|
58- s.name = PKG_NAME
59- s.version = PKG_VERSION
60- s.summary = "OpenBSD's bcrypt() password hashing algorithm."
61- s.description = <<-EOF
62- bcrypt() is a sophisticated and secure hash algorithm designed by The OpenBSD project
63- for hashing passwords. bcrypt-ruby provides a simple, humane wrapper for safely handling
64- passwords.
65- EOF
66-
67- s.files = PKG_FILES.to_a
68- s.require_path = 'lib'
69- s.add_development_dependency 'rake-compiler'
70-
71- s.has_rdoc = true
72- s.rdoc_options = rd.options
73- s.extra_rdoc_files = rd.rdoc_files.to_a
74-
75- s.extensions = FileList["ext/mri/extconf.rb"].to_a
76-
77- s.authors = ["Coda Hale"]
78- s.email = "coda.hale@gmail.com"
79- s.homepage = "http://bcrypt-ruby.rubyforge.org"
80- s.rubyforge_project = "bcrypt-ruby"
81-end
82-
83-Rake::GemPackageTask.new(spec) do |pkg|
46+Rake::GemPackageTask.new(GEMSPEC) do |pkg|
8447 pkg.need_zip = true
8548 pkg.need_tar = true
8649 end
8750
8851 if RUBY_PLATFORM =~ /java/
89- Rake::JavaExtensionTask.new('bcrypt_ext', spec) do |ext|
52+ Rake::JavaExtensionTask.new('bcrypt_ext', GEMSPEC) do |ext|
9053 ext.ext_dir = 'ext/jruby'
9154 end
9255 else
93- Rake::ExtensionTask.new("bcrypt_ext", spec) do |ext|
56+ Rake::ExtensionTask.new("bcrypt_ext", GEMSPEC) do |ext|
9457 ext.ext_dir = 'ext/mri'
9558 ext.cross_compile = true
9659 ext.cross_platform = ['x86-mingw32', 'x86-mswin32-60']
9760
bcrypt-ruby.gemspecView
@@ -1,0 +1,28 @@
1+Gem::Specification.new do |s|
2+ s.name = 'bcrypt-ruby'
3+ s.version = '2.1.3'
4+
5+ s.summary = "OpenBSD's bcrypt() password hashing algorithm."
6+ s.description = <<-EOF
7+ bcrypt() is a sophisticated and secure hash algorithm designed by The OpenBSD project
8+ for hashing passwords. bcrypt-ruby provides a simple, humane wrapper for safely handling
9+ passwords.
10+ EOF
11+
12+ s.files = `git ls-files`.split("\n")
13+ s.require_path = 'lib'
14+
15+ s.add_development_dependency 'rake-compiler'
16+ s.add_development_dependency 'rspec'
17+
18+ s.has_rdoc = true
19+ s.rdoc_options += ['--title', 'bcrypt-ruby', '--line-numbers', '--inline-source', '--main', 'README']
20+ s.extra_rdoc_files += ['README', 'COPYING', 'CHANGELOG', *Dir['lib/**/*.rb']]
21+
22+ s.extensions = 'ext/mri/extconf.rb'
23+
24+ s.authors = ["Coda Hale"]
25+ s.email = "coda.hale@gmail.com"
26+ s.homepage = "http://bcrypt-ruby.rubyforge.org"
27+ s.rubyforge_project = "bcrypt-ruby"
28+end

Built with git-ssb-web