bicycle 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -11,4 +11,5 @@ group :development do
11
11
  gem "bundler"
12
12
  gem "jeweler", "~> 1.6.4"
13
13
  gem "simplecov"
14
+ gem 'turn', "~> 0.9.5"
14
15
  end
data/Gemfile.lock CHANGED
@@ -1,6 +1,7 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
+ ansi (1.4.2)
4
5
  git (1.2.5)
5
6
  jeweler (1.6.4)
6
7
  bundler (~> 1.0)
@@ -13,6 +14,8 @@ GEM
13
14
  multi_json (~> 1.0)
14
15
  simplecov-html (~> 0.5.3)
15
16
  simplecov-html (0.5.3)
17
+ turn (0.9.5)
18
+ ansi
16
19
  yard (0.6.8)
17
20
 
18
21
  PLATFORMS
@@ -23,4 +26,5 @@ DEPENDENCIES
23
26
  jeweler (~> 1.6.4)
24
27
  minitest
25
28
  simplecov
29
+ turn (~> 0.9.5)
26
30
  yard (~> 0.6.0)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.0
1
+ 0.0.1
data/bicycle.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "bicycle"
8
- s.version = "0.0.0"
8
+ s.version = "0.0.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Stuart Chinery"]
12
- s.date = "2012-06-05"
12
+ s.date = "2012-06-06"
13
13
  s.description = "A conveniance gem for cycling through a set of values, much like the 'cycle' functionality found in Rails, but is independant of which framework you use so will run in Sinatra, Padrino or straight up Ruby itself."
14
14
  s.email = "sleepingstu@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -32,7 +32,7 @@ Gem::Specification.new do |s|
32
32
  s.homepage = "http://github.com/sleepingstu/bicycle"
33
33
  s.licenses = ["MIT"]
34
34
  s.require_paths = ["lib"]
35
- s.rubygems_version = "1.8.24"
35
+ s.rubygems_version = "1.8.19"
36
36
  s.summary = "Why walk when you can cycle"
37
37
 
38
38
  if s.respond_to? :specification_version then
@@ -44,12 +44,14 @@ Gem::Specification.new do |s|
44
44
  s.add_development_dependency(%q<bundler>, [">= 0"])
45
45
  s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
46
46
  s.add_development_dependency(%q<simplecov>, [">= 0"])
47
+ s.add_development_dependency(%q<turn>, ["~> 0.9.5"])
47
48
  else
48
49
  s.add_dependency(%q<minitest>, [">= 0"])
49
50
  s.add_dependency(%q<yard>, ["~> 0.6.0"])
50
51
  s.add_dependency(%q<bundler>, [">= 0"])
51
52
  s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
52
53
  s.add_dependency(%q<simplecov>, [">= 0"])
54
+ s.add_dependency(%q<turn>, ["~> 0.9.5"])
53
55
  end
54
56
  else
55
57
  s.add_dependency(%q<minitest>, [">= 0"])
@@ -57,6 +59,7 @@ Gem::Specification.new do |s|
57
59
  s.add_dependency(%q<bundler>, [">= 0"])
58
60
  s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
59
61
  s.add_dependency(%q<simplecov>, [">= 0"])
62
+ s.add_dependency(%q<turn>, ["~> 0.9.5"])
60
63
  end
61
64
  end
62
65
 
data/lib/bicycle.rb CHANGED
@@ -1,8 +1,8 @@
1
1
  module Bicycle
2
2
 
3
- # Function to return a single value from an array of
3
+ # Function to return a single value from an array of
4
4
  # given values that you want to cycle through.
5
- # @param [Array] values to cycle through
5
+ # @param [Array] *to_cycle - values to cycle through
6
6
  # @return [?] one of the values in a given order
7
7
  def self.cycle(*to_cycle)
8
8
  return to_cycle[@_cycle = ((@_cycle || -1) + 1) % to_cycle.count]
data/test/helper.rb CHANGED
@@ -12,6 +12,7 @@ rescue Bundler::BundlerError => e
12
12
  end
13
13
 
14
14
  require 'minitest/spec'
15
+ begin; require 'turn/autorun'; rescue LoadError; end
15
16
 
16
17
  $LOAD_PATH.unshift(File.dirname(__FILE__))
17
18
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
data/test/test_bicycle.rb CHANGED
@@ -2,16 +2,16 @@ require 'helper'
2
2
 
3
3
  describe "When cycling" do
4
4
  before do
5
- @value1 = Bicycle.cycle("Foo", "Bar", "Huh?")
6
- @value2 = Bicycle.cycle("Foo", "Bar", "Huh?")
7
- @value3 = Bicycle.cycle("Foo", "Bar", "Huh?")
8
- @value4 = Bicycle.cycle("Foo", "Bar", "Huh?")
5
+ @values = []
6
+ for i in (0..3)
7
+ @values[i] = Bicycle.cycle("Foo", "Bar", "Huh?")
8
+ end
9
9
  end
10
10
 
11
11
  it "should return a value in the cycle order" do
12
- assert_equal "Foo", @value1
13
- assert_equal "Bar", @value2
14
- assert_equal "Huh?", @value3
15
- assert_equal "Foo", @value4
12
+ assert_equal "Foo", @values[0]
13
+ assert_equal "Bar", @values[1]
14
+ assert_equal "Huh?", @values[2]
15
+ assert_equal "Foo", @values[3]
16
16
  end
17
17
  end
metadata CHANGED
@@ -1,106 +1,122 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: bicycle
3
- version: !ruby/object:Gem::Version
4
- version: 0.0.0
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Stuart Chinery
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-06-05 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: minitest
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
17
+
18
+ date: 2012-06-06 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
22
21
  type: :development
23
- prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
22
+ requirement: &id001 !ruby/object:Gem::Requirement
25
23
  none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
29
- version: '0'
30
- - !ruby/object:Gem::Dependency
31
- name: yard
32
- requirement: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ hash: 3
28
+ segments:
29
+ - 0
30
+ version: "0"
31
+ version_requirements: *id001
32
+ name: minitest
33
+ prerelease: false
34
+ - !ruby/object:Gem::Dependency
35
+ type: :development
36
+ requirement: &id002 !ruby/object:Gem::Requirement
33
37
  none: false
34
- requirements:
38
+ requirements:
35
39
  - - ~>
36
- - !ruby/object:Gem::Version
40
+ - !ruby/object:Gem::Version
41
+ hash: 7
42
+ segments:
43
+ - 0
44
+ - 6
45
+ - 0
37
46
  version: 0.6.0
38
- type: :development
47
+ version_requirements: *id002
48
+ name: yard
39
49
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
50
+ - !ruby/object:Gem::Dependency
51
+ type: :development
52
+ requirement: &id003 !ruby/object:Gem::Requirement
41
53
  none: false
42
- requirements:
43
- - - ~>
44
- - !ruby/object:Gem::Version
45
- version: 0.6.0
46
- - !ruby/object:Gem::Dependency
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ hash: 3
58
+ segments:
59
+ - 0
60
+ version: "0"
61
+ version_requirements: *id003
47
62
  name: bundler
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ! '>='
52
- - !ruby/object:Gem::Version
53
- version: '0'
54
- type: :development
55
63
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- - !ruby/object:Gem::Dependency
63
- name: jeweler
64
- requirement: !ruby/object:Gem::Requirement
64
+ - !ruby/object:Gem::Dependency
65
+ type: :development
66
+ requirement: &id004 !ruby/object:Gem::Requirement
65
67
  none: false
66
- requirements:
68
+ requirements:
67
69
  - - ~>
68
- - !ruby/object:Gem::Version
70
+ - !ruby/object:Gem::Version
71
+ hash: 7
72
+ segments:
73
+ - 1
74
+ - 6
75
+ - 4
69
76
  version: 1.6.4
70
- type: :development
77
+ version_requirements: *id004
78
+ name: jeweler
71
79
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
80
+ - !ruby/object:Gem::Dependency
81
+ type: :development
82
+ requirement: &id005 !ruby/object:Gem::Requirement
73
83
  none: false
74
- requirements:
75
- - - ~>
76
- - !ruby/object:Gem::Version
77
- version: 1.6.4
78
- - !ruby/object:Gem::Dependency
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ hash: 3
88
+ segments:
89
+ - 0
90
+ version: "0"
91
+ version_requirements: *id005
79
92
  name: simplecov
80
- requirement: !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ! '>='
84
- - !ruby/object:Gem::Version
85
- version: '0'
86
- type: :development
87
93
  prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
94
+ - !ruby/object:Gem::Dependency
95
+ type: :development
96
+ requirement: &id006 !ruby/object:Gem::Requirement
89
97
  none: false
90
- requirements:
91
- - - ! '>='
92
- - !ruby/object:Gem::Version
93
- version: '0'
94
- description: A conveniance gem for cycling through a set of values, much like the
95
- 'cycle' functionality found in Rails, but is independant of which framework you
96
- use so will run in Sinatra, Padrino or straight up Ruby itself.
98
+ requirements:
99
+ - - ~>
100
+ - !ruby/object:Gem::Version
101
+ hash: 49
102
+ segments:
103
+ - 0
104
+ - 9
105
+ - 5
106
+ version: 0.9.5
107
+ version_requirements: *id006
108
+ name: turn
109
+ prerelease: false
110
+ description: A conveniance gem for cycling through a set of values, much like the 'cycle' functionality found in Rails, but is independant of which framework you use so will run in Sinatra, Padrino or straight up Ruby itself.
97
111
  email: sleepingstu@gmail.com
98
112
  executables: []
113
+
99
114
  extensions: []
100
- extra_rdoc_files:
115
+
116
+ extra_rdoc_files:
101
117
  - LICENSE.txt
102
118
  - README.md
103
- files:
119
+ files:
104
120
  - .document
105
121
  - Gemfile
106
122
  - Gemfile.lock
@@ -113,31 +129,37 @@ files:
113
129
  - test/helper.rb
114
130
  - test/test_bicycle.rb
115
131
  homepage: http://github.com/sleepingstu/bicycle
116
- licenses:
132
+ licenses:
117
133
  - MIT
118
134
  post_install_message:
119
135
  rdoc_options: []
120
- require_paths:
136
+
137
+ require_paths:
121
138
  - lib
122
- required_ruby_version: !ruby/object:Gem::Requirement
139
+ required_ruby_version: !ruby/object:Gem::Requirement
123
140
  none: false
124
- requirements:
125
- - - ! '>='
126
- - !ruby/object:Gem::Version
127
- version: '0'
128
- segments:
141
+ requirements:
142
+ - - ">="
143
+ - !ruby/object:Gem::Version
144
+ hash: 3
145
+ segments:
129
146
  - 0
130
- hash: -1095171187747761284
131
- required_rubygems_version: !ruby/object:Gem::Requirement
147
+ version: "0"
148
+ required_rubygems_version: !ruby/object:Gem::Requirement
132
149
  none: false
133
- requirements:
134
- - - ! '>='
135
- - !ruby/object:Gem::Version
136
- version: '0'
150
+ requirements:
151
+ - - ">="
152
+ - !ruby/object:Gem::Version
153
+ hash: 3
154
+ segments:
155
+ - 0
156
+ version: "0"
137
157
  requirements: []
158
+
138
159
  rubyforge_project:
139
- rubygems_version: 1.8.24
160
+ rubygems_version: 1.8.19
140
161
  signing_key:
141
162
  specification_version: 3
142
163
  summary: Why walk when you can cycle
143
164
  test_files: []
165
+