semrush 3.0.11 → 3.0.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -269,7 +269,7 @@ module Semrush
269
269
  params.delete(:report_type) unless REPORT_TYPES.include?(params[:report_type].try(:to_sym))
270
270
  params.delete(:request_type) unless REQUEST_TYPES.include?(params[:request_type].try(:to_sym))
271
271
  @parameters = {:db => "us", :api_key => Semrush.api_key, :limit => "", :offset => "", :export_columns => ""}.merge(@parameters).merge(params)
272
- raise Semrush::Exception::Nolimit.new(self, "The limit parameter is missing: a limit is required.") unless @parameters[:limit].present?
272
+ raise Semrush::Exception::Nolimit.new(self, "The limit parameter is missing: a limit is required.") unless @parameters[:limit].present? && @parameters[:limit].to_i>0
273
273
  raise Semrush::Exception::BadArgument.new(self, "Request parameter is missing: Domain name, URL, or keywords are required.") unless @parameters[:request].present?
274
274
  raise Semrush::Exception::BadArgument.new(self, "Bad db: #{@parameters[:db]}") unless DBS.include?(@parameters[:db].try(:to_sym))
275
275
  raise Semrush::Exception::BadArgument.new(self, "Bad report type: #{@parameters[:report_type]}") unless REPORT_TYPES.include?(@parameters[:report_type].try(:to_sym))
@@ -1,3 +1,3 @@
1
1
  module Semrush
2
- VERSION = "3.0.11" # we want to follow the API version: for API 3.0, the gem will be version 3.0.x
2
+ VERSION = "3.0.12" # we want to follow the API version: for API 3.0, the gem will be version 3.0.x
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: semrush
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.11
4
+ version: 3.0.12
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: 2013-05-22 00:00:00.000000000 Z
12
+ date: 2013-05-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport