array_floe 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +4 -4
- data/Rakefile +3 -30
- data/array_floe.gemspec +0 -1
- data/lib/array_floe/version.rb +1 -1
- metadata +53 -74
data/README.rdoc
CHANGED
@@ -31,10 +31,10 @@ in the array:
|
|
31
31
|
end
|
32
32
|
|
33
33
|
ary.each_with_index_floe do |element, i, floe|
|
34
|
-
assert_equal(i == 0,
|
35
|
-
assert_equal(i == ary.
|
36
|
-
assert_equal(i % 2 == 1,
|
37
|
-
assert_equal(i % 2 == 0,
|
34
|
+
assert_equal(i == 0, floe.first?)
|
35
|
+
assert_equal(i == ary.size-1, floe.last?)
|
36
|
+
assert_equal(i % 2 == 1, float.odd?)
|
37
|
+
assert_equal(i % 2 == 0, float.even?)
|
38
38
|
end
|
39
39
|
|
40
40
|
If no block is given, an enumerator is returned instead.
|
data/Rakefile
CHANGED
@@ -1,36 +1,9 @@
|
|
1
|
-
require '
|
2
|
-
|
3
|
-
begin
|
4
|
-
require 'bundler'
|
5
|
-
rescue LoadError
|
6
|
-
$stderr.puts "You must install bundler - run `gem install bundler`"
|
7
|
-
end
|
8
|
-
|
9
|
-
begin
|
10
|
-
Bundler.setup
|
11
|
-
rescue Bundler::BundlerError => e
|
12
|
-
$stderr.puts e.message
|
13
|
-
$stderr.puts "Run `bundle install` to install missing gems"
|
14
|
-
exit e.status_code
|
15
|
-
end
|
16
|
-
require 'rake'
|
17
|
-
|
18
|
-
require 'bueller'
|
19
|
-
Bueller::Tasks.new
|
1
|
+
require 'bundler/gem_tasks'
|
20
2
|
|
21
3
|
require 'rspec/core/rake_task'
|
22
|
-
RSpec::Core::RakeTask.new(:spec)
|
23
|
-
spec.rspec_opts = '-Ispec'
|
24
|
-
end
|
25
|
-
|
26
|
-
RSpec::Core::RakeTask.new(:rcov) do |spec|
|
27
|
-
spec.rspec_opts = '-Ispec'
|
28
|
-
spec.rcov = true
|
29
|
-
end
|
30
|
-
|
31
|
-
task :default => :spec
|
4
|
+
RSpec::Core::RakeTask.new(:spec)
|
32
5
|
|
33
|
-
require '
|
6
|
+
require 'rdoc/task'
|
34
7
|
Rake::RDocTask.new do |rdoc|
|
35
8
|
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
36
9
|
|
data/array_floe.gemspec
CHANGED
@@ -33,7 +33,6 @@ It's particularly handy for generating CSS classes.
|
|
33
33
|
|
34
34
|
s.add_development_dependency 'rspec'
|
35
35
|
s.add_development_dependency 'bundler'
|
36
|
-
s.add_development_dependency 'bueller'
|
37
36
|
s.add_development_dependency 'simplecov'
|
38
37
|
s.add_development_dependency 'simplecov-gem-adapter'
|
39
38
|
end
|
data/lib/array_floe/version.rb
CHANGED
metadata
CHANGED
@@ -1,87 +1,72 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: array_floe
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.1.3
|
4
5
|
prerelease:
|
5
|
-
version: 1.1.2
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- ronen barzel
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2011-04-23 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
16
15
|
name: rspec
|
17
|
-
requirement: &
|
16
|
+
requirement: &70221680709500 !ruby/object:Gem::Requirement
|
18
17
|
none: false
|
19
|
-
requirements:
|
20
|
-
- -
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version:
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
23
22
|
type: :development
|
24
23
|
prerelease: false
|
25
|
-
version_requirements: *
|
26
|
-
- !ruby/object:Gem::Dependency
|
24
|
+
version_requirements: *70221680709500
|
25
|
+
- !ruby/object:Gem::Dependency
|
27
26
|
name: bundler
|
28
|
-
requirement: &
|
27
|
+
requirement: &70221680708920 !ruby/object:Gem::Requirement
|
29
28
|
none: false
|
30
|
-
requirements:
|
31
|
-
- -
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version:
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
34
33
|
type: :development
|
35
34
|
prerelease: false
|
36
|
-
version_requirements: *
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
name: bueller
|
39
|
-
requirement: &id003 !ruby/object:Gem::Requirement
|
40
|
-
none: false
|
41
|
-
requirements:
|
42
|
-
- - ">="
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
version: "0"
|
45
|
-
type: :development
|
46
|
-
prerelease: false
|
47
|
-
version_requirements: *id003
|
48
|
-
- !ruby/object:Gem::Dependency
|
35
|
+
version_requirements: *70221680708920
|
36
|
+
- !ruby/object:Gem::Dependency
|
49
37
|
name: simplecov
|
50
|
-
requirement: &
|
38
|
+
requirement: &70221680708500 !ruby/object:Gem::Requirement
|
51
39
|
none: false
|
52
|
-
requirements:
|
53
|
-
- -
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
version:
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
56
44
|
type: :development
|
57
45
|
prerelease: false
|
58
|
-
version_requirements: *
|
59
|
-
- !ruby/object:Gem::Dependency
|
46
|
+
version_requirements: *70221680708500
|
47
|
+
- !ruby/object:Gem::Dependency
|
60
48
|
name: simplecov-gem-adapter
|
61
|
-
requirement: &
|
49
|
+
requirement: &70221680707580 !ruby/object:Gem::Requirement
|
62
50
|
none: false
|
63
|
-
requirements:
|
64
|
-
- -
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
version:
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
67
55
|
type: :development
|
68
56
|
prerelease: false
|
69
|
-
version_requirements: *
|
70
|
-
description: "\
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
It's particularly handy for generating CSS classes.\n "
|
57
|
+
version_requirements: *70221680707580
|
58
|
+
description: ! "\nThis small extension to ruby's Array class provides two additional\niterators,
|
59
|
+
Array#each_with_floe and Array#each_with_index_floe, that\nsimplify the reasonably-common
|
60
|
+
need to specially handle \"floe\"--i.e.,\nfirst, last, odd, even--when iterating
|
61
|
+
through the elements of an array.\nIt's particularly handy for generating CSS classes.\n
|
62
|
+
\ "
|
76
63
|
email: ronen@barzel.org
|
77
64
|
executables: []
|
78
|
-
|
79
65
|
extensions: []
|
80
|
-
|
81
|
-
extra_rdoc_files:
|
66
|
+
extra_rdoc_files:
|
82
67
|
- LICENSE.txt
|
83
68
|
- README.rdoc
|
84
|
-
files:
|
69
|
+
files:
|
85
70
|
- .document
|
86
71
|
- .gitignore
|
87
72
|
- .rspec
|
@@ -98,34 +83,28 @@ files:
|
|
98
83
|
- spec/spec_helper.rb
|
99
84
|
homepage: http://github.com/ronen/array_floe
|
100
85
|
licenses: []
|
101
|
-
|
102
86
|
post_install_message:
|
103
87
|
rdoc_options: []
|
104
|
-
|
105
|
-
require_paths:
|
88
|
+
require_paths:
|
106
89
|
- lib
|
107
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
90
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
108
91
|
none: false
|
109
|
-
requirements:
|
110
|
-
- -
|
111
|
-
- !ruby/object:Gem::Version
|
112
|
-
|
113
|
-
|
114
|
-
- 0
|
115
|
-
version: "0"
|
116
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ! '>='
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
96
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
117
97
|
none: false
|
118
|
-
requirements:
|
119
|
-
- -
|
120
|
-
- !ruby/object:Gem::Version
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
121
101
|
version: 1.3.7
|
122
102
|
requirements: []
|
123
|
-
|
124
103
|
rubyforge_project:
|
125
|
-
rubygems_version: 1.
|
104
|
+
rubygems_version: 1.8.12
|
126
105
|
signing_key:
|
127
106
|
specification_version: 3
|
128
107
|
summary: Provides iterators Array#each_with_floe and Array#each_with_index_floe
|
129
|
-
test_files:
|
108
|
+
test_files:
|
130
109
|
- spec/array_floe_spec.rb
|
131
110
|
- spec/spec_helper.rb
|