deep_dive 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f669a8637e2bb6df031341ec6f46faceff35d69c
4
- data.tar.gz: 74482292250c407ba8e7a76a7db382e5f16c9cc0
3
+ metadata.gz: edfa82a8660149b76457f02a49541360e7e8eb16
4
+ data.tar.gz: cc5c9011d141ccbb5a5712332bd4cdc7f3863393
5
5
  SHA512:
6
- metadata.gz: 717ed93d9c83020fc767113d4a0e34e0af19f10d1a894b299cb07748066d86fd7c4342f510bfb28bd6fa88d413908fff7323e4d6347e30f11fc33c539e6a6d84
7
- data.tar.gz: 141e3408d645535183dcc1943d3d32bc5ea070d79dc6dbc9cdc4b0227011ea6a352b484bd75c73932eba437af34b5d3c075d13434eaaa2b2761f8c4fb70c8e49
6
+ metadata.gz: 86f4070a23685517d38f85e0aac4b9b0163fe76531c7cfbf31908650525811253d21c9c2e2ac9fae2ee0a2ec4d754609df0a951bff26875e85a5fbd4d09a5c81
7
+ data.tar.gz: 205582c148ce33d881a633c97bf9d1ee416ae1fe443e60c4d925626d43e5f24ebf770060fa997669478db17ae46fabc7985ac714a2f3f0e7dadaa6a5db493519
data/.semver CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 2
4
- :patch: 4
4
+ :patch: 5
5
5
  :special: ''
data/Gemfile.lock CHANGED
@@ -7,8 +7,6 @@ GEM
7
7
  builder (3.2.2)
8
8
  byebug (4.0.5)
9
9
  columnize (= 0.9.0)
10
- celluloid (0.16.0)
11
- timers (~> 4.0.0)
12
10
  coderay (1.1.0)
13
11
  columnize (0.9.0)
14
12
  debug_inspector (0.0.2)
@@ -16,7 +14,7 @@ GEM
16
14
  docile (1.1.5)
17
15
  faraday (0.8.9)
18
16
  multipart-post (~> 1.2.0)
19
- ffi (1.9.8)
17
+ ffi (1.9.10)
20
18
  formatador (0.2.5)
21
19
  git (1.2.9.1)
22
20
  github_api (0.10.1)
@@ -26,9 +24,9 @@ GEM
26
24
  multi_json (~> 1.4)
27
25
  nokogiri (~> 1.5.2)
28
26
  oauth2
29
- guard (2.12.6)
27
+ guard (2.12.8)
30
28
  formatador (>= 0.2.4)
31
- listen (~> 2.7)
29
+ listen (>= 2.7, <= 4.0)
32
30
  lumberjack (~> 1.0)
33
31
  nenv (~> 0.1)
34
32
  notiffany (~> 0.0)
@@ -39,7 +37,6 @@ GEM
39
37
  guard (>= 1.1)
40
38
  hashie (3.4.2)
41
39
  highline (1.7.2)
42
- hitimes (1.2.2)
43
40
  interception (0.5)
44
41
  jeweler (1.8.8)
45
42
  builder
@@ -51,14 +48,13 @@ GEM
51
48
  rake
52
49
  rdoc
53
50
  json (1.8.3)
54
- jwt (1.5.0)
55
- listen (2.10.1)
56
- celluloid (~> 0.16.0)
51
+ jwt (1.5.1)
52
+ listen (3.0.1)
57
53
  rb-fsevent (>= 0.9.3)
58
54
  rb-inotify (>= 0.9)
59
55
  lumberjack (1.0.9)
60
56
  method_source (0.8.2)
61
- multi_json (1.11.1)
57
+ multi_json (1.11.2)
62
58
  multi_xml (0.5.5)
63
59
  multipart-post (1.2.0)
64
60
  nenv (0.2.0)
@@ -115,8 +111,6 @@ GEM
115
111
  simplecov-html (0.10.0)
116
112
  slop (3.6.0)
117
113
  thor (0.19.1)
118
- timers (4.0.1)
119
- hitimes
120
114
  yard (0.8.7.6)
121
115
 
122
116
  PLATFORMS
data/README.rdoc CHANGED
@@ -16,6 +16,18 @@ copying of your complex interconnected objects.
16
16
  Simply include DeepDive in your base class. All classes derived will be set
17
17
  for deep cloning or deep duping.
18
18
 
19
+ === Debugging
20
+ In some cases, you may need to get a dump of classes DeepDive is replicating,
21
+ particulary if you need to hunt down objects whose instance variables might
22
+ need to be added to the exclsion list. In that case, you may turn on the verbose
23
+ mode, thusly:
24
+
25
+ DeepDive.verbose = true
26
+
27
+ in which case you will get a dump to stdout of all the classes
28
+ of the objects it copies, which can be copious depending on your
29
+ application.
30
+
19
31
  == Examples
20
32
 
21
33
  class FooBase
data/deep_dive.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: deep_dive 0.2.4 ruby lib
5
+ # stub: deep_dive 0.2.5 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "deep_dive"
9
- s.version = "0.2.4"
9
+ s.version = "0.2.5"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Fred Mitchell"]
14
- s.date = "2015-06-21"
14
+ s.date = "2015-07-07"
15
15
  s.description = "\n When you have a system of objects that have many references to each other, it becomes an\n issue to be able to clone properly that object graph. There may be control objects you may\n not want to clone, but maintain references to. And some references you may not wish to clone at all.\n\n Enter DeepDive. Allows you a means by which you can do controlled deep cloning or\n copying of your complex interconnected objects.\n "
16
16
  s.email = "lordalveric@yahoo.com"
17
17
  s.extra_rdoc_files = [
@@ -18,6 +18,14 @@ module DeepDive
18
18
  class DeepDiveException < Exception
19
19
  end
20
20
 
21
+ def self.verbose=(t)
22
+ @@verbosity = t
23
+ end
24
+
25
+ def self.verbose?
26
+ defined?(@@verbosity) && @@verbosity
27
+ end
28
+
21
29
  module API
22
30
  # #ddup is a Deep Dive's replacement for #dup.
23
31
  def ddup
@@ -43,6 +51,8 @@ module DeepDive
43
51
  # Not meant to be called externally. Use either ddup or dclone.
44
52
  def _replicate(dupit: true, oc: {})
45
53
  unless oc.member? self
54
+ puts "DeepDive: replicating #{self.class}" if DeepDive::verbose?
55
+
46
56
  copy = oc[self] = if dupit
47
57
  dup
48
58
  else
@@ -50,6 +50,14 @@ describe DeepDive do
50
50
  @fbf.fexcludeme = Foo.new
51
51
  end
52
52
 
53
+ context 'debugging' do
54
+ it 'handles verbosity switching' do
55
+ DeepDive.verbose = true
56
+ DeepDive.verbose?.should be_true
57
+ DeepDive.verbose = false
58
+ DeepDive.verbose?.should be_false
59
+ end
60
+ end
53
61
 
54
62
  context 'clone' do
55
63
  it 'simple' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deep_dive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fred Mitchell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-21 00:00:00.000000000 Z
11
+ date: 2015-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec