cloudflare 1.1.3 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,23 @@
1
+ # Copyright, 2012, by Marcin Prokop.
2
+ #
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ # of this software and associated documentation files (the "Software"), to deal
5
+ # in the Software without restriction, including without limitation the rights
6
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ # copies of the Software, and to permit persons to whom the Software is
8
+ # furnished to do so, subject to the following conditions:
9
+ #
10
+ # The above copyright notice and this permission notice shall be included in
11
+ # all copies or substantial portions of the Software.
12
+ #
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ # THE SOFTWARE.
20
+
21
+ module CloudFlare
22
+ VERSION = '2.0.0'
23
+ end
@@ -2,15 +2,23 @@ require 'test/unit'
2
2
  require 'cloudflare'
3
3
 
4
4
  class HostTest < Test::Unit::TestCase
5
+ def test_client_connection
6
+ cf = CloudFlare::connection('example_api', 'example@example.com')
7
+
8
+ info = assert_raise CloudFlare::RequestError, "as" do
9
+ cf.ipv46('example.com', true)
10
+ end
5
11
 
6
- def test_client_connection
7
- cf = CloudFlare.new('example_api', 'example@example.com')
8
- assert_equal('E_UNAUTH', cf.ipv46('example.com', true)['err_code'])
9
- end
12
+ assert info, 'No or invalid host_key.'
13
+ end
10
14
 
11
- def test_host_connection
12
- cf = CloudFlare.new('example_api')
13
- assert_equal(100, cf.user_auth('example.com', 'password')['err_code'])
14
- end
15
+ def test_host_connection
16
+ cf = CloudFlare::connection('example_api')
15
17
 
18
+ info = assert_raise CloudFlare::RequestError do
19
+ cf.user_auth('example.com', 'password')
20
+ end
21
+
22
+ assert info, 'No or invalid host_key.'
23
+ end
16
24
  end
metadata CHANGED
@@ -1,30 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudflare
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
5
- prerelease:
4
+ version: 2.0.0
6
5
  platform: ruby
7
6
  authors:
8
- - Marcin 'B4k3r' Prokop
7
+ - Marcin Prokop
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-04-18 00:00:00.000000000 Z
11
+ date: 2014-03-11 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: json
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ~>
20
18
  - !ruby/object:Gem::Version
21
- version: '0'
19
+ version: '1'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
28
39
  - !ruby/object:Gem::Version
29
40
  version: '0'
30
41
  description: A Ruby wrapper for the CloudFlare API.
@@ -35,13 +46,19 @@ extra_rdoc_files:
35
46
  - README.md
36
47
  - LICENSE
37
48
  files:
49
+ - Gemfile
50
+ - LICENSE
51
+ - README.md
38
52
  - Rakefile
53
+ - cloudflare.gemspec
39
54
  - lib/cloudflare.rb
55
+ - lib/cloudflare/connection.rb
56
+ - lib/cloudflare/version.rb
40
57
  - test/test_cloudflare.rb
41
- - README.md
42
- - LICENSE
43
- homepage: https://github.com/B4k3r/cloudflare
44
- licenses: []
58
+ homepage: https://github.com/b4k3r/cloudflare
59
+ licenses:
60
+ - MIT
61
+ metadata: {}
45
62
  post_install_message:
46
63
  rdoc_options:
47
64
  - --main
@@ -50,22 +67,20 @@ rdoc_options:
50
67
  require_paths:
51
68
  - lib
52
69
  required_ruby_version: !ruby/object:Gem::Requirement
53
- none: false
54
70
  requirements:
55
- - - ! '>='
71
+ - - '>='
56
72
  - !ruby/object:Gem::Version
57
73
  version: 1.9.0
58
74
  required_rubygems_version: !ruby/object:Gem::Requirement
59
- none: false
60
75
  requirements:
61
- - - ! '>='
76
+ - - '>='
62
77
  - !ruby/object:Gem::Version
63
78
  version: '0'
64
79
  requirements: []
65
80
  rubyforge_project:
66
- rubygems_version: 1.8.25
81
+ rubygems_version: 2.2.2
67
82
  signing_key:
68
- specification_version: 3
83
+ specification_version: 4
69
84
  summary: A Ruby wrapper for the CloudFlare API.
70
85
  test_files:
71
86
  - test/test_cloudflare.rb