rjiffy 0.1.2 → 0.1.3

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.
@@ -2,10 +2,10 @@ rvm:
2
2
  - 1.8.7
3
3
  - 1.9.2
4
4
  - 1.9.3
5
+ - 2.0.0
6
+ - 2.1.2
5
7
  - ree
6
- - ruby-head
7
- - rbx
8
- - rbx-2.0
9
- - jruby
10
- env: JRUBY_OPTS=--1.9
8
+ - jruby-18mode
9
+ - jruby-19mode
10
+ - rbx-2
11
11
  script: "bundle exec rspec spec"
data/Readme.md CHANGED
@@ -4,8 +4,11 @@ Ruby Wrapper for jiffybox.de API
4
4
  ## Configuration
5
5
  Rjiffy::Configuration.configure do |conf|
6
6
  conf.token = "somevalidapitoken"
7
+ conf.loglevel = Logger::INFO
7
8
  end
8
9
 
10
+ Note `Logger::INFO` or higher will disable request logging. Default is `Logger::DEBUG`
11
+
9
12
  ## List all backups
10
13
  Rjiffy.backups
11
14
 
@@ -4,7 +4,7 @@ module Rjiffy
4
4
  API_VERSION = "v1.0"
5
5
 
6
6
  class << self
7
- attr_accessor :token, :loglevel
7
+ attr_accessor :token
8
8
 
9
9
  def configure
10
10
  yield self
@@ -13,6 +13,10 @@ module Rjiffy
13
13
  def base_uri
14
14
  "https://api.jiffybox.de/#{token}/#{API_VERSION}".to_uri
15
15
  end
16
+
17
+ def loglevel=(loglevel)
18
+ Wrest.logger.level = loglevel
19
+ end
16
20
  end
17
21
 
18
22
  end
@@ -1,7 +1,6 @@
1
1
  module Rjiffy
2
2
  class Request
3
3
  class << self
4
- Wrest.logger.level = Configuration.loglevel || Logger::DEBUG
5
4
 
6
5
  def get_data(url)
7
6
  process_response(Configuration.base_uri[url].get.deserialize)
@@ -1,3 +1,3 @@
1
1
  module Rjiffy
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -10,7 +10,7 @@ describe Rjiffy::Configuration do
10
10
  end
11
11
  Rjiffy::Configuration.token.should == "mytoken"
12
12
  Rjiffy::Configuration.base_uri.should == "https://api.jiffybox.de/mytoken/v1.0".to_uri
13
- Rjiffy::Configuration.loglevel.should == Logger::DEBUG
13
+ Wrest.logger.level.should == Logger::DEBUG
14
14
  end
15
15
 
16
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rjiffy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: