noopi 1.0.1 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/lib/noopi.rb CHANGED
@@ -6,11 +6,12 @@ class Noopi
6
6
 
7
7
  @@api_server = 'api.noop.fr'
8
8
  @@api_version = 1
9
+ @@api_key = nil
9
10
 
10
11
  attr_accessor :api_key
11
12
 
12
- def initialize( api_key )
13
- @api_key = api_key
13
+ def initialize( api_key = nil )
14
+ @api_key = api_key || @@api_key
14
15
  end
15
16
 
16
17
  def shorten( *args )
@@ -35,18 +36,26 @@ class Noopi
35
36
  return send_request( request )
36
37
  end
37
38
 
38
- def self.api_version=( value )
39
- @@api_version = value
39
+ def self.api_key=( value )
40
+ @@api_key = value
40
41
  end
41
42
 
42
- def self.api_server=( value )
43
+ def self.api_key
44
+ @@api_key
45
+ end
46
+
47
+ def self.api_version=( value )
43
48
  @@api_version = value
44
49
  end
45
-
50
+
46
51
  def self.api_version
47
52
  @@api_version
48
53
  end
49
54
 
55
+ def self.api_server=( value )
56
+ @@api_version = value
57
+ end
58
+
50
59
  def self.api_server
51
60
  @@api_version
52
61
  end
data/lib/noopi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Noopi
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.3"
3
3
  end
data/noopi.gemspec CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
11
11
  s.homepage = ""
12
12
  s.summary = %q{n/a}
13
13
  s.description = %q{n/a}
14
- s.add_dependency( 'json' )
14
+ s.add_dependency( 'json', '>= 1.5.1' )
15
15
 
16
16
  s.rubyforge_project = "noopi"
17
17
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: noopi
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.1
5
+ version: 1.0.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Julien DUMAS
@@ -21,7 +21,7 @@ dependencies:
21
21
  requirements:
22
22
  - - ">="
23
23
  - !ruby/object:Gem::Version
24
- version: "0"
24
+ version: 1.5.1
25
25
  type: :runtime
26
26
  version_requirements: *id001
27
27
  description: n/a