tvrage_api 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +26 -13
  3. data/lib/tvrage_api/base.rb +25 -6
  4. data/lib/tvrage_api/client.rb +13 -0
  5. data/lib/tvrage_api/search.rb +9 -0
  6. data/lib/tvrage_api/show.rb +14 -19
  7. data/lib/tvrage_api/update.rb +5 -0
  8. data/lib/tvrage_api/version.rb +1 -1
  9. data/lib/tvrage_api.rb +3 -7
  10. data/spec/integrations/client_spec.rb +55 -0
  11. data/spec/integrations/search_spec.rb +7 -7
  12. data/spec/integrations/show_spec.rb +12 -12
  13. data/spec/integrations/update_spec.rb +5 -6
  14. data/spec/tvrage_api/base_spec.rb +56 -0
  15. data/spec/tvrage_api/client_spec.rb +23 -0
  16. data/spec/tvrage_api/search_spec.rb +22 -0
  17. data/spec/tvrage_api/show_spec.rb +18 -59
  18. data/spec/tvrage_api/update_spec.rb +14 -0
  19. data/tvrage_api.gemspec +1 -2
  20. metadata +15 -53
  21. data/lib/tvrage_api/element.rb +0 -3
  22. data/lib/tvrage_api/episode.rb +0 -9
  23. data/lib/tvrage_api/request/base.rb +0 -57
  24. data/lib/tvrage_api/request/search.rb +0 -13
  25. data/lib/tvrage_api/request/show.rb +0 -37
  26. data/lib/tvrage_api/request/update.rb +0 -13
  27. data/lib/tvrage_api/utility/aka_array.rb +0 -9
  28. data/lib/tvrage_api/utility/date.rb +0 -9
  29. data/lib/tvrage_api/utility/date_or_integer.rb +0 -11
  30. data/lib/tvrage_api/utility/episode_array.rb +0 -15
  31. data/lib/tvrage_api/utility/genre_array.rb +0 -9
  32. data/lib/tvrage_api/utility/hashie/extensions/key_replace.rb +0 -42
  33. data/lib/tvrage_api/utility/integer.rb +0 -5
  34. data/lib/tvrage_api/utility/string.rb +0 -11
  35. data/lib/tvrage_api/utility.rb +0 -8
  36. data/spec/tvrage_api/episode_spec.rb +0 -51
  37. data/spec/tvrage_api/request/base_spec.rb +0 -113
  38. data/spec/tvrage_api/request/search_spec.rb +0 -30
  39. data/spec/tvrage_api/request/show_spec.rb +0 -71
  40. data/spec/tvrage_api/request/update_spec.rb +0 -28
  41. data/spec/tvrage_api/utility/aka_array_spec.rb +0 -17
  42. data/spec/tvrage_api/utility/date_or_integer_spec.rb +0 -13
  43. data/spec/tvrage_api/utility/date_spec.rb +0 -13
  44. data/spec/tvrage_api/utility/genre_array_spec.rb +0 -17
  45. data/spec/tvrage_api/utility/integer_spec.rb +0 -9
  46. data/spec/tvrage_api/utility/string_spec.rb +0 -9
@@ -1,17 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe AkaArray do
4
- describe '#coerce' do
5
- describe 'when value is Array' do
6
- it 'should return Array' do
7
- AkaArray.coerce([]).should == []
8
- end
9
- end
10
-
11
- describe 'when value is not Array' do
12
- it 'should return Array' do
13
- AkaArray.coerce(double(aka: [double(country: 'EN', __content__: 'test')])).first.class.should == TvrageApi::Element
14
- end
15
- end
16
- end
17
- end
@@ -1,13 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe DateOrInteger do
4
- describe '#coerce' do
5
- it 'should convert string to date' do
6
- DateOrInteger.coerce('2001/02/03').should == Date.new(2001, 2, 3)
7
- end
8
-
9
- it 'should return integer for no date string' do
10
- DateOrInteger.coerce('2000').should == 2000
11
- end
12
- end
13
- end
@@ -1,13 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Date do
4
- describe '#coerce' do
5
- it 'should convert string to date' do
6
- Date.coerce('2001-02-03').should == Date.new(2001, 2, 3)
7
- end
8
-
9
- it 'should return nil for no date string' do
10
- Date.coerce('test').should == nil
11
- end
12
- end
13
- end
@@ -1,17 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe GenreArray do
4
- describe '#coerce' do
5
- describe 'when value is Array' do
6
- it 'should return Array' do
7
- GenreArray.coerce([]).should == []
8
- end
9
- end
10
-
11
- describe 'when value is not Array' do
12
- it 'should return Array' do
13
- GenreArray.coerce(double(genre: 'Action')).should == 'Action'
14
- end
15
- end
16
- end
17
- end
@@ -1,9 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Integer do
4
- describe '#coerce' do
5
- it 'should convert string to integer' do
6
- Integer.coerce('1234').should == 1234
7
- end
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe String do
4
- describe '#underscore' do
5
- it 'should convert camelCase to underscore' do
6
- 'methodName'.underscore.should == 'method_name'
7
- end
8
- end
9
- end