lc_api 1.2 → 1.3
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.
- data/lib/lc_api/message.rb +1 -1
- data/lib/lc_api/series.rb +4 -0
- data/lib/lc_api/version.rb +1 -1
- data/spec/resources/series_spec.rb +19 -1
- metadata +2 -2
data/lib/lc_api/message.rb
CHANGED
data/lib/lc_api/series.rb
CHANGED
data/lib/lc_api/version.rb
CHANGED
@@ -9,7 +9,7 @@ describe LcApi::Series do
|
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
12
|
-
describe "returning a single series" do
|
12
|
+
describe "returning a single series by id" do
|
13
13
|
it "should return a series" do
|
14
14
|
FakeWeb.register_uri(:get, "#{SITE_URL}/series/2.json?key=1111", :body => fixture("series.json"))
|
15
15
|
@series = LcApi::Series.find(2)
|
@@ -17,6 +17,14 @@ describe LcApi::Series do
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
+
describe "returning a single series by slug" do
|
21
|
+
it "should return a series" do
|
22
|
+
FakeWeb.register_uri(:get, "#{SITE_URL}/series/series-slug-example.json?key=1111", :body => fixture("series.json"))
|
23
|
+
@series = LcApi::Series.find("series-slug-example")
|
24
|
+
expect(@series.class).to eq LcApi::Series
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
20
28
|
describe "including the messages info" do
|
21
29
|
it "should include 'messages' in the url" do
|
22
30
|
# If this test passes, that means the url below was correctly called, no need for any expects
|
@@ -42,4 +50,14 @@ describe LcApi::Series do
|
|
42
50
|
end
|
43
51
|
end
|
44
52
|
end
|
53
|
+
|
54
|
+
describe "finding different images" do
|
55
|
+
describe ".find_image" do
|
56
|
+
it "should find the image" do
|
57
|
+
FakeWeb.register_uri(:get, "#{SITE_URL}/series/2.json?key=1111", :body => fixture("series.json"))
|
58
|
+
series = LcApi::Series.find(2)
|
59
|
+
expect(series.find_image("224x160").url).to eq "http://s3.amazonaws.com/lcapi.production/series/small-things/224x160.jpg?1391467308"
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
45
63
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lc_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.3'
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-02-
|
12
|
+
date: 2014-02-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activeresource
|