This repository has been archived by the owner on Mar 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from anvil-src/finetuning
Help finetuning
- Loading branch information
Showing
31 changed files
with
121 additions
and
83 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
language: ruby | ||
rvm: | ||
- 2.1.1 | ||
- 2.1.0 | ||
- 2.0.0 | ||
- 1.9.3 | ||
- 2.1 | ||
- 2.0 | ||
- 1.9 | ||
gemfile: Gemfile.ci | ||
addons: | ||
code_climate: | ||
|
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
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,20 @@ | ||
module Anvil | ||
# Detect whether the options parser has parsed any option or not in | ||
# order, for example, to write the required help for them. | ||
class OptionsDetector | ||
attr_accessor :has_options | ||
|
||
def on(*_, &_block) | ||
self.has_options = true | ||
end | ||
|
||
def arguments(*_, &_block) | ||
end | ||
|
||
def detect_options(&block) | ||
instance_eval(&block) | ||
|
||
has_options | ||
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 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
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
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,24 +1,19 @@ | ||
require 'spec_helper' | ||
|
||
describe Anvil::Config, fakefs: true do | ||
describe Anvil::Config do | ||
subject { Anvil::Config } | ||
before { Anvil::Config.reset } | ||
before { Anvil::Config.init } | ||
|
||
its('github.user') { should be_nil } | ||
its('github.token') { should be_nil } | ||
|
||
context 'with a config file', config: true do | ||
its('github.user') { should eq('dummy_user') } | ||
its('github.token') { should eq('dummy_token') } | ||
end | ||
its('github.user') { is_expected.to eq('dummy_user') } | ||
its('github.token') { is_expected.to eq('dummy_token') } | ||
|
||
context '.init_base_path' do | ||
before { Anvil::Config.send :init_base_path } | ||
subject { File } | ||
|
||
it { should be_directory(Anvil::Config.base_path) } | ||
it { should be_directory(Anvil::Config.base_tasks_path) } | ||
it { should be_exists(Anvil::Config.base_config_path) } | ||
it { should be_exists(Anvil::Config.base_projects_path) } | ||
it { is_expected.to be_directory(Anvil::Config.base_path) } | ||
it { is_expected.to be_directory(Anvil::Config.base_tasks_path) } | ||
it { is_expected.to be_exists(Anvil::Config.base_config_path) } | ||
it { is_expected.to be_exists(Anvil::Config.base_projects_path) } | ||
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
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 |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
|
||
describe Projects::AddTask do | ||
let(:repo_url) { '[email protected]:account/repo' } | ||
before { Anvil::Config.send :init_base_path } | ||
|
||
subject { described_class.new('repo', 'account/repo') } | ||
|
||
|
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
spec/support/dot_anvil/config.rb → spec/support/fixtures/config.rb
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,2 +1,2 @@ | ||
github.user 'dummy_user' | ||
github.user 'dummy_user' | ||
github.token 'dummy_token' |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.