parseconfig 1.1.0 → 1.1.2

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
2
  SHA256:
3
- metadata.gz: 79e32d975451b2b4cbf6ee3123e87b26a1fbf540066b3d44322c02d573a451af
4
- data.tar.gz: 3a53181d9344b6b2ea790f968d7f33305709944bafd1c430a27601c411672fff
3
+ metadata.gz: 6d3c3c0e6a2c362a4d7afb9c6ecef637497b94137e570b96c3eade26f07f8825
4
+ data.tar.gz: ae849249bce23a5988a51159e388237af2540883dc60de7d164e14501c3d484d
5
5
  SHA512:
6
- metadata.gz: d7b538e6e901837e6d6e479e072841ba6dd404ecc060cf417d98a40e714daabaf92fa54c3eeec137ff11d5df98e055f374c8f8f43917ce4d3d3ef4668a3d2efa
7
- data.tar.gz: 634668d51266a54123d170652bb8bd03fcac5936c4a0deb0f388860ecad6cd84cd88c256b85be6d78a7155b766cbccbc2de0334d3b601e1b9304aaa8403118c9
6
+ metadata.gz: 3f49ecd6162b3a6f6bb6140f7a44666f312e6682862e8e6957ce28792b4e5e1629b815e981b409ee0588a9309d2c4dbdcce595b3f42e2bee390f6439731b6c54
7
+ data.tar.gz: bfc2d1519921b14744d873bf71ad76b3da18068cc0929ce59baac5757e0dcb5948b59a86940e2141ee99530ef436787157f4a04726c8562762979f48c8708996
data/Changelog CHANGED
@@ -1,3 +1,10 @@
1
+
2
+ Wed Sep 29, 2021 - v1.1.1 (DEVELOPMENT - will be released as 1.1.2)
3
+ - Dev and test against recent versions of Ruby (2.6+, 3.0+)
4
+ - Docker development support
5
+ - Remove tests for deprecated 'get_value()' method
6
+ - Use Rspec 'expect' in place of 'should'
7
+
1
8
  Mon Sep 28, 2020 - v1.1.0
2
9
  - Add non-value option support.
3
10
  Resolves Issue #11
data/LICENSE CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  The MIT License:
3
3
 
4
- Copyright (c) 2006-2016 Data Folk Labs, LLC
4
+ Copyright (c) 2006 Data Folk Labs, LLC
5
5
 
6
6
  Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  ParseConfig provides simple parsing of standard configuration files in the
4
4
  form of `param = value`. It also supports nested `[group]` sections.
5
5
 
6
- [![Continuous Integration Status](https://secure.travis-ci.org/datafolklabs/ruby-parseconfig.png)](http://travis-ci.org/datafolklabs/ruby-parseconfig)
6
+ [![Continuous Integration Status](https://app.travis-ci.com/datafolklabs/ruby-parseconfig.svg?branch=master)](https://app.travis-ci.com/github/datafolklabs/ruby-parseconfig)
7
7
 
8
8
  ## Installation
9
9
 
@@ -84,8 +84,56 @@ Access it with ParseConfig:
84
84
 
85
85
  ```
86
86
 
87
+ ## Development
88
+
89
+ ### Docker
90
+
91
+ This project includes a `docker-compose` configuration that sets up all required services, and dependencies for development and testing. This is the recommended path for local development, and is the only fully supported option.
92
+
93
+ The following creates all required docker containers, and launches a BASH shell within the `parseconfig` dev container for development.
94
+ ```
95
+ $ make dev
96
+
97
+ |> parseconfig <| src #
98
+ ```
99
+
100
+ The above is the equivalent of running:
101
+
102
+ ```
103
+ $ docker-compose up -d
104
+
105
+ $ docker-compose exec parseconfig /bin/bash
106
+ ```
107
+
108
+ **Testing Alternative Versions of Ruby**
109
+
110
+ The latest stable version of Ruby is the default, and target version accessible as the `parseconfig` container within Docker Compose. For testing against alternative versions of Ruby, additional containers are created (ex: `parseconfig-rb26`, `parseconfig-rb27`, etc). You can access these containers via:
111
+
112
+ ```
113
+ $ docker-compose ps
114
+ Name Command State Ports
115
+ ---------------------------------------------------------------
116
+ ruby-parseconfig_parseconfig-rb26_1 /bin/bash Up
117
+ ruby-parseconfig_parseconfig-rb27_1 /bin/bash Up
118
+ ruby-parseconfig_parseconfig-rb30_1 /bin/bash Up
119
+ ruby-parseconfig_parseconfig_1 /bin/bash Up
120
+
121
+
122
+ $ docker-compose exec parseconfig-rb26 /bin/bash
123
+
124
+ |> parseconfig-rb26 <| src #
125
+ ```
126
+
127
+ ### Running Unit Tests
128
+
129
+ ```
130
+ $ make test
131
+ ```
132
+
133
+
87
134
  ## License
88
135
 
89
136
  The ParseConfig library is Open Source and distributed under the MIT license.
90
137
  Please see the LICENSE file included with this software.
91
138
 
139
+
data/lib/parseconfig.rb CHANGED
@@ -93,8 +93,8 @@ class ParseConfig
93
93
  else
94
94
  add(var_name, new_value)
95
95
  end
96
- elsif /^\[(.+)\]$/.match(line).to_a != []
97
- group = /^\[(.+)\]$/.match(line).to_a[1]
96
+ elsif /^\[(.+)\](\s*#{escaped_comment_regex}+.*)?$/.match(line).to_a != []
97
+ group = /^\[(.+)\](\s*#{escaped_comment_regex}+.*)?$/.match(line).to_a[1]
98
98
  add(group, {})
99
99
  elsif /\w+/.match(line)
100
100
  add(line.to_s.chomp.strip, true)
@@ -104,6 +104,10 @@ class ParseConfig
104
104
  end
105
105
  end
106
106
 
107
+ def escaped_comment_regex
108
+ /[#{Regexp.escape(@comments.join(''))}]/
109
+ end
110
+
107
111
  # This method will provide the value held by the object "@param"
108
112
  # where "@param" is actually the name of the param in the config
109
113
  # file.
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module ParseConfig
2
- VERSION = '1.1.0'.freeze
2
+ VERSION = '1.1.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,18 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parseconfig
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - BJ Dierkes
8
- autorequire:
8
+ - Dmitry Shagin
9
+ autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2020-09-28 00:00:00.000000000 Z
12
+ date: 2021-09-30 00:00:00.000000000 Z
12
13
  dependencies: []
13
14
  description: ParseConfig provides simple parsing of standardconfiguration files in
14
15
  the form of 'param = value'. It also supports nested [group] sections.
15
- email: derks@datafolklabs.com
16
+ email: team@datafolklabs.com
16
17
  executables: []
17
18
  extensions: []
18
19
  extra_rdoc_files: []
@@ -23,9 +24,10 @@ files:
23
24
  - lib/parseconfig.rb
24
25
  - lib/version.rb
25
26
  homepage: http://github.com/datafolklabs/ruby-parseconfig/
26
- licenses: []
27
+ licenses:
28
+ - MIT
27
29
  metadata: {}
28
- post_install_message:
30
+ post_install_message:
29
31
  rdoc_options: []
30
32
  require_paths:
31
33
  - lib
@@ -40,8 +42,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
40
42
  - !ruby/object:Gem::Version
41
43
  version: '0'
42
44
  requirements: []
43
- rubygems_version: 3.0.6
44
- signing_key:
45
+ rubygems_version: 3.0.3
46
+ signing_key:
45
47
  specification_version: 4
46
48
  summary: Config File Parser for Standard Unix/Linux Type Config Files
47
49
  test_files: []