point 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/point.rb +1 -1
- data/lib/point/base.rb +2 -0
- data/lib/point/request.rb +1 -1
- data/lib/point/zone.rb +6 -0
- data/lib/point/zone_record.rb +2 -0
- metadata +35 -49
data/lib/point.rb
CHANGED
data/lib/point/base.rb
CHANGED
@@ -25,6 +25,8 @@ module Point
|
|
25
25
|
case type
|
26
26
|
when :all then find_all(params)
|
27
27
|
when Integer then find_single(type, params)
|
28
|
+
when String then find_all(params).select {|r| r.attributes["name"] == type}.first
|
29
|
+
else raise Point::Error, "Find requires :all, a string or an integer.'
|
28
30
|
end
|
29
31
|
end
|
30
32
|
|
data/lib/point/request.rb
CHANGED
@@ -21,7 +21,7 @@ module Point
|
|
21
21
|
## Hashes will be converted to JSON before being sent to the remote service.
|
22
22
|
def make
|
23
23
|
uri = URI.parse([Point.site, @path].join('/'))
|
24
|
-
http_request = http_class.new(uri.
|
24
|
+
http_request = http_class.new(uri.request_uri)
|
25
25
|
http_request.basic_auth(Point.username, Point.apitoken)
|
26
26
|
http_request.add_field("Accept", "application/json")
|
27
27
|
http_request.add_field("Content-type", "application/json")
|
data/lib/point/zone.rb
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
module Point
|
2
2
|
class Zone < Base
|
3
|
+
|
4
|
+
class << self
|
5
|
+
def collection_path(params = {})
|
6
|
+
params[:group] ? "zones?group=#{params[:group]}" : 'zones'
|
7
|
+
end
|
8
|
+
end
|
3
9
|
|
4
10
|
def apply!
|
5
11
|
$stderr.puts "Zone information does not need to be applied manually. Point::Zone#apply! method will be deprecated soon."
|
data/lib/point/zone_record.rb
CHANGED
metadata
CHANGED
@@ -1,80 +1,66 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: point
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 1
|
7
|
-
- 0
|
8
|
-
- 1
|
9
|
-
version: 1.0.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.2
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- Adam Cooke
|
13
9
|
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2013-10-24 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: json
|
22
|
-
|
23
|
-
|
24
|
-
requirements:
|
25
|
-
- -
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
segments:
|
28
|
-
- 1
|
29
|
-
- 1
|
30
|
-
- 5
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
31
21
|
version: 1.1.5
|
32
22
|
type: :runtime
|
33
|
-
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.1.5
|
34
30
|
description:
|
35
31
|
email: adam@atechmedia.com
|
36
32
|
executables: []
|
37
|
-
|
38
33
|
extensions: []
|
39
|
-
|
40
34
|
extra_rdoc_files: []
|
41
|
-
|
42
|
-
files:
|
35
|
+
files:
|
43
36
|
- lib/point/base.rb
|
44
37
|
- lib/point/errors.rb
|
45
38
|
- lib/point/request.rb
|
46
39
|
- lib/point/zone.rb
|
47
40
|
- lib/point/zone_record.rb
|
48
41
|
- lib/point.rb
|
49
|
-
has_rdoc: true
|
50
42
|
homepage: http://www.pointhq.com
|
51
43
|
licenses: []
|
52
|
-
|
53
44
|
post_install_message:
|
54
45
|
rdoc_options: []
|
55
|
-
|
56
|
-
require_paths:
|
46
|
+
require_paths:
|
57
47
|
- lib
|
58
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
requirements:
|
67
|
-
- -
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
|
70
|
-
- 0
|
71
|
-
version: "0"
|
48
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
56
|
+
requirements:
|
57
|
+
- - ! '>='
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '0'
|
72
60
|
requirements: []
|
73
|
-
|
74
61
|
rubyforge_project:
|
75
|
-
rubygems_version: 1.
|
62
|
+
rubygems_version: 1.8.23
|
76
63
|
signing_key:
|
77
64
|
specification_version: 3
|
78
65
|
summary: API client for the PointHQ DNS Hosting System
|
79
66
|
test_files: []
|
80
|
-
|