bundler 2.2.17 → 2.2.22

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.

Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +70 -0
  3. data/bundler.gemspec +2 -3
  4. data/lib/bundler.rb +2 -1
  5. data/lib/bundler/build_metadata.rb +2 -2
  6. data/lib/bundler/cli.rb +13 -33
  7. data/lib/bundler/cli/check.rb +4 -2
  8. data/lib/bundler/cli/doctor.rb +11 -1
  9. data/lib/bundler/cli/install.rb +7 -8
  10. data/lib/bundler/cli/lock.rb +5 -1
  11. data/lib/bundler/cli/outdated.rb +9 -10
  12. data/lib/bundler/cli/update.rb +8 -3
  13. data/lib/bundler/current_ruby.rb +4 -4
  14. data/lib/bundler/definition.rb +38 -127
  15. data/lib/bundler/dsl.rb +3 -11
  16. data/lib/bundler/feature_flag.rb +0 -3
  17. data/lib/bundler/fetcher/compact_index.rb +1 -1
  18. data/lib/bundler/fetcher/downloader.rb +1 -2
  19. data/lib/bundler/fetcher/index.rb +0 -1
  20. data/lib/bundler/friendly_errors.rb +2 -4
  21. data/lib/bundler/index.rb +1 -2
  22. data/lib/bundler/installer.rb +5 -12
  23. data/lib/bundler/lockfile_parser.rb +2 -20
  24. data/lib/bundler/man/bundle-add.1 +1 -1
  25. data/lib/bundler/man/bundle-binstubs.1 +1 -1
  26. data/lib/bundler/man/bundle-cache.1 +1 -1
  27. data/lib/bundler/man/bundle-check.1 +1 -1
  28. data/lib/bundler/man/bundle-clean.1 +1 -1
  29. data/lib/bundler/man/bundle-config.1 +1 -10
  30. data/lib/bundler/man/bundle-config.1.ronn +0 -11
  31. data/lib/bundler/man/bundle-doctor.1 +1 -1
  32. data/lib/bundler/man/bundle-exec.1 +1 -1
  33. data/lib/bundler/man/bundle-gem.1 +1 -1
  34. data/lib/bundler/man/bundle-info.1 +1 -1
  35. data/lib/bundler/man/bundle-init.1 +1 -1
  36. data/lib/bundler/man/bundle-inject.1 +1 -1
  37. data/lib/bundler/man/bundle-install.1 +1 -1
  38. data/lib/bundler/man/bundle-list.1 +1 -1
  39. data/lib/bundler/man/bundle-lock.1 +1 -1
  40. data/lib/bundler/man/bundle-open.1 +1 -1
  41. data/lib/bundler/man/bundle-outdated.1 +1 -1
  42. data/lib/bundler/man/bundle-platform.1 +1 -1
  43. data/lib/bundler/man/bundle-pristine.1 +1 -1
  44. data/lib/bundler/man/bundle-remove.1 +1 -1
  45. data/lib/bundler/man/bundle-show.1 +1 -1
  46. data/lib/bundler/man/bundle-update.1 +4 -4
  47. data/lib/bundler/man/bundle-update.1.ronn +3 -3
  48. data/lib/bundler/man/bundle-viz.1 +1 -1
  49. data/lib/bundler/man/bundle.1 +1 -1
  50. data/lib/bundler/man/gemfile.5 +1 -1
  51. data/lib/bundler/plugin/api/source.rb +14 -0
  52. data/lib/bundler/plugin/installer.rb +1 -1
  53. data/lib/bundler/resolver.rb +15 -96
  54. data/lib/bundler/resolver/spec_group.rb +0 -24
  55. data/lib/bundler/rubygems_ext.rb +2 -2
  56. data/lib/bundler/rubygems_integration.rb +4 -3
  57. data/lib/bundler/settings.rb +21 -4
  58. data/lib/bundler/source.rb +11 -0
  59. data/lib/bundler/source/rubygems.rb +22 -22
  60. data/lib/bundler/source/rubygems_aggregate.rb +64 -0
  61. data/lib/bundler/source_list.rb +69 -27
  62. data/lib/bundler/source_map.rb +58 -0
  63. data/lib/bundler/spec_set.rb +2 -6
  64. data/lib/bundler/templates/newgem/newgem.gemspec.tt +2 -2
  65. data/lib/bundler/version.rb +1 -1
  66. metadata +5 -3
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-OUTDATED" "1" "April 2021" "" ""
4
+ .TH "BUNDLE\-OUTDATED" "1" "June 2021" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-outdated\fR \- List installed gems with newer versions available
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-PLATFORM" "1" "April 2021" "" ""
4
+ .TH "BUNDLE\-PLATFORM" "1" "June 2021" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-platform\fR \- Displays platform compatibility information
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-PRISTINE" "1" "April 2021" "" ""
4
+ .TH "BUNDLE\-PRISTINE" "1" "June 2021" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-pristine\fR \- Restores installed gems to their pristine condition
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-REMOVE" "1" "April 2021" "" ""
4
+ .TH "BUNDLE\-REMOVE" "1" "June 2021" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-remove\fR \- Removes gems from the Gemfile
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-SHOW" "1" "April 2021" "" ""
4
+ .TH "BUNDLE\-SHOW" "1" "June 2021" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-show\fR \- Shows all the gems in your bundle, or the path to a gem
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-UPDATE" "1" "April 2021" "" ""
4
+ .TH "BUNDLE\-UPDATE" "1" "June 2021" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-update\fR \- Update your gems to the latest available versions
@@ -79,7 +79,7 @@ Do not allow any gem to be updated past latest \fB\-\-patch\fR | \fB\-\-minor\fR
79
79
  .
80
80
  .TP
81
81
  \fB\-\-conservative\fR
82
- Use bundle install conservative update behavior and do not allow shared dependencies to be updated\.
82
+ Use bundle install conservative update behavior and do not allow indirect dependencies to be updated\.
83
83
  .
84
84
  .SH "UPDATING ALL GEMS"
85
85
  If you run \fBbundle update \-\-all\fR, bundler will ignore any previously installed gems and resolve all dependencies again based on the latest versions of all gems available in the sources\.
@@ -208,13 +208,13 @@ In this case, the two gems have their own set of dependencies, but they share \f
208
208
  In short, by default, when you update a gem using \fBbundle update\fR, bundler will update all dependencies of that gem, including those that are also dependencies of another gem\.
209
209
  .
210
210
  .P
211
- To prevent updating shared dependencies, prior to version 1\.14 the only option was the \fBCONSERVATIVE UPDATING\fR behavior in bundle install(1) \fIbundle\-install\.1\.html\fR:
211
+ To prevent updating indirect dependencies, prior to version 1\.14 the only option was the \fBCONSERVATIVE UPDATING\fR behavior in bundle install(1) \fIbundle\-install\.1\.html\fR:
212
212
  .
213
213
  .P
214
214
  In this scenario, updating the \fBthin\fR version manually in the Gemfile(5), and then running bundle install(1) \fIbundle\-install\.1\.html\fR will only update \fBdaemons\fR and \fBeventmachine\fR, but not \fBrack\fR\. For more information, see the \fBCONSERVATIVE UPDATING\fR section of bundle install(1) \fIbundle\-install\.1\.html\fR\.
215
215
  .
216
216
  .P
217
- Starting with 1\.14, specifying the \fB\-\-conservative\fR option will also prevent shared dependencies from being updated\.
217
+ Starting with 1\.14, specifying the \fB\-\-conservative\fR option will also prevent indirect dependencies from being updated\.
218
218
  .
219
219
  .SH "PATCH LEVEL OPTIONS"
220
220
  Version 1\.14 introduced 4 patch\-level options that will influence how gem versions are resolved\. One of the following options can be used: \fB\-\-patch\fR, \fB\-\-minor\fR or \fB\-\-major\fR\. \fB\-\-strict\fR can be added to further influence resolution\.
@@ -80,7 +80,7 @@ gem.
80
80
  Do not allow any gem to be updated past latest `--patch` | `--minor` | `--major`.
81
81
 
82
82
  * `--conservative`:
83
- Use bundle install conservative update behavior and do not allow shared dependencies to be updated.
83
+ Use bundle install conservative update behavior and do not allow indirect dependencies to be updated.
84
84
 
85
85
  ## UPDATING ALL GEMS
86
86
 
@@ -195,7 +195,7 @@ In short, by default, when you update a gem using `bundle update`, bundler will
195
195
  update all dependencies of that gem, including those that are also dependencies
196
196
  of another gem.
197
197
 
198
- To prevent updating shared dependencies, prior to version 1.14 the only option
198
+ To prevent updating indirect dependencies, prior to version 1.14 the only option
199
199
  was the `CONSERVATIVE UPDATING` behavior in [bundle install(1)](bundle-install.1.html):
200
200
 
201
201
  In this scenario, updating the `thin` version manually in the Gemfile(5),
@@ -203,7 +203,7 @@ and then running [bundle install(1)](bundle-install.1.html) will only update `da
203
203
  but not `rack`. For more information, see the `CONSERVATIVE UPDATING` section
204
204
  of [bundle install(1)](bundle-install.1.html).
205
205
 
206
- Starting with 1.14, specifying the `--conservative` option will also prevent shared
206
+ Starting with 1.14, specifying the `--conservative` option will also prevent indirect
207
207
  dependencies from being updated.
208
208
 
209
209
  ## PATCH LEVEL OPTIONS
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-VIZ" "1" "April 2021" "" ""
4
+ .TH "BUNDLE\-VIZ" "1" "June 2021" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-viz\fR \- Generates a visual dependency graph for your Gemfile
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE" "1" "April 2021" "" ""
4
+ .TH "BUNDLE" "1" "June 2021" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\fR \- Ruby Dependency Management
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "GEMFILE" "5" "April 2021" "" ""
4
+ .TH "GEMFILE" "5" "June 2021" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
@@ -244,6 +244,20 @@ module Bundler
244
244
  specs.unmet_dependency_names
245
245
  end
246
246
 
247
+ # Used by definition.
248
+ #
249
+ # Note: Do not override if you don't know what you are doing.
250
+ def spec_names
251
+ specs.spec_names
252
+ end
253
+
254
+ # Used by definition.
255
+ #
256
+ # Note: Do not override if you don't know what you are doing.
257
+ def add_dependency_names(names)
258
+ @dependencies |= Array(names)
259
+ end
260
+
247
261
  # Note: Do not override if you don't know what you are doing.
248
262
  def can_lock?(spec)
249
263
  spec.source == self
@@ -77,7 +77,7 @@ module Bundler
77
77
  source_list = SourceList.new
78
78
 
79
79
  source_list.add_git_source(git_source_options) if git_source_options
80
- source_list.global_rubygems_source = rubygems_source if rubygems_source
80
+ source_list.add_global_rubygems_remote(rubygems_source) if rubygems_source
81
81
 
82
82
  deps = names.map {|name| Dependency.new name, version }
83
83
 
@@ -21,23 +21,19 @@ module Bundler
21
21
  base = SpecSet.new(base) unless base.is_a?(SpecSet)
22
22
  resolver = new(source_requirements, base, gem_version_promoter, additional_base_requirements, platforms)
23
23
  result = resolver.start(requirements)
24
- SpecSet.new(result)
24
+ SpecSet.new(SpecSet.new(result).for(requirements.reject{|dep| dep.name.end_with?("\0") }))
25
25
  end
26
26
 
27
27
  def initialize(source_requirements, base, gem_version_promoter, additional_base_requirements, platforms)
28
28
  @source_requirements = source_requirements
29
-
30
- @index_requirements = source_requirements.each_with_object({}) do |source_requirement, index_requirements|
31
- name, source = source_requirement
32
- index_requirements[name] = name == :global ? source : source.specs
33
- end
34
-
35
29
  @base = base
36
30
  @resolver = Molinillo::Resolver.new(self, self)
37
31
  @search_for = {}
38
32
  @base_dg = Molinillo::DependencyGraph.new
33
+ aggregate_global_source = @source_requirements[:default].is_a?(Source::RubygemsAggregate)
39
34
  @base.each do |ls|
40
35
  dep = Dependency.new(ls.name, ls.version)
36
+ ls.source = source_for(ls.name) unless aggregate_global_source
41
37
  @base_dg.add_vertex(ls.name, DepProxy.get_proxy(dep, ls.platform), true)
42
38
  end
43
39
  additional_base_requirements.each {|d| @base_dg.add_vertex(d.name, d) }
@@ -45,10 +41,6 @@ module Bundler
45
41
  @resolving_only_for_ruby = platforms == [Gem::Platform::RUBY]
46
42
  @gem_version_promoter = gem_version_promoter
47
43
  @use_gvp = Bundler.feature_flag.use_gem_version_promoter_for_major_updates? || !@gem_version_promoter.major?
48
- @no_aggregate_global_source = @source_requirements[:global].nil?
49
-
50
- @variant_specific_names = []
51
- @generic_names = ["Ruby\0", "RubyGems\0"]
52
44
  end
53
45
 
54
46
  def start(requirements)
@@ -58,7 +50,6 @@ module Bundler
58
50
  verify_gemfile_dependencies_are_found!(requirements)
59
51
  dg = @resolver.resolve(requirements, @base_dg)
60
52
  dg.
61
- tap {|resolved| validate_resolved_specs!(resolved) }.
62
53
  map(&:payload).
63
54
  reject {|sg| sg.name.end_with?("\0") }.
64
55
  map(&:to_specs).
@@ -112,24 +103,14 @@ module Bundler
112
103
  include Molinillo::SpecificationProvider
113
104
 
114
105
  def dependencies_for(specification)
115
- all_dependencies = specification.dependencies_for_activated_platforms
116
-
117
- if @variant_specific_names.include?(specification.name)
118
- @variant_specific_names |= all_dependencies.map(&:name) - @generic_names
119
- else
120
- generic_names, variant_specific_names = specification.partitioned_dependency_names_for_activated_platforms
121
- @variant_specific_names |= variant_specific_names - @generic_names
122
- @generic_names |= generic_names
123
- end
124
-
125
- all_dependencies
106
+ specification.dependencies_for_activated_platforms
126
107
  end
127
108
 
128
109
  def search_for(dependency_proxy)
129
110
  platform = dependency_proxy.__platform
130
111
  dependency = dependency_proxy.dep
131
112
  name = dependency.name
132
- search_result = @search_for[dependency_proxy] ||= begin
113
+ @search_for[dependency_proxy] ||= begin
133
114
  results = results_for(dependency, @base[name])
134
115
 
135
116
  if vertex = @base_dg.vertex_named(name)
@@ -181,35 +162,14 @@ module Bundler
181
162
  @gem_version_promoter.sort_versions(dependency, spec_groups)
182
163
  end
183
164
  end
184
-
185
- unless search_result.empty?
186
- specific_dependency = @variant_specific_names.include?(name)
187
- return search_result unless specific_dependency
188
-
189
- search_result.each do |sg|
190
- if @generic_names.include?(name)
191
- @variant_specific_names -= [name]
192
- sg.activate_all_platforms!
193
- else
194
- sg.activate_platform!(platform)
195
- end
196
- end
197
- end
198
-
199
- search_result
200
165
  end
201
166
 
202
167
  def index_for(dependency)
203
- source = @index_requirements[dependency.name]
204
- if source
205
- source
206
- elsif @no_aggregate_global_source
207
- Index.build do |idx|
208
- dependency.all_sources.each {|s| idx.add_source(s.specs) }
209
- end
210
- else
211
- @index_requirements[:global]
212
- end
168
+ source_for(dependency.name).specs
169
+ end
170
+
171
+ def source_for(name)
172
+ @source_requirements[name] || @source_requirements[:default]
213
173
  end
214
174
 
215
175
  def results_for(dependency, base)
@@ -240,23 +200,10 @@ module Bundler
240
200
  dependencies.map(&:dep) == other_dependencies.map(&:dep)
241
201
  end
242
202
 
243
- def relevant_sources_for_vertex(vertex)
244
- if vertex.root?
245
- [@source_requirements[vertex.name]]
246
- elsif @no_aggregate_global_source
247
- vertex.recursive_predecessors.map do |v|
248
- @source_requirements[v.name]
249
- end.compact << @source_requirements[:default]
250
- else
251
- []
252
- end
253
- end
254
-
255
203
  def sort_dependencies(dependencies, activated, conflicts)
256
204
  dependencies.sort_by do |dependency|
257
205
  name = name_for(dependency)
258
206
  vertex = activated.vertex_named(name)
259
- dependency.all_sources = relevant_sources_for_vertex(vertex)
260
207
  [
261
208
  @base_dg.vertex_named(name) ? 0 : 1,
262
209
  vertex.payload ? 0 : 1,
@@ -398,7 +345,7 @@ module Bundler
398
345
  if other_bundler_required
399
346
  o << "\n\n"
400
347
 
401
- candidate_specs = @index_requirements[:default_bundler].search(conflict_dependency)
348
+ candidate_specs = source_for(:default_bundler).specs.search(conflict_dependency)
402
349
  if candidate_specs.any?
403
350
  target_version = candidate_specs.last.version
404
351
  new_command = [File.basename($PROGRAM_NAME), "_#{target_version}_", *ARGV].join(" ")
@@ -415,11 +362,7 @@ module Bundler
415
362
  elsif !conflict.existing
416
363
  o << "\n"
417
364
 
418
- relevant_sources = if conflict.requirement.source
419
- [conflict.requirement.source]
420
- else
421
- conflict.requirement.all_sources
422
- end.compact.map(&:to_s).uniq.sort
365
+ relevant_source = conflict.requirement.source || source_for(name)
423
366
 
424
367
  metadata_requirement = name.end_with?("\0")
425
368
 
@@ -432,12 +375,10 @@ module Bundler
432
375
  end
433
376
  o << " "
434
377
 
435
- o << if relevant_sources.empty?
436
- "in any of the sources.\n"
437
- elsif metadata_requirement
438
- "is not available in #{relevant_sources.join(" or ")}"
378
+ o << if metadata_requirement
379
+ "is not available in #{relevant_source}"
439
380
  else
440
- "in any of the relevant sources:\n #{relevant_sources * "\n "}\n"
381
+ "in #{relevant_source}.\n"
441
382
  end
442
383
  end
443
384
  end,
@@ -451,27 +392,5 @@ module Bundler
451
392
  end
452
393
  )
453
394
  end
454
-
455
- def validate_resolved_specs!(resolved_specs)
456
- resolved_specs.each do |v|
457
- name = v.name
458
- sources = relevant_sources_for_vertex(v)
459
- next unless sources.any?
460
- if default_index = sources.index(@source_requirements[:default])
461
- sources.delete_at(default_index)
462
- end
463
- sources.reject! {|s| s.specs.search(name).empty? }
464
- sources.uniq!
465
- next if sources.size <= 1
466
-
467
- msg = ["The gem '#{name}' was found in multiple relevant sources."]
468
- msg.concat sources.map {|s| " * #{s}" }.sort
469
- msg << "You #{@no_aggregate_global_source ? :must : :should} add this gem to the source block for the source you wish it to be installed from."
470
- msg = msg.join("\n")
471
-
472
- raise SecurityError, msg if @no_aggregate_global_source
473
- Bundler.ui.warn "Warning: #{msg}"
474
- end
475
- end
476
395
  end
477
396
  end
@@ -21,14 +21,10 @@ module Bundler
21
21
  @version = exemplary_spec.version
22
22
  @source = exemplary_spec.source
23
23
 
24
- @all_platforms = relevant_platforms
25
24
  @activated_platforms = relevant_platforms
26
25
  @dependencies = Hash.new do |dependencies, platforms|
27
26
  dependencies[platforms] = dependencies_for(platforms)
28
27
  end
29
- @partitioned_dependency_names = Hash.new do |partitioned_dependency_names, platforms|
30
- partitioned_dependency_names[platforms] = partitioned_dependency_names_for(platforms)
31
- end
32
28
  @specs = specs
33
29
  end
34
30
 
@@ -45,14 +41,6 @@ module Bundler
45
41
  end.flatten.compact.uniq
46
42
  end
47
43
 
48
- def activate_platform!(platform)
49
- self.activated_platforms = [platform]
50
- end
51
-
52
- def activate_all_platforms!
53
- self.activated_platforms = @all_platforms
54
- end
55
-
56
44
  def to_s
57
45
  activated_platforms_string = sorted_activated_platforms.join(", ")
58
46
  "#{name} (#{version}) (#{activated_platforms_string})"
@@ -62,10 +50,6 @@ module Bundler
62
50
  @dependencies[activated_platforms]
63
51
  end
64
52
 
65
- def partitioned_dependency_names_for_activated_platforms
66
- @partitioned_dependency_names[activated_platforms]
67
- end
68
-
69
53
  def ==(other)
70
54
  return unless other.is_a?(SpecGroup)
71
55
  name == other.name &&
@@ -100,14 +84,6 @@ module Bundler
100
84
  end.flatten
101
85
  end
102
86
 
103
- def partitioned_dependency_names_for(platforms)
104
- return @dependencies[platforms].map(&:name), [] if platforms.size == 1
105
-
106
- @dependencies[platforms].partition do |dep_proxy|
107
- @dependencies[platforms].count {|dp| dp.dep == dep_proxy.dep } == platforms.size
108
- end.map {|deps| deps.map(&:name) }
109
- end
110
-
111
87
  def __dependencies(platform)
112
88
  dependencies = []
113
89
  @specs[platform].first.dependencies.each do |dep|
@@ -105,7 +105,7 @@ module Gem
105
105
  end
106
106
 
107
107
  class Dependency
108
- attr_accessor :source, :groups, :all_sources
108
+ attr_accessor :source, :groups
109
109
 
110
110
  alias_method :eql?, :==
111
111
 
@@ -116,7 +116,7 @@ module Gem
116
116
  end
117
117
 
118
118
  def to_yaml_properties
119
- instance_variables.reject {|p| ["@source", "@groups", "@all_sources"].include?(p.to_s) }
119
+ instance_variables.reject {|p| ["@source", "@groups"].include?(p.to_s) }
120
120
  end
121
121
 
122
122
  def to_lock