diff --git a/.gitignore b/.gitignore index 483f81a..cbb29a0 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ test/tmp test/version_tmp tmp /**/*.log +.rubocop-*yml diff --git a/CHANGES.md b/CHANGES.md index a8bbd08..fc4aedc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,7 @@ +## 0.6.3 + +* Require forwardable module from standard lib. + ## 0.6.2 * Fix Trace so it works with Ruby <= 2.4 diff --git a/README.md b/README.md index 802f405..5f084e1 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,6 @@ An operation can be used exaclty like an activity, including nesting, tracing, e ## Copyright -Copyright (c) 2016 Nick Sutterer +Copyright (c) 2016-2020 Nick Sutterer `trailblazer-operation` is released under the [MIT License](http://www.opensource.org/licenses/MIT). diff --git a/lib/trailblazer/operation.rb b/lib/trailblazer/operation.rb index 2b05130..5b8b002 100644 --- a/lib/trailblazer/operation.rb +++ b/lib/trailblazer/operation.rb @@ -1,10 +1,10 @@ +require 'forwardable' require "trailblazer/option" require "trailblazer/context" require "trailblazer/container_chain" require "trailblazer/activity/dsl/linear" - module Trailblazer # DISCUSS: I don't know where else to put this. It's not part of the {Activity} concept class Activity @@ -61,6 +61,8 @@ def self.pass_fast!; Activity::FastTrack::PassFast end end end +require 'trailblazer/operation/version' + require "trailblazer/operation/class_dependencies" require "trailblazer/operation/deprecated_macro" # TODO: remove in 2.2. diff --git a/lib/trailblazer/operation/result.rb b/lib/trailblazer/operation/result.rb index a04a490..6663b30 100644 --- a/lib/trailblazer/operation/result.rb +++ b/lib/trailblazer/operation/result.rb @@ -1,5 +1,3 @@ -require 'forwardable' - class Trailblazer::Operation class Result # @param success Boolean validity of the result object diff --git a/lib/trailblazer/operation/trace.rb b/lib/trailblazer/operation/trace.rb index f8a8cc8..887396f 100644 --- a/lib/trailblazer/operation/trace.rb +++ b/lib/trailblazer/operation/trace.rb @@ -33,7 +33,7 @@ def initialize(result, stack) end def wtf - Trailblazer::Developer::Trace::Present.(@stack) + Developer::Trace::Present.(@stack) end def wtf? diff --git a/lib/trailblazer/operation/version.rb b/lib/trailblazer/operation/version.rb index 3952cb9..7061ba5 100644 --- a/lib/trailblazer/operation/version.rb +++ b/lib/trailblazer/operation/version.rb @@ -1,7 +1,5 @@ module Trailblazer - module Version - module Operation - VERSION = "0.6.2" - end + class Operation + VERSION = "0.6.3" end end diff --git a/test/step_test.rb b/test/step_test.rb index 843019e..2d0df78 100644 --- a/test/step_test.rb +++ b/test/step_test.rb @@ -173,11 +173,12 @@ class Ii < I #- # not existent :name it do - assert_raises Trailblazer::Activity::DSL::Linear::Sequence::IndexError do + op = assert_raises Trailblazer::Activity::DSL::Linear::Sequence::IndexError do Class.new(Trailblazer::Operation) do step :a, before: "I don't exist!" end - end.inspect.must_equal %{#} + end + assert_match /= 0.2.6", "< 1.0.0"