alephant 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -9
- data/alephant.gemspec +0 -7
- data/lib/alephant.rb +0 -16
- data/lib/alephant/version.rb +1 -1
- metadata +2 -110
- data/.travis.yml +0 -10
- data/Guardfile +0 -6
- data/spec/.gitkeep +0 -1
- data/spec/aop_spec.rb +0 -24
- data/spec/fixtures/test.rb +0 -10
- data/spec/spec_helper.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89b20e5e5d3d85acabf0c932eb65d072d852c376
|
4
|
+
data.tar.gz: 460548605328232d1793ba9b756ff57d7a574d65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de117125e68af956cf2bf11ba6a14e7ea713b9a4bd32378ad52dbc4cc30bfbe62e6e2ae8a60b2fa27358640545b981e6a073dde3e9d8e991c2140c25bb6da133
|
7
|
+
data.tar.gz: 325d4cbd189d35fc74aea97eceab30d624462f0315c345da761a6e6f7b79331e11c2d8652ee4d0a131a4e81c1e2aba4211609a63a51a5cb55ab0cb1927892f9a
|
data/Rakefile
CHANGED
data/alephant.gemspec
CHANGED
@@ -20,13 +20,6 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_development_dependency "bundler", "~> 1.5"
|
22
22
|
spec.add_development_dependency "rake"
|
23
|
-
spec.add_development_dependency "rspec"
|
24
|
-
spec.add_development_dependency "rspec-nc"
|
25
|
-
spec.add_development_dependency "guard"
|
26
|
-
spec.add_development_dependency "guard-rspec"
|
27
|
-
spec.add_development_dependency "pry"
|
28
|
-
spec.add_development_dependency "pry-remote"
|
29
|
-
spec.add_development_dependency "pry-nav"
|
30
23
|
|
31
24
|
spec.add_runtime_dependency 'alephant-publisher'
|
32
25
|
spec.add_runtime_dependency 'alephant-support'
|
data/lib/alephant.rb
CHANGED
@@ -3,20 +3,4 @@ require "alephant/publisher"
|
|
3
3
|
|
4
4
|
module Alephant
|
5
5
|
# Consuming application calls: `Alephant::Publisher.create`
|
6
|
-
|
7
|
-
module AOP
|
8
|
-
|
9
|
-
def around(fn_name)
|
10
|
-
puts 'In around method'
|
11
|
-
old_method = instance_method(fn_name)
|
12
|
-
define_method(fn_name) do |*args|
|
13
|
-
yield :before, args if block_given?
|
14
|
-
old_method.bind(self).call(args).tap do |return_value|
|
15
|
-
args << return_value unless return_value.nil?
|
16
|
-
end
|
17
|
-
yield :after, args if block_given?
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
end
|
22
6
|
end
|
data/lib/alephant/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alephant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Integralist
|
@@ -38,104 +38,6 @@ dependencies:
|
|
38
38
|
version: '0'
|
39
39
|
prerelease: false
|
40
40
|
type: :development
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rspec
|
43
|
-
version_requirements: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - '>='
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
49
|
-
requirements:
|
50
|
-
- - '>='
|
51
|
-
- !ruby/object:Gem::Version
|
52
|
-
version: '0'
|
53
|
-
prerelease: false
|
54
|
-
type: :development
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: rspec-nc
|
57
|
-
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - '>='
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
requirement: !ruby/object:Gem::Requirement
|
63
|
-
requirements:
|
64
|
-
- - '>='
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
version: '0'
|
67
|
-
prerelease: false
|
68
|
-
type: :development
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: guard
|
71
|
-
version_requirements: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - '>='
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
requirement: !ruby/object:Gem::Requirement
|
77
|
-
requirements:
|
78
|
-
- - '>='
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
version: '0'
|
81
|
-
prerelease: false
|
82
|
-
type: :development
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: guard-rspec
|
85
|
-
version_requirements: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - '>='
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
requirement: !ruby/object:Gem::Requirement
|
91
|
-
requirements:
|
92
|
-
- - '>='
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
version: '0'
|
95
|
-
prerelease: false
|
96
|
-
type: :development
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: pry
|
99
|
-
version_requirements: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - '>='
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
104
|
-
requirement: !ruby/object:Gem::Requirement
|
105
|
-
requirements:
|
106
|
-
- - '>='
|
107
|
-
- !ruby/object:Gem::Version
|
108
|
-
version: '0'
|
109
|
-
prerelease: false
|
110
|
-
type: :development
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: pry-remote
|
113
|
-
version_requirements: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - '>='
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
118
|
-
requirement: !ruby/object:Gem::Requirement
|
119
|
-
requirements:
|
120
|
-
- - '>='
|
121
|
-
- !ruby/object:Gem::Version
|
122
|
-
version: '0'
|
123
|
-
prerelease: false
|
124
|
-
type: :development
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: pry-nav
|
127
|
-
version_requirements: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - '>='
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
132
|
-
requirement: !ruby/object:Gem::Requirement
|
133
|
-
requirements:
|
134
|
-
- - '>='
|
135
|
-
- !ruby/object:Gem::Version
|
136
|
-
version: '0'
|
137
|
-
prerelease: false
|
138
|
-
type: :development
|
139
41
|
- !ruby/object:Gem::Dependency
|
140
42
|
name: alephant-publisher
|
141
43
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -271,9 +173,7 @@ extra_rdoc_files: []
|
|
271
173
|
files:
|
272
174
|
- .gitignore
|
273
175
|
- .ruby-version
|
274
|
-
- .travis.yml
|
275
176
|
- Gemfile
|
276
|
-
- Guardfile
|
277
177
|
- LICENSE.txt
|
278
178
|
- README.md
|
279
179
|
- Rakefile
|
@@ -281,10 +181,6 @@ files:
|
|
281
181
|
- alephant/.gitignore
|
282
182
|
- lib/alephant.rb
|
283
183
|
- lib/alephant/version.rb
|
284
|
-
- spec/.gitkeep
|
285
|
-
- spec/aop_spec.rb
|
286
|
-
- spec/fixtures/test.rb
|
287
|
-
- spec/spec_helper.rb
|
288
184
|
homepage: https://github.com/BBC-News/alephant
|
289
185
|
licenses:
|
290
186
|
- MIT
|
@@ -309,8 +205,4 @@ rubygems_version: 2.1.9
|
|
309
205
|
signing_key:
|
310
206
|
specification_version: 4
|
311
207
|
summary: Alephant framework
|
312
|
-
test_files:
|
313
|
-
- spec/.gitkeep
|
314
|
-
- spec/aop_spec.rb
|
315
|
-
- spec/fixtures/test.rb
|
316
|
-
- spec/spec_helper.rb
|
208
|
+
test_files: []
|
data/.travis.yml
DELETED
data/Guardfile
DELETED
data/spec/.gitkeep
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
*
|
data/spec/aop_spec.rb
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Alephant::AOP do
|
4
|
-
describe "#around(fn_name)" do
|
5
|
-
it "Overwrites the existing method with the block passed in, providing hooks for before and after the original method call" do
|
6
|
-
|
7
|
-
states = []
|
8
|
-
|
9
|
-
Test.around('test_method') do |state, args|
|
10
|
-
states << state
|
11
|
-
if state == :before
|
12
|
-
args.should eq(['test'])
|
13
|
-
elsif state == :after
|
14
|
-
args.should eq(['test', 'test_return'])
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
Test.new.test_method('test')
|
19
|
-
states.should include(:before, :after)
|
20
|
-
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
data/spec/fixtures/test.rb
DELETED
data/spec/spec_helper.rb
DELETED