git-commander 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +8 -0
- data/.rubocop.yml +38 -0
- data/.ruby-version +1 -0
- data/.travis.yml +5 -0
- data/.yardopts +1 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +39 -0
- data/LICENSE.txt +21 -0
- data/README.md +196 -0
- data/Rakefile +7 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/exe/git-cmd +35 -0
- data/git-commander.gemspec +31 -0
- data/lib/git_commander.rb +17 -0
- data/lib/git_commander/cli.rb +126 -0
- data/lib/git_commander/command.rb +168 -0
- data/lib/git_commander/command/configurator.rb +26 -0
- data/lib/git_commander/command/loaders/file_loader.rb +35 -0
- data/lib/git_commander/command/loaders/raw.rb +43 -0
- data/lib/git_commander/command/option.rb +43 -0
- data/lib/git_commander/command/runner.rb +45 -0
- data/lib/git_commander/command_loader_options.rb +34 -0
- data/lib/git_commander/loader.rb +28 -0
- data/lib/git_commander/loader_result.rb +18 -0
- data/lib/git_commander/logger.rb +39 -0
- data/lib/git_commander/plugin.rb +50 -0
- data/lib/git_commander/plugin/executor.rb +10 -0
- data/lib/git_commander/plugin/loader.rb +77 -0
- data/lib/git_commander/plugins/git.rb +31 -0
- data/lib/git_commander/plugins/github.rb +35 -0
- data/lib/git_commander/plugins/prompt.rb +8 -0
- data/lib/git_commander/plugins/system.rb +3 -0
- data/lib/git_commander/registry.rb +91 -0
- data/lib/git_commander/rspec.rb +3 -0
- data/lib/git_commander/rspec/plugin_helpers.rb +82 -0
- data/lib/git_commander/system.rb +76 -0
- data/lib/git_commander/version.rb +5 -0
- metadata +159 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7e4e61ccf3751b8e511981eb8335aa65c73e3b4b0932af02bb2a2bbd0046bc08
|
4
|
+
data.tar.gz: 0be52ddaf9c2816e931f6af9e63de9f118717de7d2d7db08ec4d9a1d57ffb788
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6f8d75298b07446ec8282f7506a6a93d04a6cd421835bc4eea68295a2cf13fd505a0a3b7b6de1ace831b1e3f031853d82022843770531684f8c2eb791d1132fb
|
7
|
+
data.tar.gz: 3d1936108a6079ec03c9c6c8b672dd64e108f5d781479f58bd9766ac68d2fd06291b80f99eb08a958451f1ece847df621a3acbb040f92218faf167647a6f1906
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
Layout/DotPosition:
|
2
|
+
EnforcedStyle: trailing
|
3
|
+
|
4
|
+
Metrics/LineLength:
|
5
|
+
Max: 120
|
6
|
+
|
7
|
+
Style/StringLiterals:
|
8
|
+
EnforcedStyle: double_quotes
|
9
|
+
ConsistentQuotesInMultiline: true
|
10
|
+
Enabled: true
|
11
|
+
|
12
|
+
Style/StringLiteralsInInterpolation:
|
13
|
+
EnforcedStyle: double_quotes
|
14
|
+
|
15
|
+
Style/LambdaCall:
|
16
|
+
Enabled: false
|
17
|
+
|
18
|
+
Metrics/BlockLength:
|
19
|
+
Exclude:
|
20
|
+
- ./**/*_spec*.rb
|
21
|
+
- ./spec/*_helper*.rb
|
22
|
+
- ./spec/support/*
|
23
|
+
- ./spec/support/**/*
|
24
|
+
- Gemfile
|
25
|
+
|
26
|
+
Metrics/ModuleLength:
|
27
|
+
Exclude:
|
28
|
+
- ./**/*_spec*.rb
|
29
|
+
- ./spec/support/**/*
|
30
|
+
|
31
|
+
Metrics/MethodLength:
|
32
|
+
Exclude:
|
33
|
+
- ./**/*_spec*.rb
|
34
|
+
- ./spec/support/**/*
|
35
|
+
|
36
|
+
Lint/AmbiguousBlockAssociation:
|
37
|
+
Exclude:
|
38
|
+
- ./**/*_spec.rb
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.6.5
|
data/.travis.yml
ADDED
data/.yardopts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--no-private --protected exe/* lib/**/*.rb - CODE_OF_CONDUCT.md README.md LICENSE.txt
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at v@codenamev.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
git-commander (0.1.0)
|
5
|
+
bundler (~> 2.1, >= 1.10.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
byebug (11.1.1)
|
11
|
+
diff-lcs (1.3)
|
12
|
+
rake (12.3.3)
|
13
|
+
rdoc (6.2.1)
|
14
|
+
rspec (3.9.0)
|
15
|
+
rspec-core (~> 3.9.0)
|
16
|
+
rspec-expectations (~> 3.9.0)
|
17
|
+
rspec-mocks (~> 3.9.0)
|
18
|
+
rspec-core (3.9.1)
|
19
|
+
rspec-support (~> 3.9.1)
|
20
|
+
rspec-expectations (3.9.1)
|
21
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
22
|
+
rspec-support (~> 3.9.0)
|
23
|
+
rspec-mocks (3.9.1)
|
24
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
25
|
+
rspec-support (~> 3.9.0)
|
26
|
+
rspec-support (3.9.2)
|
27
|
+
|
28
|
+
PLATFORMS
|
29
|
+
ruby
|
30
|
+
|
31
|
+
DEPENDENCIES
|
32
|
+
byebug (~> 11)
|
33
|
+
git-commander!
|
34
|
+
rake (~> 12.3)
|
35
|
+
rdoc (~> 6.2)
|
36
|
+
rspec (< 4.0)
|
37
|
+
|
38
|
+
BUNDLED WITH
|
39
|
+
2.1.0
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 Valentino Stoll
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,196 @@
|
|
1
|
+
# git-commander
|
2
|
+
|
3
|
+
Make your own git commands.
|
4
|
+
|
5
|
+
Installation
|
6
|
+
============
|
7
|
+
|
8
|
+
Add this line to your application's Gemfile:
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
gem 'git-commander'
|
12
|
+
```
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
|
16
|
+
$ bundle
|
17
|
+
|
18
|
+
Or install it yourself as:
|
19
|
+
|
20
|
+
$ gem install git-commander
|
21
|
+
|
22
|
+
Usage
|
23
|
+
=====
|
24
|
+
|
25
|
+
All commands you register can be run using `git cmd ...`.
|
26
|
+
|
27
|
+
Registering a new command is as easy as creating a new `Workflow` file in your git-root's directory (or organize them in a `.git-commands` directory).
|
28
|
+
Example:
|
29
|
+
|
30
|
+
```ruby
|
31
|
+
# ~/git-root/.git-commands/current.rb
|
32
|
+
|
33
|
+
plugin :system
|
34
|
+
|
35
|
+
command :current do |cmd|
|
36
|
+
cmd.summary "Outputs all commits not on the base branch"
|
37
|
+
cmd.argument :base_branch, default: "master"
|
38
|
+
|
39
|
+
cmd.on_run do |options|
|
40
|
+
current_branch = system.run "git rev-parse --abbrev-ref HEAD"
|
41
|
+
system.run "git log #{options[:base_branch]}..#{current_branch} --format=\"%C(auto)%h %s %C(#999999)%ar\" --color"
|
42
|
+
end
|
43
|
+
end
|
44
|
+
```
|
45
|
+
|
46
|
+
In the above example, we:
|
47
|
+
|
48
|
+
1. Use the native `system` plugin. This gives us access to an instance of [System](/docs/GitCommander/System) inside of our `on_run` block.
|
49
|
+
2. Creates a new `git cmd current :base_branch` command and runs everything in the `on_run` block when we execute it (passing the `:base_branch` in the `options`)
|
50
|
+
|
51
|
+
`cmd` can configure multiple `argument`, `flag`, `switch` options, and a `default: 'some value'` can be set for any.
|
52
|
+
A long-form `description` can also be set for your commands for use in the command's help text: `git cmd help current`.
|
53
|
+
|
54
|
+
You can define multiple commands in a single file if you wish, but it is recommended to keep commands contained to their own file.
|
55
|
+
|
56
|
+
Gem usage
|
57
|
+
=========
|
58
|
+
|
59
|
+
Command declaration files can include their own inline gems:
|
60
|
+
|
61
|
+
```ruby
|
62
|
+
gemfile do
|
63
|
+
source "https://rubygems.org"
|
64
|
+
gem "octokit"
|
65
|
+
end
|
66
|
+
```
|
67
|
+
|
68
|
+
Plugins
|
69
|
+
=======
|
70
|
+
|
71
|
+
Git-commander is built with the intention of being extended. To make things
|
72
|
+
flexible, there is a plugin architecture that allows you to define new top-level
|
73
|
+
methods that can be available inside of your command's `on_run` blocks.
|
74
|
+
|
75
|
+
As a simple example, if you wanted access to a `github` method to perform API calls, you can use the [octokit gem](https://github.com/octokit/octokit.rb) to do this:
|
76
|
+
|
77
|
+
```ruby
|
78
|
+
# .git-commands/plugins/github.rb
|
79
|
+
gemfile do
|
80
|
+
source "https://rubygems.org"
|
81
|
+
gem "octokit"
|
82
|
+
end
|
83
|
+
|
84
|
+
Octokit::Client.new
|
85
|
+
```
|
86
|
+
|
87
|
+
Then in a new command, use the new `github` plugin:
|
88
|
+
|
89
|
+
```ruby
|
90
|
+
plugin :github
|
91
|
+
|
92
|
+
command :prs do |cmd|
|
93
|
+
cmd.summary "Lists all open GitHub PullRequests for the git-commander repo"
|
94
|
+
|
95
|
+
cmd.on_run do |cmd|
|
96
|
+
github.pull_requests("codenamev/git-commander", state: "open").each do |pr|
|
97
|
+
say "@#{pr.user.login} #{pr.title} – #{pr.html_url}"
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
```
|
102
|
+
|
103
|
+
### Anatomy of a plugin
|
104
|
+
|
105
|
+
1. [Name of the plugin](#name-of-the-plugin)
|
106
|
+
2. [Gem dependencies](#gem-dependencies) (via `gemfile` block)
|
107
|
+
3. [Plugin dependencies](#plugin-dependencies)
|
108
|
+
4. [Plugin-specific commands](#plugin-specific-commands)
|
109
|
+
5. [The plugin instance](#the-plugin-instance)
|
110
|
+
|
111
|
+
Name of the plugin
|
112
|
+
------------------
|
113
|
+
|
114
|
+
As mentioned in the simple example above, the filename of the plugin defines the keyword that will be available within the `on_run` blocks of your commands. Plugins must be added to your `.git-commands/plugins` directory, and the file extension must be `.rb`. Whatever you name the file becomes the name used internally to reference it. So if you name your plugin `some-awesome-plugin.rb`, you will have to reference it as `plugin 'some-awesome-plugin'`.
|
115
|
+
|
116
|
+
Gem dependencies
|
117
|
+
----------------
|
118
|
+
|
119
|
+
Just like commands, you can include third-party gems using [Bundler's inline helpers](https://github.com/rubygems/bundler/blob/master/lib/bundler/inline.rb).
|
120
|
+
|
121
|
+
Plugin dependencies
|
122
|
+
-------------------
|
123
|
+
|
124
|
+
Also the same as with commands, plugins can also define other plugins as dependencies. We include the following plugins natively:
|
125
|
+
|
126
|
+
- [git](https://github.com/codenamev/git-commander/blob/master/lib/git_commander/plugins/git.rb)
|
127
|
+
- [github](https://github.com/codenamev/git-commander/blob/master/lib/git_commander/plugins/github.rb)
|
128
|
+
- [prompt](https://github.com/codenamev/git-commander/blob/master/lib/git_commander/plugins/prompt.rb)
|
129
|
+
- [system](https://github.com/codenamev/git-commander/blob/master/lib/git_commander/plugins/system.rb)
|
130
|
+
|
131
|
+
Plugin-specific commands
|
132
|
+
------------------------
|
133
|
+
|
134
|
+
Plugins can also define their own commands. These commands will be namespaced to the name of the plugin. So the following plugin would allow you to run `git cmd github:setup`.
|
135
|
+
|
136
|
+
```ruby
|
137
|
+
gemfile do
|
138
|
+
source "https://rubygems.org"
|
139
|
+
gem "octokit"
|
140
|
+
end
|
141
|
+
|
142
|
+
plugin :prompt
|
143
|
+
|
144
|
+
command :setup do |cmd|
|
145
|
+
cmd.summary "Connects to GitHub, creates an access token, and stores it in the git-cmd section of your git config"
|
146
|
+
|
147
|
+
cmd.on_run do
|
148
|
+
gh_user = prompt.ask("Please enter your GitHub username", required: true)
|
149
|
+
gh_password = promt.mask("Please enter your GitHub password (this is NOT stored): ", required: true)
|
150
|
+
|
151
|
+
github.login = gh_user
|
152
|
+
github.password = gh_password
|
153
|
+
|
154
|
+
# Check for 2-factor requirements
|
155
|
+
begin
|
156
|
+
client.user
|
157
|
+
rescue Octokit::Unauthorized
|
158
|
+
github.user(
|
159
|
+
gh_user,
|
160
|
+
headers: { "X-GitHub-OTP" => prompt.ask("Please enter your two-factor authentication code") }
|
161
|
+
)
|
162
|
+
end
|
163
|
+
|
164
|
+
say "GitHub account successfully setup!"
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
Octokit::Client.new
|
169
|
+
```
|
170
|
+
|
171
|
+
The plugin instance
|
172
|
+
-------------------
|
173
|
+
|
174
|
+
When plugins are loaded, their content is evaluated in the context of the Plugin::Loader class. Whatever the file returns (the last line evaluated) is stored as the plugin's instance. In this way, whenever you reference the plugin from within a command's `on_run`, you are referencing the same instance that was returned from evaluating the plugin's file.
|
175
|
+
|
176
|
+
Development
|
177
|
+
===========
|
178
|
+
|
179
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
180
|
+
|
181
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
182
|
+
|
183
|
+
Contributing
|
184
|
+
============
|
185
|
+
|
186
|
+
[Bug reports](https://github.com/codenamev/git-commander/issues/new) and [pull requests](https://github.com/codenamev/git-commander/pulls) are welcome on GitHub. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
187
|
+
|
188
|
+
License
|
189
|
+
=======
|
190
|
+
|
191
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
192
|
+
|
193
|
+
Code of Conduct
|
194
|
+
===============
|
195
|
+
|
196
|
+
Everyone interacting in the GitCommander project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/codenamev/git-commander/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "git_commander"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/exe/git-cmd
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
$LOAD_PATH.unshift "#{__dir__}/../lib"
|
5
|
+
|
6
|
+
require "rubygems"
|
7
|
+
require "git_commander"
|
8
|
+
require "git_commander/cli"
|
9
|
+
|
10
|
+
runner = GitCommander::CLI.new
|
11
|
+
|
12
|
+
plugin_files = Dir[
|
13
|
+
File.join(Dir.pwd, ".git-commands", "plugins", "*.rb")
|
14
|
+
]
|
15
|
+
command_files = Dir[
|
16
|
+
File.join(Dir.pwd, "Workflow"),
|
17
|
+
File.join(Dir.pwd, ".git-commands", "*.rb")
|
18
|
+
]
|
19
|
+
|
20
|
+
command_files.each do |filename|
|
21
|
+
loader = runner.registry.load GitCommander::Command::Loaders::FileLoader, filename if File.exist?(filename)
|
22
|
+
unless loader.success?
|
23
|
+
GitCommander.logger.warn "Unable to load command from: #{filename}\n\tErrors: #{loader.errors.inspect}"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
plugin_files.each do |filename|
|
28
|
+
loader = runner.registry.load GitCommander::Plugin::Loader, filename if File.exist?(filename)
|
29
|
+
unless loader.success?
|
30
|
+
GitCommander.logger.warn "Unable to load plugin from: #{filename}\n\tErrors: #{loader.errors.inspect}"
|
31
|
+
GitCommander.logger.debug "\n\tBacktrace: #{loader.errors.map(&:backtrace)}"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
runner.run
|