36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
# File 'lib/lapis_lazuli/cli.rb', line 36
def config
STDOUT.write "LapisLazuli searches for configuration files in the `config' subdirectory of\nthe current working directory, taking the stated test environment into\nconsideration.\n\nExample:\n ENV['TEST_ENV'] = 'production'\n load_config(\"config/config.yml\")\n\nWill try to load the following files, in order:\n - config/config-production.yml\n - config/config-debug.yml\n - config/config-test.yml\n - config/config-local.yml\n - config/config.yml\n\nThe first configuration file in the list that is found will be loaded, and its\ncontents become available via the configuraiton functions.\n\nSupported configuration formats and file name extensions are:\n .yml - YAML file\n .json - JSON file\n\nIn addition to environment-specific configuration files, LapisLazuli supports\nthe concept of test environments within a single file, where environments are\njust top-level keys, e.g.:\n\n production:\n- config for the production environment\n\n development:\n- config for the development environment\n\nThe configuration files can contain any configuration options, but a few are\ninterpreted by LapisLazuli. Note that instead of specifying these supported\noptions in the configuraiton file, you may also provide them in the environment\n(convert option name to upper case). Environment variables override the\nconfiguration file contents.\n\n"
STDOUT.flush
LapisLazuli::CONFIG_OPTIONS.each do |option, value|
printf "%22s\n", option
display_default = value[0]
if display_default.nil?
display_default = "No default."
else
display_default = "Defaults to '#{display_default}'."
end
printf " #{display_default}\n"
printf " #{value[1]}\n\n"
end
end
|