yapt 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4d0e21e81ba877579e8cad963ed7e14179ce547d
4
- data.tar.gz: a33f9d111151aa92fd43593758bb42ed74af3b47
3
+ metadata.gz: c07c8cba09a9e0195d70e4f09710b1373622f947
4
+ data.tar.gz: 59d1bb646ab7b5b94097ebd45fff8fecc665e1c3
5
5
  SHA512:
6
- metadata.gz: 284da10ba83cfdcfbc0ed23d5b7105dd1627b96288e2cf93538a98fa4aca2a5373b8170d070244576518a7650c7a580722a003d98cc0192cce9aea146856da68
7
- data.tar.gz: 7eded38f9c0030fd230b235688be40659ece165e54f93a00bc4c58040965f6764ba94ebe23689683f5025cbbcec2fdc1f4be93477766a300fe57c72ddb7fccf2
6
+ metadata.gz: c3fb170ac9a7c2b3e5a983840592aa586deaca027d13507137447dd09beb54777ce6e110523d38c47afc2dca538dca81316b0facda9f48512671eea2069990de
7
+ data.tar.gz: 227c7157d116853daf2d124acaaf9ff93d21faa3b1e646a57391874c31a14dbabfb2006c85bef4dd1b2f947034c97f178953d3e35efffd0dcb23cd8b406981e5
data/lib/yapt/story.rb CHANGED
@@ -55,7 +55,7 @@ module Yapt
55
55
  end
56
56
 
57
57
  def self.base_site_url
58
- "https://www.pivotaltracker.com/s/projects/#{Yapt.project_id}"
58
+ "https://www.pivotaltracker.com/projects/#{Yapt.project_id}"
59
59
  end
60
60
 
61
61
  attr_reader :raw_story
@@ -71,6 +71,10 @@ module Yapt
71
71
  end
72
72
  end
73
73
 
74
+ def has_image?
75
+ Request.new("stories/", {filter: "id:#{id} has:attachment"}, :get).result.any?
76
+ end
77
+
74
78
  def comments
75
79
  @comments ||= Comment.find(id)
76
80
  end
@@ -1,12 +1,13 @@
1
1
  <% @stories.each do |story| -%>
2
- <%= Rainbow(story.id).bright.color("0C2233") %> | <%= Rainbow(story.name).bright.color("065471") %>
2
+ <%= Rainbow(story.id).bright.color("0C2233").inverse %> | <%= Rainbow(story.name).bright.color("065471") %>
3
+ <%= Rainbow("HAS IMAGE").red.bright if story.has_image? %>
3
4
  <%= story.description %>
4
5
  <% if story.comments.any? -%>
5
6
  <%= Rainbow('-' * 100).color("0A91AB") %>
6
7
  <% story.comments.each_with_index do |comment, i| -%>
7
8
  <%= i+1 %>. <%= comment.commenter.initials %>: <%= comment.text %>
8
- <% end %>
9
- <% end %>
9
+ <% end -%>
10
+ <% end -%>
10
11
  <%= Rainbow('-' * 100).color("0A91AB") %>
11
12
  <%= story.created_at_display %> | <%= story.updated_at_display %> | <%= story.current_state %> | <%= story.requester_initials %> | <%= story.owner_initials %>
12
13
  <%= Rainbow('=' * 100).color("065471") %>
data/lib/yapt/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Yapt
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
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.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Schenkman-Moore