Skip to content

Commit

Permalink
Remove mutant-license gem mechanism
Browse files Browse the repository at this point in the history
  • Loading branch information
mbj committed Apr 8, 2024
1 parent 9d85799 commit 4d5710a
Show file tree
Hide file tree
Showing 25 changed files with 263 additions and 1,573 deletions.
10 changes: 10 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# v0.12.0 [unreleased]

Drop the license gem, entirely. This removes the last bit of DRM from mutants code base.
Mutant is *still* comercial software that requires payment if used on a commercial code base!

Migration:

* Commercial users: Add `usage: commercial` to your config file (or `--usage commercail` to your CLI)
* Opensource users: Add `usage: opensource` to your config file (or `--usage commercail` to your CLI)

# v0.11.34 2024-03-26

* [#1432](https://github.com/mbj/mutant/pull/1432)
Expand Down
8 changes: 1 addition & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
PATH
remote: .
specs:
mutant (0.11.34)
mutant (0.12.0)
diff-lcs (~> 1.3)
parser (~> 3.3.0)
regexp_parser (~> 2.9.0)
sorbet-runtime (~> 0.5.0)
unparser (~> 0.6.9)

GEM
remote: https://oss:Px2ENN7S91OmWaD5G7MIQJi1dmtmYrEh@gem.mutant.dev/
specs:
mutant-license (0.1.1.2.2355046999240944981729280251890364410689.5)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -69,7 +64,6 @@ PLATFORMS

DEPENDENCIES
mutant!
mutant-license!
rspec (~> 3.10)
rspec-core (~> 3.10)
rspec-its (~> 1.3.0)
Expand Down
6 changes: 0 additions & 6 deletions Gemfile.shared
Original file line number Diff line number Diff line change
@@ -1,6 +0,0 @@
# Mutant itself uses an opensource license key.
# Scoped to https://github.com/mbj/mutant it'll
# not be useful elsewhere.
source 'https://oss:Px2ENN7S91OmWaD5G7MIQJi1dmtmYrEh@gem.mutant.dev' do
gem 'mutant-license'
end
48 changes: 3 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,50 +77,9 @@ Labels:

## Licensing

Mutant is commercial software, with a free usage plan for opensource projects.
Mutant is commercial software, with a free usage option for opensource projects.

Commercial projects have to acquire a license per developer, with unlimited repositories
per developer. CI usage for licensed developers is included.

Opensource projects have to acquire their free license per repository. That license will
work for any contributor implicitly. Typically the project maintainer gets the license.

The license distribution happens through the `mutant-license` gem. Mutant installs without
that dependency, but will not be very cooperative unless `mutant-license` is also available.

The license gem is dynamically generated per licensee and comes with a unique license gem source
URL.

After signup for a license the following has to be added to your `Gemfile` replacing `${key}`
with the license key and `${plan}` with `com` for commercial or `oss` for opensource usage.

```ruby
source 'https://${plan}:${key}@gem.mutant.dev' do
gem 'mutant-license'
end
```

The mutant license gem contains metadata that allows mutant to verify licensed use.

For commercial licenses mutant checks the git commit author or the configured git email
to be in the set of licensed developers.

For opensource licenses mutant checks the git remotes against the licensed git repositories.
This allows the project maintainer to sign up and not bother collaborators with the details.

There are, apart from initial license gem installation, no remote interaction for
license validation.

### Getting an Opensource license

As stated above: Opensource projects of any kind are free to use mutant.

Just mail [me](mailto:mbj@schirp-dso.com?subject=Mutant%20Opensource%20License): Please
include:

* Just the git remote URL of your repository. Repository can be anywhere, must not be on Github, just has to be public.

I do not need any more details.
Commercial projects have to pay a subscription fee.

### Pricing

Expand All @@ -137,7 +96,7 @@ For commercial use mutants pricing is subscription based.

Costs are **per developer using mutant on any number of repositories**.

Volume licenses with custom plans are available on request.
Volume subscriptions with custom plans are available on request.

Should you want to procure a commercial mutant subscription please [mail me](mailto:mbj@schirp-dso.com?subject=Mutant%20Commercial%20License).

Expand All @@ -148,7 +107,6 @@ Please include the following information:
* Only for the EU: A valid VAT-ID is *required*, no sales to private customers to avoid the
horrors cross border VAT / MOSS.
VAT for customers outside of Malta will use **reverse charging**.
* *Per developer* the git author email address as returned by `git config user.email`

Also feel free to ask any other question I forgot to proactively answer here.

Expand Down
6 changes: 0 additions & 6 deletions lib/mutant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ module Mutant
require 'mutant/config/coverage_criteria'
require 'mutant/cli'
require 'mutant/cli/command'
require 'mutant/cli/command/subscription'
require 'mutant/cli/command/environment'
require 'mutant/cli/command/environment/irb'
require 'mutant/cli/command/environment/run'
Expand Down Expand Up @@ -255,11 +254,6 @@ module Mutant
require 'mutant/repository/diff/ranges'
require 'mutant/zombifier'
require 'mutant/range'
require 'mutant/license'
require 'mutant/license/subscription'
require 'mutant/license/subscription/commercial'
require 'mutant/license/subscription/opensource'
require 'mutant/license/subscription/repository'
require 'mutant/segment'
require 'mutant/segment/recorder'
end
Expand Down
8 changes: 0 additions & 8 deletions lib/mutant/cli/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,6 @@ def parse_remaining(remaining)
end
end

def parse_remaining_arguments(remaining)
if remaining.any?
Either::Left.new("#{full_name}: Does not expect extra arguments")
else
Either::Right.new(self)
end
end

def parse_subcommand(arguments)
command_name, *arguments = arguments

Expand Down
3 changes: 1 addition & 2 deletions lib/mutant/cli/command/environment/run.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ class Run < self
private

def action
License.call(world)
.bind { bootstrap }
bootstrap
.bind(&method(:validate_tests))
.bind(&Mutation::Runner.public_method(:call))
.bind(&method(:from_result))
Expand Down
2 changes: 1 addition & 1 deletion lib/mutant/cli/command/root.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Environment < self
class Root < self
NAME = 'mutant'
SHORT_DESCRIPTION = 'mutation testing engine main command'
SUBCOMMANDS = [Environment::Run, Environment, Subscription, Util].freeze
SUBCOMMANDS = [Environment::Run, Environment, Util].freeze
end # Root
end # Command
end # CLI
Expand Down
54 changes: 0 additions & 54 deletions lib/mutant/cli/command/subscription.rb

This file was deleted.

46 changes: 0 additions & 46 deletions lib/mutant/license.rb

This file was deleted.

69 changes: 0 additions & 69 deletions lib/mutant/license/subscription.rb

This file was deleted.

Loading

0 comments on commit 4d5710a

Please sign in to comment.