nanopop 0.0.1 → 0.0.2
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 +4 -4
- data/lib/nanopop/picture.rb +3 -4
- data/lib/nanopop/version.rb +1 -1
- data/test/lib/nanopop/picture_test.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 697cdf11aee0683d10014cc98dc7d56f973cfe76
|
|
4
|
+
data.tar.gz: 6cff167ba3919df8932e8eeb56c19734a278e44a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fc11b4185b76159d9133270532d584db1a7cdc9a467f716560b25215a60bebf3b06e47b2cc54d715412b40911fb50233fa31533e9760d7f21f1b13616e761929
|
|
7
|
+
data.tar.gz: 4809c0ab6b286f352bcb8a0d1462ef4f5c57470dbaa7c68cd6f36b7c62cc23ed8aeaf6c8b89f98b9d067ca4b69ce4a46e9b306243d24487aa657585f809eaf87
|
data/lib/nanopop/picture.rb
CHANGED
|
@@ -14,7 +14,7 @@ class Nanopop::Picture
|
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def url
|
|
17
|
-
URL % [adjust(
|
|
17
|
+
URL % [adjust(task_id), picture_filename]
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def avatar_url
|
|
@@ -22,10 +22,9 @@ class Nanopop::Picture
|
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
def self.latest qty
|
|
25
|
-
|
|
26
25
|
raise Nanopop::UndefinedToken unless Nanopop.configuration.token
|
|
26
|
+
|
|
27
27
|
response = fetch(:latest, numberOfPictures: qty)
|
|
28
|
-
File.open("test.xml", "w"){|f| f.write response }
|
|
29
28
|
doc = Nokogiri.XML(response)
|
|
30
29
|
|
|
31
30
|
doc.search('PictureLatest').map do |item|
|
|
@@ -56,7 +55,7 @@ class Nanopop::Picture
|
|
|
56
55
|
value.rjust(7, '0')
|
|
57
56
|
end
|
|
58
57
|
|
|
59
|
-
def method_missing method
|
|
58
|
+
def method_missing method, params={}
|
|
60
59
|
@ats[method]
|
|
61
60
|
end
|
|
62
61
|
|
data/lib/nanopop/version.rb
CHANGED
|
@@ -29,7 +29,7 @@ describe Nanopop::Picture do
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
it "should have url" do
|
|
32
|
-
subject.url.must_equal "https://nanopopapi.blob.core.windows.net/tasks/
|
|
32
|
+
subject.url.must_equal "https://nanopopapi.blob.core.windows.net/tasks/0000028/130719_ZO1DY.jpg"
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
it "should have user_name" do
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: nanopop
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Maiz Lulkin
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-08-
|
|
11
|
+
date: 2013-08-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|