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 +8 -8
- data/lib/helpers/sprintly.rb +9 -7
- data/lib/overview/version.rb +1 -1
- data/spec/helpers_spec.rb +14 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MWExZWZjOWRmNDdhNzlmZjZhOWExMGE2YmFmYTFmZTRiM2NlYWVmOQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YjgyODJjMTk5YWE3NjRhYWRjOGFhOGNkMDcwZWJiMzAzZDQzZDk0Mw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MTdkZDY3Y2ViNjYzMDMyMTJlNjhkNWMzNjBhMjZmZDBiZjExMjM0NDM1ZjRj
|
10
|
+
YzZhNmE0ZTdmNDkzZTEyYjk3ZmYzYzU3YjA3MGNlNTgzZDQyNmVjZWVjZjdj
|
11
|
+
MjZiZmJiOWFjOTM1YjlkZDNjZGMxYzM4YTM5MjczM2FkZTc0Yjk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODAxYjdjNTM0MTFlMGJlYWU3YWVlOGUxY2QyODhiNWUwNmI3NWMxZjZjMzlk
|
14
|
+
NDc0YmM2MmMyYWMyZjIxODFkZTYyMzMzMzI2MWE5MTUwZTA0YzI1MDRiODQx
|
15
|
+
NjNjMjU4YzdlYjhlYTJmMWE2YjQxM2YzNDNiODAyMjMyMWRiMWE=
|
data/lib/helpers/sprintly.rb
CHANGED
@@ -35,14 +35,17 @@ module Helpers
|
|
35
35
|
attr_accessor :type
|
36
36
|
attr_accessor :author
|
37
37
|
attr_accessor :id
|
38
|
-
attr_accessor :
|
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
|
-
@
|
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
|
111
|
+
def all_specs
|
110
112
|
hackpads = Array.new
|
111
|
-
hackpads.push(self.
|
112
|
-
hackpads.push(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
|
|
data/lib/overview/version.rb
CHANGED
data/spec/helpers_spec.rb
CHANGED
@@ -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.
|
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.
|
286
|
-
expect(item.
|
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.
|
296
|
-
expect(item.
|
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.
|
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-
|
11
|
+
date: 2015-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|