rubiks_cube 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ea7804b38177c1c4c7075d2e4cd1db3c4de4d511
4
- data.tar.gz: eb603bea15bfc45f9eee766563170d3c867838bb
3
+ metadata.gz: e2bece314deb5dd8aad60a2b2738348c9036ca33
4
+ data.tar.gz: fc0f21d80a77e77533ee8deb292e672344e0867a
5
5
  SHA512:
6
- metadata.gz: 7c12b08b5ffb2bf6394799ed19a5092e596ec985c59f8a14530f021bc8fd505a16d25cb8c20443538f7b69c201d203231e08e4030a27acedb05fbc8c727d3fbc
7
- data.tar.gz: c0e10419fe026a25b542ae3bfde7be090882114bbd20e19dd974ebebfabe0c5147dcc1a7ea234eeef09bfb76fc835abf600858d753bbcef180e6a84c0c8d5b6e
6
+ metadata.gz: ee6ff89ab9c03dcfc8664035a88ad3b7c20d4f7129048b0eaddd10039e7c01df0d368c3ad819902e43fba0f41b85a125e77af77ac8f253033409b81c3379bb54
7
+ data.tar.gz: fc60968386dd38602d773975bdc8222f83829d11c8d37b1a5fe47862a398a5250f9eb7533d58b2f064178c31d15edd6a6c7b568b08b2afcf6cd280740d6fdbbd
@@ -1,4 +1,5 @@
1
1
  language: ruby
2
2
  rvm:
3
+ - 2.1.0
3
4
  - 2.0.0
4
5
  - 1.9.3
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubiks_cube (1.2.0)
4
+ rubiks_cube (1.3.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -10,41 +10,28 @@ GEM
10
10
  parallel
11
11
  cane-hashcheck (1.2.0)
12
12
  cane
13
- colorize (0.5.8)
14
- coveralls (0.6.7)
15
- colorize
16
- multi_json (~> 1.3)
17
- rest-client
18
- simplecov (>= 0.7)
19
- thor
20
- diff-lcs (1.2.4)
21
- mime-types (1.23)
22
- multi_json (1.7.7)
13
+ diff-lcs (1.2.5)
23
14
  parallel (0.7.1)
24
- rake (10.1.0)
25
- rest-client (1.6.7)
26
- mime-types (>= 1.16)
27
- rspec (2.13.0)
28
- rspec-core (~> 2.13.0)
29
- rspec-expectations (~> 2.13.0)
30
- rspec-mocks (~> 2.13.0)
31
- rspec-core (2.13.1)
32
- rspec-expectations (2.13.0)
33
- diff-lcs (>= 1.1.3, < 2.0)
34
- rspec-mocks (2.13.1)
35
- simplecov (0.7.1)
36
- multi_json (~> 1.0)
37
- simplecov-html (~> 0.7.1)
38
- simplecov-html (0.7.1)
39
- thor (0.18.1)
15
+ rake (10.3.2)
16
+ rspec (3.1.0)
17
+ rspec-core (~> 3.1.0)
18
+ rspec-expectations (~> 3.1.0)
19
+ rspec-mocks (~> 3.1.0)
20
+ rspec-core (3.1.2)
21
+ rspec-support (~> 3.1.0)
22
+ rspec-expectations (3.1.0)
23
+ diff-lcs (>= 1.2.0, < 2.0)
24
+ rspec-support (~> 3.1.0)
25
+ rspec-mocks (3.1.0)
26
+ rspec-support (~> 3.1.0)
27
+ rspec-support (3.1.0)
40
28
 
41
29
  PLATFORMS
42
30
  ruby
43
31
 
44
32
  DEPENDENCIES
45
- bundler (~> 1.3)
46
- cane-hashcheck
47
- coveralls
48
- rake
49
- rspec
33
+ bundler (~> 1.7.2)
34
+ cane-hashcheck (~> 1.2.0)
35
+ rake (~> 10.3.2)
36
+ rspec (~> 3.1.0)
50
37
  rubiks_cube!
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Rubik's Cube
2
2
 
3
- [![Travis CI](https://travis-ci.org/chrishunt/rubiks-cube.png)](https://travis-ci.org/chrishunt/rubiks-cube)
4
- [![Coverage Status](https://coveralls.io/repos/chrishunt/rubiks-cube/badge.png)](https://coveralls.io/r/chrishunt/rubiks-cube)
3
+ [![Gem Version](http://img.shields.io/gem/v/rubiks_cube.svg?style=flat)](http://rubygems.org/gems/rubiks_cube)
4
+ [![Travis CI](http://img.shields.io/travis/chrishunt/rubiks-cube.svg?style=flat)](https://travis-ci.org/chrishunt/rubiks-cube)
5
5
 
6
6
  Solve your Rubik's Cube with an **easy** two-cycle solution
7
7
 
@@ -5,3 +5,4 @@ require 'rubiks_cube/cubie'
5
5
  require 'rubiks_cube/algorithms'
6
6
  require 'rubiks_cube/solution'
7
7
  require 'rubiks_cube/two_cycle_solution'
8
+ require 'rubiks_cube/bicycle_solution'
@@ -0,0 +1,4 @@
1
+ module RubiksCube
2
+ # Alias for TwoCycleSolution
3
+ BicycleSolution = TwoCycleSolution
4
+ end
@@ -30,8 +30,7 @@ module RubiksCube
30
30
  end
31
31
 
32
32
  def length
33
- (solution.respond_to?(:flatten) ? solution.flatten.join(' ') : solution)
34
- .split.count
33
+ Array(solution).flatten.join(' ').split.count
35
34
  end
36
35
  end
37
36
  end
@@ -1,3 +1,3 @@
1
1
  module RubiksCube
2
- VERSION = '1.2.0'
2
+ VERSION = '1.3.0'
3
3
  end
@@ -18,9 +18,8 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ['lib']
20
20
 
21
- spec.add_development_dependency 'bundler', '~> 1.3'
22
- spec.add_development_dependency 'rake'
23
- spec.add_development_dependency 'rspec'
24
- spec.add_development_dependency 'cane-hashcheck'
25
- spec.add_development_dependency 'coveralls'
21
+ spec.add_development_dependency 'bundler', '~> 1.7.2'
22
+ spec.add_development_dependency 'rake', '~> 10.3.2'
23
+ spec.add_development_dependency 'rspec', '~> 3.1.0'
24
+ spec.add_development_dependency 'cane-hashcheck', '~> 1.2.0'
26
25
  end
@@ -0,0 +1,14 @@
1
+ require 'spec_helper'
2
+
3
+ module RubiksCube
4
+ describe BicycleSolution do
5
+ it 'is an alias for TwoCycleSolution' do
6
+ cube = double('RubiksCube::Cube')
7
+ allow(TwoCycleSolution).to receive(:new)
8
+
9
+ BicycleSolution.new(cube)
10
+
11
+ expect(TwoCycleSolution).to have_received(:new).with(cube)
12
+ end
13
+ end
14
+ end
@@ -182,8 +182,8 @@ describe RubiksCube::Cube do
182
182
  permuted_edge = subject.edges[4]
183
183
  unpermuted_edge = subject.edges[0]
184
184
 
185
- expect(subject.edge_permuted? unpermuted_edge).to be_false
186
- expect(subject.edge_permuted? permuted_edge).to be_true
185
+ expect(subject.edge_permuted? unpermuted_edge).to be false
186
+ expect(subject.edge_permuted? permuted_edge).to be true
187
187
  end
188
188
  end
189
189
 
@@ -194,8 +194,8 @@ describe RubiksCube::Cube do
194
194
  permuted_corner = subject.corners[2]
195
195
  unpermuted_corner = subject.corners[1]
196
196
 
197
- expect(subject.corner_permuted? unpermuted_corner).to be_false
198
- expect(subject.corner_permuted? permuted_corner).to be_true
197
+ expect(subject.corner_permuted? unpermuted_corner).to be false
198
+ expect(subject.corner_permuted? permuted_corner).to be true
199
199
  end
200
200
  end
201
201
 
@@ -12,13 +12,13 @@ describe RubiksCube::Cubie do
12
12
  describe '==' do
13
13
  context 'when the state equals the state of the other' do
14
14
  it 'returns true' do
15
- expect(subject == described_class.new(state)).to be_true
15
+ expect(subject == described_class.new(state)).to be true
16
16
  end
17
17
  end
18
18
 
19
19
  context 'when the state does not equal the state of the other' do
20
20
  it 'returns false' do
21
- expect(subject == described_class.new('UB')).to be_false
21
+ expect(subject == described_class.new('UB')).to be false
22
22
  end
23
23
  end
24
24
  end
@@ -1,4 +1 @@
1
1
  require 'rubiks_cube'
2
- require 'coveralls'
3
-
4
- Coveralls.wear!
metadata CHANGED
@@ -1,85 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubiks_cube
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Hunt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-23 00:00:00.000000000 Z
11
+ date: 2014-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.3'
19
+ version: 1.7.2
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.3'
26
+ version: 1.7.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 10.3.2
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: 10.3.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: 3.1.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: 3.1.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: cane-hashcheck
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: 1.2.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: coveralls
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - '>='
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - '>='
81
- - !ruby/object:Gem::Version
82
- version: '0'
68
+ version: 1.2.0
83
69
  description: Solve your Rubik's Cube with a two-cycle solution
84
70
  email:
85
71
  - c@chrishunt.co
@@ -87,8 +73,8 @@ executables: []
87
73
  extensions: []
88
74
  extra_rdoc_files: []
89
75
  files:
90
- - .gitignore
91
- - .travis.yml
76
+ - ".gitignore"
77
+ - ".travis.yml"
92
78
  - CONTRIBUTING.md
93
79
  - Gemfile
94
80
  - Gemfile.lock
@@ -106,6 +92,7 @@ files:
106
92
  - img/video_thumbnail.jpg
107
93
  - lib/rubiks_cube.rb
108
94
  - lib/rubiks_cube/algorithms.rb
95
+ - lib/rubiks_cube/bicycle_solution.rb
109
96
  - lib/rubiks_cube/cube.rb
110
97
  - lib/rubiks_cube/cubie.rb
111
98
  - lib/rubiks_cube/solution.rb
@@ -114,6 +101,7 @@ files:
114
101
  - lib/rubiks_cube/version.rb
115
102
  - rubiks_cube.gemspec
116
103
  - spec/rubiks_cube/algorithms_spec.rb
104
+ - spec/rubiks_cube/bicycle_solution_spec.rb
117
105
  - spec/rubiks_cube/cube_spec.rb
118
106
  - spec/rubiks_cube/cubie_spec.rb
119
107
  - spec/rubiks_cube/solution_spec.rb
@@ -130,22 +118,23 @@ require_paths:
130
118
  - lib
131
119
  required_ruby_version: !ruby/object:Gem::Requirement
132
120
  requirements:
133
- - - '>='
121
+ - - ">="
134
122
  - !ruby/object:Gem::Version
135
123
  version: '0'
136
124
  required_rubygems_version: !ruby/object:Gem::Requirement
137
125
  requirements:
138
- - - '>='
126
+ - - ">="
139
127
  - !ruby/object:Gem::Version
140
128
  version: '0'
141
129
  requirements: []
142
130
  rubyforge_project:
143
- rubygems_version: 2.0.3
131
+ rubygems_version: 2.2.2
144
132
  signing_key:
145
133
  specification_version: 4
146
134
  summary: Solve your Rubik's Cube with a two-cycle solution
147
135
  test_files:
148
136
  - spec/rubiks_cube/algorithms_spec.rb
137
+ - spec/rubiks_cube/bicycle_solution_spec.rb
149
138
  - spec/rubiks_cube/cube_spec.rb
150
139
  - spec/rubiks_cube/cubie_spec.rb
151
140
  - spec/rubiks_cube/solution_spec.rb