Skip to content

Commit

Permalink
extracted context-filters to separate gem
Browse files Browse the repository at this point in the history
  • Loading branch information
mpapis committed Oct 16, 2014
1 parent e8d46a8 commit 842e932
Show file tree
Hide file tree
Showing 14 changed files with 5 additions and 628 deletions.
11 changes: 0 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,8 @@

Build command text based on multiple filters

## Content

This gem contains two helper classes that are not connected but fully
compatible, you can use them together to allow building advanced
commands using filters (like server / server group).

## Command

`CommandDesigner::Command` is a simple implementation with string value -
the `command_name` and a callback function allowing to change it.

## Filters

`CommandDesigner::Filters` allows storing and applying filters,
the filters can be anything, most convienient an object instance or
hash of options.
2 changes: 2 additions & 0 deletions command-designer.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ Gem::Specification.new do |spec|

spec.required_ruby_version = ">=1.9.3"

spec.add_dependency("context-filters", "~>0.8")

spec.add_development_dependency("guard", "~>2.6")
spec.add_development_dependency("guard-minitest", "~>2.3")
spec.add_development_dependency("guard-yard", "~>2.1")
Expand Down
23 changes: 0 additions & 23 deletions lib/command-designer/context.rb

This file was deleted.

6 changes: 3 additions & 3 deletions lib/command-designer/dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
=end

require "command-designer/command"
require "command-designer/context"
require "context-filters"

# Add support for +command+ in +Context+
class CommandDesigner::Dsl < CommandDesigner::Context
# Add support for +command+ in +Context+ using +Filters+
class CommandDesigner::Dsl < ContextFilters::Context

# evaluates the given command_name in current context (applies matching filters)
# @param command_name [String] the command name to evaluate
Expand Down
68 changes: 0 additions & 68 deletions lib/command-designer/filters.rb

This file was deleted.

77 changes: 0 additions & 77 deletions lib/command-designer/global_context.rb

This file was deleted.

39 changes: 0 additions & 39 deletions lib/command-designer/local_context.rb

This file was deleted.

52 changes: 0 additions & 52 deletions lib/command-designer/priority_filters.rb

This file was deleted.

62 changes: 0 additions & 62 deletions test/command-designer/context_test.rb

This file was deleted.

15 changes: 0 additions & 15 deletions test/command-designer/filter_test_subject.rb

This file was deleted.

Loading

0 comments on commit 842e932

Please sign in to comment.