aquarium 0.4.4 → 0.5.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.
- data/CHANGES +31 -6
- data/README +4 -1
- data/RELEASE-PLAN +2 -0
- data/Rakefile +20 -30
- data/UPGRADE +14 -4
- data/lib/aquarium/aspects/advice.rb +25 -10
- data/lib/aquarium/aspects/aspect.rb +8 -7
- data/lib/aquarium/aspects/join_point.rb +15 -5
- data/lib/aquarium/aspects/pointcut.rb +4 -4
- data/lib/aquarium/extensions.rb +0 -1
- data/lib/aquarium/finders/method_finder.rb +3 -10
- data/lib/aquarium/finders/pointcut_finder.rb +15 -5
- data/lib/aquarium/finders/type_finder.rb +0 -1
- data/lib/aquarium/utils/array_utils.rb +0 -1
- data/lib/aquarium/utils/method_utils.rb +13 -2
- data/lib/aquarium/utils/options_utils.rb +1 -0
- data/lib/aquarium/utils/type_utils.rb +21 -5
- data/lib/aquarium/version.rb +2 -2
- data/spec/aquarium/aspects/advice_chain_node_spec.rb +0 -1
- data/spec/aquarium/aspects/advice_spec.rb +80 -45
- data/spec/aquarium/aspects/aspect_invocation_spec.rb +66 -31
- data/spec/aquarium/aspects/aspect_spec.rb +88 -91
- data/spec/aquarium/aspects/concurrent_aspects_spec.rb +1 -1
- data/spec/aquarium/aspects/concurrent_aspects_with_objects_and_types_spec.rb +3 -1
- data/spec/aquarium/aspects/join_point_spec.rb +0 -1
- data/spec/aquarium/aspects/pointcut_spec.rb +21 -18
- data/spec/aquarium/extensions/hash_spec.rb +211 -219
- data/spec/aquarium/extensions/set_spec.rb +1 -1
- data/spec/aquarium/extras/design_by_contract_spec.rb +1 -1
- data/spec/aquarium/finders/finder_result_spec.rb +4 -4
- data/spec/aquarium/finders/method_finder_spec.rb +6 -9
- data/spec/aquarium/finders/type_finder_spec.rb +2 -2
- data/spec/aquarium/finders/type_finder_with_descendents_and_ancestors_spec.rb +12 -10
- data/spec/aquarium/spec_example_types.rb +2 -2
- data/spec/aquarium/spec_helper.rb +1 -1
- data/spec/aquarium/utils/array_utils_spec.rb +32 -5
- data/spec/aquarium/utils/hash_utils_spec.rb +1 -0
- data/spec/aquarium/utils/method_utils_spec.rb +18 -0
- data/spec/aquarium/utils/options_utils_spec.rb +16 -20
- data/spec/aquarium/utils/type_utils_sample_classes.rb +10 -1
- data/spec/aquarium/utils/type_utils_spec.rb +9 -7
- metadata +29 -35
- data/lib/aquarium/extensions/symbol.rb +0 -22
- data/spec/aquarium/extensions/symbol_spec.rb +0 -37
metadata
CHANGED
@@ -1,30 +1,28 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: aquarium
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.5.1
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
|
-
authors:
|
7
|
+
authors:
|
7
8
|
- Aquarium Development Team
|
8
9
|
autorequire: aquarium
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
|
12
|
-
date: 2009-10-03 00:00:00 -05:00
|
13
|
-
default_executable: ""
|
12
|
+
date: 2012-07-31 00:00:00.000000000 Z
|
14
13
|
dependencies: []
|
15
|
-
|
16
|
-
|
14
|
+
description: ! " Aquarium is a full-featured Aspect-Oriented Programming (AOP)
|
15
|
+
framework for Ruby that is \n designed to provide an intuitive syntax and support
|
16
|
+
for large-scale, dynamic aspects.\n"
|
17
17
|
email: aquarium-devel@rubyforge.org
|
18
18
|
executables: []
|
19
|
-
|
20
19
|
extensions: []
|
21
|
-
|
22
|
-
extra_rdoc_files:
|
20
|
+
extra_rdoc_files:
|
23
21
|
- README
|
24
22
|
- CHANGES
|
25
23
|
- MIT_LICENSE
|
26
24
|
- UPGRADE
|
27
|
-
files:
|
25
|
+
files:
|
28
26
|
- CHANGES
|
29
27
|
- EXAMPLES.rd
|
30
28
|
- MIT_LICENSE
|
@@ -47,7 +45,6 @@ files:
|
|
47
45
|
- lib/aquarium/extensions/regexp.rb
|
48
46
|
- lib/aquarium/extensions/set.rb
|
49
47
|
- lib/aquarium/extensions/string.rb
|
50
|
-
- lib/aquarium/extensions/symbol.rb
|
51
48
|
- lib/aquarium/extensions.rb
|
52
49
|
- lib/aquarium/extras/design_by_contract.rb
|
53
50
|
- lib/aquarium/extras.rb
|
@@ -90,7 +87,6 @@ files:
|
|
90
87
|
- spec/aquarium/extensions/regex_spec.rb
|
91
88
|
- spec/aquarium/extensions/set_spec.rb
|
92
89
|
- spec/aquarium/extensions/string_spec.rb
|
93
|
-
- spec/aquarium/extensions/symbol_spec.rb
|
94
90
|
- spec/aquarium/extras/design_by_contract_spec.rb
|
95
91
|
- spec/aquarium/finders/finder_result_spec.rb
|
96
92
|
- spec/aquarium/finders/method_finder_spec.rb
|
@@ -132,36 +128,34 @@ files:
|
|
132
128
|
- rake_tasks/examples_specdoc.rake
|
133
129
|
- rake_tasks/examples_with_rcov.rake
|
134
130
|
- rake_tasks/verify_rcov.rake
|
135
|
-
has_rdoc: true
|
136
131
|
homepage: http://aquarium.rubyforge.org
|
132
|
+
licenses: []
|
137
133
|
post_install_message:
|
138
|
-
rdoc_options:
|
134
|
+
rdoc_options:
|
139
135
|
- --title
|
140
136
|
- Aquarium
|
141
137
|
- --line-numbers
|
142
138
|
- --inline-source
|
143
139
|
- --main
|
144
140
|
- README
|
145
|
-
require_paths:
|
141
|
+
require_paths:
|
146
142
|
- lib
|
147
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
143
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
144
|
+
none: false
|
145
|
+
requirements:
|
146
|
+
- - ! '>='
|
147
|
+
- !ruby/object:Gem::Version
|
148
|
+
version: '0'
|
149
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
150
|
+
none: false
|
151
|
+
requirements:
|
152
|
+
- - ! '>='
|
153
|
+
- !ruby/object:Gem::Version
|
154
|
+
version: '0'
|
159
155
|
requirements: []
|
160
|
-
|
161
156
|
rubyforge_project: aquarium
|
162
|
-
rubygems_version: 1.
|
157
|
+
rubygems_version: 1.8.11
|
163
158
|
signing_key:
|
164
|
-
specification_version:
|
165
|
-
summary: Aquarium-0.
|
159
|
+
specification_version: 3
|
160
|
+
summary: Aquarium-0.5.1 (r7) - Aspect-Oriented Programming toolkit for Ruby http://aquarium.rubyforge.org
|
166
161
|
test_files: []
|
167
|
-
|
@@ -1,22 +0,0 @@
|
|
1
|
-
# Adding useful methods to Symbol.
|
2
|
-
module Aquarium
|
3
|
-
module Extensions
|
4
|
-
module SymbolHelper
|
5
|
-
def empty?
|
6
|
-
return to_s.strip.empty?
|
7
|
-
end
|
8
|
-
|
9
|
-
def strip
|
10
|
-
return to_s.strip.to_sym
|
11
|
-
end
|
12
|
-
|
13
|
-
def <=> other_symbol
|
14
|
-
self.to_s <=> other_symbol.to_s
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
class Symbol
|
21
|
-
include Aquarium::Extensions::SymbolHelper
|
22
|
-
end
|
@@ -1,37 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../spec_helper'
|
2
|
-
require 'aquarium/extensions/symbol'
|
3
|
-
|
4
|
-
describe "Symbol#empty?" do
|
5
|
-
|
6
|
-
it "should return true for an empty symbol with whitespace" do
|
7
|
-
:" \t ".empty?.should be_true
|
8
|
-
end
|
9
|
-
|
10
|
-
it "should return false for a non-empty symbol" do
|
11
|
-
:x.empty?.should be_false
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
describe "Symbol#strip" do
|
16
|
-
it "should return equivalent Symbol if there is no leading or trailing whitespace." do
|
17
|
-
:a.strip.should == :a
|
18
|
-
end
|
19
|
-
|
20
|
-
it "should return new Symbol with removed leading and/or trailing whitespace, when present." do
|
21
|
-
:" \ta\t ".strip.should == :a
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
describe "Symbol#<=>" do
|
26
|
-
it "should return < 0 if the string representation of the left-hand side symbol is less than the string representation of the right-hand side symbol." do
|
27
|
-
(:a <=> :b).should == -1
|
28
|
-
end
|
29
|
-
|
30
|
-
it "should return > 0 if the string representation of the left-hand side symbol is greater than the string representation of the right-hand side symbol." do
|
31
|
-
(:b <=> :a).should == 1
|
32
|
-
end
|
33
|
-
|
34
|
-
it "should return 0 if the string representation of the left-hand side symbol is equal to the string representation of the right-hand side symbol." do
|
35
|
-
(:a <=> :a).should == 0
|
36
|
-
end
|
37
|
-
end
|