Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 75 lines (65 sloc) 1.918 kb
5ddcb0e initialize with newgem --simple
Joshua Sierles authored
1 require 'rubygems'
2 require 'rake/gempackagetask'
3 require 'rubygems/specification'
bfee8bb @atmos setup a gemspec, add a spec task to the rakefile, add a .gitignore file
authored
4 require 'spec'
5 require 'spec/rake/spectask'
5ddcb0e initialize with newgem --simple
Joshua Sierles authored
6 require 'date'
7
8 GEM = "pars"
23df82f remove old deploy task
Joshua Sierles authored
9 GEM_VERSION = "0.0.1"
f0bc803 @atmos update informational files and only run the lvm backup tests if you set ...
authored
10 AUTHOR = "Corey Donohoe"
11 EMAIL = "cdonohoe@engineyard.com"
12 HOMEPAGE = "http://github.com/atmos/pars/tree/master"
13 SUMMARY = "A gem that provides parse routines for various linux config file formats"
5ddcb0e initialize with newgem --simple
Joshua Sierles authored
14
15 spec = Gem::Specification.new do |s|
16 s.name = GEM
17 s.version = GEM_VERSION
18 s.platform = Gem::Platform::RUBY
19 s.has_rdoc = true
20 s.extra_rdoc_files = ["README", "LICENSE", 'TODO']
21 s.summary = SUMMARY
22 s.description = s.summary
23 s.author = AUTHOR
24 s.email = EMAIL
25 s.homepage = HOMEPAGE
26
27 # Uncomment this to add a dependency
9dac743 @atmos add treetop depedency
authored
28 s.add_dependency "treetop"
5ddcb0e initialize with newgem --simple
Joshua Sierles authored
29
30 s.require_path = 'lib'
31 s.autorequire = GEM
bfee8bb @atmos setup a gemspec, add a spec task to the rakefile, add a .gitignore file
authored
32 s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,spec}/**/**/*")
5ddcb0e initialize with newgem --simple
Joshua Sierles authored
33 end
34
35 Rake::GemPackageTask.new(spec) do |pkg|
36 pkg.gem_spec = spec
ddacc72 @atmos copy at the right time
authored
37 FileUtils.cp "README.markdown", "README"
5ddcb0e initialize with newgem --simple
Joshua Sierles authored
38 end
39
40 desc "install the gem locally"
41 task :install => [:package] do
42 sh %{sudo gem install pkg/#{GEM}-#{GEM_VERSION}}
43 end
44
45 desc "create a gemspec file"
46 task :make_spec do
47 File.open("#{GEM}.gemspec", "w") do |file|
48 file.puts spec.to_ruby
49 end
bfee8bb @atmos setup a gemspec, add a spec task to the rakefile, add a .gitignore file
authored
50 end
ade33ae @atmos shuffle things around so specdoc will eventually be meaningful
authored
51 task :default => ['spec:run']
52 ENV['SLOW_TESTS_TOO'] == true
bfee8bb @atmos setup a gemspec, add a spec task to the rakefile, add a .gitignore file
authored
53
f016087 @atmos add some example usage to the readme
authored
54 task :readme do
55 require 'bluecloth'
56 FileUtils.mkdir_p File.dirname(__FILE__)+'/doc'
57 File.open("doc/README.html", 'w') do |outfp|
58 File.open("README.markdown") do |infp|
59 outfp.puts BlueCloth::new(infp.read).to_html
60 end
61 end
62 %x{open #{File.dirname(__FILE__)+'/doc/README.html'}}
63 end
ade33ae @atmos shuffle things around so specdoc will eventually be meaningful
authored
64 namespace :spec do
da02cea @atmos nuke evaluator, add specdoc format as the default rake task and fix the ...
authored
65 Spec::Rake::SpecTask.new('run') do |t|
66 t.spec_files = FileList['spec/**/**/*.rb']
67 end
68
69 desc "Generate specdocs for examples for inclusion in RDoc"
ade33ae @atmos shuffle things around so specdoc will eventually be meaningful
authored
70 Spec::Rake::SpecTask.new('doc') do |t|
da02cea @atmos nuke evaluator, add specdoc format as the default rake task and fix the ...
authored
71 t.spec_files = FileList['spec/**/**/*.rb']
72 t.spec_opts = ["--format", "specdoc"]
73 end
df6d4ca add deploy task to rakefile
Joshua Sierles authored
74 end
Something went wrong with that request. Please try again.