Skip to content

Developersdevelopersdevelopers #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sudo: false
language: ruby
rvm:
- 2.0.0-p247
- 2.1
script: rspec spec
14 changes: 7 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
source 'https://rubygems.org'

gem 'commander'
gem 'faraday', '0.9.2'
gem 'colorize', '~> 0.8'
gemspec

gem 'rspec'
gem 'webmock', '1.21.0'
gem 'rake'
gem 'rake', require: false

gemspec
group :test do
gem 'rspec', '~> 3.5.0'
gem 'rubocop', '~> 0.47'
gem 'webmock', '1.21.0'
end
13 changes: 10 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
require 'rubygems'
require 'bundler/setup'
require 'rspec/core/rake_task'
require 'rubocop/rake_task'

# Immediately sync all stdout so that tools like buildbot can
# immediately load in the output.
$stdout.sync = true
$stderr.sync = true

# Change to the directory of this file.
Dir.chdir(File.expand_path("../", __FILE__))
Dir.chdir(File.expand_path('../', __FILE__))

# This installs the tasks that help with gem creation and
# publishing.
Bundler::GemHelper.install_tasks

# Install the `spec` task so that we can run tests.
RSpec::Core::RakeTask.new(:spec) do |t|
t.rspec_opts = "--order defined"
t.rspec_opts = '--order defined'
end

desc 'Run RuboCop'
RuboCop::RakeTask.new(:rubocop) do |task|
task.options << '--display-cop-names'
end

# Default task is to run the unit tests
task :default => :spec
task default: :spec
2 changes: 1 addition & 1 deletion lib/vmfloaty.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Vmfloaty
include Commander::Methods

def run
program :version, Version.get
program :version, Vmfloaty::VERSION
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, haven't tried this yet but I've tried to get this to work this way for a couple of times now and it never seems to behave correctly. 👍

program :description, 'A CLI helper tool for Puppet Labs vmpooler to help you stay afloat'

config = Conf.read_config
Expand Down
9 changes: 2 additions & 7 deletions lib/vmfloaty/version.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@

class Version
@version = '0.7.8'

def self.get
@version
end
class Vmfloaty
VERSION = '0.7.8'.freeze
end
6 changes: 6 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
require 'vmfloaty'
require 'webmock/rspec'

RSpec.configure do |config|
config.color = true
config.tty = true
config.formatter = :documentation
end
15 changes: 10 additions & 5 deletions vmfloaty.gemspec
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
$LOAD_PATH.push File.expand_path('../lib', __FILE__)
require 'vmfloaty/version'

Gem::Specification.new do |s|
s.name = 'vmfloaty'
s.version = '0.7.8'
s.version = Vmfloaty::VERSION
s.authors = ['Brian Cain']
s.email = ['[email protected]']
s.license = 'Apache'
s.license = 'Apache-2.0'
s.homepage = 'https://github.com/briancain/vmfloaty'
s.description = 'A helper tool for vmpooler to help you stay afloat'
s.summary = 'CLI application to interface with vmpooler'

s.executables = ['floaty']
s.files = Dir['LICENSE', 'README.md', 'lib/**/*']
s.test_files = Dir['spec/**/*']
s.require_path = 'lib'
s.add_dependency 'commander', '~> 4.3'
s.add_dependency 'faraday', '~> 0.9'
s.add_dependency 'colorize', '0.8.1'

s.add_dependency 'commander', '~> 4.3.0'
s.add_dependency 'faraday', '~> 0.9.0'
s.add_dependency 'colorize', '~> 0.8.1'
end