schema_monkey 1.0.0 → 1.0.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 63717b66e73fd1bf6bd109a53e4a9923e47067b2
4
- data.tar.gz: 86c7b56f67c7b9c54a816e90f6e4309e1d766e20
3
+ metadata.gz: fcf24614a0b60131f52dc7bdd8dae426dac1d814
4
+ data.tar.gz: 8767b57fb97dc4b5f7ff17129b0dd6ddb0850f5f
5
5
  SHA512:
6
- metadata.gz: 0146db8b1769a7b59f797bae5960c003f6cf59296681d381af3356e2f1c6d7e4dbe9223e36167dff098e1a0c2846131655a87f2ad5780cae0b5a0c4c8ae355ce
7
- data.tar.gz: 140723e774bd68a0356bd64d041eaa8035c535f06b3ded87bbd2d642be72899f09a7babaefbdb449c5c2e35b225bbe5313fcb225b7169f5fa67e1dd4c0d1efc6
6
+ metadata.gz: 33210d7c9683c756deb46931f049b25bdd0efdd3aea15a5fd984e69fe8529f234e6c1a5ef61424628535c3414dcd3b79befe4a02c50c87e0ae695fb5d1a0f8e1
7
+ data.tar.gz: f573a50c27d09f31b0be37f86c278d6cc7b216370abfb06d015044c3c1b1ee210c33d71f052e1cf070edd4cd9690ad354b8920129400a2fa2859f0074a6cd074
@@ -8,7 +8,7 @@ module SchemaMonkey::Tool
8
8
  end
9
9
 
10
10
  def self.is_hook?(mod)
11
- return true if (mod.instance_methods & [:before, :around, :after, :implementation]).any?
11
+ return true if (mod.instance_methods & [:before, :around, :after, :implement]).any?
12
12
  return true if Module.const_lookup mod, "ENV"
13
13
  false
14
14
  end
@@ -37,8 +37,8 @@ module SchemaMonkey::Tool
37
37
  end
38
38
 
39
39
  def call_implementation(env)
40
- if hook = @hooks.select(&it.respond_to?(:implementation)).last
41
- hook.implementation(env)
40
+ if hook = @hooks.select(&it.respond_to?(:implement)).last
41
+ hook.implement(env)
42
42
  elsif @implementation
43
43
  @implementation.call env
44
44
  else
@@ -1,3 +1,3 @@
1
1
  module SchemaMonkey
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -27,13 +27,13 @@ describe SchemaMonkey::Middleware do
27
27
 
28
28
  Given { SchemaMonkey.register make_client(1) }
29
29
 
30
- Then { expect(env.result).to eq [:before1, :around_pre1, :implementation1, :around_post1, :after1 ] }
30
+ Then { expect(env.result).to eq [:before1, :around_pre1, :implement1, :around_post1, :after1 ] }
31
31
 
32
32
  context "if register client2" do
33
33
 
34
34
  Given { SchemaMonkey.register make_client(2) }
35
35
 
36
- Then { expect(env.result).to eq [:before1, :before2, :around_pre1, :around_pre2, :implementation2, :around_post2, :around_post1, :after1, :after2 ] }
36
+ Then { expect(env.result).to eq [:before1, :before2, :around_pre1, :around_pre2, :implement2, :around_post2, :around_post1, :after1, :after2 ] }
37
37
  end
38
38
  end
39
39
  end
@@ -84,8 +84,8 @@ describe SchemaMonkey::Middleware do
84
84
  env.result << :"around_post#{n}"
85
85
  end
86
86
 
87
- def implementation(env)
88
- env.result << :"implementation#{n}"
87
+ def implement(env)
88
+ env.result << :"implement#{n}"
89
89
  end
90
90
  end
91
91
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schema_monkey
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ronen barzel