porkbun 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ece7707cda5e00c01e1f602dead38c53b0cfa7bc855bca379d1b49ed964d9edd
4
- data.tar.gz: c6732f1843cc0a4e92875d8205160c35003c341abd34de9c08887aaedf0fd693
3
+ metadata.gz: aebfa2c29ddffffa9cf6d816aa5e17383cb962ee1cc51dbab02ae5df948ce8fc
4
+ data.tar.gz: baa74553fa476a321ae3ec62ddc0b5eeab422d69964df7ffccc1a5a073e7a300
5
5
  SHA512:
6
- metadata.gz: 9d3dcde1ed269afa5074308b79e0640be5982655e365d6586ab4f88b4b90db0a17471b21817e28a2f1addbaa2b17a015522ee87f29afe0043306fc3592a66725
7
- data.tar.gz: 29a28d2cd653560dfb169ecb835a44c5f85f6ba7ffe5e05a910a8a503ea470fbee559681a266387219b81524c93aa2447ab1c07c86db90695f7e45f323bdc14d
6
+ metadata.gz: 320834d6fca370309e497a28900e109cf8479b3db52787703c006ada5a6f7b3abad57cd7a447cebcd4ffa64123306f1939d6175446adaa4c8e56930337ef5df2
7
+ data.tar.gz: 474d25bd930004c43a1ecb3226beb1c26cce76977691d956fa182b7a8480b28b7231a74f4eac1adc0ff0d420d3383f414a94e464ad077cdccbd8725ff815b919
data/README.md CHANGED
@@ -9,15 +9,50 @@ Reference: https://porkbun.com/api/json/v3/documentation
9
9
  ## Usage
10
10
 
11
11
  ```ruby
12
- Porkbun.API_KEY = 'YOUR_API_KEY'
13
- Porkbun.SECRET_API_KEY = 'YOUR_SECRET_API_KEY'
12
+ ENV['PORKBUN_API_KEY'] = 'YOUR_API_KEY'
13
+ ENV['PORKBUN_SECRET_API_KEY'] = 'YOUR_SECRET_API_KEY'
14
14
  record = Porkbun::DNS.create(name: 'test',
15
- type: 'A',
16
- content: '1.1.1.1',
17
- ttl: 300
15
+ type: 'A',
16
+ content: '1.1.1.1',
17
+ ttl: 300
18
18
  )
19
19
  ```
20
20
 
21
+ ## API
22
+
23
+ ### `Porkbun::Domain.ping`
24
+
25
+ Make sure your keys are good.
26
+
27
+ ### `Porkbun::DNS.retrieve(domain, id)`
28
+
29
+ Retrive all or specific record for a domain
30
+
31
+ ### `Porkbun::DNS.create(options)`
32
+
33
+ Create record for a domain
34
+
35
+ options:
36
+ - `name` - name of record. example `www`
37
+ - `type` - record type. example: CNAME
38
+ - `content` - content of record. example '1.1.1.1',
39
+ - `ttl` - time to live. example: 600. porkbun seems to have this as a minimum
40
+ - `prio` - record priority. mainly for MX records. example 10.
41
+
42
+ returns instance of DNS which can be used to delete
43
+
44
+ ## CLI
45
+
46
+ The gem also comes with a CLI
47
+
48
+ $ porkbun
49
+ Commands:
50
+ porkbun delete_all <domain> # deletes all records for a domain. this is destructive. use with caution
51
+ porkbun help [COMMAND] # Describe available commands or one specific command
52
+ porkbun import <file> # Import BIND zone file
53
+ porkbun list # List all domains
54
+ porkbun retrieve <domain> [<id>] # List all records for a domain
55
+
21
56
  ## Development
22
57
 
23
58
  After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Porkbun
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.2"
5
5
  end
data/lib/porkbun.rb CHANGED
@@ -79,7 +79,6 @@ module Porkbun
79
79
  self
80
80
  end
81
81
 
82
- require 'pry'
83
82
  def to_s
84
83
  content_str = case type
85
84
  when /TXT|SPF/
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: porkbun
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Bretoi
@@ -39,7 +39,6 @@ files:
39
39
  - bin/porkbun
40
40
  - lib/porkbun.rb
41
41
  - lib/porkbun/version.rb
42
- - sig/porkbun.rbs
43
42
  homepage: https://github.com/danielb2/porkbun-ruby
44
43
  licenses: []
45
44
  metadata:
data/sig/porkbun.rbs DELETED
@@ -1,4 +0,0 @@
1
- module Porkbun
2
- VERSION: String
3
- # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
- end