ahrefs_api 0.0.2 → 0.0.3

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: ca5aede1614a9cedff3200f575914abe91091cf5
4
- data.tar.gz: 95449395f3fdcee85cca34d0a23aa5641f6de53a
3
+ metadata.gz: 5ca7c58c5c129812d1f1115be5200a1dd4ebca9e
4
+ data.tar.gz: f97e036ccd7e26943820e6d889e970c16e02d4fd
5
5
  SHA512:
6
- metadata.gz: aa161e0e36768b6ff99e8213db7a93b241aae70ca480db07ea340fbeec8dd5cc4c7ef74fdcc4fed960fa8f422abb34391e2e4dad73dfeffb9efaabfb31a2609f
7
- data.tar.gz: b354cdd35798e518ff0e4dd981ec31fd5b2d510e93701dc53a4eccaf767141784f5497db2474185f3d4f668253ef20d539ef33b1022cb2964de61c51ee537d4a
6
+ metadata.gz: aa0537df40b93865c5fa44d14c11319c0b33c6b91b710863d8a6ca3d214df81dc3f64b1fe76954ad1472e11a26068079c2c1f433a1425cf9f41d5bdff7390c60
7
+ data.tar.gz: 78cbb44a5341b8b08a5c89324fb645320bd5b17cafa6a35f6e055348f1332d39a25971e2bb6597a7cc8cd41c88db53b0d5f46c1b0464248f2ab31bb7d074a3f1
@@ -6,12 +6,13 @@ module AhrefsAPI
6
6
  class Base
7
7
  include HTTParty
8
8
  base_uri 'http://apiv2.ahrefs.com'
9
- debug_output $stdout
10
9
 
11
10
  attr_accessor :mode
12
- def initialize(api_token = ENV['AHREFS_TOKEN'])
11
+ def initialize(api_token = ENV['AHREFS_TOKEN'], activate_debug = false)
13
12
  @mode ||= :domain
14
13
  @token = api_token
14
+ self.class.debug_output $stdout if activate_debug
15
+
15
16
  raise "No token: please provide a valid token for the AhrefsAPI" if @token.nil?
16
17
  end
17
18
 
@@ -1,3 +1,3 @@
1
1
  module AhrefsAPI
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ahrefs_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christoph Engelhardt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-02 00:00:00.000000000 Z
11
+ date: 2015-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler