overview 0.0.8.pre.28 → 0.0.9.pre.30

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YTg2NGIxM2U1ZmE1N2JhMDdhMGEwZTkyYzk0NzgzNTk0NTM0YzcxOQ==
4
+ MWExZWZjOWRmNDdhNzlmZjZhOWExMGE2YmFmYTFmZTRiM2NlYWVmOQ==
5
5
  data.tar.gz: !binary |-
6
- ODgzMDAwZThlMWZmOTIyNGU5ZjI1MjQ4OTVjODA4ZGUxMTJlODE4Yg==
6
+ YjgyODJjMTk5YWE3NjRhYWRjOGFhOGNkMDcwZWJiMzAzZDQzZDk0Mw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZWVlYTVmNzcwYzU5OWI1ZWZiMjMxMDVmZDU5MDY0NmU3NzY4OTJlN2JlZTg5
10
- OGQ2OWU5MjU3MDNhMjczMDU5ZGMxN2JhOGRmZDBiYzBhMTRhNWQwODQyM2Q5
11
- OTFmZTllMjRlYzRhOGI1YmE4NTBlNWYwMGZhNjcwZGFjMjQwOTU=
9
+ MTdkZDY3Y2ViNjYzMDMyMTJlNjhkNWMzNjBhMjZmZDBiZjExMjM0NDM1ZjRj
10
+ YzZhNmE0ZTdmNDkzZTEyYjk3ZmYzYzU3YjA3MGNlNTgzZDQyNmVjZWVjZjdj
11
+ MjZiZmJiOWFjOTM1YjlkZDNjZGMxYzM4YTM5MjczM2FkZTc0Yjk=
12
12
  data.tar.gz: !binary |-
13
- N2ZmMjdkNGVhOGEzMjQ1NTY5YjkyNTE0YjBjOWM3OWU2M2Y5MzBhYzEyMDFm
14
- MWViYmVkYmU0MjNmNzQwYWE2MTA4NzkwZGE2NTM3ZTQ2OTY5OWY5MjI3NjVk
15
- MmVlZjMzYWY2OWM4MWYwMTllMWI0OTlmMTVjNWIxMzJkN2JlMzI=
13
+ ODAxYjdjNTM0MTFlMGJlYWU3YWVlOGUxY2QyODhiNWUwNmI3NWMxZjZjMzlk
14
+ NDc0YmM2MmMyYWMyZjIxODFkZTYyMzMzMzI2MWE5MTUwZTA0YzI1MDRiODQx
15
+ NjNjMjU4YzdlYjhlYTJmMWE2YjQxM2YzNDNiODAyMjMyMWRiMWE=
@@ -35,14 +35,17 @@ module Helpers
35
35
  attr_accessor :type
36
36
  attr_accessor :author
37
37
  attr_accessor :id
38
- attr_accessor :hackpads
38
+ attr_accessor :specs
39
39
  attr_accessor :url
40
40
  attr_accessor :parent
41
+ attr_accessor :specs
42
+
41
43
 
42
- HACKPADURL = "hackpad.com"
43
44
 
44
45
  def initialize(json)
45
46
 
47
+ @specurls = %w(hackpad.com notes.dropbox.com)
48
+
46
49
  type ||="NA"
47
50
  status ||="UNKNOWN"
48
51
  author ||="UNKNOWN"
@@ -57,9 +60,8 @@ module Helpers
57
60
  @author = author
58
61
  @url = json["short_url"]
59
62
  @parent = SprintlyItem.new(json["parent"]) if json["parent"]
60
-
61
63
  urls = URI.extract(@description)
62
- @hackpads = urls.select { |u| u.include?(HACKPADURL)}.collect {|u| SprintlyEmbeddedURL.new(u)}
64
+ @specs = urls.select { |u| @specurls.any? {|specurl| u.include?(specurl)}}.collect {|u| SprintlyEmbeddedURL.new(u)}
63
65
 
64
66
  end
65
67
 
@@ -106,10 +108,10 @@ module Helpers
106
108
  return @type.upcase == "STORY"
107
109
  end
108
110
 
109
- def all_hackpads
111
+ def all_specs
110
112
  hackpads = Array.new
111
- hackpads.push(self.hackpads)
112
- hackpads.push(self.parent.all_hackpads) if self.parent
113
+ hackpads.push(self.specs)
114
+ hackpads.push(self.parent.all_specs) if self.parent
113
115
  return hackpads.flatten.uniq
114
116
  end
115
117
 
@@ -1,3 +1,3 @@
1
1
  module Overview
2
- VERSION = '0.0.8.pre.28'
2
+ VERSION = '0.0.9.pre.30'
3
3
  end
@@ -264,7 +264,7 @@ RSpec.describe 'Sprintly#retrieveSprintlyItem' do
264
264
  cache = Cache.new
265
265
  sprintly = Sprintly.new(30420,"jono+overview+test@overllc.com", "kPnNLnM8pjkYeS9sMvrQPhj6JkC4mcNL", cache)
266
266
  item = sprintly.sprintly_item(1)
267
- expect(item.hackpads.count).to eq(1)
267
+ expect(item.specs.count).to eq(1)
268
268
  end
269
269
  end
270
270
 
@@ -282,8 +282,8 @@ RSpec.describe 'Sprintly#retrieveSprintlyItem.allHackpads' do
282
282
  cache = Cache.new
283
283
  sprintly = Sprintly.new(30420,"jono+overview+test@overllc.com", "kPnNLnM8pjkYeS9sMvrQPhj6JkC4mcNL", cache)
284
284
  item = sprintly.sprintly_item(2)
285
- expect(item.hackpads.count).to eq(0)
286
- expect(item.all_hackpads.count).to eq(1)
285
+ expect(item.specs.count).to eq(0)
286
+ expect(item.all_specs.count).to eq(1)
287
287
  end
288
288
  end
289
289
 
@@ -292,8 +292,17 @@ RSpec.describe 'Sprintly#retrieveSprintlyItem.allHackpads' do
292
292
  cache = Cache.new
293
293
  sprintly = Sprintly.new(30420,"jono+overview+test@overllc.com", "kPnNLnM8pjkYeS9sMvrQPhj6JkC4mcNL", cache)
294
294
  item = sprintly.sprintly_item(4)
295
- expect(item.hackpads.count).to eq(1)
296
- expect(item.all_hackpads.count).to eq(2)
295
+ expect(item.specs.count).to eq(1)
296
+ expect(item.all_specs.count).to eq(2)
297
+ end
298
+ end
299
+
300
+ RSpec.describe 'sprintly_item supports Dropbox notes' do
301
+ it 'returns single dropbox note item' do
302
+ cache = Cache.new
303
+ sprintly = Sprintly.new(30420,"jono+overview+test@overllc.com", "kPnNLnM8pjkYeS9sMvrQPhj6JkC4mcNL", cache)
304
+ item = sprintly.sprintly_item(5)
305
+ expect(item.specs.count).to eq(1)
297
306
  end
298
307
  end
299
308
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: overview
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8.pre.28
4
+ version: 0.0.9.pre.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Orford
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-04 00:00:00.000000000 Z
11
+ date: 2015-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake