This repository has been archived by the owner on Apr 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove the notion of a project type.
Rather than a "type" of a project, plugins start to emerge as the "one true way™" of doing everything. We will have a single project class, and one would mix in plugins to add the needed functionality. There are some new methods on the graph to find projects with a given plugin, replacing the old `all_by_type` and `changed_by_type`: these new methods are `all_with_plugin` and `changed_with_plugin`, respectively. This work is in regards to #5.#5.#5.
- Loading branch information
1 parent
814081a
commit 6e4407c
Showing
18 changed files
with
93 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
require 'logger' | ||
require 'pathname' | ||
require 'yaml' | ||
|
||
module Shanty | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
require 'shanty/plugin' | ||
|
||
module Shanty | ||
# Public: Rubygem plugin for buildin gems. | ||
module RubygemPlugin | ||
extend Plugin | ||
|
||
subscribe :build, :build_gem | ||
|
||
def build_gem | ||
system 'gem build *.gemspec' | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
require 'shanty/plugin' | ||
|
||
module Shanty | ||
# Test unused Plugin fixture, used for testing whether looking plugins up by this plugin type, given none of them | ||
# have it included, returns nothing. | ||
module UnusedPlugin | ||
extend Plugin | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
require 'spec_helper' | ||
require 'shanty/plugins/rubygem_plugin' | ||
|
||
# All classes referenced belong to the shanty project | ||
module Shanty | ||
RSpec.describe(RubygemPlugin) do | ||
include_context('basics') | ||
subject { Class.new { include RubygemPlugin }.new } | ||
|
||
it('subscribes to the test event') do | ||
expect(RubygemPlugin.callbacks).to include([:build, :build_gem]) | ||
end | ||
|
||
describe('#build_gem') do | ||
it('calls gem build') do | ||
expect(subject).to receive(:system).with('gem build *.gemspec') | ||
|
||
subject.build_gem | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.