Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Moving Version::Checker class into it's own file. Less intrusive

  • Loading branch information...
commit d14b333723987084082734461dc1d3448aad8c9e 1 parent dba7e63
@mattdbridges authored
View
1  lib/dotify/cli.rb
@@ -5,6 +5,7 @@
require 'dotify'
require 'dotify/cli/listing'
+require 'dotify/version/checker'
module Dotify
module CLI
View
27 lib/dotify/version.rb
@@ -28,32 +28,5 @@ def latest
Checker.latest
end
- # The Checkup class is responsible for
- # reaching out to Rubygems.org and retrieving
- # the latest gem version.
- class Checker
-
- class << self
- attr_reader :result, :resp
- end
-
- def self.check_latest_release!
- @result = latest == Version.build.level
- end
-
- def self.latest
- fetch.map { |v| v['number'] }.max
- end
-
- private
-
- def self.fetch
- require 'multi_json'
- @resp = Net::HTTP.get('rubygems.org', '/api/v1/versions/dotify.json')
- MultiJson.load(@resp)
- end
-
- end
end
-
end
View
30 lib/dotify/version/checker.rb
@@ -0,0 +1,30 @@
+module Dotify
+ class Version
+ # The Checkup class is responsible for
+ # reaching out to Rubygems.org and retrieving
+ # the latest gem version.
+ class Checker
+
+ class << self
+ attr_reader :result, :resp
+ end
+
+ def self.check_latest_release!
+ @result = latest == Version.build.level
+ end
+
+ def self.latest
+ fetch.map { |v| v['number'] }.max
+ end
+
+ private
+
+ def self.fetch
+ require 'multi_json'
+ @resp = Net::HTTP.get('rubygems.org', '/api/v1/versions/dotify.json')
+ MultiJson.load(@resp)
+ end
+
+ end
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.