Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
seuros committed Jun 28, 2020
1 parent b70597b commit ec1046c
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ test/tmp
test/version_tmp
tmp
/**/*.log
.rubocop-*yml
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ An operation can be used exaclty like an activity, including nesting, tracing, e

## Copyright

Copyright (c) 2016 Nick Sutterer <[email protected]>
Copyright (c) 2016-2020 Nick Sutterer <[email protected]>

`trailblazer-operation` is released under the [MIT License](http://www.opensource.org/licenses/MIT).
4 changes: 3 additions & 1 deletion lib/trailblazer/operation.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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.

Expand Down
2 changes: 0 additions & 2 deletions lib/trailblazer/operation/result.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require 'forwardable'

class Trailblazer::Operation
class Result
# @param success Boolean validity of the result object
Expand Down
2 changes: 1 addition & 1 deletion lib/trailblazer/operation/trace.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def initialize(result, stack)
end

def wtf
Trailblazer::Developer::Trace::Present.(@stack)
Developer::Trace::Present.(@stack)
end

def wtf?
Expand Down
6 changes: 2 additions & 4 deletions lib/trailblazer/operation/version.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
module Trailblazer
module Version
module Operation
VERSION = "0.6.2"
end
class Operation
VERSION = "0.6.3"
end
end
5 changes: 3 additions & 2 deletions test/step_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 %{#<Trailblazer::Activity::DSL::Linear::Sequence::IndexError: "I don't exist!">}
end
assert_match /<Trailblazer::Activity::DSL::Linear::Sequence::IndexError: "I don't exist!" is not a valid step ID. Did you mean any of these ?/, op.inspect
end

#---
Expand Down
4 changes: 2 additions & 2 deletions trailblazer-operation.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require 'trailblazer/operation/version'

Gem::Specification.new do |spec|
spec.name = "trailblazer-operation"
spec.version = Trailblazer::Version::Operation::VERSION
spec.version = Trailblazer::Operation::VERSION
spec.authors = ["Nick Sutterer"]
spec.email = ["[email protected]"]
spec.description = %q(Trailblazer's operation object.)
Expand All @@ -14,7 +14,7 @@ Gem::Specification.new do |spec|

spec.files = `git ls-files`.split($/)
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.test_files = spec.files.grep(%r{^(test)/})
spec.require_paths = ["lib"]

spec.add_dependency "trailblazer-activity-dsl-linear", ">= 0.2.6", "< 1.0.0"
Expand Down

0 comments on commit ec1046c

Please sign in to comment.