~ubuntu-branches/ubuntu/trusty/ruby-typed-array/trusty

« back to all changes in this revision

Viewing changes to Rakefile

  • Committer: Package Import Robot
  • Author(s): HIGUCHI Daisuke (VDR dai)
  • Date: 2013-08-05 22:41:18 UTC
  • Revision ID: package-import@ubuntu.com-20130805224118-2nh4b3poz6izpvql
Tags: upstream-0.1.2
ImportĀ upstreamĀ versionĀ 0.1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# encoding: utf-8
 
2
 
 
3
require 'rubygems'
 
4
require 'bundler'
 
5
begin
 
6
  Bundler.setup(:default, :development)
 
7
rescue Bundler::BundlerError => e
 
8
  $stderr.puts e.message
 
9
  $stderr.puts "Run `bundle install` to install missing gems"
 
10
  exit e.status_code
 
11
end
 
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
 
17
  gem.name = "typed-array"
 
18
  gem.homepage = "http://github.com/yaauie/typed-array"
 
19
  gem.license = "MIT"
 
20
  gem.summary = %Q{Provides methods for creating type-enforced Arrays}
 
21
  gem.description =<<-DESCRIPTION
 
22
      All methods that alter the contents of an array that implements this Gem are first checked to
 
23
      ensure that the added items are of the types allowed. All methods behave exactly as their Array
 
24
      counterparts, including additional forms, block processing, etc.
 
25
 
 
26
      Defining a TypedArray Class:
 
27
 
 
28
      ```ruby
 
29
      class ThingsArray < Array
 
30
        extend TypedArray
 
31
        restrict_types Thing1, Thing2
 
32
      end
 
33
 
 
34
      things = ThingsArray.new
 
35
      ```
 
36
 
 
37
      Generating a single TypedArray
 
38
      
 
39
      ```ruby
 
40
      things = TypedArray(Thing1,Thing2).new
 
41
 
 
42
      These classes can be extended, and their accepted-types appended to after their initial definition.
 
43
    DESCRIPTION
 
44
  gem.email = "ruby-dev@yaauie.com"
 
45
  gem.authors = ["Ryan Biesemeyer"]
 
46
  # dependencies defined in Gemfile
 
47
end
 
48
Jeweler::RubygemsDotOrgTasks.new
 
49
 
 
50
require 'rspec/core'
 
51
require 'rspec/core/rake_task'
 
52
RSpec::Core::RakeTask.new(:spec) do |spec|
 
53
  spec.pattern = FileList['spec/**/*_spec.rb']
 
54
end
 
55
 
 
56
RSpec::Core::RakeTask.new(:rcov) do |spec|
 
57
  spec.pattern = 'spec/**/*_spec.rb'
 
58
  spec.rcov = true
 
59
end
 
60
 
 
61
task :default => :spec
 
62
 
 
63
require 'rake/rdoctask'
 
64
Rake::RDocTask.new do |rdoc|
 
65
  version = File.exist?('VERSION') ? File.read('VERSION') : ""
 
66
 
 
67
  rdoc.rdoc_dir = 'rdoc'
 
68
  rdoc.title = "typed-array #{version}"
 
69
  rdoc.rdoc_files.include('README*')
 
70
  rdoc.rdoc_files.include('lib/**/*.rb')
 
71
end