Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 48 lines (42 sloc) 1.204 kb
70f4d10 Winton Welsh Version 1.0.0
authored
1 require 'rubygems'
15b93ed Winton Welsh First commit
authored
2 require 'rake'
70f4d10 Winton Welsh Version 1.0.0
authored
3 require 'rake/gempackagetask'
4 require 'spec/rake/spectask'
15b93ed Winton Welsh First commit
authored
5
70f4d10 Winton Welsh Version 1.0.0
authored
6 GEM_NAME = 'externals'
7 PKG_FILES = FileList['**/*'] - FileList['coverage', 'coverage/**/*', 'pkg', 'pkg/**/*']
15b93ed Winton Welsh First commit
authored
8
70f4d10 Winton Welsh Version 1.0.0
authored
9 spec = Gem::Specification.new do |s|
10 s.author = "Winton Welsh"
11 s.email = "mail@wintoni.us"
12 s.executables << GEM_NAME
13 s.extra_rdoc_files = [ "README.markdown" ]
14 s.files = PKG_FILES.to_a
15 s.has_rdoc = false
16 s.homepage = "http://github.com/winton/#{GEM_NAME}"
17 s.name = GEM_NAME
18 s.platform = Gem::Platform::RUBY
19 s.require_path = "lib"
3d7d87b Winton Welsh README, gemspec description
authored
20 s.summary = "Quickly freeze and unfreeze external git dependencies"
f7713c3 Winton Welsh Making output prettier (alphabetizing, formatting)
authored
21 s.version = "1.0.2"
15b93ed Winton Welsh First commit
authored
22 end
23
70f4d10 Winton Welsh Version 1.0.0
authored
24 desc "Package gem"
25 Rake::GemPackageTask.new(spec) do |pkg|
26 pkg.gem_spec = spec
27 end
28
29 desc "Install gem"
15b93ed Winton Welsh First commit
authored
30 task :install do
70f4d10 Winton Welsh Version 1.0.0
authored
31 Rake::Task['gem'].invoke
32 `sudo gem uninstall #{GEM_NAME} -x`
33 `sudo gem install pkg/#{GEM_NAME}*.gem`
34 `rm -Rf pkg`
35 end
36
37 desc "Generate gemspec"
38 task :gemspec do
39 File.open("#{File.dirname(__FILE__)}/#{GEM_NAME}.gemspec", 'w') do |f|
40 f.write(spec.to_ruby)
41 end
42 end
43
44 desc "Run specs"
45 Spec::Rake::SpecTask.new do |t|
46 t.spec_opts = ["--format", "specdoc", "--colour"]
47 t.spec_files = FileList["spec/**/*_spec.rb"]
15b93ed Winton Welsh First commit
authored
48 end
Something went wrong with that request. Please try again.