tty-config 0.3.2 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/README.md +103 -18
  4. data/lib/tty/config.rb +66 -129
  5. data/lib/tty/config/dependency_loader.rb +55 -0
  6. data/lib/tty/config/generator.rb +57 -0
  7. data/lib/tty/config/marshaller.rb +56 -0
  8. data/lib/tty/config/marshaller_registry.rb +43 -0
  9. data/lib/tty/config/marshallers.rb +35 -0
  10. data/lib/tty/config/marshallers/hcl_marshaller.rb +25 -0
  11. data/lib/tty/config/marshallers/ini_marshaller.rb +28 -0
  12. data/lib/tty/config/marshallers/java_props_marshaller.rb +25 -0
  13. data/lib/tty/config/marshallers/json_marshaller.rb +25 -0
  14. data/lib/tty/config/marshallers/toml_marshaller.rb +25 -0
  15. data/lib/tty/config/marshallers/yaml_marshaller.rb +29 -0
  16. data/lib/tty/config/version.rb +1 -1
  17. metadata +54 -32
  18. data/Rakefile +0 -8
  19. data/bin/console +0 -14
  20. data/bin/setup +0 -8
  21. data/spec/spec_helper.rb +0 -54
  22. data/spec/unit/alias_setting_spec.rb +0 -72
  23. data/spec/unit/append_spec.rb +0 -26
  24. data/spec/unit/autoload_env_spec.rb +0 -62
  25. data/spec/unit/delete_spec.rb +0 -22
  26. data/spec/unit/exist_spec.rb +0 -24
  27. data/spec/unit/fetch_spec.rb +0 -45
  28. data/spec/unit/generate_spec.rb +0 -70
  29. data/spec/unit/merge_spec.rb +0 -22
  30. data/spec/unit/new_spec.rb +0 -6
  31. data/spec/unit/normalize_hash_spec.rb +0 -21
  32. data/spec/unit/read_spec.rb +0 -118
  33. data/spec/unit/remove_spec.rb +0 -16
  34. data/spec/unit/set_from_env_spec.rb +0 -78
  35. data/spec/unit/set_if_empty_spec.rb +0 -26
  36. data/spec/unit/set_spec.rb +0 -62
  37. data/spec/unit/validate_spec.rb +0 -76
  38. data/spec/unit/write_spec.rb +0 -197
  39. data/tasks/console.rake +0 -11
  40. data/tasks/coverage.rake +0 -11
  41. data/tasks/spec.rake +0 -29
  42. data/tty-config.gemspec +0 -28
@@ -1,11 +0,0 @@
1
- # encoding: utf-8
2
-
3
- desc 'Load gem inside irb console'
4
- task :console do
5
- require 'irb'
6
- require 'irb/completion'
7
- require File.join(__FILE__, '../../lib/tty-config')
8
- ARGV.clear
9
- IRB.start
10
- end
11
- task c: %w[ console ]
@@ -1,11 +0,0 @@
1
- # encoding: utf-8
2
-
3
- desc 'Measure code coverage'
4
- task :coverage do
5
- begin
6
- original, ENV['COVERAGE'] = ENV['COVERAGE'], 'true'
7
- Rake::Task['spec'].invoke
8
- ensure
9
- ENV['COVERAGE'] = original
10
- end
11
- end
@@ -1,29 +0,0 @@
1
- # encoding: utf-8
2
-
3
- begin
4
- require 'rspec/core/rake_task'
5
-
6
- desc 'Run all specs'
7
- RSpec::Core::RakeTask.new(:spec) do |task|
8
- task.pattern = 'spec/{unit,integration}{,/*/**}/*_spec.rb'
9
- end
10
-
11
- namespace :spec do
12
- desc 'Run unit specs'
13
- RSpec::Core::RakeTask.new(:unit) do |task|
14
- task.pattern = 'spec/unit{,/*/**}/*_spec.rb'
15
- end
16
-
17
- desc 'Run integration specs'
18
- RSpec::Core::RakeTask.new(:integration) do |task|
19
- task.pattern = 'spec/integration{,/*/**}/*_spec.rb'
20
- end
21
- end
22
-
23
- rescue LoadError
24
- %w[spec spec:unit spec:integration].each do |name|
25
- task name do
26
- $stderr.puts "In order to run #{name}, do `gem install rspec`"
27
- end
28
- end
29
- end
@@ -1,28 +0,0 @@
1
- lib = File.expand_path("../lib", __FILE__)
2
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require "tty/config/version"
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = "tty-config"
7
- spec.version = TTY::Config::VERSION
8
- spec.authors = ["Piotr Murach"]
9
- spec.email = ["me@piotrmurach.com"]
10
- spec.summary = %q{Define, read and write any Ruby app configurations with a penchant for terminal clients.}
11
- spec.description = %q{Define, read and write any Ruby app configurations with a penchant for terminal clients.}
12
- spec.homepage = "https://piotrmurach.github.io/tty"
13
- spec.license = "MIT"
14
- spec.files = Dir['{lib,spec}/**/*.rb']
15
- spec.files += Dir['{bin,tasks}/*', 'tty-config.gemspec']
16
- spec.files += Dir['README.md', 'CHANGELOG.md', 'LICENSE.txt', 'Rakefile']
17
- spec.bindir = "exe"
18
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
- spec.require_paths = ["lib"]
20
-
21
- spec.required_ruby_version = '>= 2.0.0'
22
-
23
- spec.add_development_dependency "bundler", ">= 1.5"
24
- spec.add_development_dependency "rake"
25
- spec.add_development_dependency "rspec", "~> 3.0"
26
- spec.add_development_dependency "toml", "~> 0.2.0"
27
- spec.add_development_dependency "inifile", "~> 3.0.0"
28
- end