pg-dsn_parser 0.1.0 → 0.1.1

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: e657deedc7502557439cbabaa0dfabada2660b6d
4
- data.tar.gz: c8208346850a70a94a81860b2ecafd930c735248
2
+ SHA256:
3
+ metadata.gz: 9e21c328f94538fffd134f8a0d36e84e1083926632fe91021ba5b661691d3a4c
4
+ data.tar.gz: a514ee993e116c51964a445dc7b29abcb47982f2f0a5f23c134110e1b600883d
5
5
  SHA512:
6
- metadata.gz: 4ff0d6208fcfe9cb2e972b17d264b145aa5ef8d78914411c5fc378f57319be2385fd64de429ce4c4e59eda5b0e515b5714a9589108f67720103cccb7b05a8fbf
7
- data.tar.gz: 46503ffc55087dc2900abaa2a37da34848c0d85218907dad1e7ace8c122d1dd706cb906a75114e146aa71e170f9fa0317aa191644d54157e5c2287712da7753c
6
+ metadata.gz: 0d776ac9772eda94009463eae8bd23234a6469d40185be7214a77dab8304ded931588cb7a9a113ef840c8d18875020d4594149f19256942a032af959f4e4d50d
7
+ data.tar.gz: e842a80880ec6bc12e5a7bb07f8de8c63691df3ba57a619f37905e10e899dc4364a3b647a46cf0ba0f2ab5bfccf3fe0eec43738f4cdbe87515053e3d4d73b791
data/.codeclimate.yml ADDED
@@ -0,0 +1,16 @@
1
+ prepare:
2
+ fetch:
3
+ - url: https://raw.githubusercontent.com/ManageIQ/manageiq-style/master/.rubocop_base.yml
4
+ path: ".rubocop_base.yml"
5
+ - url: https://raw.githubusercontent.com/ManageIQ/manageiq-style/master/.rubocop_cc_base.yml
6
+ path: ".rubocop_cc_base.yml"
7
+ - url: https://raw.githubusercontent.com/ManageIQ/manageiq-style/master/styles/base.yml
8
+ path: styles/base.yml
9
+ - url: https://raw.githubusercontent.com/ManageIQ/manageiq-style/master/styles/cc_base.yml
10
+ path: styles/cc_base.yml
11
+ plugins:
12
+ rubocop:
13
+ enabled: true
14
+ config: ".rubocop_cc.yml"
15
+ channel: rubocop-0-82
16
+ version: '2'
@@ -0,0 +1,34 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+ schedule:
7
+ - cron: '0 0 * * 0'
8
+
9
+ jobs:
10
+ ci:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ ruby-version:
15
+ - '2.5'
16
+ - '2.6'
17
+ - '2.7'
18
+ - '3.0'
19
+ env:
20
+ CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
21
+ steps:
22
+ - uses: actions/checkout@v2
23
+ - name: Set up Ruby
24
+ uses: ruby/setup-ruby@v1
25
+ with:
26
+ ruby-version: ${{ matrix.ruby-version }}
27
+ bundler-cache: true
28
+ timeout-minutes: 30
29
+ - name: Run tests
30
+ run: bundle exec rake
31
+ - name: Report code coverage
32
+ if: ${{ github.ref == 'refs/heads/master' && matrix.ruby-version == '3.0' }}
33
+ continue-on-error: true
34
+ uses: paambaati/codeclimate-action@v3.0.0
data/.rspec CHANGED
@@ -1,3 +1,3 @@
1
1
  --require spec_helper
2
- --format documentation
3
2
  --color
3
+ --order random
data/.rubocop.yml ADDED
@@ -0,0 +1,4 @@
1
+ inherit_gem:
2
+ manageiq-style: ".rubocop_base.yml"
3
+ inherit_from:
4
+ - ".rubocop_local.yml"
data/.rubocop_cc.yml ADDED
@@ -0,0 +1,4 @@
1
+ inherit_from:
2
+ - ".rubocop_base.yml"
3
+ - ".rubocop_cc_base.yml"
4
+ - ".rubocop_local.yml"
File without changes
data/.whitesource ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "settingsInheritedFrom": "ManageIQ/whitesource-config@master"
3
+ }
data/CODEOWNERS ADDED
@@ -0,0 +1 @@
1
+ * @Fryguy
data/README.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # PG::DSNParser
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/pg-dsn_parser.svg)](http://badge.fury.io/rb/pg-dsn_parser)
4
+ [![CI](https://github.com/ManageIQ/pg-dsn_parser/actions/workflows/ci.yaml/badge.svg)](https://github.com/ManageIQ/pg-dsn_parser/actions/workflows/ci.yaml)
5
+ [![Code Climate](https://codeclimate.com/github/ManageIQ/pg-dsn_parser.svg)](https://codeclimate.com/github/ManageIQ/pg-dsn_parser)
6
+ [![Test Coverage](https://codeclimate.com/github/ManageIQ/pg-dsn_parser/badges/coverage.svg)](https://codeclimate.com/github/ManageIQ/pg-dsn_parser/coverage)
7
+
3
8
  A parser for PostgreSQL DSNs
4
9
 
5
10
  ## Installation
@@ -1,5 +1,5 @@
1
1
  module PG
2
2
  class DSNParser
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
data/lib/pg/dsn_parser.rb CHANGED
@@ -8,13 +8,13 @@ module PG
8
8
  end
9
9
 
10
10
  def parse(dsn)
11
- scanner = StringScanner.new(dsn)
11
+ scanner = StringScanner.new(dsn.strip)
12
12
 
13
13
  dsn_hash = {}
14
14
 
15
15
  until scanner.eos?
16
16
  # get the key by matching up to and including the (optionally) white space bordered '='
17
- key = scanner.scan_until(/\s?=\s?/)
17
+ key = scanner.scan_until(/\s*=\s*/)
18
18
  key = key[0...-scanner.matched_size]
19
19
 
20
20
  dsn_hash[key.to_sym] = get_dsn_value(scanner)
@@ -17,7 +17,11 @@ Gem::Specification.new do |spec|
17
17
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
18
  spec.require_paths = ["lib"]
19
19
 
20
- spec.add_development_dependency "bundler", "~> 1.12"
21
- spec.add_development_dependency "rake", "~> 10.0"
22
- spec.add_development_dependency "rspec", "~> 3.0"
20
+ spec.required_ruby_version = '>= 2.5.8'
21
+
22
+ spec.add_development_dependency "bundler"
23
+ spec.add_development_dependency "manageiq-style"
24
+ spec.add_development_dependency "rake"
25
+ spec.add_development_dependency "rspec", "~> 3.0"
26
+ spec.add_development_dependency "simplecov", ">= 0.21.2"
23
27
  end
metadata CHANGED
@@ -1,43 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg-dsn_parser
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
  - Nick Carboni
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-28 00:00:00.000000000 Z
11
+ date: 2022-08-29 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
- version: '1.12'
19
+ version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: manageiq-style
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
25
32
  - !ruby/object:Gem::Version
26
- version: '1.12'
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rake
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
- - - "~>"
45
+ - - ">="
32
46
  - !ruby/object:Gem::Version
33
- version: '10.0'
47
+ version: '0'
34
48
  type: :development
35
49
  prerelease: false
36
50
  version_requirements: !ruby/object:Gem::Requirement
37
51
  requirements:
38
- - - "~>"
52
+ - - ">="
39
53
  - !ruby/object:Gem::Version
40
- version: '10.0'
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: rspec
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -52,6 +66,20 @@ dependencies:
52
66
  - - "~>"
53
67
  - !ruby/object:Gem::Version
54
68
  version: '3.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: simplecov
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: 0.21.2
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 0.21.2
55
83
  description: A parser for PostgreSQL DSNs
56
84
  email:
57
85
  - ncarboni@redhat.com
@@ -59,9 +87,15 @@ executables: []
59
87
  extensions: []
60
88
  extra_rdoc_files: []
61
89
  files:
90
+ - ".codeclimate.yml"
91
+ - ".github/workflows/ci.yaml"
62
92
  - ".gitignore"
63
93
  - ".rspec"
64
- - ".travis.yml"
94
+ - ".rubocop.yml"
95
+ - ".rubocop_cc.yml"
96
+ - ".rubocop_local.yml"
97
+ - ".whitesource"
98
+ - CODEOWNERS
65
99
  - Gemfile
66
100
  - LICENSE.txt
67
101
  - README.md
@@ -74,7 +108,7 @@ homepage: https://github.com/ManageIQ/pg-dsn_parser
74
108
  licenses:
75
109
  - Apache-2.0
76
110
  metadata: {}
77
- post_install_message:
111
+ post_install_message:
78
112
  rdoc_options: []
79
113
  require_paths:
80
114
  - lib
@@ -82,16 +116,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
82
116
  requirements:
83
117
  - - ">="
84
118
  - !ruby/object:Gem::Version
85
- version: '0'
119
+ version: 2.5.8
86
120
  required_rubygems_version: !ruby/object:Gem::Requirement
87
121
  requirements:
88
122
  - - ">="
89
123
  - !ruby/object:Gem::Version
90
124
  version: '0'
91
125
  requirements: []
92
- rubyforge_project:
93
- rubygems_version: 2.6.3
94
- signing_key:
126
+ rubygems_version: 3.3.18
127
+ signing_key:
95
128
  specification_version: 4
96
129
  summary: A parser for PostgreSQL DSNs
97
130
  test_files: []
data/.travis.yml DELETED
@@ -1,5 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.2.4
5
- before_install: gem install bundler -v 1.12.5