climatic 0.2.26 → 0.2.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/climatic.gemspec +1 -1
- data/lib/climatic/layers_manager.rb +1 -1
- data/lib/climatic/version.rb +1 -1
- metadata +2 -20
- data/example/simple_app/.gitignore +0 -12
- data/example/simple_app/.rspec +0 -2
- data/example/simple_app/.ruby-version +0 -1
- data/example/simple_app/.travis.yml +0 -5
- data/example/simple_app/CODE_OF_CONDUCT.md +0 -74
- data/example/simple_app/Gemfile +0 -6
- data/example/simple_app/LICENSE.txt +0 -21
- data/example/simple_app/README.md +0 -43
- data/example/simple_app/Rakefile +0 -6
- data/example/simple_app/bin/console +0 -14
- data/example/simple_app/bin/setup +0 -8
- data/example/simple_app/etc/command_line.yml +0 -52
- data/example/simple_app/exe/user +0 -57
- data/example/simple_app/lib/tst_climatic/version.rb +0 -3
- data/example/simple_app/lib/tst_climatic.rb +0 -5
- data/example/simple_app/spec/spec_helper.rb +0 -14
- data/example/simple_app/spec/tst_climatic_spec.rb +0 -11
- data/example/simple_app/tst_climatic.gemspec +0 -39
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c50432c8336ffefc49e57abfd820564808ee557c
|
4
|
+
data.tar.gz: 097024b903b01a2032cb4cbd3bd2caee70a5b3ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aabfadeb44160126ccbad737ab05c8747646affce47c5a2a25ca2686098d394ea1655a642c2387f5d844bcf00e66f03a25a6ab0cbb954035a193e6ff05c0bf4a
|
7
|
+
data.tar.gz: e2a394fe92fb05b3913a6153b2ba9414df3bab25f3201897e6cbae2730f5387bcbaec5c89b36be26ab435bce631d81dce5273f62b138135346d0a2aadf3dbe1e
|
data/climatic.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.license = 'MIT'
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
17
|
-
f.match(%r{^(test|spec|features)/})
|
17
|
+
f.match(%r{^(test|spec|features|example)/})
|
18
18
|
end
|
19
19
|
spec.bindir = 'exe'
|
20
20
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
@@ -62,7 +62,7 @@ module Climatic
|
|
62
62
|
@provided_config_file_layer = setup_layer Climatic::ConfigLayers::ProvidedConfigFileLayer, 'Specific config file configuration level', 60
|
63
63
|
|
64
64
|
# The layer to write something
|
65
|
-
override_layer = setup_layer SuperStack::Layer, 'Overridden configuration level',
|
65
|
+
override_layer = setup_layer SuperStack::Layer, 'Overridden configuration level', 5000
|
66
66
|
self.write_layer = override_layer
|
67
67
|
|
68
68
|
reload_layers
|
data/lib/climatic/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: climatic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Laurent B.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-08
|
11
|
+
date: 2019-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -84,24 +84,6 @@ files:
|
|
84
84
|
- bin/console
|
85
85
|
- bin/setup
|
86
86
|
- climatic.gemspec
|
87
|
-
- example/simple_app/.gitignore
|
88
|
-
- example/simple_app/.rspec
|
89
|
-
- example/simple_app/.ruby-version
|
90
|
-
- example/simple_app/.travis.yml
|
91
|
-
- example/simple_app/CODE_OF_CONDUCT.md
|
92
|
-
- example/simple_app/Gemfile
|
93
|
-
- example/simple_app/LICENSE.txt
|
94
|
-
- example/simple_app/README.md
|
95
|
-
- example/simple_app/Rakefile
|
96
|
-
- example/simple_app/bin/console
|
97
|
-
- example/simple_app/bin/setup
|
98
|
-
- example/simple_app/etc/command_line.yml
|
99
|
-
- example/simple_app/exe/user
|
100
|
-
- example/simple_app/lib/tst_climatic.rb
|
101
|
-
- example/simple_app/lib/tst_climatic/version.rb
|
102
|
-
- example/simple_app/spec/spec_helper.rb
|
103
|
-
- example/simple_app/spec/tst_climatic_spec.rb
|
104
|
-
- example/simple_app/tst_climatic.gemspec
|
105
87
|
- lib/climatic.rb
|
106
88
|
- lib/climatic/config_layers/command_line_layer.rb
|
107
89
|
- lib/climatic/config_layers/command_line_manager_binder.rb
|
data/example/simple_app/.rspec
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.3.1
|
@@ -1,74 +0,0 @@
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
2
|
-
|
3
|
-
## Our Pledge
|
4
|
-
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
6
|
-
contributors and maintainers pledge to making participation in our project and
|
7
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
-
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
-
orientation.
|
11
|
-
|
12
|
-
## Our Standards
|
13
|
-
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
15
|
-
include:
|
16
|
-
|
17
|
-
* Using welcoming and inclusive language
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
19
|
-
* Gracefully accepting constructive criticism
|
20
|
-
* Focusing on what is best for the community
|
21
|
-
* Showing empathy towards other community members
|
22
|
-
|
23
|
-
Examples of unacceptable behavior by participants include:
|
24
|
-
|
25
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
-
advances
|
27
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
-
* Public or private harassment
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
30
|
-
address, without explicit permission
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
-
professional setting
|
33
|
-
|
34
|
-
## Our Responsibilities
|
35
|
-
|
36
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
38
|
-
response to any instances of unacceptable behavior.
|
39
|
-
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
-
threatening, offensive, or harmful.
|
45
|
-
|
46
|
-
## Scope
|
47
|
-
|
48
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
-
when an individual is representing the project or its community. Examples of
|
50
|
-
representing a project or community include using an official project e-mail
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
53
|
-
further defined and clarified by project maintainers.
|
54
|
-
|
55
|
-
## Enforcement
|
56
|
-
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported by contacting the project team at lbnetid+gh@gmail.com. All
|
59
|
-
complaints will be reviewed and investigated and will result in a response that
|
60
|
-
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
-
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
-
Further details of specific enforcement policies may be posted separately.
|
63
|
-
|
64
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
-
faith may face temporary or permanent repercussions as determined by other
|
66
|
-
members of the project's leadership.
|
67
|
-
|
68
|
-
## Attribution
|
69
|
-
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
-
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
-
|
73
|
-
[homepage]: http://contributor-covenant.org
|
74
|
-
[version]: http://contributor-covenant.org/version/1/4/
|
data/example/simple_app/Gemfile
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
source "https://gems.nanonet"
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in tst_climatic.gemspec
|
4
|
-
gemspec
|
5
|
-
gem 'climatic', path: File.expand_path(File.join('..', '..', '..'), __FILE__)
|
6
|
-
# gem 'slop_wrapper', path: File.expand_path(File.join('..', '..', 'slop_wrapper'), __FILE__)
|
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2017 Laurent B.
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
13
|
-
all copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|
@@ -1,43 +0,0 @@
|
|
1
|
-
# TstClimatic
|
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/tst_climatic`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
6
|
-
|
7
|
-
## Installation
|
8
|
-
|
9
|
-
Add this line to your application's Gemfile:
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
gem 'tst_climatic'
|
13
|
-
```
|
14
|
-
|
15
|
-
And then execute:
|
16
|
-
|
17
|
-
$ bundle
|
18
|
-
|
19
|
-
Or install it yourself as:
|
20
|
-
|
21
|
-
$ gem install tst_climatic
|
22
|
-
|
23
|
-
## Usage
|
24
|
-
|
25
|
-
TODO: Write usage instructions here
|
26
|
-
|
27
|
-
## Development
|
28
|
-
|
29
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
-
|
31
|
-
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
|
-
|
33
|
-
## Contributing
|
34
|
-
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/tst_climatic. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
|
-
|
37
|
-
## License
|
38
|
-
|
39
|
-
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
40
|
-
|
41
|
-
## Code of Conduct
|
42
|
-
|
43
|
-
Everyone interacting in the TstClimatic project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/tst_climatic/blob/master/CODE_OF_CONDUCT.md).
|
data/example/simple_app/Rakefile
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "tst_climatic"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start(__FILE__)
|
@@ -1,52 +0,0 @@
|
|
1
|
-
:options:
|
2
|
-
verbose:
|
3
|
-
:type: bool
|
4
|
-
:summary: Enables verbose mode.
|
5
|
-
:global: true
|
6
|
-
:short_aliases:
|
7
|
-
- v
|
8
|
-
help:
|
9
|
-
:type: bool
|
10
|
-
:summary: Displays this help.
|
11
|
-
:global: true
|
12
|
-
:short_aliases:
|
13
|
-
- h
|
14
|
-
version:
|
15
|
-
:type: bool
|
16
|
-
:summary: Displays program version.
|
17
|
-
:short_aliases:
|
18
|
-
- V
|
19
|
-
:long_aliases:
|
20
|
-
- program-version
|
21
|
-
debug:
|
22
|
-
:type: bool
|
23
|
-
:summary: Debug mode
|
24
|
-
:global: true
|
25
|
-
debug-on-stderr:
|
26
|
-
:type: bool
|
27
|
-
:global: true
|
28
|
-
:summary: Debugging to SDTERR
|
29
|
-
:long_aliases:
|
30
|
-
- debug-on-err
|
31
|
-
:dependencies:
|
32
|
-
- debug
|
33
|
-
log-level:
|
34
|
-
:global: true
|
35
|
-
:dependencies:
|
36
|
-
- debug
|
37
|
-
:type: integer
|
38
|
-
:summary: Defines the level of logging (0 to 5).
|
39
|
-
|
40
|
-
:banner: |
|
41
|
-
This is the banner for the root command.
|
42
|
-
Obviously it can be multiline...
|
43
|
-
|
44
|
-
:subcommands:
|
45
|
-
test:
|
46
|
-
:options:
|
47
|
-
pipo:
|
48
|
-
:type: bool
|
49
|
-
:summary: A stupid option
|
50
|
-
:banner: |
|
51
|
-
This is the banner for the subcommand "test".
|
52
|
-
And it is multiline too...
|
data/example/simple_app/exe/user
DELETED
@@ -1,57 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# coding: utf-8
|
3
|
-
# This file has been generated by easy_app_helper Gem on the <%= current_date %>
|
4
|
-
# See 'https://rubygems.org/gems/easy_app_helper'
|
5
|
-
|
6
|
-
require 'rubygems'
|
7
|
-
require 'bundler/setup'
|
8
|
-
|
9
|
-
$DO_NOT_AUTOSTART_CLIMATIC = true
|
10
|
-
require 'climatic'
|
11
|
-
# Patch as it is launched as an example
|
12
|
-
class Climatic::ConfigLayers::ExecutableGemLayer
|
13
|
-
def self.executable_gem_config_root
|
14
|
-
return File.expand_path File.join('..', '..'), __FILE__
|
15
|
-
end
|
16
|
-
end
|
17
|
-
Climatic.bootstrap
|
18
|
-
puts '-' * 80
|
19
|
-
require 'climatic/script'
|
20
|
-
|
21
|
-
#
|
22
|
-
# c = Climatic::LayersManager.new
|
23
|
-
#
|
24
|
-
# # puts c.detailed_config_files_info.to_yaml
|
25
|
-
# #
|
26
|
-
# # puts c.detailed_layers_info
|
27
|
-
#
|
28
|
-
# puts "Options: #{c[].inspect}"
|
29
|
-
#
|
30
|
-
#
|
31
|
-
# puts "Extra parameters: #{c.command_line_layer.extra_parameters.inspect}"
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
class MyScript < Climatic::Script::Simple
|
36
|
-
|
37
|
-
def check_params(command_params)
|
38
|
-
puts "Validating params: '#{command_params.inspect}'"
|
39
|
-
cmd_line_mngr = Climatic.config.command_line_layer.command_line_manager
|
40
|
-
puts "Validating command params: '#{cmd_line_mngr.cmd_line_args_for_command cmd_line_mngr.command}'"
|
41
|
-
puts "Validating config: '#{Climatic.config[].inspect}'"
|
42
|
-
true
|
43
|
-
end
|
44
|
-
|
45
|
-
def execute
|
46
|
-
puts "Config: #{Climatic.config[].inspect}"
|
47
|
-
puts "Logger: #{Climatic.logger.inspect}"
|
48
|
-
cmd = Climatic.config.command_line_layer.command_line_manager.command
|
49
|
-
puts "Running command #{cmd.name.empty? ? 'ROOT' : cmd.name}"
|
50
|
-
Climatic::Logger::Accumulator::STACK_OPS.each do |log_op|
|
51
|
-
Climatic.logger.send log_op, "Yo ! (logged using #{log_op.to_s} mode)."
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
MyScript.new.run
|
57
|
-
|
@@ -1,14 +0,0 @@
|
|
1
|
-
require "bundler/setup"
|
2
|
-
require "tst_climatic"
|
3
|
-
|
4
|
-
RSpec.configure do |config|
|
5
|
-
# Enable flags like --only-failures and --next-failure
|
6
|
-
config.example_status_persistence_file_path = ".rspec_status"
|
7
|
-
|
8
|
-
# Disable RSpec exposing methods globally on `Module` and `main`
|
9
|
-
config.disable_monkey_patching!
|
10
|
-
|
11
|
-
config.expect_with :rspec do |c|
|
12
|
-
c.syntax = :expect
|
13
|
-
end
|
14
|
-
end
|
@@ -1,39 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path("../lib", __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require "tst_climatic/version"
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "tst_climatic"
|
8
|
-
spec.version = TstClimatic::VERSION
|
9
|
-
spec.authors = ["Laurent B."]
|
10
|
-
spec.email = ["lbnetid+gh@gmail.com"]
|
11
|
-
|
12
|
-
spec.summary = %q{ Write a short summary, because Rubygems requires one.}
|
13
|
-
spec.description = %q{ Write a longer description or delete this line.}
|
14
|
-
# spec.homepage = "Put your gem's website or public repo URL here."
|
15
|
-
spec.license = "MIT"
|
16
|
-
|
17
|
-
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
|
-
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
|
-
if spec.respond_to?(:metadata)
|
20
|
-
spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
|
21
|
-
else
|
22
|
-
raise "RubyGems 2.0 or newer is required to protect against " \
|
23
|
-
"public gem pushes."
|
24
|
-
end
|
25
|
-
|
26
|
-
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
27
|
-
f.match(%r{^(test|spec|features)/})
|
28
|
-
end
|
29
|
-
spec.bindir = "exe"
|
30
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
31
|
-
spec.require_paths = ["lib"]
|
32
|
-
|
33
|
-
spec.add_development_dependency "bundler", "~> 1.15"
|
34
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
35
|
-
spec.add_development_dependency "rspec", "~> 3.0"
|
36
|
-
|
37
|
-
spec.add_dependency 'slop_wrapper'
|
38
|
-
spec.add_dependency 'climatic'
|
39
|
-
end
|