paramix 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY CHANGED
@@ -1,5 +1,15 @@
1
1
  = RELEASE HISTORY
2
2
 
3
+ == 1.0.1 // 2010-04-03
4
+
5
+ This release simply removed dependencies on Facets.
6
+
7
+ Changes:
8
+
9
+ * Removed dependencies on Facets module/basename and module/modspace.
10
+ * Divided tests into separate files.
11
+
12
+
3
13
  == 1.0.0 // 2009-06-29
4
14
 
5
15
  This is the initial stand-alone release of Paramix
@@ -0,0 +1,79 @@
1
+ ---
2
+ announce:
3
+ service : Email
4
+ file : ~
5
+ subject : ~
6
+ mailto : ruby-talk@ruby-lang.org
7
+ active : true
8
+
9
+ box:
10
+ service: Box
11
+ active : true
12
+ types : [gem, tar]
13
+ include: [bin, demo, lib, meta, test, "[A-Z]*"]
14
+ exclude: ~
15
+
16
+ rdoc:
17
+ service : RDoc
18
+ template : redfish
19
+ include : ~
20
+ exclude : ~
21
+ main : ~
22
+ extra : ~
23
+ active : true
24
+
25
+ ridoc:
26
+ service: RIDoc
27
+ include: ~
28
+ exclude: ~
29
+ active : true
30
+
31
+ notes:
32
+ service : DNotes
33
+ loadpath : ~
34
+ labels : ~
35
+ output : ~
36
+ format : ~
37
+ active : false
38
+
39
+ stats:
40
+ service : Stats
41
+ title : ~
42
+ loadpath : ~
43
+ exclude : ~
44
+ output : ~
45
+ active : true
46
+
47
+ testrb:
48
+ service : testrb
49
+ tests : ~
50
+ exclude : ~
51
+ loadpath : ~
52
+ requires : ~
53
+ live : false
54
+ active : true
55
+
56
+ syntax:
57
+ service : Syntax
58
+ loadpath : ~
59
+ exclude : ~
60
+ active : false
61
+
62
+ vclog:
63
+ service : VClog
64
+ format : html # xml, txt
65
+ layout : rel # gnu
66
+ typed : false
67
+ output : ~
68
+ active : false
69
+
70
+
71
+ #rubyforge:
72
+ # service : Rubyforge
73
+ # unixname: <%= project %>
74
+ # groupid : ~
75
+ # package : <%= package %>
76
+ # sitemap:
77
+ # doc/rdoc: <%= package %>
78
+ # active : false
79
+
@@ -25,8 +25,6 @@
25
25
  #
26
26
  # - Thomas Sawyer
27
27
 
28
- require 'facets/module/basename'
29
- require 'facets/module/modspace'
30
28
 
31
29
  # = Parametric Mixin
32
30
  #
@@ -196,6 +194,7 @@ class Module
196
194
  def mixin_parameters
197
195
  @mixin_parameters ||= {}
198
196
  end
197
+
199
198
  alias_method :mixin_params, :mixin_parameters
200
199
 
201
200
  end
@@ -1 +1 @@
1
- trans <transfire@gmail.com>
1
+ Thomas Sawyer
File without changes
@@ -0,0 +1 @@
1
+ trans <transfire@gmail.com>
File without changes
@@ -0,0 +1 @@
1
+ http://rubyworks.github.com/paramix
@@ -0,0 +1 @@
1
+ git://github.com/rubyworks/paramix.git
@@ -0,0 +1 @@
1
+ Parametric Mixins
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.1
@@ -0,0 +1,36 @@
1
+ require 'paramix'
2
+ require 'test/unit'
3
+
4
+ class TC_Paramix_Basic < Test::Unit::TestCase
5
+
6
+ module M
7
+ include Paramix
8
+
9
+ def f
10
+ mixin_params[M][:p]
11
+ end
12
+ end
13
+
14
+ class C
15
+ extend M[:p => "mosh"]
16
+ end
17
+
18
+ class D
19
+ extend M[:p => "many"]
20
+ end
21
+
22
+ def test_03_001
23
+ assert_equal( "mosh", C.f )
24
+ end
25
+
26
+ def test_03_002
27
+ assert_equal( "many", D.f )
28
+ end
29
+
30
+ def test_03_003
31
+ assert_equal( {M=>{:p => "mosh"}}, (class << C; self; end).mixin_parameters )
32
+ assert_equal( {M=>{:p => "many"}}, (class << D; self; end).mixin_parameters )
33
+ end
34
+
35
+ end
36
+
@@ -0,0 +1,56 @@
1
+ require 'paramix'
2
+ require 'test/unit'
3
+
4
+ class TC_Paramix_Callback < Test::Unit::TestCase
5
+
6
+ module M
7
+ include Paramix
8
+
9
+ def f
10
+ mixin_params[M][:p]
11
+ end
12
+
13
+ def self.included(base)
14
+ params = base.mixin_params[self]
15
+ base.class_eval do
16
+ define_method :check do
17
+ params
18
+ end
19
+ end
20
+ end
21
+ end
22
+
23
+ class C
24
+ include M[:p => "check"]
25
+ end
26
+
27
+ class D
28
+ include M[:p => "steak"]
29
+ end
30
+
31
+ def test_01_001
32
+ c = C.new
33
+ assert_equal( "check", c.mixin_params[M][:p] )
34
+ assert_equal( "check", c.f )
35
+ end
36
+
37
+ def test_01_002
38
+ d = D.new
39
+ assert_equal( "steak", d.mixin_params[M][:p] )
40
+ assert_equal( "steak", d.f )
41
+ end
42
+
43
+ def test_01_003
44
+ assert_equal( {M=>{:p => "check"}}, C.mixin_parameters )
45
+ assert_equal( {M=>{:p => "steak"}}, D.mixin_parameters )
46
+ end
47
+
48
+ def test_01_004
49
+ c = C.new
50
+ assert_equal( {:p => "check"}, c.check )
51
+ d = D.new
52
+ assert_equal( {:p => "steak"}, d.check )
53
+ end
54
+
55
+ end
56
+
@@ -1,59 +1,6 @@
1
- require 'facets/paramix.rb'
1
+ require 'paramix'
2
2
  require 'test/unit'
3
3
 
4
- class TC_Paramix_01 < Test::Unit::TestCase
5
-
6
- module M
7
- include Paramix
8
-
9
- def f
10
- mixin_params[M][:p]
11
- end
12
-
13
- def self.included(base)
14
- params = base.mixin_params[self]
15
- base.class_eval do
16
- define_method :check do
17
- params
18
- end
19
- end
20
- end
21
- end
22
-
23
- class C
24
- include M[:p => "check"]
25
- end
26
-
27
- class D
28
- include M[:p => "steak"]
29
- end
30
-
31
- def test_01_001
32
- c = C.new
33
- assert_equal( "check", c.mixin_params[M][:p] )
34
- assert_equal( "check", c.f )
35
- end
36
-
37
- def test_01_002
38
- d = D.new
39
- assert_equal( "steak", d.mixin_params[M][:p] )
40
- assert_equal( "steak", d.f )
41
- end
42
-
43
- def test_01_003
44
- assert_equal( {M=>{:p => "check"}}, C.mixin_parameters )
45
- assert_equal( {M=>{:p => "steak"}}, D.mixin_parameters )
46
- end
47
-
48
- def test_01_004
49
- c = C.new
50
- assert_equal( {:p => "check"}, c.check )
51
- d = D.new
52
- assert_equal( {:p => "steak"}, d.check )
53
- end
54
-
55
- end
56
-
57
4
  class TC_Paramix_02 < Test::Unit::TestCase
58
5
 
59
6
  module M
@@ -105,40 +52,6 @@ class TC_Paramix_02 < Test::Unit::TestCase
105
52
 
106
53
  end
107
54
 
108
- class TC_Paramix_03 < Test::Unit::TestCase
109
-
110
- module M
111
- include Paramix
112
-
113
- def f
114
- mixin_params[M][:p]
115
- end
116
- end
117
-
118
- class C
119
- extend M[:p => "mosh"]
120
- end
121
-
122
- class D
123
- extend M[:p => "many"]
124
- end
125
-
126
- def test_03_001
127
- assert_equal( "mosh", C.f )
128
- end
129
-
130
- def test_03_002
131
- assert_equal( "many", D.f )
132
- end
133
-
134
- def test_03_003
135
- assert_equal( {M=>{:p => "mosh"}}, (class << C; self; end).mixin_parameters )
136
- assert_equal( {M=>{:p => "many"}}, (class << D; self; end).mixin_parameters )
137
- end
138
-
139
- end
140
-
141
-
142
55
  class TC_Paramix_04 < Test::Unit::TestCase
143
56
 
144
57
  module O
@@ -0,0 +1,40 @@
1
+ require 'paramix'
2
+ require 'test/unit'
3
+
4
+ class TC_Paramix_Basic < Test::Unit::TestCase
5
+
6
+ module Q1
7
+ module M
8
+ include Paramix
9
+
10
+ def f
11
+ mixin_params[M][:p]
12
+ end
13
+ end
14
+ end
15
+
16
+ module Q2
17
+ class C
18
+ extend Q1::M[:p => "mosh"]
19
+ end
20
+
21
+ class D
22
+ extend Q1::M[:p => "many"]
23
+ end
24
+ end
25
+
26
+ def test_03_001
27
+ assert_equal( "mosh", Q2::C.f )
28
+ end
29
+
30
+ def test_03_002
31
+ assert_equal( "many", Q2::D.f )
32
+ end
33
+
34
+ def test_03_003
35
+ assert_equal( {Q1::M=>{:p => "mosh"}}, (class << Q2::C; self; end).mixin_parameters )
36
+ assert_equal( {Q1::M=>{:p => "many"}}, (class << Q2::D; self; end).mixin_parameters )
37
+ end
38
+
39
+ end
40
+
metadata CHANGED
@@ -1,75 +1,88 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paramix
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ prerelease: false
5
+ segments:
6
+ - 1
7
+ - 0
8
+ - 1
9
+ version: 1.0.1
5
10
  platform: ruby
6
11
  authors:
7
- - trans <transfire@gmail.com>
12
+ - Thomas Sawyer
8
13
  autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2009-09-22 00:00:00 -04:00
17
+ date: 2010-04-03 00:00:00 -04:00
13
18
  default_executable:
14
19
  dependencies: []
15
20
 
16
21
  description: Parametric Mixins provides parameters for mixin modules.
17
- email: trans <transfire@gmail.com>
22
+ email:
18
23
  executables: []
19
24
 
20
25
  extensions: []
21
26
 
22
- extra_rdoc_files:
23
- - MANIFEST
24
- - LICENSE
25
- - README.rdoc
26
- - HISTORY
27
+ extra_rdoc_files: []
28
+
27
29
  files:
28
30
  - lib/paramix.rb
29
31
  - meta/authors
32
+ - meta/collection
33
+ - meta/contact
30
34
  - meta/created
31
35
  - meta/description
32
36
  - meta/homepage
33
37
  - meta/license
34
- - meta/package
35
- - meta/project
38
+ - meta/name
36
39
  - meta/repository
40
+ - meta/resources/homepage
41
+ - meta/resources/repository
42
+ - meta/summary
37
43
  - meta/title
38
44
  - meta/version
39
- - test/test_paramix.rb
45
+ - test/test_paramix_basic.rb
46
+ - test/test_paramix_callback.rb
47
+ - test/test_paramix_inject.rb
48
+ - test/test_paramix_namespace.rb
40
49
  - LICENSE
41
50
  - README.rdoc
42
51
  - HISTORY
43
- - MANIFEST
52
+ - Syckfile
44
53
  has_rdoc: true
45
54
  homepage: http://rubyworks.github.com/paramix
46
55
  licenses: []
47
56
 
48
57
  post_install_message:
49
58
  rdoc_options:
50
- - --inline-source
51
59
  - --title
52
- - paramix api
60
+ - Paramix API
53
61
  require_paths:
54
62
  - lib
55
63
  required_ruby_version: !ruby/object:Gem::Requirement
56
64
  requirements:
57
65
  - - ">="
58
66
  - !ruby/object:Gem::Version
67
+ segments:
68
+ - 0
59
69
  version: "0"
60
- version:
61
70
  required_rubygems_version: !ruby/object:Gem::Requirement
62
71
  requirements:
63
72
  - - ">="
64
73
  - !ruby/object:Gem::Version
74
+ segments:
75
+ - 0
65
76
  version: "0"
66
- version:
67
77
  requirements: []
68
78
 
69
79
  rubyforge_project: paramix
70
- rubygems_version: 1.3.5
80
+ rubygems_version: 1.3.6.pre.3
71
81
  signing_key:
72
82
  specification_version: 3
73
- summary: Parametric Mixins provides parameters for mixin modules.
83
+ summary: Parametric Mixins
74
84
  test_files:
75
- - test/test_paramix.rb
85
+ - test/test_paramix_basic.rb
86
+ - test/test_paramix_callback.rb
87
+ - test/test_paramix_inject.rb
88
+ - test/test_paramix_namespace.rb
data/MANIFEST DELETED
@@ -1,19 +0,0 @@
1
- #!mast bin lib meta test [A-Z]*
2
- lib
3
- lib/paramix.rb
4
- meta
5
- meta/authors
6
- meta/created
7
- meta/description
8
- meta/homepage
9
- meta/license
10
- meta/package
11
- meta/project
12
- meta/repository
13
- meta/title
14
- meta/version
15
- test
16
- test/test_paramix.rb
17
- LICENSE
18
- README.rdoc
19
- HISTORY