smps 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/changelog.md +5 -0
  3. data/exe/smps +17 -3
  4. data/lib/smps/version.rb +1 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 04e50be45d76d8a48727fee5d8fb76356c27353b
4
- data.tar.gz: 894396de27a5b150d03c70e66591bdfc0503a3aa
3
+ metadata.gz: ebbfbeac0609494fd92d46e558b77a8defb3bb4e
4
+ data.tar.gz: 9bd12ef036edca059eceb4abd6bf68442f7f3eb7
5
5
  SHA512:
6
- metadata.gz: 4db415f4e8ee2f1fccc6dd812324d2511af5d4e282657fc66f27767b858be75dcf53794e956abb90c313f9db391a1dfc67c306afe0a91e44a0424b61b2081bd0
7
- data.tar.gz: 69136335cbe42f919d13601019d1c1df6bf733ad9f371d5032b682be0bb74729b0d6ba2b727845db0643d9b405dae15ecc0a1d4fde405d5d5e841e1ebb92d791
6
+ metadata.gz: 7000ae6e0d4873190e0389e9d3a5ec11c88475385101134c0c04dbb0cc4bdac11e8a213c2b02e5746752eeaacd7d8db868b4fe86b34bdb29d31d9fc5b3333bc2
7
+ data.tar.gz: 934c83efc882b8061423fc35eeb32f3e46d1738a6573b83df52b8018d2ea3dca245c7933edae372dd423858f4e3d213ddec8fa6ff7f270ee0993154af80fd7d2
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
4
4
  Version format based on http://semver.org/
5
5
 
6
6
  ## [Unreleased]
7
+
8
+ ## [0.3.1] - 2017-11-16
9
+ ### Added
10
+ - Test script param for fetch by_path
11
+
7
12
  ## [0.3.0] - 2017-10-13
8
13
  ### Added
9
14
  - parameters_by_path method
data/exe/smps CHANGED
@@ -2,6 +2,7 @@
2
2
  require 'getoptlong'
3
3
  require 'smps'
4
4
  require 'net/http'
5
+ require 'pp'
5
6
 
6
7
  def clidoc
7
8
  puts <<-CLIDOC
@@ -18,6 +19,9 @@ def clidoc
18
19
  -p, --param <param_name>
19
20
  Parameter name.
20
21
 
22
+ -b --by_path <path>
23
+ Path name
24
+
21
25
  -v, --value <new_value>
22
26
  Value to assign
23
27
 
@@ -49,6 +53,7 @@ opts = GetoptLong.new(
49
53
  ['--help', '-h', GetoptLong::NO_ARGUMENT],
50
54
  ['--role', '-r', GetoptLong::REQUIRED_ARGUMENT],
51
55
  ['--param', '-p', GetoptLong::REQUIRED_ARGUMENT],
56
+ ['--by_path', '-b', GetoptLong::REQUIRED_ARGUMENT],
52
57
  ['--value', '-v', GetoptLong::REQUIRED_ARGUMENT],
53
58
  ['--type', '-t', GetoptLong::REQUIRED_ARGUMENT],
54
59
  ['--key', '-k', GetoptLong::REQUIRED_ARGUMENT],
@@ -57,6 +62,7 @@ opts = GetoptLong.new(
57
62
 
58
63
  role = nil
59
64
  param = nil
65
+ by_path = nil
60
66
  value = nil
61
67
  type = nil
62
68
  key_id = nil
@@ -71,6 +77,8 @@ opts.each do |opt, arg|
71
77
  role = arg
72
78
  when '--param'
73
79
  param = arg
80
+ when '--by_path'
81
+ by_path = arg
74
82
  when '--value'
75
83
  value = arg
76
84
  when '--type'
@@ -103,8 +111,14 @@ else
103
111
  smps = SmPs.new
104
112
  end
105
113
 
106
- parameter = smps.parameter(name: param, type: type, key_id: key_id)
107
- parameter.write!(value) if value
108
- puts parameter.to_s
114
+ if param
115
+ parameter = smps.parameter(name: param, type: type, key_id: key_id)
116
+ parameter.write!(value) if value
117
+ puts parameter.to_s
118
+ end
109
119
 
120
+ if by_path
121
+ parameters = smps.parameters_by_path(path: by_path)
122
+ pp parameters
123
+ end
110
124
  # vim:set fileencoding=utf8 fileformat=unix filetype=ruby tabstop=2 expandtab:
@@ -1,3 +1,3 @@
1
1
  class SmPs
2
- VERSION = '0.3.0'.freeze
2
+ VERSION = '0.3.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan - Zipkid - Goethals
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-10-13 00:00:00.000000000 Z
11
+ date: 2017-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler