Skip to content
Permalink
Browse files

Merge pull request #991 from mbj/change/to-mprelude

Change to mprelude
  • Loading branch information
mbj committed Jan 4, 2020
2 parents 79e4b35 + 3ea0951 commit bb023ca3c542955e8ff0d3684972d6f65af3fcb9
@@ -1,3 +1,7 @@
# v0.9.4 2020-01-03

* Bump unparser dependency

# v0.9.3 2020-01-03

* Change to soft dependency on mutant-license.
@@ -37,7 +37,7 @@ GIT
PATH
remote: .
specs:
mutant (0.9.3)
mutant (0.9.4)
abstract_type (~> 0.0.7)
adamantium (~> 0.2.0)
anima (~> 0.3.1)
@@ -47,9 +47,10 @@ PATH
equalizer (~> 0.0.9)
ice_nine (~> 0.11.1)
memoizable (~> 0.4.2)
mprelude (~> 0.1.0)
parser (~> 2.6.5)
procto (~> 0.0.2)
unparser (~> 0.4.5)
unparser (~> 0.4.6)

GEM
remote: https://rubygems.org/
@@ -96,6 +97,13 @@ GEM
kwalify (0.7.2)
memoizable (0.4.2)
thread_safe (~> 0.3, >= 0.3.1)
mprelude (0.1.0)
abstract_type (~> 0.0.7)
adamantium (~> 0.2.0)
concord (~> 0.1.5)
equalizer (~> 0.0.9)
ice_nine (~> 0.11.1)
procto (~> 0.0.2)
mutant-license (0.1.0)
parallel (1.19.1)
parser (2.6.5.0)
@@ -10,6 +10,7 @@
require 'equalizer'
require 'etc'
require 'ice_nine'
require 'mprelude'
require 'json'
require 'open3'
require 'optparse'
@@ -30,13 +31,14 @@
#
# @api private
module Mutant
Either = MPrelude::Either

EMPTY_STRING = ''
EMPTY_ARRAY = [].freeze
EMPTY_HASH = {}.freeze
SCOPE_OPERATOR = '::'
end # Mutant

require 'mutant/base'
require 'mutant/bootstrap'
require 'mutant/version'
require 'mutant/env'

This file was deleted.

@@ -36,10 +36,10 @@ class CLI
def self.run(world, default_config, arguments)
License
.apply(world)
.apply { Config.load_config_file(world, default_config) }
.apply { |file_config| apply(world, file_config, arguments) }
.apply { |cli_config| Bootstrap.apply(world, cli_config) }
.apply(&Runner.method(:apply))
.bind { Config.load_config_file(world, default_config) }
.bind { |file_config| apply(world, file_config, arguments) }
.bind { |cli_config| Bootstrap.apply(world, cli_config) }
.bind(&Runner.method(:apply))
.from_right { |error| world.stderr.puts(error); return false }
.success?
end
@@ -28,7 +28,7 @@ class Integration
# @return [Either<String, Integration>]
def self.setup(env)
attempt_require(env)
.apply { attempt_const_get(env) }
.bind { attempt_const_get(env) }
.fmap { |klass| klass.new(env.config).setup }
end

@@ -23,7 +23,7 @@ def self.license_result(world)
load_mutant_license(world)
.fmap { license_path(world) }
.fmap { |path| Subscription.from_json(world.json.load(path)) }
.apply { |sub| sub.apply(world) }
.bind { |sub| sub.apply(world) }
end
private_class_method :license_result

@@ -53,7 +53,7 @@ def apply(world)
world
.capture_stdout(%w[git remote --verbose])
.fmap(&method(:parse_remotes))
.apply(&method(:check_subscription))
.bind(&method(:check_subscription))
end

private
@@ -263,7 +263,7 @@ def apply(input)
PRIMITIVE
.apply(input)
.lmap(&method(:lift_error))
.apply(&method(:run))
.bind(&method(:run))
end

private
@@ -351,8 +351,8 @@ def apply(input)
PRIMITIVE
.apply(input)
.lmap(&method(:lift_error))
.apply(&method(:reject_keys))
.apply(&method(:transform))
.bind(&method(:reject_keys))
.bind(&method(:transform))
end

private
@@ -363,7 +363,7 @@ def apply(input)
#
# @return [Either<Error, Hash>]
def transform(input)
transform_required(input).apply do |required|
transform_required(input).bind do |required|
transform_optional(input).fmap(&required.method(:merge))
end
end
@@ -503,7 +503,8 @@ class Exception < self
#
# @return [Either<Error, Object>]
def apply(input)
Either.wrap_error(error_class) { block.call(input) }
Either
.wrap_error(error_class) { block.call(input) }
.lmap { |exception| error(input: input, message: exception.to_s) }
end
end # Exception
@@ -2,5 +2,5 @@

module Mutant
# Current mutant version
VERSION = '0.9.3'
VERSION = '0.9.4'
end # Mutant
@@ -21,18 +21,19 @@ Gem::Specification.new do |gem|
gem.extra_rdoc_files = %w[LICENSE]
gem.executables = %w[mutant]

gem.add_runtime_dependency('abstract_type', '~> 0.0.7')
gem.add_runtime_dependency('adamantium', '~> 0.2.0')
gem.add_runtime_dependency('anima', '~> 0.3.1')
gem.add_runtime_dependency('ast', '~> 2.2')
gem.add_runtime_dependency('concord', '~> 0.1.5')
gem.add_runtime_dependency('diff-lcs', '~> 1.3')
gem.add_runtime_dependency('equalizer', '~> 0.0.9')
gem.add_runtime_dependency('ice_nine', '~> 0.11.1')
gem.add_runtime_dependency('memoizable', '~> 0.4.2')
gem.add_runtime_dependency('parser', '~> 2.6.5')
gem.add_runtime_dependency('procto', '~> 0.0.2')
gem.add_runtime_dependency('unparser', '~> 0.4.5')
gem.add_runtime_dependency('abstract_type', '~> 0.0.7')
gem.add_runtime_dependency('adamantium', '~> 0.2.0')
gem.add_runtime_dependency('anima', '~> 0.3.1')
gem.add_runtime_dependency('ast', '~> 2.2')
gem.add_runtime_dependency('concord', '~> 0.1.5')
gem.add_runtime_dependency('diff-lcs', '~> 1.3')
gem.add_runtime_dependency('equalizer', '~> 0.0.9')
gem.add_runtime_dependency('ice_nine', '~> 0.11.1')
gem.add_runtime_dependency('memoizable', '~> 0.4.2')
gem.add_runtime_dependency('mprelude', '~> 0.1.0')
gem.add_runtime_dependency('parser', '~> 2.6.5')
gem.add_runtime_dependency('procto', '~> 0.0.2')
gem.add_runtime_dependency('unparser', '~> 0.4.6')

gem.add_development_dependency('devtools', '~> 0.1.23')
gem.add_development_dependency('parallel', '~> 1.3')

0 comments on commit bb023ca

Please sign in to comment.
You can’t perform that action at this time.