Skip to content

Commit

Permalink
replaced github_api with rubygems api gem; check for new release logi…
Browse files Browse the repository at this point in the history
…c changed
  • Loading branch information
michaelchadwick committed Aug 17, 2015
1 parent 7ad97c7 commit 8b9d060
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
5 changes: 3 additions & 2 deletions gemwarrior.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ Gem::Specification.new do |spec|
spec.add_runtime_dependency 'clocker', '~> 0.1.2'
spec.add_runtime_dependency 'win32-sound', '~> 0.6.0'
spec.add_runtime_dependency 'feep', '~> 0.1.3'
spec.add_runtime_dependency 'github_api', '~> 0.12.4'
spec.add_runtime_dependency 'gems', '~> 0.8.3'

# gems for future features
# spec.add_runtime_dependency 'hr', '~> 0.0.2'

# spec.add_runtime_dependency 'github_api', '~> 0.12.4'

spec.add_development_dependency 'bundler', '~> 1.8'
spec.add_development_dependency 'rake', '~> 10.0'

Expand Down
12 changes: 5 additions & 7 deletions lib/gemwarrior/repl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
require 'os'
require 'clocker'
require 'io/console'
require 'github_api'
require 'gems'

require_relative 'misc/timer'
require_relative 'misc/wordlist'
Expand Down Expand Up @@ -185,12 +185,10 @@ def display_log_of_attempts

def check_for_new_release
puts 'Checking releases...'
github = Github.new
gw_latest_release = github.repos.releases.list GITHUB_NAME, GITHUB_PROJECT
local_release = Gemwarrior::VERSION
remote_release = gw_latest_release[0].tag_name
remote_release[0] = ''
if remote_release > local_release
remote_version = Gems.versions('gemwarrior').first['number']
local_version = Gemwarrior::VERSION

if remote_release != local_release
puts "GW v#{remote_release} available! Please (E)xit and run 'gem update' before continuing."
puts
else
Expand Down
2 changes: 1 addition & 1 deletion lib/gemwarrior/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# Version of Gem Warrior

module Gemwarrior
VERSION = '0.10.0'
VERSION = '0.10.1'
end

0 comments on commit 8b9d060

Please sign in to comment.