brakecheck 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 873cfc9ef679bf35d9023e872441d326cef2e62c
4
- data.tar.gz: eddf2189cf54fc5c48f016fbde2f6353512ced7d
3
+ metadata.gz: 8ad36bcebb49ecc09892a5b73006681d79d107e0
4
+ data.tar.gz: b8526570a2549d32469dcfc6d35d6d6132ace374
5
5
  SHA512:
6
- metadata.gz: fbfa85bf619a516b93eaca15bdb06f415f8aed541c8555597ce4a310ab9d44fbc127cf1a14d5604f2c30c0686172a1fd6ddadfbb040d253c4c57f00e88e005bc
7
- data.tar.gz: 73e7f068c63422f749ebf82888fdd4a61528d8715738a6df1454e5212bc671749f5eefee197ff13a532a91c3e58dad24c4d86c8a4fa6e90a52f70c985307bc57
6
+ metadata.gz: 02f53b80e3e14b86d058fe5ef1440305adc536fe52a5725ccf60bc5f5745cdb8738527747debbb8b819dd01131978d3ef65ad54ebd515a75f80934229fd794d7
7
+ data.tar.gz: fb924566d052f454cc24d92e468d6e1e873daa8e2531b65a10baad0b776b68c5626f59d0ee4c19cdfe9f4911425a54450a8b9b877b1f5993ed1dcc2f8c22e55c
@@ -1,5 +1,4 @@
1
1
  require "brakecheck/version"
2
- require "open-uri"
3
2
  require "bundler"
4
3
 
5
4
  module Brakecheck
@@ -7,15 +6,13 @@ module Brakecheck
7
6
  LOCK = Bundler.default_lockfile
8
7
 
9
8
  def self.latest(gem_name)
10
- open("#{RUBYGEMS_HOST}/api/v1/versions/#{gem_name}/latest.json").read[/"version":"(.+?)"/, 1]
11
- rescue StandardError
12
- nil
9
+ Gem.latest_version_for(gem_name)
13
10
  end
14
11
 
15
12
  def self.local(gem_name)
16
13
  lock = Bundler::LockfileParser.new(Bundler.read_file(LOCK))
17
14
  return unless spec = lock.specs.detect { |s| s.name == gem_name }
18
- spec.version.to_s
15
+ spec.version
19
16
  end
20
17
 
21
18
  def self.compare(gem_name)
@@ -1,3 +1,3 @@
1
1
  module Brakecheck
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brakecheck
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Panzer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-07 00:00:00.000000000 Z
11
+ date: 2017-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler