yapt 0.0.6 → 0.0.7

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: c87d64d0ea7777eb448747137bb77d4d30bc8dcb
4
- data.tar.gz: 2b087b18bb83f290a284376de2cf9c90804bce04
3
+ metadata.gz: 374e048c2960b7f3ef011bf37b3ee80f6a565a39
4
+ data.tar.gz: 6477259c5cd0f9f5e66f27cc3605864b1e815cb1
5
5
  SHA512:
6
- metadata.gz: 66c0e55c57689ed2049a1f20d20b9fcd91f9473db64a86d07a4bbfb8166b56e91db8ae3702b1a07ba14b8a80dff58dcfc454fadec0245f82a4023569b90ad648
7
- data.tar.gz: bade0f8237011b9e37dd381c957340b5193cd9ceb504e5599b31639fb731783f13c699d1181e93fe5b68f760b1c9452a59524d125b92c08ecb54b10a8955659c
6
+ metadata.gz: 278cb42ce4a9644178278aed35e76028a6501a433ab997303c50a42afb962d386d4ffcc3fb5f21e8633816233f54d468e1443b2d8536ff2611609cde08959bbc
7
+ data.tar.gz: 802452d0cf1e9edf4aee3a94fb8d68fd814b65354525cdc13682fb1e85068c638f9d9998d83094039436cbdda688d0699eafe5a2bf7c26584bb007361187fd23
@@ -11,6 +11,7 @@ module Yapt
11
11
  autoload :Config, "yapt/config"
12
12
  autoload :Move, "yapt/move"
13
13
  autoload :Comment, "yapt/comment"
14
+ autoload :GitView, "yapt/git_view"
14
15
 
15
16
  def self.config
16
17
  @config ||= Config.new(Dir.pwd)
@@ -68,14 +69,8 @@ module Yapt
68
69
  "#{Yapt.github_url_base}/commit/#{sha}"
69
70
  end
70
71
 
71
- def display
72
- output = ''
73
- tracker_ids.each do |id|
74
- story = Story.find(id)
75
- output << View.new([story]).display("for_git_display").strip + "\n"
76
- end
77
- output << "Git commit:\n #{message} by #{author}\n #{github_link}\n\n"
78
- output
72
+ def stories
73
+ @stories ||= tracker_ids.collect {|t| Story.find(t) }
79
74
  end
80
75
  end
81
76
 
@@ -87,7 +82,8 @@ module Yapt
87
82
  end
88
83
 
89
84
  def git(since_until)
90
- output GitLogShiv.find(since_until).collect(&:display)
85
+ commits = GitLogShiv.find(since_until)
86
+ output GitView.new(commits).display("git")
91
87
  end
92
88
 
93
89
  def list(*args)
@@ -0,0 +1,7 @@
1
+ module Yapt
2
+ class GitView < View
3
+ def initialize(git_commit)
4
+ @commit = git_commit
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,10 @@
1
+ <% @commit.each do |commit| -%>
2
+ <% commit.stories.each do |story| %>
3
+ Tracker Story:
4
+ <%= story.name %>
5
+ <%= story.url %>
6
+ <% end %>
7
+ Git commit:
8
+ <%= commit.message %> by <%= commit.author %>
9
+ <%= commit.github_link %>
10
+ <% end %>
@@ -1,3 +1,3 @@
1
1
  module Yapt
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yapt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Schenkman-Moore
@@ -126,12 +126,13 @@ files:
126
126
  - lib/yapt/comment.rb
127
127
  - lib/yapt/config.rb
128
128
  - lib/yapt/filter.rb
129
+ - lib/yapt/git_view.rb
129
130
  - lib/yapt/member.rb
130
131
  - lib/yapt/move.rb
131
132
  - lib/yapt/request.rb
132
133
  - lib/yapt/story.rb
133
134
  - lib/yapt/templates/detail.erb
134
- - lib/yapt/templates/for_git_display.erb
135
+ - lib/yapt/templates/git.erb
135
136
  - lib/yapt/templates/simple.erb
136
137
  - lib/yapt/version.rb
137
138
  - lib/yapt/view.rb
@@ -1,5 +0,0 @@
1
- <% @stories.each do |story| -%>
2
- Tracker Story:
3
- <%= story.name %>
4
- <%= story.url %>
5
- <% end %>