registered_domains 0.1.0 → 0.1.1

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: a894376e600ad68cb838db96f374b40b5862cd197f30865d4486fa5d6681a362
4
- data.tar.gz: e8c7705fa364d3a31b5774f5ba69e42d4bd637428ccf8890787013b051b2bcf8
3
+ metadata.gz: '028adcec298bf82d271fb6e3ae27a46404e7be8e568e48f84c9d1bb03517647c'
4
+ data.tar.gz: 20dcc847fbbbabcb18b15161af574fbd9ce5713d48a98eb05ffc802d801a4821
5
5
  SHA512:
6
- metadata.gz: cc26a93f35f9e5ee3d927608e27576083e17058ff0df75d1e9f68bbdc38582fa863a35fa69aa3861c0ac29c9e224afdd899afc68a76cb685f0e4238b014264c1
7
- data.tar.gz: bc9b13d33b103f1013e70763d530169d604ad35ec15ce8914434c548c3282c5def442d658db10709300e32776f0f543e646eb9f303bd3429d0ecdf648323bb88
6
+ metadata.gz: 9e0f05bf2f63bd39e5218cc7387364e5a159c21b3656e7dd2bf48a127d72d68e6015304d1b18d7d83e1b8d9fee21cae7ab6980a44e9f8fcdc938d6188ff1d605
7
+ data.tar.gz: 306e937ed96ea618776e9ecca98024ddd8494c689612c2d6daac383d1299a897d78d6747b2376ac5ef78497c5f1f14c06f4c261746b8be081160ab1e6f5dc353
data/.circleci/config.yml CHANGED
@@ -11,6 +11,7 @@ jobs:
11
11
  - image: circleci/ruby:2.6
12
12
  steps:
13
13
  - checkout
14
+ - run: gem uninstall bundler && gem install bundler
14
15
  - run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
15
16
  - restore_cache:
16
17
  keys:
data/.gitignore CHANGED
@@ -8,3 +8,5 @@
8
8
  /spec/reports/
9
9
  /tmp/
10
10
  *.gem
11
+ .ruby-version
12
+ .ruby-gemset
data/Gemfile.lock CHANGED
@@ -9,55 +9,45 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- addressable (2.6.0)
13
- public_suffix (>= 2.0.2, < 4.0)
12
+ addressable (2.7.0)
13
+ public_suffix (>= 2.0.2, < 5.0)
14
14
  crack (0.4.3)
15
15
  safe_yaml (~> 1.0.0)
16
16
  diff-lcs (1.3)
17
17
  ethon (0.12.0)
18
18
  ffi (>= 1.3.0)
19
- ffi (1.10.0)
20
- hashdiff (0.3.9)
21
- httparty (0.17.0)
19
+ ffi (1.11.3)
20
+ hashdiff (1.0.0)
21
+ httparty (0.17.3)
22
22
  mime-types (~> 3.0)
23
23
  multi_xml (>= 0.5.2)
24
- mime-types (3.2.2)
24
+ mime-types (3.3)
25
25
  mime-types-data (~> 3.2015)
26
- mime-types-data (3.2019.0331)
26
+ mime-types-data (3.2019.1009)
27
27
  mini_portile2 (2.4.0)
28
28
  multi_xml (0.6.0)
29
29
  namecheap-api (0.0.1)
30
30
  nokogiri (~> 1.6)
31
31
  typhoeus (~> 0.6)
32
- nokogiri (1.10.3)
32
+ nokogiri (1.10.8)
33
33
  mini_portile2 (~> 2.4.0)
34
- public_suffix (3.0.3)
34
+ public_suffix (4.0.1)
35
35
  rake (10.5.0)
36
- rb-fsevent (0.10.3)
37
- rb-inotify (0.10.0)
38
- ffi (~> 1.0)
39
- rexml (3.2.1)
36
+ rexml (3.2.3)
40
37
  rspec (3.8.0)
41
38
  rspec-core (~> 3.8.0)
42
39
  rspec-expectations (~> 3.8.0)
43
40
  rspec-mocks (~> 3.8.0)
44
- rspec-core (3.8.0)
41
+ rspec-core (3.8.2)
45
42
  rspec-support (~> 3.8.0)
46
- rspec-expectations (3.8.3)
43
+ rspec-expectations (3.8.6)
47
44
  diff-lcs (>= 1.2.0, < 2.0)
48
45
  rspec-support (~> 3.8.0)
49
- rspec-mocks (3.8.0)
46
+ rspec-mocks (3.8.2)
50
47
  diff-lcs (>= 1.2.0, < 2.0)
51
48
  rspec-support (~> 3.8.0)
52
- rspec-support (3.8.0)
49
+ rspec-support (3.8.3)
53
50
  safe_yaml (1.0.5)
54
- sass (3.7.4)
55
- sass-listen (~> 4.0.0)
56
- sass-listen (4.0.0)
57
- rb-fsevent (~> 0.9, >= 0.9.4)
58
- rb-inotify (~> 0.9, >= 0.9.7)
59
- true (2.2.2)
60
- sass (~> 3.4)
61
51
  typhoeus (0.8.0)
62
52
  ethon (>= 0.8.0)
63
53
  webmock (3.5.1)
@@ -69,12 +59,11 @@ PLATFORMS
69
59
  ruby
70
60
 
71
61
  DEPENDENCIES
72
- bundler (~> 1.17)
62
+ bundler (> 1.17)
73
63
  rake (~> 10.0)
74
64
  registered_domains!
75
65
  rspec (~> 3.8.0)
76
- true (~> 2.2.2)
77
66
  webmock (~> 3.5.1)
78
67
 
79
68
  BUNDLED WITH
80
- 1.17.3
69
+ 2.1.2
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
- # RegisteredDomains
1
+ [![CircleCI](https://circleci.com/gh/hortoncd/registered_domains.svg?style=svg)](https://circleci.com/gh/hortoncd/registered_domains)
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/registered_domains`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ # RegisteredDomains
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ Return a list of domains registered at a registrar.
6
6
 
7
7
  ## Installation
8
8
 
@@ -21,18 +21,32 @@ Or install it yourself as:
21
21
  $ gem install registered_domains
22
22
 
23
23
  ## Usage
24
+ Currently this works for Name.com and Namecheap
25
+
26
+ Name.com
27
+ ```
28
+ nc = NameCom::Domains.new('user', 'apikey')
29
+ nc.domains
30
+ > ['fakedomain.com']
31
+ ```
32
+
33
+ Namecheap
34
+ ```
35
+ nc = Namecheap::Domains.new('user', 'apikey', 'apiuser')
36
+ nc.domains
37
+ > ['fakedomain.com']
38
+ ```
24
39
 
25
- TODO: Write usage instructions here
26
40
 
27
41
  ## Development
28
42
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake true` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
43
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
44
 
31
45
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
46
 
33
47
  ## Contributing
34
48
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/registered_domains.
49
+ Bug reports and pull requests are welcome on GitHub at https://github.com/hortoncd/registered_domains.
36
50
 
37
51
  ## License
38
52
 
data/Rakefile CHANGED
@@ -1,2 +1,10 @@
1
1
  require "bundler/gem_tasks"
2
- task :default => :spec
2
+
3
+ begin
4
+ require 'rspec/core/rake_task'
5
+ RSpec::Core::RakeTask.new(:spec)
6
+
7
+ task :default => :spec
8
+ rescue LoadError
9
+ # no rspec available
10
+ end
data/bin/setup CHANGED
@@ -3,6 +3,7 @@ set -euo pipefail
3
3
  IFS=$'\n\t'
4
4
  set -vx
5
5
 
6
- bundle install --path ./vendor
6
+ bundle config set path './vendor'
7
+ bundle install
7
8
 
8
9
  # Do any other automated setup that you need to do here
@@ -11,7 +11,7 @@ module RegisteredDomains
11
11
  attr_reader :domains
12
12
 
13
13
  def initialize(user, api_key, api_user)
14
- ip = ::HTTParty.get('https://www.icanhazip.com')
14
+ ip = ::HTTParty.get('https://ipv4.icanhazip.com')
15
15
  ip.success?
16
16
  @config = {
17
17
  client_ip: ip,
@@ -1,3 +1,3 @@
1
1
  module RegisteredDomains
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -22,9 +22,8 @@ Gem::Specification.new do |spec|
22
22
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
23
  spec.require_paths = ["lib"]
24
24
 
25
- spec.add_development_dependency "bundler", "~> 1.17"
25
+ spec.add_development_dependency "bundler", "> 1.17"
26
26
  spec.add_development_dependency "rake", "~> 10.0"
27
- spec.add_development_dependency "true", "~> 2.2.2"
28
27
  spec.add_development_dependency "rspec", "~> 3.8.0"
29
28
  spec.add_development_dependency "webmock", "~> 3.5.1"
30
29
  spec.add_dependency "httparty", "~> 0.17"
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: registered_domains
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Horton
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-05-16 00:00:00.000000000 Z
11
+ date: 2020-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.17'
20
20
  type: :development
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: '1.17'
27
27
  - !ruby/object:Gem::Dependency
@@ -38,20 +38,6 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
- - !ruby/object:Gem::Dependency
42
- name: 'true'
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: 2.2.2
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: 2.2.2
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: rspec
57
43
  requirement: !ruby/object:Gem::Requirement