Thu Mar 7 16:42:54 2013 UTC ()
gem.mk:
* Add Rubygem 2.0.0 and Ruby 2.0.0 support which wouldn't enabled yet.
* Use Ruby code format for gemspec to build/install instead of YAML.
* Add --backtrace option to "gem install".

files/update-gemspec.rb:
* Allow rename name attribute in gemspec.
* Handle Ruby code format of gemspec.


(taca)
diff -r1.16 -r1.17 pkgsrc/lang/ruby/gem.mk
diff -r1.4 -r1.5 pkgsrc/lang/ruby/files/update-gemspec.rb

cvs diff -r1.16 -r1.17 pkgsrc/lang/ruby/gem.mk (expand / switch to unified diff)

--- pkgsrc/lang/ruby/gem.mk 2012/10/03 12:58:34 1.16
+++ pkgsrc/lang/ruby/gem.mk 2013/03/07 16:42:53 1.17
@@ -1,25 +1,26 @@ @@ -1,25 +1,26 @@
1# $NetBSD: gem.mk,v 1.16 2012/10/03 12:58:34 asau Exp $ 1# $NetBSD: gem.mk,v 1.17 2013/03/07 16:42:53 taca Exp $
2# 2#
3# This Makefile fragment is intended to be included by packages that build 3# This Makefile fragment is intended to be included by packages that build
4# and install Ruby gems. 4# and install Ruby gems.
5# 5#
6# Package-settable variables: 6# Package-settable variables:
7# 7#
8# RUBYGEMS_REQD 8# RUBYGEMS_REQD
9# Minimum version of required rubygems. Ruby base packages contain: 9# Minimum version of required rubygems. Ruby base packages contain:
10# 10#
11# ruby18-base: none 11# ruby18-base: none
12# ruby193-base: 1.8.11 12# ruby193-base: 1.8.11
 13# ruby200-base: 2.0.0
13# 14#
14# If newer version of rubygems is resuiqred, set RUBYGEMS_REQD to 15# If newer version of rubygems is resuiqred, set RUBYGEMS_REQD to
15# minimum version. 16# minimum version.
16# 17#
17# Default: not defined 18# Default: not defined
18# 19#
19# OVERRIDE_GEMSPEC 20# OVERRIDE_GEMSPEC
20# Fix version of depending gem or modify files in gemspec. 21# Fix version of depending gem or modify files in gemspec.
21# 22#
22# (1) Specify as gem and dependency pattern as usual pkgsrc's one. 23# (1) Specify as gem and dependency pattern as usual pkgsrc's one.
23# 24#
24# Example: 25# Example:
25# When gemspec contains "json~>1.4.7" as runtime dependency 26# When gemspec contains "json~>1.4.7" as runtime dependency
@@ -27,27 +28,32 @@ @@ -27,27 +28,32 @@
27# "json>=1.4.6" then use: 28# "json>=1.4.6" then use:
28#  29#
29# OVERRIDE_GEMSPEC+= json>=1.4.6 30# OVERRIDE_GEMSPEC+= json>=1.4.6
30#  31#
31# If you want to change depending gem to "json_pure>=1.4.6" 32# If you want to change depending gem to "json_pure>=1.4.6"
32# then use: 33# then use:
33#  34#
34# OVERRIDE_GEMSPEC+= json:json_pure>=1.4.6 35# OVERRIDE_GEMSPEC+= json:json_pure>=1.4.6
35#  36#
36# You can also remove dependency: 37# You can also remove dependency:
37#  38#
38# OVERRIDE_GEMSPEC+= json: 39# OVERRIDE_GEMSPEC+= json:
39# 40#
40# (2) Modify files in gemspec. 41# (2) Modify instance of gemspec.
 42#
 43# Example:
 44# Rename gem's name to "foo" (setting instance @name):
 45#
 46# OVERRIDE_GEMSPEC+= :name=foo
41# 47#
42# Example: 48# Example:
43# Remove files (a.rb and b.rb) from 'files': 49# Remove files (a.rb and b.rb) from 'files':
44# 50#
45# OVERRIDE_GEMSPEC+= :files a.rb= b.rb= 51# OVERRIDE_GEMSPEC+= :files a.rb= b.rb=
46# 52#
47# Example: 53# Example:
48# Add a file (exec.rb) to 'executables': 54# Add a file (exec.rb) to 'executables':
49# 55#
50# OVERRIDE_GEMSPEC+= :executables exec.rb 56# OVERRIDE_GEMSPEC+= :executables exec.rb
51# 57#
52# Example: 58# Example:
53# Rename a file (from 'ruby' to 'ruby193') in 'files': 59# Rename a file (from 'ruby' to 'ruby193') in 'files':
@@ -153,33 +159,37 @@ PRINT_PLIST_AWK+= /^${RUBY_GEM_BASE:S|/| @@ -153,33 +159,37 @@ PRINT_PLIST_AWK+= /^${RUBY_GEM_BASE:S|/|
153# resulting installed gem can run with older versions of rubygems. 159# resulting installed gem can run with older versions of rubygems.
154# 160#
155# If we're using rake to build the local gem, then include it as a 161# If we're using rake to build the local gem, then include it as a
156# build tool. 162# build tool.
157# 163#
158 164
159.if ${RUBY_VER} == "18" 165.if ${RUBY_VER} == "18"
160BUILD_DEPENDS+= ${RUBY_PKGPREFIX}-rubygems>=1.1.0:../../misc/rubygems 166BUILD_DEPENDS+= ${RUBY_PKGPREFIX}-rubygems>=1.1.0:../../misc/rubygems
161DEPENDS+= ${RUBY_PKGPREFIX}-rubygems>=1.0.1:../../misc/rubygems 167DEPENDS+= ${RUBY_PKGPREFIX}-rubygems>=1.0.1:../../misc/rubygems
162.else # !ruby18 168.else # !ruby18
163. if defined(RUBYGEMS_REQD) 169. if defined(RUBYGEMS_REQD)
164 170
165RUBY193_RUBYGEMS_VERS= 1.8.11 171RUBY193_RUBYGEMS_VERS= 1.8.11
 172RUBY200_RUBYGEMS_VERS= 2.0.0
166 173
167_RUBYGEMS_REQD_MAJOR= ${RUBYGEMS_REQD:C/\.[0-9\.]+$//} 174_RUBYGEMS_REQD_MAJOR= ${RUBYGEMS_REQD:C/\.[0-9\.]+$//}
168_RUBYGEMS_REQD_MINORS= ${RUBYGEMS_REQD:C/^([0-9]+)\.*//} 175_RUBYGEMS_REQD_MINORS= ${RUBYGEMS_REQD:C/^([0-9]+)\.*//}
169 176
170. if ${RUBY_VER} == "193" 177. if ${RUBY_VER} == "193"
171_RUBYGEMS_MAJOR= ${RUBY193_RUBYGEMS_VERS:C/\.[0-9\.]+$//} 178_RUBYGEMS_MAJOR= ${RUBY193_RUBYGEMS_VERS:C/\.[0-9\.]+$//}
172_RUBYGEMS_MINORS= ${RUBY193_RUBYGEMS_VERS:C/^([0-9]+)\.*//} 179_RUBYGEMS_MINORS= ${RUBY193_RUBYGEMS_VERS:C/^([0-9]+)\.*//}
 180. elif ${RUBY_VER} == "200"
 181_RUBYGEMS_MAJOR= ${RUBY200_RUBYGEMS_VERS:C/\.[0-9\.]+$//}
 182_RUBYGEMS_MINORS= ${RUBY200_RUBYGEMS_VERS:C/^([0-9]+)\.*//}
173. else 183. else
174PKG_FAIL_REASON+= "Unknown Ruby version specified: ${RUBY_VER}." 184PKG_FAIL_REASON+= "Unknown Ruby version specified: ${RUBY_VER}."
175. endif 185. endif
176 186
177_RUBYGEMS_REQD= NO 187_RUBYGEMS_REQD= NO
178 188
179. if ${_RUBYGEMS_REQD_MAJOR} > ${_RUBYGEMS_MAJOR} 189. if ${_RUBYGEMS_REQD_MAJOR} > ${_RUBYGEMS_MAJOR}
180_RUBYGEMS_REQD= YES 190_RUBYGEMS_REQD= YES
181. elif ${_RUBYGEMS_REQD_MAJOR} == ${_RUBYGEMS_MAJOR} 191. elif ${_RUBYGEMS_REQD_MAJOR} == ${_RUBYGEMS_MAJOR}
182. if !empty(_RUBYGEMS_MINORS) && ${_RUBYGEMS_REQD_MINORS} > ${_RUBYGEMS_MINORS} 192. if !empty(_RUBYGEMS_MINORS) && ${_RUBYGEMS_REQD_MINORS} > ${_RUBYGEMS_MINORS}
183_RUBYGEMS_REQD= YES 193_RUBYGEMS_REQD= YES
184. endif 194. endif
185. endif 195. endif
@@ -234,31 +244,30 @@ PLIST_SUBST+= GEM_DOCDIR=${GEM_DOCDIR} @@ -234,31 +244,30 @@ PLIST_SUBST+= GEM_DOCDIR=${GEM_DOCDIR}
234### 244###
235### The gem-extract target extracts a standard gem file. It is an 245### The gem-extract target extracts a standard gem file. It is an
236### automatic dependency for the post-extract target so it doesn't 246### automatic dependency for the post-extract target so it doesn't
237### disturb the usual do-extract actions. 247### disturb the usual do-extract actions.
238### 248###
239GEM_SPECFILE?= ${WRKDIR}/${DISTNAME}.gemspec 249GEM_SPECFILE?= ${WRKDIR}/${DISTNAME}.gemspec
240 250
241.PHONY: gem-extract 251.PHONY: gem-extract
242post-extract: gem-extract 252post-extract: gem-extract
243.if !target(gem-extract) 253.if !target(gem-extract)
244gem-extract: fake-home 254gem-extract: fake-home
245. for _gem_ in ${DISTFILES:M*.gem} 255. for _gem_ in ${DISTFILES:M*.gem}
246 ${RUN} cd ${WRKDIR} && ${SETENV} ${MAKE_ENV} ${RUBYGEM_ENV} \ 256 ${RUN} cd ${WRKDIR} && ${SETENV} ${MAKE_ENV} ${RUBYGEM_ENV} \
247 ${RUBYGEM} unpack ${RUBYGEM_INSTALL_ROOT_OPTION} \ 257 ${RUBYGEM} unpack ${_DISTDIR:Q}${_gem_:Q}
248 ${_DISTDIR:Q}/${_gem_:Q} 
249 ${RUN} cd ${WRKDIR} && \ 258 ${RUN} cd ${WRKDIR} && \
250 ${SETENV} ${MAKE_ENV} TZ=UTC ${RUBYGEM_ENV} \ 259 ${SETENV} ${MAKE_ENV} TZ=UTC ${RUBYGEM_ENV} \
251 ${RUBYGEM} spec ${_DISTDIR:Q}/${_gem_:Q} > ${_gem_}spec 260 ${RUBYGEM} spec --ruby ${_DISTDIR:Q}${_gem_:Q} > ${_gem_}spec
252. endfor 261. endfor
253.endif 262.endif
254 263
255### 264###
256### gem-build 265### gem-build
257### 266###
258### The gem-build target builds a new local gem from the extracted gem's 267### The gem-build target builds a new local gem from the extracted gem's
259### contents. The new gem as created as ${WRKSRC}/${GEM_NAME}.gem. 268### contents. The new gem as created as ${WRKSRC}/${GEM_NAME}.gem.
260### The local gem is then installed into a special build root under 269### The local gem is then installed into a special build root under
261### ${WRKDIR} (${RUBYGEM_INSTALL_ROOT}), possibly compiling any extensions. 270### ${WRKDIR} (${RUBYGEM_INSTALL_ROOT}), possibly compiling any extensions.
262### 271###
263GEM_CLEANBUILD?= ext/* 272GEM_CLEANBUILD?= ext/*
264 273
@@ -311,27 +320,27 @@ _RUBYGEM_OPTIONS+= --no-ri @@ -311,27 +320,27 @@ _RUBYGEM_OPTIONS+= --no-ri
311.if !empty(RUBY_BUILD_RDOC:M[nN][oO]) 320.if !empty(RUBY_BUILD_RDOC:M[nN][oO])
312_RUBYGEM_OPTIONS+= --no-rdoc 321_RUBYGEM_OPTIONS+= --no-rdoc
313.endif 322.endif
314.if !empty(CONFIGURE_ARGS) 323.if !empty(CONFIGURE_ARGS)
315_RUBYGEM_OPTIONS+= -- --build-args ${CONFIGURE_ARGS} 324_RUBYGEM_OPTIONS+= -- --build-args ${CONFIGURE_ARGS}
316.endif 325.endif
317 326
318RUBYGEM_INSTALL_ROOT_OPTION= --install-root ${RUBYGEM_INSTALL_ROOT} 327RUBYGEM_INSTALL_ROOT_OPTION= --install-root ${RUBYGEM_INSTALL_ROOT}
319 328
320.PHONY: _gem-build-install-root 329.PHONY: _gem-build-install-root
321_gem-build-install-root: 330_gem-build-install-root:
322 @${STEP_MSG} "Installing gem into installation root" 331 @${STEP_MSG} "Installing gem into installation root"
323 ${RUN} ${SETENV} ${MAKE_ENV} ${RUBYGEM_ENV} \ 332 ${RUN} ${SETENV} ${MAKE_ENV} ${RUBYGEM_ENV} \
324 ${RUBYGEM} install ${RUBYGEM_OPTIONS} ${_RUBYGEM_OPTIONS} 333 ${RUBYGEM} install --backtrace ${RUBYGEM_OPTIONS} ${_RUBYGEM_OPTIONS}
325 334
326# The ``gem'' command doesn't exit with a non-zero result even if the 335# The ``gem'' command doesn't exit with a non-zero result even if the
327# install of the gem failed, so we do the check and return the proper exit 336# install of the gem failed, so we do the check and return the proper exit
328# code ourselves. 337# code ourselves.
329# 338#
330.PHONY: _gem-build-install-root-check 339.PHONY: _gem-build-install-root-check
331_gem-build-install-root-check: 340_gem-build-install-root-check:
332 ${RUN} ${TEST} -f ${RUBYGEM_INSTALL_ROOT}${PREFIX}/${GEM_CACHEDIR}/${GEM_NAME}.gem || \ 341 ${RUN} ${TEST} -f ${RUBYGEM_INSTALL_ROOT}${PREFIX}/${GEM_CACHEDIR}/${GEM_NAME}.gem || \
333 ${FAIL_MSG} "Installing ${GEM_NAME}.gem into installation root failed." 342 ${FAIL_MSG} "Installing ${GEM_NAME}.gem into installation root failed."
334 343
335.if !empty(GEM_CLEANBUILD) 344.if !empty(GEM_CLEANBUILD)
336.PHONY: _gem-build-cleanbuild 345.PHONY: _gem-build-cleanbuild
337_gem-build-cleanbuild: 346_gem-build-cleanbuild:

cvs diff -r1.4 -r1.5 pkgsrc/lang/ruby/files/update-gemspec.rb (expand / switch to unified diff)

--- pkgsrc/lang/ruby/files/update-gemspec.rb 2012/03/02 03:46:09 1.4
+++ pkgsrc/lang/ruby/files/update-gemspec.rb 2013/03/07 16:42:53 1.5
@@ -1,19 +1,19 @@ @@ -1,19 +1,19 @@
1#!/usr/pkg/bin/ruby 1#!/usr/pkg/bin/ruby
2# -*- coding: utf-8 -*- 2# -*- coding: utf-8 -*-
3# 3#
4# $NetBSD: update-gemspec.rb,v 1.4 2012/03/02 03:46:09 taca Exp $ 4# $NetBSD: update-gemspec.rb,v 1.5 2013/03/07 16:42:53 taca Exp $
5# 5#
6# Copyright (c) 2011, 2012 The NetBSD Foundation, Inc. 6# Copyright (c) 2011, 2012, 2013 The NetBSD Foundation, Inc.
7# All rights reserved. 7# All rights reserved.
8# 8#
9# This code is derived from software contributed to The NetBSD Foundation 9# This code is derived from software contributed to The NetBSD Foundation
10# by Takahiro Kambe. 10# by Takahiro Kambe.
11# 11#
12# Redistribution and use in source and binary forms, with or without 12# Redistribution and use in source and binary forms, with or without
13# modification, are permitted provided that the following conditions 13# modification, are permitted provided that the following conditions
14# are met: 14# are met:
15# 15#
16# 1. Redistributions of source code must retain the above copyright 16# 1. Redistributions of source code must retain the above copyright
17# notice, this list of conditions and the following disclaimer. 17# notice, this list of conditions and the following disclaimer.
18# 2. Redistributions in binary form must reproduce the above copyright 18# 2. Redistributions in binary form must reproduce the above copyright
19# notice, this list of conditions and the following disclaimer in the 19# notice, this list of conditions and the following disclaimer in the
@@ -29,135 +29,148 @@ @@ -29,135 +29,148 @@
29# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32# SUCH DAMAGE. 32# SUCH DAMAGE.
33# 33#
34 34
35# 35#
36# This is a quick and dirty tool which updates gemspec file: 36# This is a quick and dirty tool which updates gemspec file:
37# 37#
38require 'rubygems' 38require 'rubygems'
39require 'fileutils' 39require 'fileutils'
40require 'optparse' 40require 'optparse'
41 41
42begin 
43 # Since newer rubygems load psych instead of syck, don't load yaml directly. 
44 Gem.load_yaml 
45rescue NoMethodError 
46 # Older rubygems don't have load_yaml() and don't know about psych. 
47end 
48 
49class GemSpecUpdater 42class GemSpecUpdater
50 OrigSuffix = '.orig_gemspec' 43 OrigSuffix = '.orig_gemspec'
51 44
52 def initialize(file) 45 def initialize(file)
53 @file = file 46 @file = file
54 open(file) { |f| 47 @spec = Gem::Specification.load(@file)
55 @spec = Gem::Specification.from_yaml(f) 
56 } 
57 @requirements = {} 48 @requirements = {}
58 @attr = {} 49 @attr = {}
59 end 50 end
60 51
61 # 52 #
62 # rule should be: 53 # rule should be:
63 # rule ::= [ dependecy_specs ] [ attr_specs ] 54 # rule ::= dependecy_specs | attr_specs
64 # dependency_specs ::= dependency_spec [ dependency_spec ] 55 # dependency_specs ::= dependency_spec [ SPACE dependency_spec ]
65 # dependency_spec ::= name_spec [ dependency ] 56 # dependency_spec ::= name_spec [ dependency ]
66 # name_spec ::= name [ ":" new_name ] 57 # name_spec ::= name [ ":" new_name ]
67 # dependency ::= "pkgsrc's dependecy operator and version string" 58 # dependency ::= <Rubygem's dependecy operator and version string>
68 # command ::= ":" attr_name" attr_operations 59 # attr_specs ::= ":" attr_name attr_operations
69 # attr_operations ::= attr_op [ attr_op ] 60 # attr_operations ::= assign_operation | array_operation
 61 # assign_operation ::= "=" [ new_value ]
 62 # array_operations ::= attr_op [ attr_op ]
70 # attr_op ::= new | old=new | old= 63 # attr_op ::= new | old=new | old=
71 # 64 #
72 def parse_rules(rules) 65 def parse_rules(rules)
73 key = nil 66 key = nil
74 rules.each do |s| 67 rules.each do |s|
75 s.split.each do |ru| 68 s.split.each do |ru|
76 if /^:([a-z_]+)+/ =~ ru 69 if /^:([a-z_]+)=*(\S+)*/ =~ ru
 70 key = $1
 71 var = $2
 72 @attr[key] = var
 73 key = nil
 74 elsif /^:([a-z_]+)+/ =~ ru
77 key = $1 75 key = $1
78 @attr[key] = [] 76 @attr[key] = []
79 elsif not key.nil? 77 elsif not key.nil?
80 @attr[key].push ru 78 @attr[key].push ru unless key.nil?
81 else 79 else
82 if /([a-z0-9_:-]+)([=!><\~][=>]*)(.*)/ =~ ru 80 if /([a-z0-9_:-]+)([=!><\~][=>]*)(.*)/ =~ ru
83 names = $1 81 names = $1
84 op = $2 82 op = $2
85 ver = $3 83 ver = $3
86 r = Gem::Version.new ver 84 r = Gem::Version.new ver
87 name, new_name = names.split(/:/, 2) 85 name, new_name = names.split(/:/, 2)
88 @requirements[name] = { 86 @requirements[name] = {
89 :method => :update, 87 :method => :update,
90 :op => op, 88 :op => op,
91 :version => r, 89 :version => r,
92 :name => new_name 90 :name => new_name
93 } 91 }
94 elsif /([a-z0-9_-]+):$/ =~ ru 92 elsif /([a-z0-9_-]+):$/ =~ ru
95 name = $1 93 name = $1
96 @requirements[name] = { 94 @requirements[name] = {
97 :method => :delete, 95 :method => :delete,
98 } 96 }
99 end 97 end
100 end 98 end
101 end 99 end
102 end 100 end
103 end 101 end
104 102
105 def modify 103 def modify
106 dependencies = @spec.instance_variable_get(:@dependencies) 104 dependencies = @spec.instance_variable_get(:@dependencies)
107 
108 dependencies.each do |dep| 105 dependencies.each do |dep|
109 next if dep.type != :runtime 106 next if dep.type != :runtime
110 update = @requirements[dep.name] 107 update = @requirements[dep.name]
111 if not update.nil? and update[:method] == :update 108 if not update.nil? and update[:method] == :update
112 r = dep.requirement.requirements 109 r = dep.requirement.requirements
113 r[0][0] = update[:op] 110 r[0][0] = update[:op]
114 r[0][1] = update[:version] 111 r[0][1] = update[:version]
115 unless update[:name].nil? 112 unless update[:name].nil?
116 dep.name = update[:name] 113 dep.name = update[:name]
117 end 114 end
118 end 115 end
119 end 116 end
120 dependencies.delete_if { |dep| 117 dependencies.delete_if { |dep|
121 next if dep.type != :runtime 118 next if dep.type != :runtime
122 update = @requirements[dep.name] 119 update = @requirements[dep.name]
123 not update.nil? and update[:method] == :delete 120 not update.nil? and update[:method] == :delete
124 } 121 }
 122
125 @attr.keys.each do |name| 123 @attr.keys.each do |name|
126 av = @spec.instance_variable_get('@' + name) 124 modified = false
127 if av.class == Array 125 av = eval "@spec.#{name}"
 126 if av.class == String
 127 nv = @attr[name]
 128 av = nv
 129 modified = true
 130 elsif av.class == Array
128 operation = @attr[name] 131 operation = @attr[name]
129 operation.each do |op| 132 operation.each do |op|
130 if /^([^=]+)=([^=]+)$/ =~ op 133 if /^([^=]+)=([^=]+)$/ =~ op
131 ov = $1 134 ov = $1
132 nv = $2 135 nv = $2
133 av.delete_if {|a| a == ov} 136 if av.include? ov
134 av.push nv unless av.include? nv 137 av.delete ov
 138 modified = true
 139 end
 140 unless av.include? nv
 141 av.push nv
 142 modified = true
 143 end
135 elsif /^([^=]+)=$/ =~ op 144 elsif /^([^=]+)=$/ =~ op
136 ov = $1 145 ov = $1
137 av.delete_if {|a| a == ov} 146 if av.include? ov
138 else 147 av.delete(ov)
139 av.push op unless av.include? op 148 modified = true
 149 end
140 end 150 end
141 end 151 end
142 end 152 end
 153 if modified
 154 eval "@spec.#{name} = av"
 155 end
143 end 156 end
144 end 157 end
145 158
146 def update 159 def update
147 FileUtils.cp(@file, @file + OrigSuffix, :preserve => true) 160 FileUtils.cp(@file, @file + OrigSuffix, :preserve => true)
148 161
149 open(@file, "w") { |f| 162 open(@file, "w") { |f|
150 f.print YAML.dump(@spec) + "\n" 163 f.print @spec.to_ruby
151 } 164 }
152 end 165 end
153 166
154 def dump_dependency 167 def dump_dependency
155 dependencies = @spec.runtime_dependencies 168 dependencies = @spec.runtime_dependencies
156 169
157 dependencies.each do |dep| 170 dependencies.each do |dep|
158 puts "#{dep.name} #{dep.requirement}" 171 puts "#{dep.name} #{dep.requirement}"
159 end 172 end
160 end 173 end
161end 174end
162 175
163def usage(status) 176def usage(status)