Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
44 changed files
with
155 additions
and
35 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,2 +1,4 @@ | ||
pkg/*.gem | ||
coverage/ | ||
.coveralls.yml | ||
config.yml | ||
*.gem |
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,2 @@ | ||
--format Fuubar | ||
--color |
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,2 @@ | ||
Encoding: | ||
Enabled: false |
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,15 @@ | ||
language: ruby | ||
cache: bundler | ||
rvm: | ||
- ruby-head | ||
- 2.0.0 | ||
- 1.9.3 | ||
- jruby-19mode | ||
notifications: | ||
email: false | ||
irc: | ||
channels: | ||
- ircs://irc.oftc.net:6697#akerl | ||
channel_key: sekrit | ||
template: | ||
- '%{repository}/%{branch}/%{build_number}: %{message} -- %{build_url}' |
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,3 @@ | ||
source 'https://rubygems.org' | ||
|
||
gemspec |
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,71 @@ | ||
PATH | ||
remote: . | ||
specs: | ||
hss (0.2.5) | ||
|
||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
ast (1.1.0) | ||
coveralls (0.7.0) | ||
multi_json (~> 1.3) | ||
rest-client | ||
simplecov (>= 0.7) | ||
term-ansicolor | ||
thor | ||
diff-lcs (1.2.5) | ||
docile (1.1.0) | ||
fuubar (1.2.1) | ||
rspec (~> 2.0) | ||
rspec-instafail (~> 0.2.0) | ||
ruby-progressbar (~> 1.0) | ||
hashr (0.0.22) | ||
mime-types (2.0) | ||
multi_json (1.8.2) | ||
parser (2.1.0.pre1) | ||
ast (~> 1.1) | ||
slop (~> 3.4, >= 3.4.5) | ||
powerpack (0.0.9) | ||
rainbow (1.1.4) | ||
rake (10.1.0) | ||
rest-client (1.6.7) | ||
mime-types (>= 1.16) | ||
rspec (2.14.1) | ||
rspec-core (~> 2.14.0) | ||
rspec-expectations (~> 2.14.0) | ||
rspec-mocks (~> 2.14.0) | ||
rspec-core (2.14.7) | ||
rspec-expectations (2.14.4) | ||
diff-lcs (>= 1.1.3, < 2.0) | ||
rspec-instafail (0.2.4) | ||
rspec-mocks (2.14.4) | ||
rubocop (0.15.0) | ||
parser (~> 2.0) | ||
powerpack (~> 0.0.6) | ||
rainbow (>= 1.1.4) | ||
ruby-progressbar (1.2.0) | ||
simplecov (0.8.2) | ||
docile (~> 1.1.0) | ||
multi_json | ||
simplecov-html (~> 0.8.0) | ||
simplecov-html (0.8.0) | ||
slop (3.4.7) | ||
term-ansicolor (1.2.2) | ||
tins (~> 0.8) | ||
thor (0.18.1) | ||
tins (0.13.1) | ||
travis-lint (1.7.0) | ||
hashr (~> 0.0.22) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
coveralls | ||
fuubar | ||
hss! | ||
parser (~> 2.1.0.pre1) | ||
rake | ||
rspec | ||
rubocop | ||
travis-lint |
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,20 @@ | ||
require "bundler/gem_tasks" | ||
require 'bundler/gem_tasks' | ||
require 'rspec/core/rake_task' | ||
require 'rubocop/rake_task' | ||
|
||
desc 'Run tests' | ||
RSpec::Core::RakeTask.new(:spec) | ||
|
||
desc 'Run Rubocop on the gem' | ||
Rubocop::RakeTask.new(:rubocop) do |task| | ||
task.patterns = ['lib/**/*.rb', 'spec/**/*.rb', 'bin/*'] | ||
task.fail_on_error = true | ||
end | ||
|
||
desc 'Run travis-lint on .travis.yml' | ||
task :travislint do | ||
fail 'There is an issue with your .travis.yml' unless system('travis-lint') | ||
end | ||
|
||
task default: [:spec, :travislint, :rubocop, :build, :install] | ||
|
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,6 +1,8 @@ | ||
## | ||
# Runs a shell command and returns the output | ||
|
||
class HSS::Parser | ||
def command(input) | ||
IO.popen(input) { |cmd| cmd.read } | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
## | ||
# Provides a helper to have default values | ||
|
||
class HSS::Parser | ||
def default(a, b) | ||
a.nil? || a.empty? ? b : a | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
require 'yaml' | ||
|
||
## | ||
# Load values from an external YAML hash | ||
|
||
class HSS::Parser | ||
def external(cmd) | ||
IO.popen(cmd).read | ||
def external(source, key) | ||
config = open(File.expand_path(source)) { |f| YAML.load f.read } | ||
key.split('.').reduce(nil) { |a, e| config[e] } | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
## | ||
# Allow shortcut expansion from the config | ||
|
||
class HSS::Parser | ||
def shortcut(input) | ||
@config['shortcuts'][input] | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
require 'coveralls' | ||
Coveralls.wear! | ||
|
||
require 'rspec' | ||
require 'basiccache' |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.