bundler 1.3.0.pre.7 → 1.3.0.pre.8
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of bundler might be problematic. Click here for more details.
- data/.rspec +1 -1
- data/.travis.yml +5 -0
- data/CHANGELOG.md +47 -0
- data/CONTRIBUTE.md +1 -2
- data/CONTRIBUTING.md +1 -1
- data/{LICENSE → LICENSE.md} +1 -1
- data/Rakefile +16 -13
- data/bundler.gemspec +20 -24
- data/lib/bundler.rb +6 -6
- data/lib/bundler/cli.rb +48 -11
- data/lib/bundler/deployment.rb +2 -1
- data/lib/bundler/deprecate.rb +1 -1
- data/lib/bundler/dsl.rb +4 -1
- data/lib/bundler/env.rb +1 -1
- data/lib/bundler/fetcher.rb +85 -57
- data/lib/bundler/friendly_errors.rb +0 -12
- data/lib/bundler/index.rb +2 -2
- data/lib/bundler/injector.rb +1 -1
- data/lib/bundler/installer.rb +7 -3
- data/lib/bundler/resolver.rb +17 -0
- data/lib/bundler/rubygems_ext.rb +4 -3
- data/lib/bundler/rubygems_integration.rb +38 -19
- data/lib/bundler/runtime.rb +9 -3
- data/lib/bundler/source/git.rb +20 -12
- data/lib/bundler/source/git/git_proxy.rb +1 -0
- data/lib/bundler/source/path/installer.rb +1 -1
- data/lib/bundler/source/rubygems.rb +25 -31
- data/lib/bundler/templates/newgem/.travis.yml.tt +3 -0
- data/lib/bundler/templates/newgem/LICENSE.txt.tt +1 -1
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +17 -16
- data/lib/bundler/templates/newgem/test/test_newgem.rb.tt +1 -1
- data/lib/bundler/ui.rb +3 -2
- data/lib/bundler/vendor/net/http/persistent.rb +743 -91
- data/lib/bundler/vendor/net/http/persistent/ssl_reuse.rb +129 -0
- data/lib/bundler/vendored_persistent.rb +11 -0
- data/lib/bundler/version.rb +1 -1
- data/lib/bundler/vlad.rb +1 -1
- data/man/bundle-config.ronn +3 -2
- data/man/bundle-install.ronn +19 -4
- data/man/bundle-package.ronn +1 -1
- data/man/bundle-platform.ronn +1 -1
- data/man/bundle-update.ronn +5 -5
- data/man/gemfile.5.ronn +1 -1
- data/spec/bundler/bundler_spec.rb +26 -0
- data/spec/cache/git_spec.rb +1 -1
- data/spec/install/gems/dependency_api_spec.rb +12 -23
- data/spec/install/gems/flex_spec.rb +1 -0
- data/spec/install/gems/groups_spec.rb +0 -19
- data/spec/install/gems/simple_case_spec.rb +4 -1
- data/spec/install/gems/sudo_spec.rb +11 -15
- data/spec/install/git_spec.rb +17 -0
- data/spec/install/security_policy_spec.rb +78 -0
- data/spec/other/licenses_spec.rb +18 -0
- data/spec/other/newgem_spec.rb +36 -0
- data/spec/other/outdated_spec.rb +10 -2
- data/spec/other/show_spec.rb +6 -1
- data/spec/realworld/dependency_api_spec.rb +2 -2
- data/spec/realworld/edgecases_spec.rb +3 -3
- data/spec/resolver/basic_spec.rb +7 -1
- data/spec/resolver/platform_spec.rb +1 -1
- data/spec/runtime/executable_spec.rb +2 -2
- data/spec/runtime/setup_spec.rb +14 -1
- data/spec/support/artifice/endpoint.rb +2 -0
- data/spec/support/builders.rb +74 -1
- data/spec/support/fakeweb/windows.rb +1 -1
- data/spec/support/indexes.rb +22 -0
- data/spec/support/path.rb +4 -0
- data/spec/support/rubygems_ext.rb +1 -0
- metadata +63 -83
@@ -12,18 +12,6 @@ module Bundler
|
|
12
12
|
exit 1
|
13
13
|
rescue SystemExit => e
|
14
14
|
exit e.status
|
15
|
-
rescue LoadError => e
|
16
|
-
case e.message
|
17
|
-
when /cannot load such file -- openssl/, /openssl.so/, /libcrypto.so/
|
18
|
-
Bundler.ui.error "\nCould not load OpenSSL."
|
19
|
-
Bundler.ui.warn "You must recompile Ruby with OpenSSL support or change the sources in your" \
|
20
|
-
"\nGemfile from 'https' to 'http'. Instructions for compiling with OpenSSL" \
|
21
|
-
"\nusing RVM are available at rvm.io/packages/openssl."
|
22
|
-
Bundler.ui.trace e
|
23
|
-
exit 1
|
24
|
-
else
|
25
|
-
raise e
|
26
|
-
end
|
27
15
|
rescue Exception => e
|
28
16
|
Bundler.ui.error(
|
29
17
|
"Unfortunately, a fatal error has occurred. Please see the Bundler \n" \
|
data/lib/bundler/index.rb
CHANGED
@@ -31,7 +31,7 @@ module Bundler
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def inspect
|
34
|
-
"
|
34
|
+
"#<#{self.class}:0x#{object_id} sources=#{sources.map{|s| s.inspect}} specs.size=#{specs.size}>"
|
35
35
|
end
|
36
36
|
|
37
37
|
def empty?
|
@@ -95,7 +95,7 @@ module Bundler
|
|
95
95
|
s.dependencies.map{|d| d.name }
|
96
96
|
end
|
97
97
|
end.flatten.uniq
|
98
|
-
dependency_names.select{|name| specs_by_name(name).empty? }
|
98
|
+
dependency_names.select{|name| name != 'bundler' && specs_by_name(name).empty? }
|
99
99
|
end
|
100
100
|
|
101
101
|
def use(other, override_dupes = false)
|
data/lib/bundler/injector.rb
CHANGED
data/lib/bundler/installer.rb
CHANGED
@@ -66,11 +66,13 @@ module Bundler
|
|
66
66
|
end
|
67
67
|
|
68
68
|
if Bundler.default_lockfile.exist? && !options["update"]
|
69
|
+
real_ui, Bundler.ui = Bundler.ui, Bundler::UI.new
|
69
70
|
begin
|
70
71
|
tmpdef = Definition.build(Bundler.default_gemfile, Bundler.default_lockfile, nil)
|
71
72
|
local = true unless tmpdef.new_platform? || tmpdef.missing_specs.any?
|
72
73
|
rescue BundlerError
|
73
74
|
end
|
75
|
+
Bundler.ui = real_ui
|
74
76
|
end
|
75
77
|
|
76
78
|
# Since we are installing, we can resolve the definition
|
@@ -107,14 +109,16 @@ module Bundler
|
|
107
109
|
|
108
110
|
# newline comes after installing, some gems say "with native extensions"
|
109
111
|
Bundler.ui.info ""
|
110
|
-
if Bundler.settings[:bin]
|
111
|
-
|
112
|
+
if Bundler.settings[:bin] && standalone
|
113
|
+
generate_standalone_bundler_executable_stubs(spec)
|
114
|
+
elsif Bundler.settings[:bin]
|
115
|
+
generate_bundler_executable_stubs(spec, :force => true)
|
112
116
|
end
|
113
117
|
|
114
118
|
FileUtils.rm_rf(Bundler.tmp)
|
115
119
|
rescue Exception => e
|
116
120
|
# install hook failed
|
117
|
-
raise e if e.is_a?(Bundler::InstallHookError)
|
121
|
+
raise e if e.is_a?(Bundler::InstallHookError) || e.is_a?(Bundler::SecurityError)
|
118
122
|
|
119
123
|
# other failure, likely a native extension build failure
|
120
124
|
Bundler.ui.info ""
|
data/lib/bundler/resolver.rb
CHANGED
@@ -122,6 +122,7 @@ module Bundler
|
|
122
122
|
# <GemBundle>,nil:: If the list of dependencies can be resolved, a
|
123
123
|
# collection of gemspecs is returned. Otherwise, nil is returned.
|
124
124
|
def self.resolve(requirements, index, source_requirements = {}, base = [])
|
125
|
+
Bundler.ui.info "Resolving dependencies..."
|
125
126
|
base = SpecSet.new(base) unless base.is_a?(SpecSet)
|
126
127
|
resolver = new(index, source_requirements, base)
|
127
128
|
result = catch(:success) do
|
@@ -295,6 +296,22 @@ module Bundler
|
|
295
296
|
conflict = resolve_requirement(spec_group, current, reqs.dup, activated.dup)
|
296
297
|
conflicts << conflict if conflict
|
297
298
|
end
|
299
|
+
|
300
|
+
# We throw the conflict up the dependency chain if it has not been
|
301
|
+
# resolved (in @errors), thus avoiding branches of the tree that have no effect
|
302
|
+
# on this conflict. Note that if the tree has multiple conflicts, we don't
|
303
|
+
# care which one we throw, as long as we get out safe
|
304
|
+
if !current.required_by.empty? && !conflicts.empty?
|
305
|
+
@errors.reverse_each do |name, pair|
|
306
|
+
if conflicts.include?(name)
|
307
|
+
# Choose the closest pivot in the stack that will affect the conflict
|
308
|
+
errorpivot = (@stack & [name, current.required_by.last.name]).last
|
309
|
+
debug { " -> Jumping to: #{errorpivot}" }
|
310
|
+
throw errorpivot, name
|
311
|
+
end
|
312
|
+
end
|
313
|
+
end
|
314
|
+
|
298
315
|
# If the current requirement is a root level gem and we have conflicts, we
|
299
316
|
# can figure out the best spot to backtrack to.
|
300
317
|
if current.required_by.empty? && !conflicts.empty?
|
data/lib/bundler/rubygems_ext.rb
CHANGED
@@ -133,15 +133,16 @@ module Gem
|
|
133
133
|
end
|
134
134
|
|
135
135
|
class Platform
|
136
|
-
JAVA = Gem::Platform.new('java')
|
137
|
-
MSWIN = Gem::Platform.new('mswin32')
|
138
|
-
MINGW = Gem::Platform.new('x86-mingw32')
|
136
|
+
JAVA = Gem::Platform.new('java') unless defined?(JAVA)
|
137
|
+
MSWIN = Gem::Platform.new('mswin32') unless defined?(MSWIN)
|
138
|
+
MINGW = Gem::Platform.new('x86-mingw32') unless defined?(MINGW)
|
139
139
|
|
140
140
|
undef_method :hash if method_defined? :hash
|
141
141
|
def hash
|
142
142
|
@cpu.hash ^ @os.hash ^ @version.hash
|
143
143
|
end
|
144
144
|
|
145
|
+
undef_method :eql? if method_defined? :eql?
|
145
146
|
alias eql? ==
|
146
147
|
end
|
147
148
|
end
|
@@ -1,4 +1,7 @@
|
|
1
1
|
require 'rubygems'
|
2
|
+
# rubygems master requires UI for ConfigFile but doesn't require it
|
3
|
+
require 'rubygems/user_interaction'
|
4
|
+
require 'rubygems/config_file'
|
2
5
|
|
3
6
|
module Bundler
|
4
7
|
class RubygemsIntegration
|
@@ -98,21 +101,22 @@ module Bundler
|
|
98
101
|
end
|
99
102
|
|
100
103
|
def fetch_specs(all, pre, &blk)
|
101
|
-
Gem::SpecFetcher.new.list(all, pre)
|
104
|
+
specs = Gem::SpecFetcher.new.list(all, pre)
|
105
|
+
specs.each { yield } if block_given?
|
106
|
+
specs
|
107
|
+
end
|
108
|
+
|
109
|
+
def fetch_prerelease_specs
|
110
|
+
fetch_specs(false, true)
|
111
|
+
rescue Gem::RemoteFetcher::FetchError
|
112
|
+
[] # if we can't download them, there aren't any
|
102
113
|
end
|
103
114
|
|
104
115
|
def fetch_all_remote_specs
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
# Then fetch the prerelease specs
|
110
|
-
begin
|
111
|
-
Gem::SpecFetcher.new.list(false, true).each {|k, v| spec_list[k] += v }
|
112
|
-
rescue Gem::RemoteFetcher::FetchError
|
113
|
-
# ignore if we can't fetch the prerelease specs
|
114
|
-
end
|
115
|
-
end
|
116
|
+
# Fetch all specs, minus prerelease specs
|
117
|
+
spec_list = fetch_specs(true, false)
|
118
|
+
# Then fetch the prerelease specs
|
119
|
+
fetch_prerelease_specs.each {|k, v| spec_list[k] += v }
|
116
120
|
|
117
121
|
return spec_list
|
118
122
|
end
|
@@ -127,11 +131,26 @@ module Bundler
|
|
127
131
|
end
|
128
132
|
end
|
129
133
|
|
130
|
-
def
|
134
|
+
def gem_from_path(path, policy = nil)
|
131
135
|
require 'rubygems/format'
|
132
|
-
Gem::Format.from_file_by_path(path)
|
136
|
+
Gem::Format.from_file_by_path(path, policy)
|
137
|
+
end
|
138
|
+
|
139
|
+
def spec_from_gem(path, policy = nil)
|
140
|
+
require 'rubygems/security'
|
141
|
+
gem_from_path(path, Gem::Security::Policies[policy]).spec
|
133
142
|
rescue Gem::Package::FormatError
|
134
|
-
raise
|
143
|
+
raise GemspecError, "Could not read gem at #{path}. It may be corrupted."
|
144
|
+
rescue Exception, Gem::Exception, Gem::Security::Exception => e
|
145
|
+
if e.is_a?(Gem::Security::Exception) ||
|
146
|
+
e.message =~ /unknown trust policy|unsigned gem/i ||
|
147
|
+
e.message =~ /couldn't verify (meta)?data signature/i
|
148
|
+
raise SecurityError,
|
149
|
+
"The gem #{File.basename(path, '.gem')} can't be installed because " \
|
150
|
+
"the security policy didn't allow it, with the message: #{e.message}"
|
151
|
+
else
|
152
|
+
raise e
|
153
|
+
end
|
135
154
|
end
|
136
155
|
|
137
156
|
def build(spec)
|
@@ -440,10 +459,10 @@ module Bundler
|
|
440
459
|
hash
|
441
460
|
end
|
442
461
|
|
443
|
-
def
|
444
|
-
Gem::Package.new(path)
|
445
|
-
|
446
|
-
|
462
|
+
def gem_from_path(path, policy = nil)
|
463
|
+
p = Gem::Package.new(path)
|
464
|
+
p.security_policy = policy if policy
|
465
|
+
return p
|
447
466
|
end
|
448
467
|
|
449
468
|
def build(spec)
|
data/lib/bundler/runtime.rb
CHANGED
@@ -5,6 +5,8 @@ module Bundler
|
|
5
5
|
include SharedHelpers
|
6
6
|
|
7
7
|
def setup(*groups)
|
8
|
+
groups.map! { |g| g.to_sym }
|
9
|
+
|
8
10
|
# Has to happen first
|
9
11
|
clean_load_path
|
10
12
|
|
@@ -78,7 +80,7 @@ module Bundler
|
|
78
80
|
rescue LoadError
|
79
81
|
REGEXPS.find { |r| r =~ e.message }
|
80
82
|
regex_name = $1
|
81
|
-
raise if dep.autorequire || (regex_name && regex_name.gsub('-', '/') != namespaced_file)
|
83
|
+
raise e if dep.autorequire || (regex_name && regex_name.gsub('-', '/') != namespaced_file)
|
82
84
|
raise e if regex_name.nil?
|
83
85
|
end
|
84
86
|
end
|
@@ -218,8 +220,12 @@ module Bundler
|
|
218
220
|
# Set RUBYOPT
|
219
221
|
rubyopt = [ENV["RUBYOPT"]].compact
|
220
222
|
if rubyopt.empty? || rubyopt.first !~ /-rbundler\/setup/
|
221
|
-
rubyopt.unshift
|
222
|
-
|
223
|
+
rubyopt.unshift %|-rbundler/setup|
|
224
|
+
if Bundler::WINDOWS
|
225
|
+
rubyopt.unshift %|"-I#{File.expand_path('../..', __FILE__)}"|
|
226
|
+
else
|
227
|
+
rubyopt.unshift %|-I#{File.expand_path('../..', __FILE__)}|
|
228
|
+
end
|
223
229
|
ENV["RUBYOPT"] = rubyopt.join(' ')
|
224
230
|
end
|
225
231
|
end
|
data/lib/bundler/source/git.rb
CHANGED
@@ -27,8 +27,7 @@ module Bundler
|
|
27
27
|
@name = options["name"]
|
28
28
|
@version = options["version"]
|
29
29
|
|
30
|
-
@
|
31
|
-
@installed = nil
|
30
|
+
@copied = false
|
32
31
|
@local = false
|
33
32
|
end
|
34
33
|
|
@@ -140,10 +139,11 @@ module Bundler
|
|
140
139
|
set_local!(app_cache_path)
|
141
140
|
end
|
142
141
|
|
143
|
-
if requires_checkout? && !@
|
142
|
+
if requires_checkout? && !@copied
|
144
143
|
git_proxy.checkout
|
145
144
|
git_proxy.copy_to(install_path, submodules)
|
146
|
-
|
145
|
+
serialize_gemspecs_in(install_path)
|
146
|
+
@copied = true
|
147
147
|
end
|
148
148
|
|
149
149
|
local_specs
|
@@ -151,10 +151,11 @@ module Bundler
|
|
151
151
|
|
152
152
|
def install(spec)
|
153
153
|
Bundler.ui.info "Using #{spec.name} (#{spec.version}) from #{to_s} "
|
154
|
-
if requires_checkout? && !@
|
154
|
+
if requires_checkout? && !@copied
|
155
155
|
Bundler.ui.debug " * Checking out revision: #{ref}"
|
156
156
|
git_proxy.copy_to(install_path, submodules)
|
157
|
-
|
157
|
+
serialize_gemspecs_in(install_path)
|
158
|
+
@copied = true
|
158
159
|
end
|
159
160
|
generate_bin(spec)
|
160
161
|
end
|
@@ -166,11 +167,7 @@ module Bundler
|
|
166
167
|
FileUtils.rm_rf(app_cache_path)
|
167
168
|
git_proxy.checkout if requires_checkout?
|
168
169
|
git_proxy.copy_to(app_cache_path, @submodules)
|
169
|
-
|
170
|
-
# in git might require git or other dependencies.
|
171
|
-
# The gemspecs we cache should already be evaluated.
|
172
|
-
spec_path = app_cache_path.join(File.basename(spec.loaded_from))
|
173
|
-
File.open(spec_path, 'wb') {|file| file.print spec.to_ruby }
|
170
|
+
serialize_gemspecs_in(app_cache_path)
|
174
171
|
end
|
175
172
|
|
176
173
|
def load_spec_files
|
@@ -201,6 +198,18 @@ module Bundler
|
|
201
198
|
|
202
199
|
private
|
203
200
|
|
201
|
+
def serialize_gemspecs_in(destination)
|
202
|
+
expanded_path = destination.expand_path(Bundler.root)
|
203
|
+
Dir["#{expanded_path}/#{@glob}"].each do |spec_path|
|
204
|
+
# Evaluate gemspecs and cache the result. Gemspecs
|
205
|
+
# in git might require git or other dependencies.
|
206
|
+
# The gemspecs we cache should already be evaluated.
|
207
|
+
spec = Bundler.load_gemspec(spec_path)
|
208
|
+
next unless spec
|
209
|
+
File.open(spec_path, 'wb') {|file| file.write(spec.to_ruby) }
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
204
213
|
def set_local!(path)
|
205
214
|
@local = true
|
206
215
|
@local_specs = @git_proxy = nil
|
@@ -261,7 +270,6 @@ module Bundler
|
|
261
270
|
|
262
271
|
def git_proxy
|
263
272
|
@git_proxy ||= GitProxy.new(cache_path, uri, ref, cached_revision){ allow_git_ops? }
|
264
|
-
|
265
273
|
end
|
266
274
|
|
267
275
|
end
|
@@ -6,7 +6,7 @@ module Bundler
|
|
6
6
|
module Source
|
7
7
|
# TODO: Refactor this class
|
8
8
|
class Rubygems
|
9
|
-
|
9
|
+
API_REQUEST_LIMIT = 100 # threshold for switching back to the modern index instead of fetching every spec
|
10
10
|
|
11
11
|
attr_reader :remotes, :caches
|
12
12
|
attr_accessor :dependency_names
|
@@ -216,41 +216,35 @@ module Bundler
|
|
216
216
|
|
217
217
|
def remote_specs
|
218
218
|
@remote_specs ||= begin
|
219
|
-
|
220
|
-
|
219
|
+
old = Bundler.rubygems.sources
|
220
|
+
idx = Index.new
|
221
221
|
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
specs = fetcher.specs(dependency_names, self)
|
226
|
-
sources[fetcher] = specs.size
|
222
|
+
fetchers = remotes.map { |uri| Bundler::Fetcher.new(uri) }
|
223
|
+
api_fetchers = fetchers.select { |f| f.use_api }
|
224
|
+
index_fetchers = fetchers - api_fetchers
|
227
225
|
|
228
|
-
|
229
|
-
|
226
|
+
# gather lists from non-api sites
|
227
|
+
index_fetchers.each { |f| idx.use f.specs(nil, self) }
|
228
|
+
return idx if api_fetchers.empty?
|
229
|
+
|
230
|
+
# because ensuring we have all the gems we need involves downloading
|
231
|
+
# the gemspecs of those gems, if the non-api sites contain more than
|
232
|
+
# about 100 gems, we just treat all sites as non-api for speed.
|
233
|
+
if idx.size < API_REQUEST_LIMIT && dependency_names.size < API_REQUEST_LIMIT
|
234
|
+
api_fetchers.each { |f| idx.use f.specs(dependency_names, self) }
|
230
235
|
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
# this will fetch all the specifications on the rubygems repo
|
239
|
-
unmet_dependency_names = idx.unmet_dependency_names
|
240
|
-
unmet_dependency_names -= ['bundler'] # bundler will always be unmet
|
241
|
-
|
242
|
-
Bundler.ui.debug "Unmet Dependencies: #{unmet_dependency_names}"
|
243
|
-
if unmet_dependency_names.any?
|
244
|
-
api_fetchers.each do |fetcher|
|
245
|
-
idx.use fetcher.specs(unmet_dependency_names, self)
|
246
|
-
end
|
247
|
-
end
|
236
|
+
# it's possible that gems from one source depend on gems from some
|
237
|
+
# other source, so now we download gemspecs and iterate over those
|
238
|
+
# dependencies, looking for gems we don't have info on yet.
|
239
|
+
unmet = idx.unmet_dependency_names
|
240
|
+
|
241
|
+
# if there are any cross-site gems we missed, get them now
|
242
|
+
api_fetchers.each { |f| idx.use f.specs(unmet, self) } if unmet.any?
|
248
243
|
else
|
249
|
-
|
250
|
-
api_fetchers.each {|fetcher| idx.use fetcher.specs([], self) }
|
244
|
+
api_fetchers.each { |f| idx.use f.specs(nil, self) }
|
251
245
|
end
|
252
246
|
|
253
|
-
idx
|
247
|
+
return idx
|
254
248
|
ensure
|
255
249
|
Bundler.rubygems.sources = old
|
256
250
|
end
|
@@ -258,4 +252,4 @@ module Bundler
|
|
258
252
|
end
|
259
253
|
|
260
254
|
end
|
261
|
-
end
|
255
|
+
end
|
@@ -19,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
19
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
20
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
21
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -1,25 +1,26 @@
|
|
1
|
-
#
|
1
|
+
# coding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
4
|
require '<%=config[:namespaced_path]%>/version'
|
5
5
|
|
6
|
-
Gem::Specification.new do |
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = <%=config[:name].inspect%>
|
8
|
+
spec.version = <%=config[:constant_name]%>::VERSION
|
9
|
+
spec.authors = [<%=config[:author].inspect%>]
|
10
|
+
spec.email = [<%=config[:email].inspect%>]
|
11
|
+
spec.description = %q{TODO: Write a gem description}
|
12
|
+
spec.summary = %q{TODO: Write a gem summary}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
|
21
|
+
spec.add_development_dependency "bundler", "~> <%= Bundler::VERSION.split(".")[0..1].join(".") %>"
|
22
|
+
spec.add_development_dependency "rake"
|
22
23
|
<% if config[:test] -%>
|
23
|
-
|
24
|
+
spec.add_development_dependency "<%=config[:test]%>"
|
24
25
|
<% end -%>
|
25
26
|
end
|