githug 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  difficulty 2
2
- description "The README file has been committed, but it looks like the file `forgotten_file.rb` was missing from the commit. Add the file and ammend your previous commit to include it."
2
+ description "The README file has been committed, but it looks like the file `forgotten_file.rb` was missing from the commit. Add the file and amend your previous commit to include it."
3
3
 
4
4
  setup do
5
5
  repo.init
@@ -8,7 +8,7 @@ setup do
8
8
  repo.add "file1"
9
9
  repo.commit_all "First commit"
10
10
 
11
- repo.git.native :checkout, {b: true}, 'long-feature-branch'
11
+ repo.git.native :checkout, {"b" => true}, 'long-feature-branch'
12
12
  File.open("file3", 'w') { |f| f << "some feature\n" }
13
13
  repo.add "file3"
14
14
  repo.commit_all "Developing new features"
data/levels/revert.rb CHANGED
@@ -18,11 +18,15 @@ setup do
18
18
  end
19
19
 
20
20
  solution do
21
- return false unless repo.commits[3].message == "First commit"
22
- return false unless repo.commits[2].message == "Second commit"
23
- return false unless repo.commits[1].message == "Bad commit"
24
- return false unless repo.commits[0].message.split("\n").first == "Revert \"Bad commit\""
25
- true
21
+ valid = false
22
+ valid = true if repo.commits.length > 3 &&
23
+ repo.commits[3].message == "First commit" &&
24
+ repo.commits[2].message == "Second commit" &&
25
+ repo.commits[1].message == "Bad commit" &&
26
+ repo.commits[0].message.split("\n").first == "Revert \"Bad commit\""
27
+ valid = true if repo.commits[1].message == "First commit" &&
28
+ repo.commits[0].message == "Second commit"
29
+ valid
26
30
  end
27
31
 
28
32
  hint do
@@ -1,3 +1,3 @@
1
1
  module Githug
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: githug
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-22 00:00:00.000000000Z
12
+ date: 2012-04-23 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &11608020 !ruby/object:Gem::Requirement
16
+ requirement: &12289920 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 2.8.0
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *11608020
24
+ version_requirements: *12289920
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: grit
27
- requirement: &11607140 !ruby/object:Gem::Requirement
27
+ requirement: &12276660 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 2.3.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *11607140
35
+ version_requirements: *12276660
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: thor
38
- requirement: &11606540 !ruby/object:Gem::Requirement
38
+ requirement: &12275640 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.14.6
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *11606540
46
+ version_requirements: *12275640
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rake
49
- requirement: &11606100 !ruby/object:Gem::Requirement
49
+ requirement: &12275220 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *11606100
57
+ version_requirements: *12275220
58
58
  description: An interactive way to learn git.
59
59
  email:
60
60
  - webmaster@gazler.com