positionrange 0.6.0 → 0.6.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/CHANGELOG.txt CHANGED
@@ -1,3 +1,8 @@
1
1
  *0.6.0* (28 December 2008)
2
2
 
3
3
  * First release as a gem
4
+
5
+
6
+ *0.6.1* (31 December 2008)
7
+
8
+ * Updated README.txt
data/README.txt CHANGED
@@ -14,32 +14,44 @@ http://www.logilogi.org (http://foundation.logilogi.org).
14
14
 
15
15
  == Usage
16
16
 
17
- You can assign random attributes to PositionRanges.
17
+ First require it.
18
+
19
+ $ irb
18
20
 
19
- r = PositionRange.new(1,10, :cow => 'moo')
21
+ > require 'rubygems'
22
+ > require 'positionrange'
23
+
24
+ You can assign random attributes to PositionRanges.
20
25
 
21
- r.cow => 'moo'
26
+ > r = PositionRange.new(1,10, :cow => 'moo')
27
+ => 1...10
28
+ > r.cow
29
+ => "moo"
22
30
 
23
31
  You can also create a PositionRange::List directly from a string.
24
32
 
25
- l = PositionRange::List.from_s('0,10:5,15')
33
+ > l = PositionRange::List.from_s('0,10:5,15')
34
+ => [0...10, 5...15]
26
35
 
27
36
  Then you can get the combined size.
28
37
 
29
- l.range_size => 20
38
+ > l.range_size
39
+ => 20
30
40
 
31
41
  Or line up overlaps.
32
42
 
33
- l.line_up_overlaps!.to_s => '0,5:5,10:5,10:10,15'
43
+ > l.line_up_overlaps!.to_s
44
+ => "0,5:5,10:5,10:10,15"
34
45
 
35
46
  Clustering overlaps maintains attributes.
36
47
 
37
- l = PositionRange::List.new([
38
- PositionRange.new(0,10, :cow => 'moo'),
39
- PositionRange.new(5,15, :goat => 7)
40
- ])
48
+ > l = PositionRange::List.new([
49
+ PositionRange.new(0,10, :cow => 'moo'),
50
+ PositionRange.new(5,15, :goat => 7)
51
+ ])
52
+ => [0...10, 5...15]
41
53
 
42
- l.cluster_overlaps => [
54
+ > output = [
43
55
  PositionRange::List.new([
44
56
  PositionRange.new(0,5, :cow => 'moo')]),
45
57
  PositionRange::List.new([
@@ -48,6 +60,10 @@ Clustering overlaps maintains attributes.
48
60
  PositionRange::List.new([
49
61
  PositionRange.new(10,15, :goat => 7)])
50
62
  ]
63
+ => [[0...5], [5...10, 5...10], [10...15]]
64
+
65
+ > l.cluster_overlaps == output
66
+ => true
51
67
 
52
68
  == Download
53
69
 
data/Rakefile CHANGED
@@ -68,17 +68,10 @@ Rake::GemPackageTask.new(spec) do |p|
68
68
  end
69
69
 
70
70
  desc "Publish the docs, gem, and release files"
71
- task :publish => [:release, :pgem, :pdoc] do
71
+ task :deploy => [:release, :pdoc] do
72
72
  puts 'Published gem'
73
73
  end
74
74
 
75
- desc "Publish the gem"
76
- task :pgem => [:package] do
77
- Rake::SshFilePublisher.new("gems.rubyonrails.org",
78
- "/u/sites/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload
79
- `ssh gems.rubyonrails.org '/u/sites/gems/gemupdate.sh'`
80
- end
81
-
82
75
  desc "Publish the API documentation"
83
76
  task :pdoc => [:rdoc] do
84
77
  sh "rsync -azv --no-perms --no-times doc/*" +
@@ -2,7 +2,7 @@ module PositionRange
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 6
5
- TINY = 0
5
+ TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -28,7 +28,7 @@
28
28
  # first...last, not first..last
29
29
 
30
30
  $:.unshift(File.dirname(__FILE__)) unless
31
- $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
31
+ $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
32
32
 
33
33
  class PositionRange < Range
34
34
  include Comparable
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: positionrange
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wybo Wiersma
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-12-29 00:00:00 +01:00
12
+ date: 2008-12-31 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -28,11 +28,11 @@ files:
28
28
  - CHANGELOG.txt
29
29
  - LICENSE.txt
30
30
  - lib/position_range.rb
31
- - lib/positionrange.rb
32
31
  - lib/position_range
32
+ - lib/position_range/version.rb
33
33
  - lib/position_range/error.rb
34
34
  - lib/position_range/list.rb
35
- - lib/position_range/version.rb
35
+ - lib/positionrange.rb
36
36
  - test/position_range_list_test.rb
37
37
  - test/position_range_test.rb
38
38
  - test/test_helper.rb