gluer 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore CHANGED
@@ -8,6 +8,7 @@ Gemfile.lock
8
8
  InstalledFiles
9
9
  _yardoc
10
10
  coverage
11
+ bin/
11
12
  doc/
12
13
  lib/bundler/man
13
14
  pkg
@@ -13,22 +13,23 @@ module Gluer
13
13
  end
14
14
 
15
15
  def commit
16
- commit_hook.call(registry, context, *args, &block)
17
- committed
18
- end
19
-
20
- def on_rollback(&hook)
21
- @rollback_hook = RegistrationHook.new(hook)
16
+ registry.tap do |registry|
17
+ commit_hook.call(registry, context, *args, &block)
18
+ committed_on(registry)
19
+ end
22
20
  end
23
21
 
24
22
  def rollback
25
- rollback_hook.call(registry, context, *args, &block) if committed?
23
+ if committed?
24
+ rollback_hook.call(registry_when_committed, context, *args, &block)
25
+ end
26
26
  end
27
27
 
28
28
  private
29
- attr_reader :definition, :context, :args, :block
29
+ attr_reader :definition, :context, :args, :block, :registry_when_committed
30
30
 
31
- def committed
31
+ def committed_on(registry)
32
+ @registry_when_committed = registry
32
33
  @committed = true
33
34
  end
34
35
 
@@ -1,3 +1,3 @@
1
1
  module Gluer
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gluer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-29 00:00:00.000000000 Z
12
+ date: 2013-05-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -94,15 +94,7 @@ dependencies:
94
94
  description: Configuration reloader
95
95
  email:
96
96
  - rcabralc@gmail.com
97
- executables:
98
- - autospec
99
- - coderay
100
- - htmldiff
101
- - ldiff
102
- - pry
103
- - rake
104
- - rdebug
105
- - rspec
97
+ executables: []
106
98
  extensions: []
107
99
  extra_rdoc_files: []
108
100
  files:
@@ -112,14 +104,6 @@ files:
112
104
  - LICENSE.txt
113
105
  - README.md
114
106
  - Rakefile
115
- - bin/autospec
116
- - bin/coderay
117
- - bin/htmldiff
118
- - bin/ldiff
119
- - bin/pry
120
- - bin/rake
121
- - bin/rdebug
122
- - bin/rspec
123
107
  - gluer.gemspec
124
108
  - lib/gluer.rb
125
109
  - lib/gluer/api.rb
@@ -151,7 +135,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
151
135
  version: '0'
152
136
  segments:
153
137
  - 0
154
- hash: 1458923697644564205
138
+ hash: 778545071681117987
155
139
  required_rubygems_version: !ruby/object:Gem::Requirement
156
140
  none: false
157
141
  requirements:
@@ -160,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
144
  version: '0'
161
145
  segments:
162
146
  - 0
163
- hash: 1458923697644564205
147
+ hash: 778545071681117987
164
148
  requirements: []
165
149
  rubyforge_project:
166
150
  rubygems_version: 1.8.25
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'autospec' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require 'pathname'
10
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require 'rubygems'
14
- require 'bundler/setup'
15
-
16
- load Gem.bin_path('rspec-core', 'autospec')
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'coderay' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require 'pathname'
10
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require 'rubygems'
14
- require 'bundler/setup'
15
-
16
- load Gem.bin_path('gluer', 'coderay')
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'htmldiff' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require 'pathname'
10
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require 'rubygems'
14
- require 'bundler/setup'
15
-
16
- load Gem.bin_path('gluer', 'htmldiff')
data/bin/ldiff DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'ldiff' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require 'pathname'
10
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require 'rubygems'
14
- require 'bundler/setup'
15
-
16
- load Gem.bin_path('gluer', 'ldiff')
data/bin/pry DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'pry' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require 'pathname'
10
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require 'rubygems'
14
- require 'bundler/setup'
15
-
16
- load Gem.bin_path('pry', 'pry')
data/bin/rake DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'rake' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require 'pathname'
10
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require 'rubygems'
14
- require 'bundler/setup'
15
-
16
- load Gem.bin_path('gluer', 'rake')
data/bin/rdebug DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'rdebug' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require 'pathname'
10
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require 'rubygems'
14
- require 'bundler/setup'
15
-
16
- load Gem.bin_path('gluer', 'rdebug')
data/bin/rspec DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'rspec' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require 'pathname'
10
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require 'rubygems'
14
- require 'bundler/setup'
15
-
16
- load Gem.bin_path('rspec-core', 'rspec')