ns1 0.1.0 → 0.2.0

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
- SHA1:
3
- metadata.gz: 0eadbc0ca65b4e99e0da1933be0b2d61a6063a93
4
- data.tar.gz: 869141a53e4107a9bf5169e6da73eac76db4b938
2
+ SHA256:
3
+ metadata.gz: '0482b26d0c2cce8f6be171093f7bef65f8c8ced9594ba126336ef5514cd1b31e'
4
+ data.tar.gz: 0575144bd87e095dacfbe675b1eb9124186e3a084d57ca539aea7e435865e807
5
5
  SHA512:
6
- metadata.gz: ee7655d6ad2557ad79424358429d6c0c3c07e9d895e5ab6f8a179b14c1a39c8d9b9308228d77395fd1c51d883c80c415d5a778dc313a269c80baecaa02cb3b0e
7
- data.tar.gz: c07111bf5b6fe83c9bcd40a19f369b955b33d706ad36357cc00f523a722bc597bf8040bebdd56af930d9491e2923771e323d70008c58961ba3f3444b9f94ecf3
6
+ metadata.gz: 55bbf5b98994099101b631b4541f07d926b0168796ce26624620441d96c16466bae722b9a3fd6345bc786128104e790c55b3f6739b0399beb44d66fa2d80f935
7
+ data.tar.gz: d4bca60292106abfda9e38790a1b935bdd2d55f4dffcfe4829c614a983487a8affd0c913735fa8534258399f37355d828efff4f112774eef3b03bc232d49b179
data/.gitignore CHANGED
@@ -9,3 +9,5 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
+
13
+ *.gem
@@ -0,0 +1,9 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ ## 0.2.0 - 2018-12-07
5
+ - [Added] `Response#status` returns status code information as an integer - #1
6
+ - [Added] Changelog
7
+
8
+ ## 0.1.0 - 2018-04-10
9
+ - Initial release supporting CRUD operations for zones and records
data/README.md CHANGED
@@ -66,4 +66,4 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
66
66
 
67
67
  ## Contributing
68
68
 
69
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/ns1.
69
+ Bug reports and pull requests are welcome on GitHub at https://github.com/kitop/ns1.
@@ -3,6 +3,12 @@ require 'delegate'
3
3
  module NS1
4
4
  module Response
5
5
  class Base < SimpleDelegator
6
+ attr_reader :status
7
+
8
+ def initialize(body, status)
9
+ @status = status
10
+ super(body)
11
+ end
6
12
  end
7
13
  end
8
14
  end
@@ -29,9 +29,9 @@ module NS1
29
29
  body = JSON.parse(response.body)
30
30
  case response
31
31
  when Net::HTTPOK
32
- NS1::Response::Success.new(body)
32
+ NS1::Response::Success.new(body, response.code.to_i)
33
33
  else
34
- NS1::Response::Error.new(body)
34
+ NS1::Response::Error.new(body, response.code.to_i)
35
35
  end
36
36
  rescue JSON::ParserError
37
37
  raise NS1::Transport::ResponseParseError
@@ -1,3 +1,3 @@
1
1
  module NS1
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ns1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esteban Pastorino
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-04-10 00:00:00.000000000 Z
11
+ date: 2018-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -76,6 +76,7 @@ files:
76
76
  - ".gitignore"
77
77
  - ".rspec"
78
78
  - ".travis.yml"
79
+ - CHANGELOG.md
79
80
  - Gemfile
80
81
  - Gemfile.lock
81
82
  - README.md
@@ -115,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
116
  version: '0'
116
117
  requirements: []
117
118
  rubyforge_project:
118
- rubygems_version: 2.6.14
119
+ rubygems_version: 2.7.8
119
120
  signing_key:
120
121
  specification_version: 4
121
122
  summary: NS1 API Client