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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a6699b96e8571bdf6a02935108ed69f4aae57598
4
- data.tar.gz: 00a00c0f9315c1f1a0381684bc72a3d1fdef90a0
3
+ metadata.gz: 4f595692340a604d931c2ed42fa5ecd32319c80e
4
+ data.tar.gz: 0f6bb63408a5bb39a762cb4c59ac35a5937395d7
5
5
  SHA512:
6
- metadata.gz: b2784da212f38a7032aff8775b7b7713d0772fa8dce476464bd82e6ed3889b65800d68a9a1c78e7cbb175c69811142ccf1073bdf55f831d9e4e487f70a36ba77
7
- data.tar.gz: 976b76d508aaa40a2703c66d70f2b3092de39c73dd57c6826da907d70b2f70439915a1eb932f57698bdc908938dca0038732dd808325a3d85fc633e9b64e9577
6
+ metadata.gz: 32e124b5387588a0115b227534e3b25af9e366265e4c29a10f0461686ce4315e5b497d5fcf223dd7e545b3459b6199e063b90d21d7b1cde27b04eac9e2a353d1
7
+ data.tar.gz: 620f37d04620c5632112f3330a041b12eb999b0f6c9ec17d6938e3e740de621435f27d960dee469d25f8696552600cb345f1bd636e9b7f009eee3d9d58a7e25d
@@ -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/skatteverket"
16
+ gem.homepage = "https://github.com/peterhellberg/filmtipset"
17
17
  gem.license = "MIT"
18
18
 
19
19
  gem.files = `git ls-files`.split($/)
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Filmtipset
4
- VERSION = "0.0.1"
4
+ VERSION = "0.0.2"
5
5
  end
@@ -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
@@ -0,0 +1,9 @@
1
+ # encoding: utf-8
2
+
3
+ require_relative '../spec_helper'
4
+
5
+ describe Filmtipset::Api do
6
+ subject { Filmtipset::Api }
7
+
8
+ # TODO
9
+ end
@@ -0,0 +1,11 @@
1
+ # encoding: utf-8
2
+
3
+ require_relative '../spec_helper'
4
+
5
+ describe Filmtipset::VERSION do
6
+ subject { Filmtipset::VERSION }
7
+
8
+ it "returns a version string" do
9
+ subject.must_match(/^\d+\.\d+\.\d+$/)
10
+ end
11
+ 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.1
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/skatteverket
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