json-spec 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +13 -0
- data/Gemfile +3 -0
- data/README.md +27 -26
- data/cachivache/.gitignore +1 -1
- data/cachivache/README.md +176 -96
- data/cachivache/Rakefile +18 -9
- data/cachivache/Vagrantfile +3 -3
- data/cachivache/cachivache.rb +4 -6
- data/cachivache/lib/rake-helper.rb +27 -105
- data/cachivache/lib/shell-contexts/shell-context.rb +63 -0
- data/cachivache/lib/shell-contexts/shell-exec.rb +19 -0
- data/cachivache/lib/shell-contexts/shell_buffer.rb +25 -0
- data/cachivache/lib/shell-contexts/shell_debugger.rb +11 -0
- data/cachivache/lib/{sh-file-context.rb → shell-file-context.rb} +13 -16
- data/cachivache/lib/shell-if-context.rb +21 -0
- data/cachivache/lib/stuff-api-behaviour.rb +145 -0
- data/cachivache/lib/stuff-configuration.rb +55 -0
- data/cachivache/lib/stuff-reminders-behaviour.rb +11 -0
- data/cachivache/stuff/ruby-json-spec.rb +10 -14
- data/json-spec.gemspec +4 -2
- data/lib/cabeza-de-termo/json-spec/expectations-library/default-expectations/default-expectations-mapping.rb +1 -1
- data/lib/cabeza-de-termo/json-spec/expectations-library/definition-builders/expectation-builders/expectations-definition-builder.rb +2 -2
- data/lib/cabeza-de-termo/json-spec/expectations-library/definition-builders/expectation-library-definition-builder.rb +1 -1
- data/lib/cabeza-de-termo/json-spec/expectations-library/definition-builders/modifier-builders/modifiers-definition-builder.rb +1 -1
- data/lib/cabeza-de-termo/json-spec/expectations-library/expectations-library.rb +1 -1
- data/lib/cabeza-de-termo/json-spec/expressions/json-any-of.rb +1 -1
- data/lib/cabeza-de-termo/json-spec/expressions/json-each-field.rb +1 -1
- data/lib/cabeza-de-termo/json-spec/expressions/json-each.rb +1 -1
- data/lib/cabeza-de-termo/json-spec/expressions/json-expression.rb +2 -2
- data/lib/cabeza-de-termo/json-spec/expressions/json-field.rb +1 -1
- data/lib/cabeza-de-termo/json-spec/expressions/json-list.rb +1 -1
- data/lib/cabeza-de-termo/json-spec/expressions/json-object.rb +1 -1
- data/lib/cabeza-de-termo/json-spec/expressions/json-spec.rb +4 -4
- data/lib/cabeza-de-termo/json-spec/version.rb +1 -1
- metadata +27 -21
- data/cachivache/lib/let-behaviour.rb +0 -27
- data/cachivache/lib/sh-if-context.rb +0 -31
- data/lib/cabeza-de-termo/json-spec/utilities/bind.rb +0 -20
@@ -1,20 +0,0 @@
|
|
1
|
-
module CabezaDeTermo
|
2
|
-
module JsonSpec
|
3
|
-
#
|
4
|
-
# Utility class to evaluate blocks binding :self to an object, but only if the block
|
5
|
-
# does not take parameters.
|
6
|
-
# If the block takes one parameter, call the block with that parameter keeping the binding
|
7
|
-
# as it is.
|
8
|
-
#
|
9
|
-
# Example:
|
10
|
-
# Bind.evaluation(of: proc { puts self }, to: 'hello!') # binds self to 'hello!'
|
11
|
-
#
|
12
|
-
# Bind.evaluation(of: proc { |string| puts string }, to: 'hello!') # no bindings
|
13
|
-
#
|
14
|
-
class Bind
|
15
|
-
def self.evaluation(of: nil, to: nil)
|
16
|
-
of.arity == 0 ? to.instance_eval(&of) : of.call(to)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|