~ubuntu-branches/ubuntu/trusty/ruby1.9/trusty

« back to all changes in this revision

Viewing changes to test/rubygems/simple_gem.rb

  • Committer: Bazaar Package Importer
  • Author(s): Stephan Hermann
  • Date: 2008-01-24 11:42:29 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20080124114229-jw2f87rdxlq6gp11
Tags: 1.9.0.0-2ubuntu1
* Merge from debian unstable, remaining changes:
  - Robustify check for target_os, fixing build failure on lpia.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#--
 
2
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
 
3
# All rights reserved.
 
4
# See LICENSE.txt for permissions.
 
5
#++
 
6
 
 
7
    SIMPLE_GEM = <<-GEMDATA
 
8
        MD5SUM = "e3701f9db765a2358aef94c40ded71c8"
 
9
        if $0 == __FILE__
 
10
          require 'optparse'
 
11
        
 
12
          options = {}
 
13
          ARGV.options do |opts|
 
14
            opts.on_tail("--help", "show this message") {puts opts; exit}
 
15
            opts.on('--dir=DIRNAME', "Installation directory for the Gem") {|options[:directory]|}
 
16
            opts.on('--force', "Force Gem to intall, bypassing dependency checks") {|options[:force]|}
 
17
            opts.on('--gen-rdoc', "Generate RDoc documentation for the Gem") {|options[:gen_rdoc]|}
 
18
            opts.parse!
 
19
          end
 
20
 
 
21
          require 'rubygems'
 
22
          @directory = options[:directory] || Gem.dir  
 
23
          @force = options[:force]
 
24
  
 
25
          gem = Gem::Installer.new(__FILE__).install(@force, @directory)      
 
26
          if options[:gen_rdoc]
 
27
            Gem::DocManager.new(gem).generate_rdoc
 
28
          end
 
29
end
 
30
 
 
31
__END__
 
32
--- !ruby/object:Gem::Specification 
 
33
rubygems_version: "1.0"
 
34
name: testing
 
35
version: !ruby/object:Gem::Version 
 
36
  version: 1.2.3
 
37
date: 2004-03-18 22:01:52.859121 -05:00
 
38
platform: 
 
39
summary: This exercise the gem testing stuff.
 
40
require_paths: 
 
41
  - lib
 
42
files: 
 
43
  - lib/foo.rb
 
44
  - lib/test
 
45
  - lib/test.rb
 
46
  - lib/test/wow.rb
 
47
autorequire: test
 
48
test_suite_file: foo
 
49
requirements: 
 
50
  - a computer processor
 
51
--- 
 
52
 
53
  size: 109
 
54
  mode: 420
 
55
  path: lib/foo.rb
 
56
 
57
  size: 0
 
58
  mode: 420
 
59
  path: lib/test.rb
 
60
 
61
  size: 15
 
62
  mode: 420
 
63
  path: lib/test/wow.rb
 
64
---
 
65
eJwVjDEKgDAUQ/eeIpsKguhY3ARPoHMp9quF0mL7e39/h5DwQpLpqz4TOqbC
 
66
U42eO6WuYEvBntIhECuaaX1KqXXLmy2kAEc32szExK+PjyBAlpTZyK0N/Twu
 
67
g1CKTjX9BGAj1w==
 
68
---
 
69
eJwDAAAAAAE=
 
70
---
 
71
eJwrKC0pVlAvzy9XyE3MU+cCACwiBP4=
 
72
    GEMDATA