Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 78 lines (62 sloc) 2.379 kb
3fd30f5 @kschiess . Reorg into a real project structure
authored
1
db8ed6c @kschiess + gem builder tasks (gem this)
authored
2 require "rubygems"
3 require "rake/gempackagetask"
4 require "rake/rdoctask"
5ee96a9 @kschiess + update to rspec2.
authored
5 require 'rspec/core/rake_task'
3fd30f5 @kschiess . Reorg into a real project structure
authored
6
5ee96a9 @kschiess + update to rspec2.
authored
7 desc "Run all examples"
8 RSpec::Core::RakeTask.new
735983d @kschiess . spec setup
authored
9
db8ed6c @kschiess + gem builder tasks (gem this)
authored
10 task :default => :spec
11
12 # This builds the actual gem. For details of what all these options
13 # mean, and other ones you can add, check the documentation here:
14 #
15 # http://rubygems.org/read/chapter/20
16 #
17 spec = Gem::Specification.new do |s|
18
19 # Change these as appropriate
20 s.name = "parslet"
b8116b6 @kschiess . version bump
authored
21 s.version = "0.10.0"
db8ed6c @kschiess + gem builder tasks (gem this)
authored
22 s.summary = "Parser construction library with great error reporting in Ruby."
23 s.author = "Kaspar Schiess"
24 s.email = "kaspar.schiess@absurd.li"
25 s.homepage = "http://kschiess.github.com/parslet"
26
27 s.has_rdoc = true
28 s.extra_rdoc_files = %w(README)
29 s.rdoc_options = %w(--main README)
30
31 # Add any extra files to include in the gem
32 s.files = %w(Gemfile HISTORY.txt LICENSE Rakefile README) + Dir.glob("{spec,lib/**/*}")
33 s.require_paths = ["lib"]
34
35 # If you want to depend on other gems, add them here, along with any
36 # relevant versions
23a4a5c @kschiess ! Fixing all examples
authored
37 s.add_dependency("blankslate", "~> 2.1.2.3")
db8ed6c @kschiess + gem builder tasks (gem this)
authored
38
39 # If your tests use any gems, include them here
40 s.add_development_dependency("rspec")
41 s.add_development_dependency("flexmock")
42 end
43
44 # This task actually builds the gem. We also regenerate a static
45 # .gemspec file, which is useful if something (i.e. GitHub) will
46 # be automatically building a gem for this project. If you're not
47 # using GitHub, edit as appropriate.
48 #
49 # To publish your gem online, install the 'gemcutter' gem; Read more
50 # about that here: http://gemcutter.org/pages/gem_docs
51 Rake::GemPackageTask.new(spec) do |pkg|
52 pkg.gem_spec = spec
53 end
54
55 desc "Build the gemspec file #{spec.name}.gemspec"
56 task :gemspec do
57 file = File.dirname(__FILE__) + "/#{spec.name}.gemspec"
58 File.open(file, "w") {|f| f << spec.to_ruby }
59 end
60
61 task :package => :gemspec
62
bc03948 @kschiess + sdoc
authored
63 require 'sdoc'
64
db8ed6c @kschiess + gem builder tasks (gem this)
authored
65 # Generate documentation
bc03948 @kschiess + sdoc
authored
66 Rake::RDocTask.new do |rdoc|
67 rdoc.options << '--fmt' << 'shtml' # explictly set shtml generator
68 rdoc.template = 'direct' # lighter template used on railsapi.com
69 rdoc.main = "README"
70 rdoc.rdoc_files.include("README", "lib/**/*.rb")
71 rdoc.rdoc_dir = "rdoc"
db8ed6c @kschiess + gem builder tasks (gem this)
authored
72 end
73
74 desc 'Clear out RDoc and generated packages'
75 task :clean => [:clobber_rdoc, :clobber_package] do
76 rm "#{spec.name}.gemspec"
77 end
Something went wrong with that request. Please try again.