filmtipset 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/filmtipset.gemspec +1 -1
- data/lib/filmtipset/version.rb +1 -1
- data/spec/filmtipset/api/genre_spec.rb +32 -0
- data/spec/filmtipset/api_spec.rb +9 -0
- data/spec/filmtipset/version_spec.rb +11 -0
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f595692340a604d931c2ed42fa5ecd32319c80e
|
4
|
+
data.tar.gz: 0f6bb63408a5bb39a762cb4c59ac35a5937395d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32e124b5387588a0115b227534e3b25af9e366265e4c29a10f0461686ce4315e5b497d5fcf223dd7e545b3459b6199e063b90d21d7b1cde27b04eac9e2a353d1
|
7
|
+
data.tar.gz: 620f37d04620c5632112f3330a041b12eb999b0f6c9ec17d6938e3e740de621435f27d960dee469d25f8696552600cb345f1bd636e9b7f009eee3d9d58a7e25d
|
data/filmtipset.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |gem|
|
|
13
13
|
gem.authors = ["Peter Hellberg"]
|
14
14
|
gem.email = ["peter@c7.se"]
|
15
15
|
gem.summary = "API client for the Filmtipset API (requires access key)"
|
16
|
-
gem.homepage = "https://github.com/peterhellberg/
|
16
|
+
gem.homepage = "https://github.com/peterhellberg/filmtipset"
|
17
17
|
gem.license = "MIT"
|
18
18
|
|
19
19
|
gem.files = `git ls-files`.split($/)
|
data/lib/filmtipset/version.rb
CHANGED
@@ -0,0 +1,32 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require_relative '../../spec_helper'
|
4
|
+
|
5
|
+
describe Filmtipset::Api::Genre do
|
6
|
+
subject { Filmtipset::Api::Genre }
|
7
|
+
|
8
|
+
describe "valid_id?" do
|
9
|
+
it "returns true for valid id" do
|
10
|
+
subject.valid_id?(4).must_equal true
|
11
|
+
end
|
12
|
+
|
13
|
+
it "returns false for invalid id" do
|
14
|
+
subject.valid_id?(88).must_equal false
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
describe "verify_id" do
|
19
|
+
it "should raise an exception for invalid id" do
|
20
|
+
-> { subject.verify_id(123) }.
|
21
|
+
must_raise Filmtipset::Api::Genre::InvalidId
|
22
|
+
end
|
23
|
+
|
24
|
+
it "returns nil for valid id" do
|
25
|
+
subject.verify_id(1).must_be_nil
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
it "has a table of 29 genres" do
|
30
|
+
subject::TABLE.size.must_equal 29
|
31
|
+
end
|
32
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: filmtipset
|
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
|
- Peter Hellberg
|
@@ -70,9 +70,12 @@ files:
|
|
70
70
|
- lib/filmtipset/api.rb
|
71
71
|
- lib/filmtipset/api/genre.rb
|
72
72
|
- lib/filmtipset/version.rb
|
73
|
+
- spec/filmtipset/api/genre_spec.rb
|
74
|
+
- spec/filmtipset/api_spec.rb
|
75
|
+
- spec/filmtipset/version_spec.rb
|
73
76
|
- spec/filmtipset_spec.rb
|
74
77
|
- spec/spec_helper.rb
|
75
|
-
homepage: https://github.com/peterhellberg/
|
78
|
+
homepage: https://github.com/peterhellberg/filmtipset
|
76
79
|
licenses:
|
77
80
|
- MIT
|
78
81
|
metadata: {}
|
@@ -102,5 +105,8 @@ signing_key:
|
|
102
105
|
specification_version: 4
|
103
106
|
summary: API client for the Filmtipset API (requires access key)
|
104
107
|
test_files:
|
108
|
+
- spec/filmtipset/api/genre_spec.rb
|
109
|
+
- spec/filmtipset/api_spec.rb
|
110
|
+
- spec/filmtipset/version_spec.rb
|
105
111
|
- spec/filmtipset_spec.rb
|
106
112
|
- spec/spec_helper.rb
|