zanoxrb 0.5.8 → 0.5.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: da2621746bb04a12d8f98c1feab9dccb75dcf30e
4
- data.tar.gz: c9c80fda9d235b4ef30aaf19f787eaedf2f9b382
3
+ metadata.gz: e0958f0151872c562edbc296fd04aec030ab3030
4
+ data.tar.gz: f2132e1ec3da109e8515db59286263e072e2d447
5
5
  SHA512:
6
- metadata.gz: 1ad318ec18ca872cd613b59d827b019bd2d419f925a8d0b3d915b847861d71c7726fc7a5b28bc79f1a4a29400aea59c5dc16bc81f68072f8db829ce83d14fad5
7
- data.tar.gz: 8c479ac0b70326f7cfad2e3f71d97f05108708ccf0d7af6a94232efaeca5885e190275cd916bff010d64bab8024c77f258441501c807de05b8ff7ad8d6f7efe5
6
+ metadata.gz: 34b3b70c86505a820642d446e82a28069e46896e54658b2a003243ae1f0d13a34f494a08d4cde61fd3bbfd1625b506b25bd1f0c5b52297687666b6e1a56af7de
7
+ data.tar.gz: b3955a86f293d6b2c839273d542d7208654803a82e14758ac497d873bdb06addd4a2b4037b68cde2a6b1fcf2e4c469b0250bb09386b9cec04476e87fddfb4258
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zanoxrb (0.5.8)
4
+ zanoxrb (0.5.9)
5
5
  httparty (~> 0.13)
6
6
  ruby-try (~> 1.1)
7
7
 
data/Rakefile CHANGED
@@ -4,6 +4,7 @@ require 'rake'
4
4
  task default: [ :build, :install, :test ]
5
5
 
6
6
  task :build do
7
+ sh 'bundle install'
7
8
  sh 'gem build zanoxrb.gemspec'
8
9
  end
9
10
 
@@ -38,29 +38,24 @@ module Zanox
38
38
  # - tracking_links (Hash[]) The list of the tracking links for the admedium
39
39
  ###################
40
40
  def initialize(data)
41
- @pid = data['@id'].to_i
42
- @name = data['name']
43
- @adrank = data['adrank']
44
- @type = data['admediumType']
45
- @program = {
41
+ @pid = data['@id'].to_i
42
+ @name = data['name']
43
+ @adrank = data['adrank']
44
+ @type = data['admediumType']
45
+ @program = {
46
46
  id: data['program']['@id'].to_i,
47
47
  name: data['program']['$']
48
48
  }
49
- @title = data['title']
50
- @description = data['description']
51
- @title = data['title']
52
- @category = parse_category(data)
53
- @trackingLinks = parse_tracking_links(data)
49
+ @title = data['title']
50
+ @description = data['description']
51
+ @category = parse_category(data)
52
+ @tracking_links = parse_tracking_links(data)
54
53
  end
55
54
 
56
55
  class << self
57
56
  def find(args = {})
58
57
  response = API.request(:admedia, args)
59
- if response.admedium_items.is_a?(Array)
60
- response.admedium_items.map { |admedium| new(admedium) }
61
- else
62
- new(response.admedium_items)
63
- end
58
+ [response.admedium_items].flatten.map { |admedium| new(admedium) }
64
59
  end
65
60
  end
66
61
 
data/lib/zanox/version.rb CHANGED
@@ -23,5 +23,5 @@
23
23
  #++
24
24
 
25
25
  module Zanox
26
- VERSION = '0.5.8'
26
+ VERSION = '0.5.9'
27
27
  end
@@ -8,7 +8,7 @@ describe Zanox::API do
8
8
  it 'returns pagination infos' do
9
9
  expect(programs.page).to be 0
10
10
  expect(programs.items).to be 10
11
- expect(programs.total).to be > 1000
11
+ expect(programs.total).to be > 500
12
12
  end
13
13
 
14
14
  it 'returns a list of programs' do
@@ -8,6 +8,7 @@ describe Zanox::AdMedium do
8
8
  describe '#find' do
9
9
  let(:admedia) { Zanox::AdMedium.find }
10
10
 
11
+ it { expect(admedia).to be_a(Array) }
11
12
  it { expect(admedia).to_not be_empty }
12
13
  it { expect(admedia.last).to be_a(Zanox::AdMedium) }
13
14
  end
data/zanoxrb.gemspec CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new { |s|
9
9
  s.platform = Gem::Platform::RUBY
10
10
  s.summary = "A Ruby wrapper for Zanox's RESTful APIs."
11
11
  s.description = "A Ruby wrapper for Zanox's RESTful APIs because all the current alternatives outta here are shit."
12
- s.license = 'BSD'
12
+ s.license = 'BSD-2-Clause'
13
13
 
14
14
  s.files = `git ls-files`.split("\n")
15
15
  s.require_paths = ['lib']
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zanoxrb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.8
4
+ version: 0.5.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giovanni Capuano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-03 00:00:00.000000000 Z
11
+ date: 2016-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -136,7 +136,7 @@ files:
136
136
  - zanoxrb.gemspec
137
137
  homepage: http://github.com/mozestudio/zanoxrb
138
138
  licenses:
139
- - BSD
139
+ - BSD-2-Clause
140
140
  metadata: {}
141
141
  post_install_message:
142
142
  rdoc_options: []