webgit 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e915df541ae8942eee3fb83ffa3eb60dfba205d9
4
- data.tar.gz: 03af1c6f3fcd40fb42be2f726b0bdcb0c1a703e4
3
+ metadata.gz: d7667f651a5abf9413e96c26f48e27a048698467
4
+ data.tar.gz: d675fa1002a14cff16e3332a1fe464987a557818
5
5
  SHA512:
6
- metadata.gz: bf6e9cfb849ebe092eb7eafbe9ce20e140c8136dbe6e86d19a5087a6147715d599151ca066403b842c7e13d1efeaee930fe284a3d43d650620e8de1d038d9bca
7
- data.tar.gz: 9fc45c72eb7ec8b39c4a5b160f10dd4b87c81fd0ba7e8cb06c22822685224643c9425b87f0f360fb491d5a5351478d83f976d9f9d58c1a8016bc86a5cc1b6213
6
+ metadata.gz: 441dd9655b033d99e4cdd19091405c244ec69dc97ed7c98b4a7744789e28348640dbffadee4a41579711907a149957032ac713ead17c2dc2fdbf6406a6a92e2e
7
+ data.tar.gz: 87a59d71de65b7dc459590df87ea633c731fd38f08c4f1f8859a5245b53cc851894047fddb2add03c8e0067f2bee8ee61294797988db41674c9542445248d1f5
data/README.md CHANGED
@@ -31,7 +31,16 @@ webgit
31
31
  webgit <GIT_REPO_DIR> <PORT>
32
32
  ```
33
33
 
34
- `http://localhost:<PORT>/`
34
+ ```
35
+ http://localhost:<PORT>/
36
+
37
+ # show commit via sha id
38
+ http://locahost:<PORT>/objects/HEAD/show
39
+ http://localhost:<PORT>/objects/<COMMIT_SHA>/show
40
+
41
+ # show tree via sha id
42
+ http://localhost:<PORT>/objects/<TREE_SHA>/show
43
+ ```
35
44
 
36
45
 
37
46
  ## Development
@@ -42,7 +51,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
42
51
 
43
52
  ## Contributing
44
53
 
45
- 1. Fork it ( https://github.com/[my-github-username]/webgit/fork )
54
+ 1. Fork it ( https://github.com/jameszhan/webgit/fork )
46
55
  2. Create your feature branch (`git checkout -b my-new-feature`)
47
56
  3. Commit your changes (`git commit -am 'Add some feature'`)
48
57
  4. Push to the branch (`git push origin my-new-feature`)
data/lib/webgit/app.rb CHANGED
@@ -56,6 +56,9 @@ module Webgit
56
56
  if obj.is_a? Rugged::Tree
57
57
  @tree = obj
58
58
  erb options[:tree_erb] || :tree
59
+ elsif obj.is_a? Rugged::Commit
60
+ @tree = obj.tree
61
+ erb options[:tree_erb] || :tree
59
62
  elsif obj.is_a? Rugged::Blob
60
63
  @blob = obj
61
64
  @format = options[:name].split('.')[-1]
@@ -1,4 +1,4 @@
1
1
  # coding: utf-8
2
2
  module Webgit
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webgit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Zhan