configliere 0.4.18 → 0.4.22

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ZTJlMDAzOWU2OWFhZmE5MjlhOWY1NGVkMzgyYjJhN2QzOWUwMWQ0OQ==
5
+ data.tar.gz: !binary |-
6
+ OTU2NGZlMjZmYzYyM2MxZjE4OGU5NWU2OTM0ZDU1Mjg2ZWFkNDA3OQ==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ N2EzOTFjNWVhMDJhNmExNGI5MWZjMDNkYmY3MGVjZTU3OWMyY2I3NDA5ZTM2
10
+ ODYxODgyZTI2ZjFhZDJkNDRhZDA0NzA4NGMwMDQ0OWNjZmQwN2U3NWY0ODk4
11
+ MzlmMWQ0MjIxMzQwNWRiOTVjNmY5ZTU1MzIzY2MzYjU2MTI2OGM=
12
+ data.tar.gz: !binary |-
13
+ NDJiMTNmNjRiYTZiNGVjY2MyMzJmYjFhOTY0OTBlZGE2NDk0YjU0ODBjODM1
14
+ MzU1ZjA3NWM5OTM4NWE4MTAzMTVlYmJiNWE4YzE1NjExYTc5N2QyNjQ1OTk0
15
+ NjZlMjM2N2M4MjA3MjMyNDg1YTYzNWFhNTJjYjBiYTBiOGJiZDI=
@@ -0,0 +1,57 @@
1
+ ## OS
2
+ .DS_Store
3
+ Icon
4
+ nohup.out
5
+ .bak
6
+
7
+ *.pem
8
+
9
+ ## EDITORS
10
+ \#*
11
+ .\#*
12
+ \#*\#
13
+ *~
14
+ *.swp
15
+ REVISION
16
+ TAGS*
17
+ tmtags
18
+ *_flymake.*
19
+ *_flymake
20
+ *.tmproj
21
+ .project
22
+ .settings
23
+
24
+ ## COMPILED
25
+ a.out
26
+ *.o
27
+ *.pyc
28
+ *.so
29
+ target/
30
+
31
+ ## OTHER SCM
32
+ .bzr
33
+ .hg
34
+ .svn
35
+
36
+ ## PROJECT::GENERAL
37
+
38
+ log/*
39
+ tmp/*
40
+ pkg/*
41
+
42
+ coverage
43
+ rdoc
44
+ doc
45
+ pkg
46
+ .rake_test_cache
47
+ .bundle
48
+ .yardoc
49
+
50
+ .vendor
51
+
52
+ ## PROJECT::SPECIFIC
53
+
54
+ Gemfile.lock
55
+ .rvmrc
56
+ .rbenv-version
57
+ .rbx
data/Gemfile CHANGED
@@ -1,20 +1,10 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
- gem 'multi_json', ">= 1.1"
3
+ gemspec
4
4
 
5
5
  # Only necessary if you want to use Configliere::Prompt
6
- gem 'highline', ">= 1.5.2", :require => false
7
6
  gem 'jruby-openssl', :platform => [:jruby] if RUBY_PLATFORM =~ /java/
8
7
 
9
- # Only gems that you want listed as development dependencies in the gemspec
10
- group :development do
11
- gem 'bundler', "~> 1.1"
12
- gem 'rake', :require => false
13
- gem 'yard', ">= 0.7", :require => false
14
- gem 'rspec', ">= 2.8", :require => false
15
- gem 'jeweler', ">= 1.6", :require => false
16
- end
17
-
18
8
  group :docs do
19
9
  gem 'RedCloth', ">= 4.2", :require => "redcloth"
20
10
  gem 'redcarpet', ">= 2.1", :platform => [:ruby]
@@ -25,6 +15,8 @@ end
25
15
  group :test do
26
16
  gem 'simplecov', ">= 0.5", :platform => [:ruby_19], :require => false
27
17
  gem 'json'
18
+ gem 'rspec', '~> 2.14'
19
+ gem 'rake'
28
20
  end
29
21
 
30
22
  # Gems you would use if hacking on this gem (rather than with it)
data/Rakefile CHANGED
@@ -16,30 +16,3 @@ task :cov do
16
16
  ENV['CONFIGLIERE_COV'] = "yep"
17
17
  Rake::Task[:rspec].execute
18
18
  end
19
-
20
- require 'yard'
21
- YARD::Rake::YardocTask.new do
22
- Bundler.setup(:default, :development, :docs)
23
- end
24
-
25
- require 'jeweler'
26
- Jeweler::Tasks.new do |gem|
27
- Bundler.setup(:default, :development, :test)
28
- gem.name = 'configliere'
29
- gem.homepage = 'https://github.com/infochimps-labs/configliere'
30
- gem.license = 'Apache 2.0'
31
- gem.email = 'coders@infochimps.org'
32
- gem.authors = ['Infochimps']
33
-
34
- gem.summary = %Q{Wise, discreet configuration management}
35
- gem.description = <<-EOF
36
- You\'ve got a script. It\'s got some settings. Some settings are for this module, some are for that module. Most of them don\'t change. Except on your laptop, where the paths are different. Or when you're in production mode. Or when you\'re testing from the command line.
37
-
38
- "" So, Consigliere of mine, I think you should tell your Don what everyone knows. "" -- Don Corleone
39
-
40
- Configliere manage settings from many sources: static constants, simple config files, environment variables, commandline options, straight ruby. You don't have to predefine anything, but you can ask configliere to type-convert, require, document or password-obscure any of its fields. Modules can define config settings independently of each other and the main program.
41
- EOF
42
-
43
- gem.executables = []
44
- end
45
- Jeweler::RubygemsDotOrgTasks.new
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.18
1
+ 0.4.20
@@ -1,111 +1,24 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
1
+ lib = File.expand_path('../lib', __FILE__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require 'configliere/version'
5
4
 
6
- Gem::Specification.new do |s|
7
- s.name = "configliere"
8
- s.version = "0.4.18"
5
+ Gem::Specification.new do |gem|
6
+ gem.name = 'configliere'
7
+ gem.version = Configliere::VERSION
9
8
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Infochimps"]
12
- s.date = "2012-12-05"
13
- s.description = "You've got a script. It's got some settings. Some settings are for this module, some are for that module. Most of them don't change. Except on your laptop, where the paths are different. Or when you're in production mode. Or when you're testing from the command line.\n\n \"\" So, Consigliere of mine, I think you should tell your Don what everyone knows. \"\" -- Don Corleone\n\nConfigliere manage settings from many sources: static constants, simple config files, environment variables, commandline options, straight ruby. You don't have to predefine anything, but you can ask configliere to type-convert, require, document or password-obscure any of its fields. Modules can define config settings independently of each other and the main program.\n"
14
- s.email = "coders@infochimps.org"
15
- s.extra_rdoc_files = [
16
- "LICENSE.md",
17
- "README.textile"
18
- ]
19
- s.files = [
20
- ".rspec",
21
- ".travis.yml",
22
- ".yardopts",
23
- "CHANGELOG.textile",
24
- "FEATURES.txt",
25
- "Gemfile",
26
- "Guardfile",
27
- "LICENSE.md",
28
- "README.textile",
29
- "Rakefile",
30
- "VERSION",
31
- "bin/configliere",
32
- "bin/configliere-decrypt",
33
- "bin/configliere-delete",
34
- "bin/configliere-dump",
35
- "bin/configliere-encrypt",
36
- "bin/configliere-list",
37
- "bin/configliere-set",
38
- "configliere.gemspec",
39
- "examples/config_block_script.rb",
40
- "examples/encrypted_script.rb",
41
- "examples/env_var_script.rb",
42
- "examples/help_message_demo.rb",
43
- "examples/independent_config.rb",
44
- "examples/joke.rb",
45
- "examples/prompt.rb",
46
- "examples/simple_script.rb",
47
- "examples/simple_script.yaml",
48
- "lib/configliere.rb",
49
- "lib/configliere/commandline.rb",
50
- "lib/configliere/commands.rb",
51
- "lib/configliere/config_block.rb",
52
- "lib/configliere/config_file.rb",
53
- "lib/configliere/crypter.rb",
54
- "lib/configliere/deep_hash.rb",
55
- "lib/configliere/define.rb",
56
- "lib/configliere/encrypted.rb",
57
- "lib/configliere/env_var.rb",
58
- "lib/configliere/param.rb",
59
- "lib/configliere/prompt.rb",
60
- "lib/configliere/vayacondios.rb",
61
- "spec/configliere/commandline_spec.rb",
62
- "spec/configliere/commands_spec.rb",
63
- "spec/configliere/config_block_spec.rb",
64
- "spec/configliere/config_file_spec.rb",
65
- "spec/configliere/deep_hash_spec.rb",
66
- "spec/configliere/define_spec.rb",
67
- "spec/configliere/encrypted_spec.rb",
68
- "spec/configliere/env_var_spec.rb",
69
- "spec/configliere/param_spec.rb",
70
- "spec/configliere/prompt_spec.rb",
71
- "spec/configliere_spec.rb",
72
- "spec/spec.opts",
73
- "spec/spec_helper.rb"
74
- ]
75
- s.homepage = "https://github.com/infochimps-labs/configliere"
76
- s.licenses = ["Apache 2.0"]
77
- s.require_paths = ["lib"]
78
- s.rubygems_version = "1.8.15"
79
- s.summary = "Wise, discreet configuration management"
9
+ gem.authors = ['Infochimps']
10
+ gem.description = "You've got a script. It's got some settings. Some settings are for this module, some are for that module. Most of them don't change. Except on your laptop, where the paths are different. Or when you're in production mode. Or when you're testing from the command line.\n\n \"\" So, Consigliere of mine, I think you should tell your Don what everyone knows. \"\" -- Don Corleone\n\nConfigliere manage settings from many sources: static constants, simple config files, environment variables, commandline options, straight ruby. You don't have to predefine anything, but you can ask configliere to type-convert, require, document or password-obscure any of its fields. Modules can define config settings independently of each other and the main program.\n"
11
+ gem.email = ['coders@infochimps.org']
80
12
 
81
- if s.respond_to? :specification_version then
82
- s.specification_version = 3
13
+ gem.files = `git ls-files`.split($/)
14
+ gem.executables = gem.files.grep(/^bin/){ |f| File.basename(f) }
15
+ gem.test_files = gem.files.grep(/^(test|spec|features)/)
16
+ gem.require_paths = ['lib']
83
17
 
84
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
85
- s.add_runtime_dependency(%q<multi_json>, [">= 1.1"])
86
- s.add_runtime_dependency(%q<highline>, [">= 1.5.2"])
87
- s.add_development_dependency(%q<bundler>, ["~> 1.1"])
88
- s.add_development_dependency(%q<rake>, [">= 0"])
89
- s.add_development_dependency(%q<yard>, [">= 0.7"])
90
- s.add_development_dependency(%q<rspec>, [">= 2.8"])
91
- s.add_development_dependency(%q<jeweler>, [">= 1.6"])
92
- else
93
- s.add_dependency(%q<multi_json>, [">= 1.1"])
94
- s.add_dependency(%q<highline>, [">= 1.5.2"])
95
- s.add_dependency(%q<bundler>, ["~> 1.1"])
96
- s.add_dependency(%q<rake>, [">= 0"])
97
- s.add_dependency(%q<yard>, [">= 0.7"])
98
- s.add_dependency(%q<rspec>, [">= 2.8"])
99
- s.add_dependency(%q<jeweler>, [">= 1.6"])
100
- end
101
- else
102
- s.add_dependency(%q<multi_json>, [">= 1.1"])
103
- s.add_dependency(%q<highline>, [">= 1.5.2"])
104
- s.add_dependency(%q<bundler>, ["~> 1.1"])
105
- s.add_dependency(%q<rake>, [">= 0"])
106
- s.add_dependency(%q<yard>, [">= 0.7"])
107
- s.add_dependency(%q<rspec>, [">= 2.8"])
108
- s.add_dependency(%q<jeweler>, [">= 1.6"])
109
- end
110
- end
18
+ gem.homepage = "https://github.com/infochimps-labs/configliere"
19
+ gem.licenses = ["Apache 2.0"]
20
+ gem.summary = "Wise, discreet configuration management"
111
21
 
22
+ gem.add_dependency(%q<multi_json> , '~> 1.10.1')
23
+ gem.add_dependency(%q<highline> , '1.5.2')
24
+ end
@@ -12,23 +12,27 @@ module Configliere
12
12
  attr_reader :unknown_argvs
13
13
 
14
14
  # Processing to reconcile all options
15
- #
16
- # Configliere::Commandline's resolve!:
17
- #
15
+ #
18
16
  # * processes all commandline params
19
- # * if the --help param was given, prints out a usage statement describing all #define'd params and exits
20
17
  # * calls up the resolve! chain.
21
18
  #
22
- def resolve!
19
+ # * if the --help param was given, prints out a usage statement describing all #define'd params and exits
20
+ #
21
+ # If the --help param was given, Will print out a usage statement
22
+ # describing all #define'd params and exit. To avoid this, pass
23
+ # `false` as the first argument.
24
+ #
25
+ # @param [true,false] print_help_and_exit whether to print help and exit if the --help param was given
26
+ def resolve!(print_help_and_exit=true)
23
27
  process_argv!
24
- if self[:help]
28
+ if print_help_and_exit && self[:help]
25
29
  dump_help
26
30
  exit(2)
27
31
  end
28
32
  super()
29
33
  self
30
34
  end
31
-
35
+
32
36
  #
33
37
  # Parse the command-line args into the params hash.
34
38
  #
@@ -137,6 +141,7 @@ module Configliere
137
141
  def usage
138
142
  %Q{usage: #{raw_script_name} [...--param=val...]}
139
143
  end
144
+ attr_writer :usage
140
145
 
141
146
  # the script basename, for recycling into help messages
142
147
  def raw_script_name
@@ -0,0 +1,3 @@
1
+ module Configliere
2
+ VERSION = '0.4.22'
3
+ end
@@ -1,5 +1,6 @@
1
1
  require 'bundler/setup' ; Bundler.require(:default, :development, :test)
2
2
  require 'rspec/autorun'
3
+ require 'yaml'
3
4
 
4
5
  puts "Running specs in version #{RUBY_VERSION} on #{RUBY_PLATFORM} #{RUBY_DESCRIPTION}"
5
6
 
metadata CHANGED
@@ -1,93 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: configliere
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.18
5
- prerelease:
4
+ version: 0.4.22
6
5
  platform: ruby
7
6
  authors:
8
7
  - Infochimps
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-12-05 00:00:00.000000000Z
11
+ date: 2014-10-20 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: multi_json
16
- requirement: &2165254580 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '1.1'
22
- type: :runtime
23
- prerelease: false
24
- version_requirements: *2165254580
25
- - !ruby/object:Gem::Dependency
26
- name: highline
27
- requirement: &2165253640 !ruby/object:Gem::Requirement
28
- none: false
29
- requirements:
30
- - - ! '>='
17
+ - - ~>
31
18
  - !ruby/object:Gem::Version
32
- version: 1.5.2
19
+ version: 1.10.1
33
20
  type: :runtime
34
21
  prerelease: false
35
- version_requirements: *2165253640
36
- - !ruby/object:Gem::Dependency
37
- name: bundler
38
- requirement: &2165252700 !ruby/object:Gem::Requirement
39
- none: false
22
+ version_requirements: !ruby/object:Gem::Requirement
40
23
  requirements:
41
24
  - - ~>
42
25
  - !ruby/object:Gem::Version
43
- version: '1.1'
44
- type: :development
45
- prerelease: false
46
- version_requirements: *2165252700
47
- - !ruby/object:Gem::Dependency
48
- name: rake
49
- requirement: &2165251420 !ruby/object:Gem::Requirement
50
- none: false
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- type: :development
56
- prerelease: false
57
- version_requirements: *2165251420
58
- - !ruby/object:Gem::Dependency
59
- name: yard
60
- requirement: &2165243400 !ruby/object:Gem::Requirement
61
- none: false
62
- requirements:
63
- - - ! '>='
64
- - !ruby/object:Gem::Version
65
- version: '0.7'
66
- type: :development
67
- prerelease: false
68
- version_requirements: *2165243400
26
+ version: 1.10.1
69
27
  - !ruby/object:Gem::Dependency
70
- name: rspec
71
- requirement: &2165242100 !ruby/object:Gem::Requirement
72
- none: false
28
+ name: highline
29
+ requirement: !ruby/object:Gem::Requirement
73
30
  requirements:
74
- - - ! '>='
31
+ - - '='
75
32
  - !ruby/object:Gem::Version
76
- version: '2.8'
77
- type: :development
33
+ version: 1.5.2
34
+ type: :runtime
78
35
  prerelease: false
79
- version_requirements: *2165242100
80
- - !ruby/object:Gem::Dependency
81
- name: jeweler
82
- requirement: &2165240440 !ruby/object:Gem::Requirement
83
- none: false
36
+ version_requirements: !ruby/object:Gem::Requirement
84
37
  requirements:
85
- - - ! '>='
38
+ - - '='
86
39
  - !ruby/object:Gem::Version
87
- version: '1.6'
88
- type: :development
89
- prerelease: false
90
- version_requirements: *2165240440
40
+ version: 1.5.2
91
41
  description: ! "You've got a script. It's got some settings. Some settings are for
92
42
  this module, some are for that module. Most of them don't change. Except on your
93
43
  laptop, where the paths are different. Or when you're in production mode. Or when
@@ -98,19 +48,27 @@ description: ! "You've got a script. It's got some settings. Some settings are f
98
48
  but you can ask configliere to type-convert, require, document or password-obscure
99
49
  any of its fields. Modules can define config settings independently of each other
100
50
  and the main program.\n"
101
- email: coders@infochimps.org
102
- executables: []
51
+ email:
52
+ - coders@infochimps.org
53
+ executables:
54
+ - configliere
55
+ - configliere-decrypt
56
+ - configliere-delete
57
+ - configliere-dump
58
+ - configliere-encrypt
59
+ - configliere-list
60
+ - configliere-set
103
61
  extensions: []
104
- extra_rdoc_files:
105
- - LICENSE.md
106
- - README.textile
62
+ extra_rdoc_files: []
107
63
  files:
64
+ - .gitignore
108
65
  - .rspec
109
66
  - .travis.yml
110
67
  - .yardopts
111
68
  - CHANGELOG.textile
112
69
  - FEATURES.txt
113
70
  - Gemfile
71
+ - Gemfile.lock
114
72
  - Guardfile
115
73
  - LICENSE.md
116
74
  - README.textile
@@ -146,6 +104,7 @@ files:
146
104
  - lib/configliere/param.rb
147
105
  - lib/configliere/prompt.rb
148
106
  - lib/configliere/vayacondios.rb
107
+ - lib/configliere/version.rb
149
108
  - spec/configliere/commandline_spec.rb
150
109
  - spec/configliere/commands_spec.rb
151
110
  - spec/configliere/config_block_spec.rb
@@ -162,29 +121,39 @@ files:
162
121
  homepage: https://github.com/infochimps-labs/configliere
163
122
  licenses:
164
123
  - Apache 2.0
124
+ metadata: {}
165
125
  post_install_message:
166
126
  rdoc_options: []
167
127
  require_paths:
168
128
  - lib
169
129
  required_ruby_version: !ruby/object:Gem::Requirement
170
- none: false
171
130
  requirements:
172
131
  - - ! '>='
173
132
  - !ruby/object:Gem::Version
174
133
  version: '0'
175
- segments:
176
- - 0
177
- hash: 825500604818380154
178
134
  required_rubygems_version: !ruby/object:Gem::Requirement
179
- none: false
180
135
  requirements:
181
136
  - - ! '>='
182
137
  - !ruby/object:Gem::Version
183
138
  version: '0'
184
139
  requirements: []
185
140
  rubyforge_project:
186
- rubygems_version: 1.8.15
141
+ rubygems_version: 2.4.1
187
142
  signing_key:
188
- specification_version: 3
143
+ specification_version: 4
189
144
  summary: Wise, discreet configuration management
190
- test_files: []
145
+ test_files:
146
+ - spec/configliere/commandline_spec.rb
147
+ - spec/configliere/commands_spec.rb
148
+ - spec/configliere/config_block_spec.rb
149
+ - spec/configliere/config_file_spec.rb
150
+ - spec/configliere/deep_hash_spec.rb
151
+ - spec/configliere/define_spec.rb
152
+ - spec/configliere/encrypted_spec.rb
153
+ - spec/configliere/env_var_spec.rb
154
+ - spec/configliere/param_spec.rb
155
+ - spec/configliere/prompt_spec.rb
156
+ - spec/configliere_spec.rb
157
+ - spec/spec.opts
158
+ - spec/spec_helper.rb
159
+ has_rdoc: