bookbindery 3.1.0 → 3.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/install_bin/bookbinder +1 -1
  3. data/lib/bookbinder/cf_command_runner.rb +1 -1
  4. data/lib/bookbinder/cli.rb +5 -5
  5. data/lib/bookbinder/code_example_reader.rb +57 -19
  6. data/lib/bookbinder/colorizer.rb +5 -2
  7. data/lib/bookbinder/commands/bind.rb +32 -42
  8. data/lib/bookbinder/commands/bind/bind_options.rb +6 -4
  9. data/lib/bookbinder/commands/bind/directory_preparer.rb +8 -13
  10. data/lib/bookbinder/{repositories/command_repository.rb → commands/collection.rb} +19 -37
  11. data/lib/bookbinder/config/archive_menu_configuration.rb +38 -0
  12. data/lib/bookbinder/config/checkers/archive_menu_checker.rb +35 -0
  13. data/lib/bookbinder/config/checkers/dita_section_checker.rb +24 -0
  14. data/lib/bookbinder/config/checkers/duplicate_section_name_checker.rb +29 -0
  15. data/lib/bookbinder/config/checkers/repository_name_presence_checker.rb +37 -0
  16. data/lib/bookbinder/config/checkers/required_keys_checker.rb +47 -0
  17. data/lib/bookbinder/config/configuration.rb +99 -0
  18. data/lib/bookbinder/config/fetcher.rb +61 -0
  19. data/lib/bookbinder/config/remote_yaml_credential_provider.rb +22 -0
  20. data/lib/bookbinder/config/validator.rb +30 -0
  21. data/lib/bookbinder/config/yaml_loader.rb +34 -0
  22. data/lib/bookbinder/ingest/git_cloner.rb +0 -1
  23. data/lib/bookbinder/ingest/local_filesystem_cloner.rb +22 -17
  24. data/lib/bookbinder/ingest/missing_working_copy.rb +21 -0
  25. data/lib/bookbinder/{repositories → ingest}/section_repository.rb +3 -4
  26. data/lib/bookbinder/{repositories → ingest}/section_repository_factory.rb +1 -1
  27. data/lib/bookbinder/ingest/working_copy.rb +12 -16
  28. data/lib/bookbinder/preprocessing/copy_to_site_gen_dir.rb +2 -3
  29. data/lib/bookbinder/preprocessing/dita_preprocessor.rb +5 -5
  30. data/lib/bookbinder/preprocessing/preprocessor.rb +1 -1
  31. data/lib/bookbinder/sheller.rb +3 -0
  32. data/lib/bookbinder/streams/colorized_stream.rb +1 -1
  33. data/lib/bookbinder/values/cf_routes.rb +17 -6
  34. data/lib/bookbinder/values/output_locations.rb +1 -12
  35. data/lib/bookbinder/values/section.rb +2 -7
  36. data/master_middleman/bookbinder_helpers.rb +23 -18
  37. data/master_middleman/quicklinks_renderer.rb +1 -0
  38. data/template_app/lib/rack_static.rb +2 -0
  39. data/template_app/lib/vienna_application.rb +2 -0
  40. metadata +51 -52
  41. data/lib/bookbinder.rb +0 -44
  42. data/lib/bookbinder/archive_menu_configuration.rb +0 -34
  43. data/lib/bookbinder/configuration.rb +0 -97
  44. data/lib/bookbinder/configuration_fetcher.rb +0 -59
  45. data/lib/bookbinder/configuration_validator.rb +0 -28
  46. data/lib/bookbinder/remote_yaml_credential_provider.rb +0 -20
  47. data/lib/bookbinder/shell_out.rb +0 -20
  48. data/lib/bookbinder/validation_checkers/archive_menu_checker.rb +0 -31
  49. data/lib/bookbinder/validation_checkers/dita_section_checker.rb +0 -20
  50. data/lib/bookbinder/validation_checkers/duplicate_section_name_checker.rb +0 -25
  51. data/lib/bookbinder/validation_checkers/repository_name_presence_checker.rb +0 -33
  52. data/lib/bookbinder/validation_checkers/required_keys_checker.rb +0 -43
  53. data/lib/bookbinder/yaml_loader.rb +0 -33
@@ -1,33 +0,0 @@
1
- require 'yaml'
2
-
3
- module Bookbinder
4
- FileNotFoundError = Class.new(RuntimeError)
5
- InvalidSyntaxError = Class.new(RuntimeError)
6
-
7
- class YAMLLoader
8
- def load(path)
9
- if File.exist?(path)
10
- config(path)
11
- else
12
- raise FileNotFoundError.new, "YAML"
13
- end
14
- rescue Psych::SyntaxError => e
15
- raise InvalidSyntaxError.new e
16
- end
17
-
18
- def load_key(path, key)
19
- if File.exist?(path)
20
- config(path)[key]
21
- end
22
- rescue Psych::SyntaxError => e
23
- raise InvalidSyntaxError.new e
24
- end
25
-
26
- private
27
-
28
- def config(path)
29
- YAML.load_file(path) || {}
30
- end
31
- end
32
- end
33
-