git_presenter 0.4.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.travis.yml +2 -0
- data/Gemfile +1 -3
- data/Gemfile.lock +68 -33
- data/README.markdown +7 -5
- data/Rakefile +0 -23
- data/VERSION +1 -1
- data/git_presenter.gemspec +9 -14
- data/lib/git_presenter.rb +1 -1
- data/lib/git_presenter/controller.rb +4 -4
- data/spec/integration/initialize_presentation_spec.rb +2 -2
- data/spec/integration/moving_through_presentation_spec.rb +11 -11
- data/spec/integration/start_presentation_spec.rb +3 -3
- data/spec/integration/update_presentation_spec.rb +1 -1
- data/spec/support/git_helpers.rb +7 -7
- metadata +45 -54
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: bf5ba20617b68266cf04cc9435c4439623fe4710
|
|
4
|
+
data.tar.gz: 030a0879ae001a8f46e4e8e55deab84c7ef2145c
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: b523ad6a05eede43461ad29345532a09e69bd3c8e85fa220c63cf1ece1a64adc6288916e655514b44f250a158739f57535fa9bbaf16a21bee12f79c72ab5da33
|
|
7
|
+
data.tar.gz: 47465803ae5bf9e8a8438bd5430f3c0d7edc38615b804ff9ed45fcdb1cdbb5776d64a9efe74babcdfe0170fde88b4413c3e1df31c55505609258ad0ac76e3ab9
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
|
@@ -3,7 +3,7 @@ source "http://rubygems.org"
|
|
|
3
3
|
# Example:
|
|
4
4
|
# gem "activesupport", ">= 2.3.5"
|
|
5
5
|
#
|
|
6
|
-
gem "
|
|
6
|
+
gem "git"
|
|
7
7
|
gem "launchy", "~> 2.1"
|
|
8
8
|
|
|
9
9
|
# Add dependencies to develop your gem here.
|
|
@@ -13,6 +13,4 @@ group :development do
|
|
|
13
13
|
gem "rspec", "~> 2.7"
|
|
14
14
|
gem "bundler"
|
|
15
15
|
gem "jeweler", "~> 1.6"
|
|
16
|
-
gem "rcov", "~> 0.9"
|
|
17
|
-
gem 'pry'
|
|
18
16
|
end
|
data/Gemfile.lock
CHANGED
|
@@ -1,51 +1,86 @@
|
|
|
1
1
|
GEM
|
|
2
2
|
remote: http://rubygems.org/
|
|
3
3
|
specs:
|
|
4
|
-
addressable (2.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
addressable (2.3.5)
|
|
5
|
+
builder (3.2.2)
|
|
6
|
+
coderay (1.1.0)
|
|
7
|
+
diff-lcs (1.2.5)
|
|
8
|
+
faraday (0.8.9)
|
|
9
|
+
multipart-post (~> 1.2.0)
|
|
10
|
+
ffi (1.9.3-java)
|
|
11
|
+
git (1.2.6)
|
|
12
|
+
github_api (0.10.1)
|
|
13
|
+
addressable
|
|
14
|
+
faraday (~> 0.8.1)
|
|
15
|
+
hashie (>= 1.2)
|
|
16
|
+
multi_json (~> 1.4)
|
|
17
|
+
nokogiri (~> 1.5.2)
|
|
18
|
+
oauth2
|
|
19
|
+
hashie (2.0.5)
|
|
20
|
+
highline (1.6.20)
|
|
21
|
+
jeweler (1.8.8)
|
|
22
|
+
builder
|
|
13
23
|
bundler (~> 1.0)
|
|
14
24
|
git (>= 1.2.5)
|
|
25
|
+
github_api (= 0.10.1)
|
|
26
|
+
highline (>= 1.6.15)
|
|
27
|
+
nokogiri (= 1.5.10)
|
|
15
28
|
rake
|
|
16
29
|
rdoc
|
|
17
|
-
json (1.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
json (1.8.1)
|
|
31
|
+
json (1.8.1-java)
|
|
32
|
+
jwt (0.1.11)
|
|
33
|
+
multi_json (>= 1.5)
|
|
34
|
+
launchy (2.4.2)
|
|
35
|
+
addressable (~> 2.3)
|
|
36
|
+
launchy (2.4.2-java)
|
|
37
|
+
addressable (~> 2.3)
|
|
38
|
+
spoon (~> 0.0.1)
|
|
39
|
+
method_source (0.8.2)
|
|
40
|
+
multi_json (1.8.4)
|
|
41
|
+
multi_xml (0.5.5)
|
|
42
|
+
multipart-post (1.2.0)
|
|
43
|
+
nokogiri (1.5.10)
|
|
44
|
+
nokogiri (1.5.10-java)
|
|
45
|
+
oauth2 (0.9.3)
|
|
46
|
+
faraday (>= 0.8, < 0.10)
|
|
47
|
+
jwt (~> 0.1.8)
|
|
48
|
+
multi_json (~> 1.3)
|
|
49
|
+
multi_xml (~> 0.5)
|
|
50
|
+
rack (~> 1.2)
|
|
51
|
+
pry (0.9.12.6)
|
|
52
|
+
coderay (~> 1.0)
|
|
53
|
+
method_source (~> 0.8)
|
|
54
|
+
slop (~> 3.4)
|
|
55
|
+
pry (0.9.12.6-java)
|
|
56
|
+
coderay (~> 1.0)
|
|
57
|
+
method_source (~> 0.8)
|
|
58
|
+
slop (~> 3.4)
|
|
59
|
+
spoon (~> 0.0)
|
|
60
|
+
rack (1.5.2)
|
|
61
|
+
rake (10.1.1)
|
|
62
|
+
rdoc (4.1.1)
|
|
30
63
|
json (~> 1.4)
|
|
31
|
-
rspec (2.
|
|
32
|
-
rspec-core (~> 2.
|
|
33
|
-
rspec-expectations (~> 2.
|
|
34
|
-
rspec-mocks (~> 2.
|
|
35
|
-
rspec-core (2.
|
|
36
|
-
rspec-expectations (2.
|
|
37
|
-
diff-lcs (
|
|
38
|
-
rspec-mocks (2.
|
|
39
|
-
slop (
|
|
64
|
+
rspec (2.14.1)
|
|
65
|
+
rspec-core (~> 2.14.0)
|
|
66
|
+
rspec-expectations (~> 2.14.0)
|
|
67
|
+
rspec-mocks (~> 2.14.0)
|
|
68
|
+
rspec-core (2.14.7)
|
|
69
|
+
rspec-expectations (2.14.5)
|
|
70
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
|
71
|
+
rspec-mocks (2.14.6)
|
|
72
|
+
slop (3.4.7)
|
|
73
|
+
spoon (0.0.4)
|
|
74
|
+
ffi
|
|
40
75
|
|
|
41
76
|
PLATFORMS
|
|
77
|
+
java
|
|
42
78
|
ruby
|
|
43
79
|
|
|
44
80
|
DEPENDENCIES
|
|
45
81
|
bundler
|
|
46
|
-
|
|
82
|
+
git
|
|
47
83
|
jeweler (~> 1.6)
|
|
48
84
|
launchy (~> 2.1)
|
|
49
85
|
pry
|
|
50
|
-
rcov (~> 0.9)
|
|
51
86
|
rspec (~> 2.7)
|
data/README.markdown
CHANGED
|
@@ -11,15 +11,12 @@ Git-presenter hope to solve this problem by giving a presentation style interfac
|
|
|
11
11
|
|
|
12
12
|
## Current status
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
Any and all feedback is welcome
|
|
14
|
+
Complete.
|
|
16
15
|
|
|
17
16
|
## Pre-requisites
|
|
18
17
|
|
|
19
18
|
* Git
|
|
20
|
-
* Ruby version 1.9.2
|
|
21
|
-
|
|
22
|
-
Note jruby is currently unsupported as there is a problem with posix-spawn and jruby
|
|
19
|
+
* Ruby version 1.9.2, 1.9.3, 2.0.0, 2.1.0 and jruby
|
|
23
20
|
|
|
24
21
|
## Installation
|
|
25
22
|
|
|
@@ -38,6 +35,11 @@ gem install git_presenter
|
|
|
38
35
|
* start/s: move to start of presentation
|
|
39
36
|
* list/l : list slides in presentation
|
|
40
37
|
* help/h: display this message
|
|
38
|
+
|
|
39
|
+
## Other resources
|
|
40
|
+
There are couple of videos showing git presenter and how to us it
|
|
41
|
+
* (video 1)[https://vimeo.com/38949496]
|
|
42
|
+
* (video 2)[https://vimeo.com/39225144]
|
|
41
43
|
|
|
42
44
|
## Bugs/Features/Prase
|
|
43
45
|
|
data/Rakefile
CHANGED
|
@@ -24,26 +24,3 @@ Jeweler::Tasks.new do |gem|
|
|
|
24
24
|
# dependencies defined in Gemfile
|
|
25
25
|
end
|
|
26
26
|
Jeweler::RubygemsDotOrgTasks.new
|
|
27
|
-
|
|
28
|
-
require 'rspec/core'
|
|
29
|
-
require 'rspec/core/rake_task'
|
|
30
|
-
RSpec::Core::RakeTask.new(:spec) do |spec|
|
|
31
|
-
spec.pattern = FileList['spec/**/*_spec.rb']
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
RSpec::Core::RakeTask.new(:rcov) do |spec|
|
|
35
|
-
spec.pattern = 'spec/**/*_spec.rb'
|
|
36
|
-
spec.rcov = true
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
task :default => :spec
|
|
40
|
-
|
|
41
|
-
require 'rake/rdoctask'
|
|
42
|
-
Rake::RDocTask.new do |rdoc|
|
|
43
|
-
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
|
44
|
-
|
|
45
|
-
rdoc.rdoc_dir = 'rdoc'
|
|
46
|
-
rdoc.title = "git_presenter #{version}"
|
|
47
|
-
rdoc.rdoc_files.include('README*')
|
|
48
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
|
49
|
-
end
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
1.0.0
|
data/git_presenter.gemspec
CHANGED
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
|
5
|
+
# stub: git_presenter 1.0.0 ruby lib
|
|
5
6
|
|
|
6
7
|
Gem::Specification.new do |s|
|
|
7
8
|
s.name = "git_presenter"
|
|
8
|
-
s.version = "0.
|
|
9
|
+
s.version = "1.0.0"
|
|
9
10
|
|
|
10
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
12
|
+
s.require_paths = ["lib"]
|
|
11
13
|
s.authors = ["Colin Gemmell"]
|
|
12
|
-
s.date = "
|
|
14
|
+
s.date = "2014-02-26"
|
|
13
15
|
s.description = "Code presentation tool using git"
|
|
14
16
|
s.email = "pythonandchips@gmail.com"
|
|
15
17
|
s.executables = ["git-presenter"]
|
|
@@ -46,41 +48,34 @@ Gem::Specification.new do |s|
|
|
|
46
48
|
]
|
|
47
49
|
s.homepage = "http://github.com/pythonandchips/git-presenter"
|
|
48
50
|
s.licenses = ["MIT"]
|
|
49
|
-
s.
|
|
50
|
-
s.rubygems_version = "1.8.15"
|
|
51
|
+
s.rubygems_version = "2.2.2"
|
|
51
52
|
s.summary = "Code presentation tool using git"
|
|
52
53
|
|
|
53
54
|
if s.respond_to? :specification_version then
|
|
54
|
-
s.specification_version =
|
|
55
|
+
s.specification_version = 4
|
|
55
56
|
|
|
56
57
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
|
57
|
-
s.add_runtime_dependency(%q<
|
|
58
|
+
s.add_runtime_dependency(%q<git>, [">= 0"])
|
|
58
59
|
s.add_runtime_dependency(%q<launchy>, ["~> 2.1"])
|
|
59
60
|
s.add_development_dependency(%q<pry>, [">= 0"])
|
|
60
61
|
s.add_development_dependency(%q<rspec>, ["~> 2.7"])
|
|
61
62
|
s.add_development_dependency(%q<bundler>, [">= 0"])
|
|
62
63
|
s.add_development_dependency(%q<jeweler>, ["~> 1.6"])
|
|
63
|
-
s.add_development_dependency(%q<rcov>, ["~> 0.9"])
|
|
64
|
-
s.add_development_dependency(%q<pry>, [">= 0"])
|
|
65
64
|
else
|
|
66
|
-
s.add_dependency(%q<
|
|
65
|
+
s.add_dependency(%q<git>, [">= 0"])
|
|
67
66
|
s.add_dependency(%q<launchy>, ["~> 2.1"])
|
|
68
67
|
s.add_dependency(%q<pry>, [">= 0"])
|
|
69
68
|
s.add_dependency(%q<rspec>, ["~> 2.7"])
|
|
70
69
|
s.add_dependency(%q<bundler>, [">= 0"])
|
|
71
70
|
s.add_dependency(%q<jeweler>, ["~> 1.6"])
|
|
72
|
-
s.add_dependency(%q<rcov>, ["~> 0.9"])
|
|
73
|
-
s.add_dependency(%q<pry>, [">= 0"])
|
|
74
71
|
end
|
|
75
72
|
else
|
|
76
|
-
s.add_dependency(%q<
|
|
73
|
+
s.add_dependency(%q<git>, [">= 0"])
|
|
77
74
|
s.add_dependency(%q<launchy>, ["~> 2.1"])
|
|
78
75
|
s.add_dependency(%q<pry>, [">= 0"])
|
|
79
76
|
s.add_dependency(%q<rspec>, ["~> 2.7"])
|
|
80
77
|
s.add_dependency(%q<bundler>, [">= 0"])
|
|
81
78
|
s.add_dependency(%q<jeweler>, ["~> 1.6"])
|
|
82
|
-
s.add_dependency(%q<rcov>, ["~> 0.9"])
|
|
83
|
-
s.add_dependency(%q<pry>, [">= 0"])
|
|
84
79
|
end
|
|
85
80
|
end
|
|
86
81
|
|
data/lib/git_presenter.rb
CHANGED
|
@@ -44,12 +44,12 @@ class GitPresenter::Controller
|
|
|
44
44
|
end
|
|
45
45
|
|
|
46
46
|
def create_slides(last_commit=nil)
|
|
47
|
-
repo =
|
|
48
|
-
commits = repo.
|
|
49
|
-
commits = commits.drop_while{|commit| commit.
|
|
47
|
+
repo = Git.open(".")
|
|
48
|
+
commits = repo.log.to_a.reverse
|
|
49
|
+
commits = commits.drop_while{|commit| commit.sha != last_commit}[1..-1] unless last_commit.nil?
|
|
50
50
|
commits.map do |commit|
|
|
51
51
|
{"slide" =>
|
|
52
|
-
|
|
52
|
+
{"commit" => commit.sha,
|
|
53
53
|
"message" => commit.message}
|
|
54
54
|
}
|
|
55
55
|
end
|
|
@@ -28,13 +28,13 @@ describe "initializing a presentation" do
|
|
|
28
28
|
|
|
29
29
|
it "first line should contain the first commit number" do
|
|
30
30
|
@helper.initialise_presentation({:delay => true}) do |commits, yaml|
|
|
31
|
-
yaml["slides"][0]["slide"]["commit"].should eql commits.first.
|
|
31
|
+
yaml["slides"][0]["slide"]["commit"].should eql commits.first.sha
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
it "second line should contain the second commit number" do
|
|
36
36
|
@helper.initialise_presentation({:delay => true}) do |commits, yaml|
|
|
37
|
-
yaml["slides"][1]["slide"]["commit"].should eql commits[1].
|
|
37
|
+
yaml["slides"][1]["slide"]["commit"].should eql commits[1].sha
|
|
38
38
|
end
|
|
39
39
|
end
|
|
40
40
|
end
|
|
@@ -11,7 +11,7 @@ describe "while giving presentation" do
|
|
|
11
11
|
it "should move to the next commit" do
|
|
12
12
|
@helper.start_presentation do |commits, presenter|
|
|
13
13
|
presenter.execute("next")
|
|
14
|
-
@helper.head_position.should eql commits[1].
|
|
14
|
+
@helper.head_position.should eql commits[1].sha
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
|
|
@@ -19,7 +19,7 @@ describe "while giving presentation" do
|
|
|
19
19
|
@helper.start_presentation do |commits, presenter|
|
|
20
20
|
presenter.execute("next")
|
|
21
21
|
presenter.execute("next")
|
|
22
|
-
@helper.head_position.should eql commits[2].
|
|
22
|
+
@helper.head_position.should eql commits[2].sha
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
end
|
|
@@ -30,7 +30,7 @@ describe "while giving presentation" do
|
|
|
30
30
|
presenter.execute("next")
|
|
31
31
|
@helper.edit_file("inner commit")
|
|
32
32
|
presenter.execute("next")
|
|
33
|
-
@helper.head_position.should eql commits[2].
|
|
33
|
+
@helper.head_position.should eql commits[2].sha
|
|
34
34
|
end
|
|
35
35
|
end
|
|
36
36
|
end
|
|
@@ -42,7 +42,7 @@ describe "while giving presentation" do
|
|
|
42
42
|
presenter.execute("next")
|
|
43
43
|
presenter.execute("next")
|
|
44
44
|
presenter.execute("next")
|
|
45
|
-
@helper.head_position.should eql commits[2].
|
|
45
|
+
@helper.head_position.should eql commits[2].sha
|
|
46
46
|
end
|
|
47
47
|
end
|
|
48
48
|
end
|
|
@@ -53,7 +53,7 @@ describe "while giving presentation" do
|
|
|
53
53
|
presenter.execute("next")
|
|
54
54
|
presenter.execute("next")
|
|
55
55
|
presenter.execute("back")
|
|
56
|
-
@helper.head_position.should eql commits[1].
|
|
56
|
+
@helper.head_position.should eql commits[1].sha
|
|
57
57
|
end
|
|
58
58
|
end
|
|
59
59
|
end
|
|
@@ -67,7 +67,7 @@ describe "while giving presentation" do
|
|
|
67
67
|
presenter.execute("back")
|
|
68
68
|
presenter.execute("back")
|
|
69
69
|
presenter.execute("back")
|
|
70
|
-
@helper.head_position.should eql commits[0].
|
|
70
|
+
@helper.head_position.should eql commits[0].sha
|
|
71
71
|
end
|
|
72
72
|
end
|
|
73
73
|
end
|
|
@@ -78,7 +78,7 @@ describe "while giving presentation" do
|
|
|
78
78
|
presenter.execute("next")
|
|
79
79
|
presenter.execute("next")
|
|
80
80
|
presenter.execute("start")
|
|
81
|
-
@helper.head_position.should eql commits[0].
|
|
81
|
+
@helper.head_position.should eql commits[0].sha
|
|
82
82
|
end
|
|
83
83
|
end
|
|
84
84
|
end
|
|
@@ -87,7 +87,7 @@ describe "while giving presentation" do
|
|
|
87
87
|
it "should move the last commit" do
|
|
88
88
|
@helper.start_presentation do |commits, presenter|
|
|
89
89
|
presenter.execute("end")
|
|
90
|
-
@helper.head_position.should eql commits.last.
|
|
90
|
+
@helper.head_position.should eql commits.last.sha
|
|
91
91
|
end
|
|
92
92
|
end
|
|
93
93
|
end
|
|
@@ -96,7 +96,7 @@ describe "while giving presentation" do
|
|
|
96
96
|
it "should checkout the specific commit" do
|
|
97
97
|
@helper.start_presentation do |commits, presenter|
|
|
98
98
|
presenter.execute("2")
|
|
99
|
-
@helper.head_position.should eql commits[1].
|
|
99
|
+
@helper.head_position.should eql commits[1].sha
|
|
100
100
|
end
|
|
101
101
|
end
|
|
102
102
|
end
|
|
@@ -104,7 +104,7 @@ describe "while giving presentation" do
|
|
|
104
104
|
context "list presentation" do
|
|
105
105
|
it "should print a list of commits" do
|
|
106
106
|
@helper.start_presentation do |commits, presenter|
|
|
107
|
-
expected_output = (["*#{commits.first.
|
|
107
|
+
expected_output = (["*#{commits.first.sha[0..9]}, #{commits.first.message}"] + commits[1..-1].map{|commit| "#{commit.sha[0..9]}, #{commit.message}"}).join("\n")
|
|
108
108
|
presentation = presenter.execute("list")
|
|
109
109
|
presentation.should eql expected_output
|
|
110
110
|
end
|
|
@@ -180,7 +180,7 @@ EOH
|
|
|
180
180
|
presenter.execute("next")
|
|
181
181
|
presenter.execute("exit")
|
|
182
182
|
@helper.current_branch.should_not be_nil
|
|
183
|
-
@helper.current_branch.
|
|
183
|
+
@helper.current_branch.should eql "master"
|
|
184
184
|
end
|
|
185
185
|
end
|
|
186
186
|
end
|
|
@@ -19,13 +19,13 @@ describe "starting a presentation" do
|
|
|
19
19
|
|
|
20
20
|
it "first commit should be first commit in file" do
|
|
21
21
|
@helper.start_presentation do |commits, presenter|
|
|
22
|
-
presenter.slides[0].commit.should eql commits[0].
|
|
22
|
+
presenter.slides[0].commit.should eql commits[0].sha
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
it "second commit should be second commit in file" do
|
|
27
27
|
@helper.start_presentation do |commits, presenter|
|
|
28
|
-
presenter.slides[1].commit.should eql commits[1].
|
|
28
|
+
presenter.slides[1].commit.should eql commits[1].sha
|
|
29
29
|
end
|
|
30
30
|
end
|
|
31
31
|
|
|
@@ -38,7 +38,7 @@ describe "starting a presentation" do
|
|
|
38
38
|
|
|
39
39
|
it "should have the presentation at first commit" do
|
|
40
40
|
@helper.start_presentation do |commits, presenter|
|
|
41
|
-
@helper.head_position.should eql commits.first.
|
|
41
|
+
@helper.head_position.should eql commits.first.sha
|
|
42
42
|
end
|
|
43
43
|
end
|
|
44
44
|
end
|
|
@@ -18,7 +18,7 @@ describe "update presentation with any new commits" do
|
|
|
18
18
|
commits = @helper.initialise_presentation({:delay => true})
|
|
19
19
|
new_commit = @helper.edit_file_and_commit("forth commit", "d")
|
|
20
20
|
@helper.update_presentation do |yaml|
|
|
21
|
-
yaml["slides"].last["slide"]["commit"].should eql new_commit.
|
|
21
|
+
yaml["slides"].last["slide"]["commit"].should eql new_commit.sha
|
|
22
22
|
end
|
|
23
23
|
end
|
|
24
24
|
|
data/spec/support/git_helpers.rb
CHANGED
|
@@ -16,10 +16,10 @@ class GitHelper
|
|
|
16
16
|
content = ('a'..'z').to_a
|
|
17
17
|
Dir.mkdir(presentation_dir)
|
|
18
18
|
Dir.chdir(presentation_dir) do
|
|
19
|
-
@git_repo =
|
|
19
|
+
@git_repo = Git.init(".")
|
|
20
20
|
(1..no_of_commits).each do |n|
|
|
21
|
-
edit_file_and_commit("commit number #{n}", content[n])
|
|
22
|
-
commits <<
|
|
21
|
+
commit = edit_file_and_commit("commit number #{n}", content[n])
|
|
22
|
+
commits << commit
|
|
23
23
|
#need to make it sleep for a second.
|
|
24
24
|
#git is not accurate enough with the speed of the test
|
|
25
25
|
#to sort correctly only when required
|
|
@@ -40,7 +40,7 @@ class GitHelper
|
|
|
40
40
|
edit_file(content)
|
|
41
41
|
@git_repo.add(".")
|
|
42
42
|
@git_repo.commit_all(commit_message)
|
|
43
|
-
@git_repo.
|
|
43
|
+
@git_repo.log.to_a[0]
|
|
44
44
|
end
|
|
45
45
|
|
|
46
46
|
def setup_presentation_file(commits)
|
|
@@ -56,7 +56,7 @@ class GitHelper
|
|
|
56
56
|
end
|
|
57
57
|
|
|
58
58
|
def head_position
|
|
59
|
-
File.open(@presentation_dir + '/.git/HEAD').
|
|
59
|
+
File.open(@presentation_dir + '/.git/HEAD').each_line.first.strip
|
|
60
60
|
end
|
|
61
61
|
|
|
62
62
|
def initialise_presentation(params={})
|
|
@@ -143,8 +143,8 @@ class GitHelper
|
|
|
143
143
|
|
|
144
144
|
def current_branch
|
|
145
145
|
Dir.chdir(PRESENTATION_DIR) do
|
|
146
|
-
repo =
|
|
147
|
-
repo.
|
|
146
|
+
repo = Git.open('.')
|
|
147
|
+
repo.current_branch
|
|
148
148
|
end
|
|
149
149
|
end
|
|
150
150
|
|
metadata
CHANGED
|
@@ -1,104 +1,99 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: git_presenter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
5
|
-
prerelease:
|
|
4
|
+
version: 1.0.0
|
|
6
5
|
platform: ruby
|
|
7
6
|
authors:
|
|
8
7
|
- Colin Gemmell
|
|
9
8
|
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 2014-02-26 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
|
-
name:
|
|
16
|
-
requirement:
|
|
17
|
-
none: false
|
|
14
|
+
name: git
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
18
16
|
requirements:
|
|
19
|
-
- -
|
|
17
|
+
- - '>='
|
|
20
18
|
- !ruby/object:Gem::Version
|
|
21
|
-
version: '
|
|
19
|
+
version: '0'
|
|
22
20
|
type: :runtime
|
|
23
21
|
prerelease: false
|
|
24
|
-
version_requirements:
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - '>='
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '0'
|
|
25
27
|
- !ruby/object:Gem::Dependency
|
|
26
28
|
name: launchy
|
|
27
|
-
requirement:
|
|
28
|
-
none: false
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
30
|
requirements:
|
|
30
31
|
- - ~>
|
|
31
32
|
- !ruby/object:Gem::Version
|
|
32
33
|
version: '2.1'
|
|
33
34
|
type: :runtime
|
|
34
35
|
prerelease: false
|
|
35
|
-
version_requirements:
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - ~>
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '2.1'
|
|
36
41
|
- !ruby/object:Gem::Dependency
|
|
37
42
|
name: pry
|
|
38
|
-
requirement:
|
|
39
|
-
none: false
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
40
44
|
requirements:
|
|
41
|
-
- -
|
|
45
|
+
- - '>='
|
|
42
46
|
- !ruby/object:Gem::Version
|
|
43
47
|
version: '0'
|
|
44
48
|
type: :development
|
|
45
49
|
prerelease: false
|
|
46
|
-
version_requirements:
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - '>='
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '0'
|
|
47
55
|
- !ruby/object:Gem::Dependency
|
|
48
56
|
name: rspec
|
|
49
|
-
requirement:
|
|
50
|
-
none: false
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
51
58
|
requirements:
|
|
52
59
|
- - ~>
|
|
53
60
|
- !ruby/object:Gem::Version
|
|
54
61
|
version: '2.7'
|
|
55
62
|
type: :development
|
|
56
63
|
prerelease: false
|
|
57
|
-
version_requirements:
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - ~>
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '2.7'
|
|
58
69
|
- !ruby/object:Gem::Dependency
|
|
59
70
|
name: bundler
|
|
60
|
-
requirement:
|
|
61
|
-
none: false
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
62
72
|
requirements:
|
|
63
|
-
- -
|
|
73
|
+
- - '>='
|
|
64
74
|
- !ruby/object:Gem::Version
|
|
65
75
|
version: '0'
|
|
66
76
|
type: :development
|
|
67
77
|
prerelease: false
|
|
68
|
-
version_requirements:
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - '>='
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: '0'
|
|
69
83
|
- !ruby/object:Gem::Dependency
|
|
70
84
|
name: jeweler
|
|
71
|
-
requirement:
|
|
72
|
-
none: false
|
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
|
73
86
|
requirements:
|
|
74
87
|
- - ~>
|
|
75
88
|
- !ruby/object:Gem::Version
|
|
76
89
|
version: '1.6'
|
|
77
90
|
type: :development
|
|
78
91
|
prerelease: false
|
|
79
|
-
version_requirements:
|
|
80
|
-
- !ruby/object:Gem::Dependency
|
|
81
|
-
name: rcov
|
|
82
|
-
requirement: &70174478954780 !ruby/object:Gem::Requirement
|
|
83
|
-
none: false
|
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
84
93
|
requirements:
|
|
85
94
|
- - ~>
|
|
86
95
|
- !ruby/object:Gem::Version
|
|
87
|
-
version: '
|
|
88
|
-
type: :development
|
|
89
|
-
prerelease: false
|
|
90
|
-
version_requirements: *70174478954780
|
|
91
|
-
- !ruby/object:Gem::Dependency
|
|
92
|
-
name: pry
|
|
93
|
-
requirement: &70174478102720 !ruby/object:Gem::Requirement
|
|
94
|
-
none: false
|
|
95
|
-
requirements:
|
|
96
|
-
- - ! '>='
|
|
97
|
-
- !ruby/object:Gem::Version
|
|
98
|
-
version: '0'
|
|
99
|
-
type: :development
|
|
100
|
-
prerelease: false
|
|
101
|
-
version_requirements: *70174478102720
|
|
96
|
+
version: '1.6'
|
|
102
97
|
description: Code presentation tool using git
|
|
103
98
|
email: pythonandchips@gmail.com
|
|
104
99
|
executables:
|
|
@@ -136,29 +131,25 @@ files:
|
|
|
136
131
|
homepage: http://github.com/pythonandchips/git-presenter
|
|
137
132
|
licenses:
|
|
138
133
|
- MIT
|
|
134
|
+
metadata: {}
|
|
139
135
|
post_install_message:
|
|
140
136
|
rdoc_options: []
|
|
141
137
|
require_paths:
|
|
142
138
|
- lib
|
|
143
139
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
144
|
-
none: false
|
|
145
140
|
requirements:
|
|
146
|
-
- -
|
|
141
|
+
- - '>='
|
|
147
142
|
- !ruby/object:Gem::Version
|
|
148
143
|
version: '0'
|
|
149
|
-
segments:
|
|
150
|
-
- 0
|
|
151
|
-
hash: -3910658736089827662
|
|
152
144
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
153
|
-
none: false
|
|
154
145
|
requirements:
|
|
155
|
-
- -
|
|
146
|
+
- - '>='
|
|
156
147
|
- !ruby/object:Gem::Version
|
|
157
148
|
version: '0'
|
|
158
149
|
requirements: []
|
|
159
150
|
rubyforge_project:
|
|
160
|
-
rubygems_version:
|
|
151
|
+
rubygems_version: 2.2.2
|
|
161
152
|
signing_key:
|
|
162
|
-
specification_version:
|
|
153
|
+
specification_version: 4
|
|
163
154
|
summary: Code presentation tool using git
|
|
164
155
|
test_files: []
|