Skip to content

Commit

Permalink
[enhancements] documentation updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Rustam Ibragimov committed Jun 6, 2018
1 parent f870658 commit b4dd1be
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,7 @@ config.settings['RUN_CI'] # => '1'
- `.configuration` - settings definitions;
- `.configure` - configuration;
- `.config` - config object;
- settings definitions can be inherited;
- instance-level:
- `#configure` - configuration;
- `#config` - config object;
Expand Down
2 changes: 2 additions & 0 deletions lib/qonfig/commands/compose.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class Compose < Base

# @param data_set_klass [Qonfig::DataSet]
#
# @raise [Qonfig::ArgumentError]
#
# @api private
# @since 0.1.0
def initialize(data_set_klass)
Expand Down
8 changes: 4 additions & 4 deletions spec/features/composition_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -173,21 +173,21 @@ class ProjectConfig < Qonfig::DataSet
AppropriateConfig = Class.new(Qonfig::DataSet)

expect do
# (incorrect) on the root
# (with incompatible config class) on the root
Class.new(Qonfig::DataSet) do
compose InappropriateConfig
end
end.to raise_error(Qonfig::ArgumentError)

expect do
# (correct) on the root
# (with compatible config class) on the root
Class.new(Qonfig::DataSet) do
compose AppropriateConfig
end
end.not_to raise_error

expect do
# (incorrect) nested
# (with incompatible config class) nested
Class.new(Qonfig::DataSet) do
setting :nested do
compose InappropriateConfig
Expand All @@ -196,7 +196,7 @@ class ProjectConfig < Qonfig::DataSet
end.to raise_error(Qonfig::ArgumentError)

expect do
# (correct) nested
# (with compatible config class) nested
Class.new(Qonfig::DataSet) do
setting :nested do
compose AppropriateConfig
Expand Down

0 comments on commit b4dd1be

Please sign in to comment.