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 +4 -4
- data/.travis.yml +1 -0
- data/Gemfile.lock +19 -32
- data/README.md +2 -2
- data/lib/rubiks_cube.rb +1 -0
- data/lib/rubiks_cube/bicycle_solution.rb +4 -0
- data/lib/rubiks_cube/solution.rb +1 -2
- data/lib/rubiks_cube/version.rb +1 -1
- data/rubiks_cube.gemspec +4 -5
- data/spec/rubiks_cube/bicycle_solution_spec.rb +14 -0
- data/spec/rubiks_cube/cube_spec.rb +4 -4
- data/spec/rubiks_cube/cubie_spec.rb +2 -2
- data/spec/spec_helper.rb +0 -3
- metadata +26 -37
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2bece314deb5dd8aad60a2b2738348c9036ca33
|
4
|
+
data.tar.gz: fc0f21d80a77e77533ee8deb292e672344e0867a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee6ff89ab9c03dcfc8664035a88ad3b7c20d4f7129048b0eaddd10039e7c01df0d368c3ad819902e43fba0f41b85a125e77af77ac8f253033409b81c3379bb54
|
7
|
+
data.tar.gz: fc60968386dd38602d773975bdc8222f83829d11c8d37b1a5fe47862a398a5250f9eb7533d58b2f064178c31d15edd6a6c7b568b08b2afcf6cd280740d6fdbbd
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rubiks_cube (1.
|
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
|
-
|
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.
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
rspec-
|
29
|
-
|
30
|
-
rspec-
|
31
|
-
rspec-
|
32
|
-
|
33
|
-
|
34
|
-
rspec-mocks (
|
35
|
-
|
36
|
-
|
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.
|
46
|
-
cane-hashcheck
|
47
|
-
|
48
|
-
|
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
|
-
[![
|
4
|
-
[![
|
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
|
|
data/lib/rubiks_cube.rb
CHANGED
data/lib/rubiks_cube/solution.rb
CHANGED
data/lib/rubiks_cube/version.rb
CHANGED
data/rubiks_cube.gemspec
CHANGED
@@ -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.
|
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
|
186
|
-
expect(subject.edge_permuted? permuted_edge).to
|
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
|
198
|
-
expect(subject.corner_permuted? permuted_corner).to
|
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
|
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
|
21
|
+
expect(subject == described_class.new('UB')).to be false
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
data/spec/spec_helper.rb
CHANGED
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.
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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.
|
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
|