cosell 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,40 @@
1
+
2
+ if test(?e, PROJ.test.file) or not PROJ.test.files.to_a.empty?
3
+ require 'rake/testtask'
4
+
5
+ namespace :test do
6
+
7
+ Rake::TestTask.new(:run) do |t|
8
+ t.libs = PROJ.libs
9
+ t.test_files = if test(?f, PROJ.test.file) then [PROJ.test.file]
10
+ else PROJ.test.files end
11
+ t.ruby_opts += PROJ.ruby_opts
12
+ t.ruby_opts += PROJ.test.opts
13
+ end
14
+
15
+ if HAVE_RCOV
16
+ desc 'Run rcov on the unit tests'
17
+ task :rcov => :clobber_rcov do
18
+ opts = PROJ.rcov.opts.dup << '-o' << PROJ.rcov.dir
19
+ opts = opts.join(' ')
20
+ files = if test(?f, PROJ.test.file) then [PROJ.test.file]
21
+ else PROJ.test.files end
22
+ files = files.join(' ')
23
+ sh "#{RCOV} #{files} #{opts}"
24
+ end
25
+
26
+ task :clobber_rcov do
27
+ rm_r 'coverage' rescue nil
28
+ end
29
+ end
30
+
31
+ end # namespace :test
32
+
33
+ desc 'Alias to test:run'
34
+ task :test => 'test:run'
35
+
36
+ task :clobber => 'test:clobber_rcov' if HAVE_RCOV
37
+
38
+ end
39
+
40
+ # EOF
@@ -0,0 +1,36 @@
1
+ if HAVE_ZENTEST
2
+
3
+ # --------------------------------------------------------------------------
4
+ if test(?e, PROJ.test.file) or not PROJ.test.files.to_a.empty?
5
+ require 'autotest'
6
+
7
+ namespace :test do
8
+ task :autotest do
9
+ Autotest.run
10
+ end
11
+ end
12
+
13
+ desc "Run the autotest loop"
14
+ task :autotest => 'test:autotest'
15
+
16
+ end # if test
17
+
18
+ # --------------------------------------------------------------------------
19
+ if HAVE_SPEC_RAKE_SPECTASK and not PROJ.spec.files.to_a.empty?
20
+ require 'autotest/rspec'
21
+
22
+ namespace :spec do
23
+ task :autotest do
24
+ load '.autotest' if test(?f, '.autotest')
25
+ Autotest::Rspec.run
26
+ end
27
+ end
28
+
29
+ desc "Run the autotest loop"
30
+ task :autotest => 'spec:autotest'
31
+
32
+ end # if rspec
33
+
34
+ end # if HAVE_ZENTEST
35
+
36
+ # EOF
metadata ADDED
@@ -0,0 +1,126 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cosell
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Steven Swerling
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-10-11 00:00:00 -04:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: bones
17
+ type: :development
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 2.5.1
24
+ version:
25
+ description: |-
26
+ Cosell is a minimal implementation of the 'Announcements' observer
27
+ framework, originally introduced in VisualWorks Smalltalk as a
28
+ replacement for 'triggerEvent' style of event notification. Instead of
29
+ triggering events identified by symbols, the events are first class
30
+ objects. For rationale, please see the original blog posting by Vassili
31
+ Bykov (refs below).
32
+
33
+ *Lineage*
34
+
35
+ This implementation is loosely based on Lukas Renggli's tweak of Colin Putney's
36
+ Squeak implementation of Vassili Bykov's Announcements framework for
37
+ VisualWorks Smalltalk. (Specifically Announcements-lr.13.mcz was used as
38
+ a reference.)
39
+
40
+ Liberties where taken during the port. In particular, the Announcer class
41
+ in the Smalltalk version is implemented here as a ruby module which can be
42
+ mixed into any object. Also, in this implementation any object (or class)
43
+ can serve as an announcement, so no Announcement class is implemented.
44
+
45
+ The ability to queue announcements in the background is built into cosell.
46
+
47
+ <b>The Name 'Cosell'</b>
48
+
49
+ I chose the name 'Cosell' because
50
+
51
+ a. Howard Cosell is an iconic event announcer
52
+ b. Googling for 'Ruby Announcements', 'Ruby Event Announcements', etc., produced scads of results about ruby meetups, conferences, and the like. So I went with something a bit cryptic but hopefully a little more searchable.
53
+
54
+ *See*
55
+
56
+ * {Original blog posting describing Announcments by Vassili Bykov}[http://www.cincomsmalltalk.com/userblogs/vbykov/blogView?entry=3310034894]
57
+ * {More info on the Announcements Framework}[http://wiki.squeak.org/squeak/5734]
58
+ email: sswerling@yahoo.com
59
+ executables: []
60
+
61
+ extensions: []
62
+
63
+ extra_rdoc_files:
64
+ - History.txt
65
+ - README.rdoc
66
+ files:
67
+ - .gitignore
68
+ - History.txt
69
+ - README.rdoc
70
+ - Rakefile
71
+ - cosell.gemspec
72
+ - example/basic_example.rb
73
+ - example/cat_whisperer.rb
74
+ - lib/cosell.rb
75
+ - lib/cosell/announcer.rb
76
+ - lib/cosell/monkey.rb
77
+ - spec/cosell_spec.rb
78
+ - spec/spec_helper.rb
79
+ - tasks/ann.rake
80
+ - tasks/bones.rake
81
+ - tasks/gem.rake
82
+ - tasks/git.rake
83
+ - tasks/notes.rake
84
+ - tasks/post_load.rake
85
+ - tasks/rdoc.rake
86
+ - tasks/rubyforge.rake
87
+ - tasks/setup.rb
88
+ - tasks/spec.rake
89
+ - tasks/svn.rake
90
+ - tasks/test.rake
91
+ - tasks/zentest.rake
92
+ has_rdoc: true
93
+ homepage: http://github.com/swerling/TODO
94
+ licenses: []
95
+
96
+ post_install_message:
97
+ rdoc_options:
98
+ - --inline-source
99
+ - -o rdoc
100
+ - --format=html
101
+ - -T hanna
102
+ - --main
103
+ - README.rdoc
104
+ require_paths:
105
+ - lib
106
+ required_ruby_version: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: "0"
111
+ version:
112
+ required_rubygems_version: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: "0"
117
+ version:
118
+ requirements: []
119
+
120
+ rubyforge_project: cosell
121
+ rubygems_version: 1.3.2
122
+ signing_key:
123
+ specification_version: 3
124
+ summary: Cosell is a minimal implementation of the 'Announcements' observer framework, originally introduced in VisualWorks Smalltalk as a replacement for 'triggerEvent' style of event notification
125
+ test_files: []
126
+