cuts 1.0.0 → 2.0.0

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.
metadata CHANGED
@@ -1,86 +1,129 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: cuts
3
- version: !ruby/object:Gem::Version
4
- version: 1.0.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.0.0
5
5
  platform: ruby
6
- authors:
7
- - tigerops-community@rubyforge.org
8
- autorequire:
6
+ authors:
7
+ - Trans
8
+ - Peter Vanbroekhoven
9
9
  bindir: bin
10
10
  cert_chain: []
11
-
12
- date: 2009-07-04 00:00:00 -04:00
13
- default_executable:
14
- dependencies: []
15
-
16
- description: |-
17
- Cuts is an expiremental implementation of cut-based
18
- AOP for Ruby written in pure Ruby.
19
- email:
11
+ date: 1980-01-02 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '13'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '13'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rubytest
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 0.11.1
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 0.11.1
41
+ - !ruby/object:Gem::Dependency
42
+ name: spectrum
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0.2'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0.2'
55
+ - !ruby/object:Gem::Dependency
56
+ name: qed
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '3.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '3.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: ae
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '1.9'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '1.9'
83
+ description: Cuts are transparent subclasses, the basis of cut-based AOP (Aspect Oriented
84
+ Programming), and the idea from which Ruby got Module#prepend. This is a pure-Ruby
85
+ implementation, built on prepend.
86
+ email:
87
+ - transfire@gmail.com
20
88
  executables: []
21
-
22
89
  extensions: []
23
-
24
- extra_rdoc_files:
25
- - README
26
- - Rakefile
27
- - MANIFEST
28
- - RELEASE
29
- - LICENSE
30
- - HISTORY
31
- files:
32
- - Rakefile
33
- - RELEASE
34
- - LICENSE
35
- - README
36
- - HISTORY
90
+ extra_rdoc_files: []
91
+ files:
92
+ - HISTORY.rdoc
93
+ - NOTICE.rdoc
94
+ - RCR.textile
95
+ - README.rdoc
96
+ - demo/01_cuts.md
97
+ - demo/02_prepend.md
98
+ - demo/03_aop.md
99
+ - demo/applique/cuts.rb
37
100
  - lib/cuts.rb
38
101
  - lib/cuts/aop.rb
39
102
  - lib/cuts/cut.rb
40
- - meta/created
41
- - meta/homepage
42
- - meta/summary
43
- - meta/abstract
44
- - meta/package
45
- - meta/version
46
- - meta/license
47
- - meta/project
48
- - meta/contact
49
- - test/test_cut.rb
50
- - test/test_aop.rb
51
- - MANIFEST
52
- has_rdoc: true
53
- homepage: http://death.rubyforge.org
54
- licenses: []
55
-
56
- post_install_message:
57
- rdoc_options:
58
- - --inline-source
59
- - --title
60
- - cuts api
61
- - --main
62
- - README
63
- require_paths:
103
+ - lib/cuts/version.rb
104
+ homepage: https://github.com/rubyworks/cuts
105
+ licenses:
106
+ - BSD-2-Clause
107
+ metadata:
108
+ source_code_uri: https://github.com/rubyworks/cuts
109
+ bug_tracker_uri: https://github.com/rubyworks/cuts/issues
110
+ changelog_uri: https://github.com/rubyworks/cuts/blob/master/HISTORY.rdoc
111
+ documentation_uri: https://rubydoc.info/gems/cuts
112
+ rdoc_options: []
113
+ require_paths:
64
114
  - lib
65
- required_ruby_version: !ruby/object:Gem::Requirement
66
- requirements:
115
+ required_ruby_version: !ruby/object:Gem::Requirement
116
+ requirements:
67
117
  - - ">="
68
- - !ruby/object:Gem::Version
69
- version: "0"
70
- version:
71
- required_rubygems_version: !ruby/object:Gem::Requirement
72
- requirements:
118
+ - !ruby/object:Gem::Version
119
+ version: '3.1'
120
+ required_rubygems_version: !ruby/object:Gem::Requirement
121
+ requirements:
73
122
  - - ">="
74
- - !ruby/object:Gem::Version
75
- version: "0"
76
- version:
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
77
125
  requirements: []
78
-
79
- rubyforge_project: death
80
- rubygems_version: 1.3.4
81
- signing_key:
82
- specification_version: 3
83
- summary: Cuts is an expiremental implementation of cut-based
84
- test_files:
85
- - test/test_cut.rb
86
- - test/test_aop.rb
126
+ rubygems_version: 3.6.9
127
+ specification_version: 4
128
+ summary: Cut-based AOP for Ruby
129
+ test_files: []
data/HISTORY DELETED
@@ -1,18 +0,0 @@
1
- = Cuts Change History
2
-
3
- == 0.0.4 // 2008-03-05
4
-
5
- * Added Rakefile to run tests.
6
-
7
- == 0.0.3 // 2008-04-06
8
-
9
- * Working release.
10
-
11
- == 0.0.1 // 2008-03-05
12
-
13
- * First release.
14
-
15
- == 0.0.0 // 2008-03-04
16
-
17
- * Started project.
18
-
data/LICENSE DELETED
@@ -1,168 +0,0 @@
1
- .
2
-
3
- GNU LESSER GENERAL PUBLIC LICENSE
4
- Version 3, 29 June 2007
5
-
6
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
7
- Everyone is permitted to copy and distribute verbatim copies
8
- of this license document, but changing it is not allowed.
9
-
10
-
11
- This version of the GNU Lesser General Public License incorporates
12
- the terms and conditions of version 3 of the GNU General Public
13
- License, supplemented by the additional permissions listed below.
14
-
15
- 0. Additional Definitions.
16
-
17
- As used herein, "this License" refers to version 3 of the GNU Lesser
18
- General Public License, and the "GNU GPL" refers to version 3 of the GNU
19
- General Public License.
20
-
21
- "The Library" refers to a covered work governed by this License,
22
- other than an Application or a Combined Work as defined below.
23
-
24
- An "Application" is any work that makes use of an interface provided
25
- by the Library, but which is not otherwise based on the Library.
26
- Defining a subclass of a class defined by the Library is deemed a mode
27
- of using an interface provided by the Library.
28
-
29
- A "Combined Work" is a work produced by combining or linking an
30
- Application with the Library. The particular version of the Library
31
- with which the Combined Work was made is also called the "Linked
32
- Version".
33
-
34
- The "Minimal Corresponding Source" for a Combined Work means the
35
- Corresponding Source for the Combined Work, excluding any source code
36
- for portions of the Combined Work that, considered in isolation, are
37
- based on the Application, and not on the Linked Version.
38
-
39
- The "Corresponding Application Code" for a Combined Work means the
40
- object code and/or source code for the Application, including any data
41
- and utility programs needed for reproducing the Combined Work from the
42
- Application, but excluding the System Libraries of the Combined Work.
43
-
44
- 1. Exception to Section 3 of the GNU GPL.
45
-
46
- You may convey a covered work under sections 3 and 4 of this License
47
- without being bound by section 3 of the GNU GPL.
48
-
49
- 2. Conveying Modified Versions.
50
-
51
- If you modify a copy of the Library, and, in your modifications, a
52
- facility refers to a function or data to be supplied by an Application
53
- that uses the facility (other than as an argument passed when the
54
- facility is invoked), then you may convey a copy of the modified
55
- version:
56
-
57
- a) under this License, provided that you make a good faith effort to
58
- ensure that, in the event an Application does not supply the
59
- function or data, the facility still operates, and performs
60
- whatever part of its purpose remains meaningful, or
61
-
62
- b) under the GNU GPL, with none of the additional permissions of
63
- this License applicable to that copy.
64
-
65
- 3. Object Code Incorporating Material from Library Header Files.
66
-
67
- The object code form of an Application may incorporate material from
68
- a header file that is part of the Library. You may convey such object
69
- code under terms of your choice, provided that, if the incorporated
70
- material is not limited to numerical parameters, data structure
71
- layouts and accessors, or small macros, inline functions and templates
72
- (ten or fewer lines in length), you do both of the following:
73
-
74
- a) Give prominent notice with each copy of the object code that the
75
- Library is used in it and that the Library and its use are
76
- covered by this License.
77
-
78
- b) Accompany the object code with a copy of the GNU GPL and this license
79
- document.
80
-
81
- 4. Combined Works.
82
-
83
- You may convey a Combined Work under terms of your choice that,
84
- taken together, effectively do not restrict modification of the
85
- portions of the Library contained in the Combined Work and reverse
86
- engineering for debugging such modifications, if you also do each of
87
- the following:
88
-
89
- a) Give prominent notice with each copy of the Combined Work that
90
- the Library is used in it and that the Library and its use are
91
- covered by this License.
92
-
93
- b) Accompany the Combined Work with a copy of the GNU GPL and this license
94
- document.
95
-
96
- c) For a Combined Work that displays copyright notices during
97
- execution, include the copyright notice for the Library among
98
- these notices, as well as a reference directing the user to the
99
- copies of the GNU GPL and this license document.
100
-
101
- d) Do one of the following:
102
-
103
- 0) Convey the Minimal Corresponding Source under the terms of this
104
- License, and the Corresponding Application Code in a form
105
- suitable for, and under terms that permit, the user to
106
- recombine or relink the Application with a modified version of
107
- the Linked Version to produce a modified Combined Work, in the
108
- manner specified by section 6 of the GNU GPL for conveying
109
- Corresponding Source.
110
-
111
- 1) Use a suitable shared library mechanism for linking with the
112
- Library. A suitable mechanism is one that (a) uses at run time
113
- a copy of the Library already present on the user's computer
114
- system, and (b) will operate properly with a modified version
115
- of the Library that is interface-compatible with the Linked
116
- Version.
117
-
118
- e) Provide Installation Information, but only if you would otherwise
119
- be required to provide such information under section 6 of the
120
- GNU GPL, and only to the extent that such information is
121
- necessary to install and execute a modified version of the
122
- Combined Work produced by recombining or relinking the
123
- Application with a modified version of the Linked Version. (If
124
- you use option 4d0, the Installation Information must accompany
125
- the Minimal Corresponding Source and Corresponding Application
126
- Code. If you use option 4d1, you must provide the Installation
127
- Information in the manner specified by section 6 of the GNU GPL
128
- for conveying Corresponding Source.)
129
-
130
- 5. Combined Libraries.
131
-
132
- You may place library facilities that are a work based on the
133
- Library side by side in a single library together with other library
134
- facilities that are not Applications and are not covered by this
135
- License, and convey such a combined library under terms of your
136
- choice, if you do both of the following:
137
-
138
- a) Accompany the combined library with a copy of the same work based
139
- on the Library, uncombined with any other library facilities,
140
- conveyed under the terms of this License.
141
-
142
- b) Give prominent notice with the combined library that part of it
143
- is a work based on the Library, and explaining where to find the
144
- accompanying uncombined form of the same work.
145
-
146
- 6. Revised Versions of the GNU Lesser General Public License.
147
-
148
- The Free Software Foundation may publish revised and/or new versions
149
- of the GNU Lesser General Public License from time to time. Such new
150
- versions will be similar in spirit to the present version, but may
151
- differ in detail to address new problems or concerns.
152
-
153
- Each version is given a distinguishing version number. If the
154
- Library as you received it specifies that a certain numbered version
155
- of the GNU Lesser General Public License "or any later version"
156
- applies to it, you have the option of following the terms and
157
- conditions either of that published version or of any later version
158
- published by the Free Software Foundation. If the Library as you
159
- received it does not specify a version number of the GNU Lesser
160
- General Public License, you may choose any version of the GNU Lesser
161
- General Public License ever published by the Free Software Foundation.
162
-
163
- If the Library as you received it specifies that a proxy can decide
164
- whether future versions of the GNU Lesser General Public License shall
165
- apply, that proxy's public statement of acceptance of any version is
166
- permanent authorization for you to choose that version for the
167
- Library.
168
-
data/MANIFEST DELETED
@@ -1,23 +0,0 @@
1
- lib
2
- meta
3
- test
4
- Rakefile
5
- RELEASE
6
- LICENSE
7
- README
8
- HISTORY
9
- lib/cuts.rb
10
- lib/cuts
11
- lib/cuts/aop.rb
12
- lib/cuts/cut.rb
13
- meta/created
14
- meta/homepage
15
- meta/summary
16
- meta/abstract
17
- meta/package
18
- meta/version
19
- meta/license
20
- meta/project
21
- meta/contact
22
- test/test_cut.rb
23
- test/test_aop.rb
data/README DELETED
@@ -1,47 +0,0 @@
1
- = Cuts
2
-
3
- http://cuts.rubyforge.org
4
-
5
-
6
- == INTRODUCTION
7
-
8
- Cuts is an expiremental implementation of cut-based AOP for Ruby.
9
-
10
-
11
-
12
- == RELEASE NOTES
13
-
14
- Please see RELEASE file.
15
-
16
-
17
-
18
- == HOW TO INSTALL
19
-
20
- To install with RubyGems simply open a console and type:
21
-
22
- gem install cuts
23
-
24
- To manually installation, you will need the Ruby Setup package
25
- (http://setup.rubyforge.org). Then download the tgz package
26
- and type:
27
-
28
- $ tar -xvzf cuts-x.y.z.tgz
29
- $ cd cuts-x.y.z.tgz
30
- $ sudo setup.rb
31
-
32
-
33
-
34
- == USAGE
35
-
36
- Please see RDoc API documentation.
37
-
38
-
39
-
40
- == LICENSE
41
-
42
- Copyright (c) 2008 TigerOps
43
-
44
- This program is ditributed unser the terms of the LGPL license.
45
-
46
- Please see COPYING file.
47
-
data/RELEASE DELETED
@@ -1,24 +0,0 @@
1
- This release completely overhauls how the the original
2
- version of cuts was implemented.
3
-
4
- Before, cuts where overriding the constant of the
5
- original class and redirecting class changes
6
- (define_method, alias_method, etc.) to the original
7
- class. This works, and is technically more true to
8
- the core idea of Cuts, but it is rather fragile --
9
- getting a handle on the Cut vs. the Cut Class b/c
10
- tricky.
11
-
12
- The new implementation simply creates a module for
13
- a cut instead, and then used #extend on objects
14
- upon instantiation. The end result is less dynamic
15
- (cuts need to be defined up front), but it is more
16
- stable. As long as #new, when overriden, is done so
17
- properly (ie. use super or copy the cut extension
18
- logic) everthing will work as expected.
19
-
20
-
21
- ### 0.1.0 / 2008-11-24
22
-
23
- * Overhauled underlying implementation.
24
-
data/Rakefile DELETED
@@ -1,10 +0,0 @@
1
-
2
- desc "run tests"
3
-
4
- task :test do
5
- $LOAD_PATH.unshift './lib'
6
-
7
- Dir['test/*'].each do |testfile|
8
- load testfile
9
- end
10
- end
data/meta/abstract DELETED
@@ -1,3 +0,0 @@
1
- Cuts is an expiremental implementation of cut-based
2
- AOP for Ruby written in pure Ruby.
3
-
data/meta/contact DELETED
@@ -1 +0,0 @@
1
- tigerops-community@rubyforge.org
data/meta/created DELETED
@@ -1 +0,0 @@
1
- 2008-02-12
data/meta/homepage DELETED
@@ -1 +0,0 @@
1
- http://death.rubyforge.org
data/meta/license DELETED
@@ -1 +0,0 @@
1
- MIT
data/meta/package DELETED
@@ -1 +0,0 @@
1
- cuts
data/meta/project DELETED
@@ -1 +0,0 @@
1
- death
data/meta/summary DELETED
@@ -1 +0,0 @@
1
- Cut-based AOP for Ruby
data/meta/version DELETED
@@ -1 +0,0 @@
1
- 1.0.0
data/test/test_aop.rb DELETED
@@ -1,49 +0,0 @@
1
- require 'test/unit'
2
- require 'cuts'
3
-
4
- class TestAop < Test::Unit::TestCase
5
-
6
- class X
7
- def x; "x"; end
8
- def y; "y"; end
9
- def q; "<" + x + ">"; end
10
- end
11
-
12
- Xa = Aspect.new do
13
- join :x do |jp|
14
- jp == :x
15
- end
16
-
17
- def x(target); '{' + target.super + '}'; end
18
- end
19
-
20
- X.apply(Xa)
21
-
22
- def setup
23
- @x1 = X.new
24
- end
25
-
26
- def test_class
27
- assert_equal(X, @x1.class)
28
- end
29
-
30
- def test_public_methods
31
- meths = @x1.public_methods(false)
32
- assert(meths.include?("y"))
33
- assert(meths.include?("q"))
34
- assert(meths.include?("x"))
35
- end
36
-
37
- def test_x
38
- assert_equal("{x}", @x1.x)
39
- end
40
-
41
- def test_y
42
- assert_equal("y", @x1.y)
43
- end
44
-
45
- def test_q
46
- assert_equal("<{x}>", @x1.q)
47
- end
48
-
49
- end
data/test/test_cut.rb DELETED
@@ -1,85 +0,0 @@
1
- require 'test/unit'
2
- require 'cuts'
3
-
4
- class TestCut < Test::Unit::TestCase
5
-
6
- class X
7
- def x; "x"; end
8
- end
9
-
10
- Xc = Cut.new(X) do
11
- def x; '{' + super + '}'; end
12
- end
13
-
14
- def test_method_is_wrapped_by_advice
15
- o = X.new
16
- assert_equal("{x}", o.x)
17
- end
18
-
19
- end
20
-
21
- class TestCut1 < Test::Unit::TestCase
22
-
23
- class F
24
- def f ; "f" ; end
25
- end
26
-
27
- cut :G < F do
28
- #join :f => :f
29
- def f; '<'+super+'>' ; end
30
- end
31
-
32
- def test_1_01
33
- f = F.new
34
- assert_equal( "<f>", f.f )
35
- assert_equal( F, f.class )
36
- end
37
-
38
- def test_1_02
39
- assert(G)
40
- assert_equal( "TestCut1::G", G.name )
41
- end
42
-
43
- end
44
-
45
- # Test multiple cuts.
46
-
47
- class TestCut2 < Test::Unit::TestCase
48
-
49
- class F
50
- def f ; "f" ; end
51
- end
52
-
53
- cut :G < F do
54
- #join :f => :f
55
- def f; '<'+super+'>' ; end
56
- end
57
-
58
- cut :Q < F do
59
- #join :f => :f
60
- def f; '['+super+']'; end
61
- end
62
-
63
- #def test_2_01
64
- # assert_equal( [Q, G], F.cuts )
65
- # assert_equal( [Q, G], F.predecessors )
66
- #end
67
-
68
- def test_2_02
69
- f = F.new
70
- assert_equal( F, f.class )
71
- assert_equal( "[<f>]", f.f )
72
- end
73
-
74
- def test_2_03
75
- assert(G)
76
- assert_equal( "TestCut2::G", G.name )
77
- end
78
-
79
- def test_2_04
80
- assert(Q)
81
- assert_equal( "TestCut2::Q", Q.name )
82
- end
83
-
84
- end
85
-