dnsimpler 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e55d0899d0aba7fa5de9ae93c0ce236ae0638d0c
4
- data.tar.gz: ad731d225b710cf02f4e972f3b3ffd70d8af8adf
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YWJkZDc5MTk3NDc5ZTg5MjZiYmYzZjNjZmJkOWRiOGJjNDMzMzE0Ng==
5
+ data.tar.gz: !binary |-
6
+ Y2FmNmIxMTEzYTc1NjY4ZmExM2EyMjc2ZTQ2ODJlMjI1ZDU5YTNhMQ==
5
7
  SHA512:
6
- metadata.gz: 7fe6d9c382f0cfdf5f67f7eee0984c3ce7f847d4c0ecb933e0fff2c37a861cdf4a7d900f8a0e56404ad8d363cc4f1feb505eac09600c815656124c0bfec3046f
7
- data.tar.gz: 7c88d152dfd412c80ca7f36df6f82a80147b6a28cc106485ce85277096018a2e780b98cab619d12850994555b3c64ac137f2eec8ac9a805c4b27a459e1b7387f
8
+ metadata.gz: !binary |-
9
+ YmY5YzExMDQyZmI5NDZkN2U2NDU1ODBkYjFiNTMyMzc3NzFlNDFlNzZlYjM1
10
+ NmE4MDBlMmJjYzQyNmExYTNhOGRkYzkzZWY1YzlkNjhhZTI3YjZmMWJmZWQ2
11
+ ODVjODUzZjlmNDM5YWYzOTZjMTU5Nzk0NmRjNGEzZWRmZjBiNjQ=
12
+ data.tar.gz: !binary |-
13
+ NDVhOWVjMjk3OGQ1ZWY3NDdmM2NjZTBkZGRkZmYxZTJjMjllNzM1YjQyOTBl
14
+ YzBlOGI0MGJjOGY2N2ZmOTVlZDVkZWEyYmQ2NjFhNTI1MGNlZTVmM2IzNGVj
15
+ OTNhM2ZiMjNhYTE2MmE1YWMyNDU1ZmY0NDY5ZWEyYTE2YzE1ZmU=
data/.gitignore CHANGED
@@ -12,3 +12,4 @@
12
12
  *.o
13
13
  *.a
14
14
  mkmf.log
15
+ *.gem
data/.travis.yml CHANGED
@@ -1,12 +1,12 @@
1
1
  language: ruby
2
2
  rvm:
3
- - "2.2.0"
3
+ - 2.2.0
4
4
  script:
5
- - bundle exec rake test
5
+ - bundle exec rake test
6
6
  deploy:
7
7
  provider: rubygems
8
8
  api_key:
9
- secure: F1Drh/pkUEDBvn0l6ZpFJeCeJk0FGReu98Ce3PMiIHjHngGsC3xDOTbkQ7+TUQHlfc0g3Hpc4pYmHxL3w/6TJwbx9csRX0Np4yaNfJZJdHR8uzAi7mpY32APXeLCJkV5En3h1B/G1V3qQ+AhH0Ez6nlOiSEhocJ+MVq9jFXagM4=
9
+ secure: tMNAGuZR+hxrHNxnoj6LJtnaXRO8hbW0AGt855Cy5bhY0/k7wYZNC69fVkOrCNu7DBq+QKwnmyyOIgf9vn5N+4EOMtKVrrtNxl1aPqD/c6izodjRjoEbJi6xFCsSdpp6strKFYDf9itQr2RPWV2D9pNyI5y5I9JaGVtGtMspgRQ=
10
10
  addons:
11
11
  code_climate:
12
- repo_token: 4ee7d32ad4a19408aa4c0d5846e6451a05635e4c1a31109cb0eac9d3a2efa265
12
+ repo_token: 4ee7d32ad4a19408aa4c0d5846e6451a05635e4c1a31109cb0eac9d3a2efa265
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Dnsimpler
2
- [![TravisCI](https://travis-ci.org/danielwestendorf/dnsimpler.svg)](https://travis-ci.org/danielwestendorf/dnsimpler)[![Code Climate](https://codeclimate.com/github/danielwestendorf/dnsimpler/badges/gpa.svg)](https://codeclimate.com/github/danielwestendorf/dnsimpler)[![Test Coverage](https://codeclimate.com/github/danielwestendorf/dnsimpler/badges/coverage.svg)](https://codeclimate.com/github/danielwestendorf/dnsimpler)
2
+ [![TravisCI](https://travis-ci.org/danielwestendorf/dnsimpler.svg)](https://travis-ci.org/danielwestendorf/dnsimpler) [![Code Climate](https://codeclimate.com/github/danielwestendorf/dnsimpler/badges/gpa.svg)](https://codeclimate.com/github/danielwestendorf/dnsimpler) [![Test Coverage](https://codeclimate.com/github/danielwestendorf/dnsimpler/badges/coverage.svg)](https://codeclimate.com/github/danielwestendorf/dnsimpler)
3
3
 
4
4
  A simple API wrapper for [DNSimple](https://dnsimple.com). Always returns the full response. Requires you to use the [API documentation](https://developer.dnsimple.com).
5
5
 
@@ -0,0 +1,17 @@
1
+ unless Hash.instance_methods.include? :try
2
+ class Hash
3
+
4
+ def try(key)
5
+ return send("[]", key)
6
+ end
7
+
8
+ end
9
+ end
10
+
11
+ unless NilClass.instance_methods.include? :try
12
+ class NilClass
13
+
14
+ def try(key); nil; end
15
+
16
+ end
17
+ end
@@ -1,3 +1,3 @@
1
1
  module DNSimpler
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/dnsimpler.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'ostruct'
2
2
  require "dnsimpler/version"
3
3
  require 'dnsimpler/http'
4
+ require 'dnsimpler/try'
4
5
 
5
6
  module DNSimpler
6
7
  MATTRS = %w[username token base_uri debug]
@@ -0,0 +1,13 @@
1
+ require 'test_helper'
2
+
3
+ class TryTest < MiniTest::Test
4
+
5
+ test "Hash responds to try" do
6
+ assert_respond_to Hash.new, :try
7
+ end
8
+
9
+ test "NilClass responds to try" do
10
+ assert_respond_to nil, :try
11
+ end
12
+
13
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dnsimpler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Westendorf
@@ -14,56 +14,56 @@ dependencies:
14
14
  name: httparty
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - ! '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - ! '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.7'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.7'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '10.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '10.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: webmock
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - ! '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - ! '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  description: dnsimple-ruby is too opinionated on how to use its method calls. We're
@@ -74,8 +74,8 @@ executables: []
74
74
  extensions: []
75
75
  extra_rdoc_files: []
76
76
  files:
77
- - ".gitignore"
78
- - ".travis.yml"
77
+ - .gitignore
78
+ - .travis.yml
79
79
  - Gemfile
80
80
  - Guardfile
81
81
  - LICENSE.txt
@@ -84,8 +84,10 @@ files:
84
84
  - dnsimpler.gemspec
85
85
  - lib/dnsimpler.rb
86
86
  - lib/dnsimpler/http.rb
87
+ - lib/dnsimpler/try.rb
87
88
  - lib/dnsimpler/version.rb
88
89
  - test/dnsimpler/http_test.rb
90
+ - test/dnsimpler/try_test.rb
89
91
  - test/dnsimpler_test.rb
90
92
  - test/test_helper.rb
91
93
  homepage: ''
@@ -98,22 +100,23 @@ require_paths:
98
100
  - lib
99
101
  required_ruby_version: !ruby/object:Gem::Requirement
100
102
  requirements:
101
- - - "~>"
103
+ - - ~>
102
104
  - !ruby/object:Gem::Version
103
105
  version: '2.0'
104
106
  required_rubygems_version: !ruby/object:Gem::Requirement
105
107
  requirements:
106
- - - ">="
108
+ - - ! '>='
107
109
  - !ruby/object:Gem::Version
108
110
  version: '0'
109
111
  requirements: []
110
112
  rubyforge_project:
111
- rubygems_version: 2.2.2
113
+ rubygems_version: 2.4.5
112
114
  signing_key:
113
115
  specification_version: 4
114
116
  summary: A simple DNSimple API wrapper that always provides the response you're looking
115
117
  for.
116
118
  test_files:
117
119
  - test/dnsimpler/http_test.rb
120
+ - test/dnsimpler/try_test.rb
118
121
  - test/dnsimpler_test.rb
119
122
  - test/test_helper.rb