stream 0.5 → 0.5.4

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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 55354ecc39933e7f4be1b3b1eaa9bcfec109b00346f739e2f6c675a333ed17e9
4
+ data.tar.gz: aab007abb0bf1bf998be99a9806d3e3d9a8f305a422ce01ac83ea586b42a778a
5
+ SHA512:
6
+ metadata.gz: 416c8fe937cc016744b8325bd3f15a6210a51fe17900de8e1db8b405ef5793cd2344ff3f0e9b0a3e336bf71c1497b9f84137238f4f92431fa861056f6a34646c
7
+ data.tar.gz: c07f8c66b7ca2d3a3e7c355b9b7bdbb6bd3151c9871159b0c92376773a732b9fdbabc2e1727f6b4c822b4412aa67a17f0601afd969f50ecd1a9751618e4c72e3
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,30 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ stream (0.5.4)
5
+ generator
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ generator (0.0.1)
11
+ power_assert (1.1.3)
12
+ rake (12.3.2)
13
+ rdoc (6.1.1)
14
+ test-unit (3.2.9)
15
+ power_assert
16
+ yard (0.9.16)
17
+
18
+ PLATFORMS
19
+ ruby
20
+ x86_64-linux
21
+
22
+ DEPENDENCIES
23
+ rake
24
+ rdoc
25
+ stream!
26
+ test-unit
27
+ yard
28
+
29
+ BUNDLED WITH
30
+ 2.3.8
data/LICENSE ADDED
@@ -0,0 +1,56 @@
1
+ Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
2
+ You can redistribute it and/or modify it under either the terms of the
3
+ 2-clause BSDL (see the file BSDL), or the conditions below:
4
+
5
+ 1. You may make and give away verbatim copies of the source form of the
6
+ software without restriction, provided that you duplicate all of the
7
+ original copyright notices and associated disclaimers.
8
+
9
+ 2. You may modify your copy of the software in any way, provided that
10
+ you do at least ONE of the following:
11
+
12
+ a) place your modifications in the Public Domain or otherwise
13
+ make them Freely Available, such as by posting said
14
+ modifications to Usenet or an equivalent medium, or by allowing
15
+ the author to include your modifications in the software.
16
+
17
+ b) use the modified software only within your corporation or
18
+ organization.
19
+
20
+ c) give non-standard binaries non-standard names, with
21
+ instructions on where to get the original software distribution.
22
+
23
+ d) make other distribution arrangements with the author.
24
+
25
+ 3. You may distribute the software in object code or binary form,
26
+ provided that you do at least ONE of the following:
27
+
28
+ a) distribute the binaries and library files of the software,
29
+ together with instructions (in the manual page or equivalent)
30
+ on where to get the original distribution.
31
+
32
+ b) accompany the distribution with the machine-readable source of
33
+ the software.
34
+
35
+ c) give non-standard binaries non-standard names, with
36
+ instructions on where to get the original software distribution.
37
+
38
+ d) make other distribution arrangements with the author.
39
+
40
+ 4. You may modify and include the part of the software into any other
41
+ software (possibly commercial). But some files in the distribution
42
+ are not written by the author, so that they are not under these terms.
43
+
44
+ For the list of those files and their copying conditions, see the
45
+ file LEGAL.
46
+
47
+ 5. The scripts and library files supplied as input to or produced as
48
+ output from the software do not automatically fall under the
49
+ copyright of the software, but belong to whomever generated them,
50
+ and may be sold commercially, and may be aggregated with this
51
+ software.
52
+
53
+ 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
54
+ IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
55
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
56
+ PURPOSE.
@@ -1,3 +1,5 @@
1
+ {<img src="https://github.com/monora/stream/actions/workflows/ruby.yml/badge.svg" alt="Build Status" />}[https://github.com/monora/stream/actions/workflows/ruby.yml]
2
+
1
3
  = Extended External Iterators (forward and backward)
2
4
 
3
5
  == Description
@@ -24,7 +26,7 @@ exactly defined
24
26
  s.current_edge == [s.current, s.peek]
25
27
 
26
28
  If s a stream on [x1,...,xn]. Consider the edges [xi,xi+1] i=1,...,n and
27
- [x0,x1] and [xn,xn+1] (x0 and xn are helper elements to define the boundary
29
+ [x0,x1] and [xn,xn+1] (x0 and xn+1 are helper elements to define the boundary
28
30
  conditions). Then if s is non empty, the following conditions must be true:
29
31
 
30
32
  s.at_beginning? <=> s.current_edge == [x0,x1]
@@ -87,7 +89,7 @@ There are several concrete classes implementing the stream interface:
87
89
 
88
90
  The latest version of stream.rb can be found at
89
91
 
90
- * http://rubyforge.org/frs/?group_id=110
92
+ * http://github.com/monora/stream
91
93
 
92
94
  == Installation
93
95
 
@@ -112,7 +114,6 @@ root privileges to install.
112
114
 
113
115
  * Streams in Smalltalk: http://wiki.cs.uiuc.edu/PatternStories/FunWithStreams
114
116
  * Simon Strandgaards iterator.rb[http://aeditor.rubyforge.org/iterator/files/iterator_rb.html]
115
- * IterationStyles: http://www.rubygarden.org/ruby?IterationStyles
116
117
 
117
118
  == Examples
118
119
 
@@ -166,9 +167,6 @@ root privileges to install.
166
167
 
167
168
  == Other Stuff
168
169
 
169
- $Revision: 1.1.1.1 $
170
- $Date: 2004/05/13 23:30:03 $
171
-
172
- Author:: Horst Duchene <hd.at.clr@hduchene.de>
173
- License:: Copyright (c) 2001, 2004 Horst Duchene
170
+ Author:: Horst Duchene
171
+ License:: Copyright (c) 2001, 2013, 2016, 2020 Horst Duchene
174
172
  Released under the same license as Ruby
data/Rakefile CHANGED
@@ -1,22 +1,15 @@
1
- # Rakefile for -*- ruby -*-
1
+ # Rakefile for stream -*- ruby -*-
2
2
 
3
- begin
4
- require 'rubygems'
5
- rescue Exception
6
- nil
7
- end
8
- require 'rake/clean'
9
- require 'rake/testtask'
10
- require 'rake/gempackagetask'
11
- require 'rake/rdoctask'
3
+ require 'rubygems'
4
+ require 'bundler/setup'
5
+ require 'rubygems/package_task'
12
6
 
13
- # Determine the current version of the software
7
+ require 'rake/testtask'
8
+ require 'rake/clean'
9
+ require 'yard'
14
10
 
15
- if `ruby -Ilib -rstream -e'puts STREAM_VERSION'` =~ /\S+$/
16
- PKG_VERSION = $&
17
- else
18
- PKG_VERSION = "0.0.0"
19
- end
11
+ $:.unshift File.join(File.dirname(__FILE__), 'lib')
12
+ require 'stream' # require module to STREAM_VERSION
20
13
 
21
14
  SRC_RB = FileList['lib/*.rb']
22
15
 
@@ -27,11 +20,11 @@ task :default => :test
27
20
 
28
21
  # Define a test task.
29
22
 
30
- Rake::TestTask.new { |t|
31
- #t.libs << "tests"
32
- #t.pattern = 'tests/Test*.rb'
23
+ Rake::TestTask.new do |t|
24
+ t.libs << 'test'
25
+ t.pattern = 'test/test*.rb'
33
26
  t.verbose = true
34
- }
27
+ end
35
28
 
36
29
  task :test
37
30
 
@@ -39,123 +32,19 @@ task :test
39
32
  desc "Run all test targets"
40
33
  task :testall => [:test ]
41
34
 
42
- # Install stream using the standard install.rb script.
35
+ # Git tagging
43
36
 
44
- desc "Install the application"
45
- task :install do
46
- ruby "install.rb"
37
+ desc "Commit all changes as a new version commit. Tag the commit with v<version> tag"
38
+ task :tag do
39
+ puts "Committing and tagging version #{STREAM_VERSION}"
40
+ `git commit -am 'Version #{STREAM_VERSION}'`
41
+ `git tag 'v#{STREAM_VERSION}'`
47
42
  end
48
43
 
49
- # Create a task to build the RDOC documentation tree.
50
-
51
- rd = Rake::RDocTask.new("rdoc") { |rdoc|
52
- rdoc.rdoc_dir = 'html'
53
- # rdoc.template = 'kilmer'
54
- # rdoc.template = 'css2'
55
- rdoc.title = "Stream - Extended External Iterators"
56
- rdoc.options << '--line-numbers' << '--inline-source'
57
- rdoc.rdoc_files.include('README')
58
- rdoc.rdoc_files.include('lib/*.rb', 'doc/**/*.rdoc')
59
- }
60
-
61
- # ====================================================================
62
- # Create a task that will package the stream software into distributable
63
- # tar, zip and gem files.
64
-
65
- PKG_FILES = FileList[
66
- 'install.rb',
67
- '[A-Z]*',
68
- 'lib/**/*.rb',
69
- 'test/**/*.rb',
70
- 'examples/**/*'
71
- ]
72
-
73
- if ! defined?(Gem)
74
- puts "Package Target requires RubyGEMs"
75
- else
76
- spec = Gem::Specification.new do |s|
77
-
78
- #### Basic information.
79
-
80
- s.name = 'stream'
81
- s.version = PKG_VERSION
82
- s.summary = "Stream - Extended External Iterators"
83
- s.description = <<-EOF
84
- Module Stream defines an interface for external iterators.
85
- EOF
86
-
87
- #### Dependencies and requirements.
88
-
89
- #s.add_dependency('log4r', '> 1.0.4')
90
- #s.requirements << ""
91
-
92
- #### Which files are to be included in this gem? Everything! (Except CVS directories.)
93
-
94
- s.files = PKG_FILES.to_a
44
+ # Documentation
95
45
 
96
- #### C code extensions.
46
+ YARD::Rake::YardocTask.new
97
47
 
98
- #s.extensions << "ext/rmagic/extconf.rb"
48
+ # Tasks for building and installing Stream gem.
99
49
 
100
- #### Load-time details: library and application (you will need one or both).
101
-
102
- s.require_path = 'lib' # Use these for libraries.
103
- s.autorequire = 'stream'
104
-
105
- #### Documentation and testing.
106
-
107
- s.has_rdoc = true
108
- #s.test_suite_file = "test/rmagic-tests.rb"
109
-
110
- #### Author and project details.
111
- s.author = "Horst Duchene"
112
- s.email = "hd.at.clr@hduchene.de"
113
- s.homepage = "http://rgl.rubyforge.org"
114
- s.rubyforge_project = "rgl"
115
- end
116
-
117
- Rake::GemPackageTask.new(spec) do |pkg|
118
- pkg.need_zip = true
119
- pkg.need_tar = true
120
- end
121
- end
122
-
123
- # Misc tasks =========================================================
124
-
125
- def count_lines(filename)
126
- lines = 0
127
- codelines = 0
128
- open(filename) { |f|
129
- f.each do |line|
130
- lines += 1
131
- next if line =~ /^\s*$/
132
- next if line =~ /^\s*#/
133
- codelines += 1
134
- end
135
- }
136
- [lines, codelines]
137
- end
138
-
139
- def show_line(msg, lines, loc)
140
- printf "%6s %6s %s\n", lines.to_s, loc.to_s, msg
141
- end
142
-
143
- desc "Count lines in the main files"
144
- task :lines do
145
- total_lines = 0
146
- total_code = 0
147
- show_line("File Name", "LINES", "LOC")
148
- SRC_RB.each do |fn|
149
- lines, codelines = count_lines(fn)
150
- show_line(fn, lines, codelines)
151
- total_lines += lines
152
- total_code += codelines
153
- end
154
- show_line("TOTAL", total_lines, total_code)
155
- end
156
-
157
- ARCHIVEDIR = '/mnt/flash'
158
-
159
- task :archive => [:package] do
160
- cp FileList["pkg/*.tgz", "pkg/*.zip", "pkg/*.gem"], ARCHIVEDIR
161
- end
50
+ Bundler::GemHelper.install_tasks