gem-versions 0.0.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +15 -3
- data/Rakefile +8 -0
- data/gem-versions.gemspec +6 -2
- data/lib/rubygems/commands/versions_command.rb +1 -1
- data/test/fixtures/thinking-sphinx.json +13 -0
- data/test/fixtures/thinking-sphinxx.json +12 -0
- data/test/test_gem-versions.rb +66 -0
- data/test/test_helper.rb +44 -0
- metadata +58 -5
data/README.md
CHANGED
|
@@ -1,21 +1,33 @@
|
|
|
1
1
|
gem-versions -- view a gem's versions
|
|
2
2
|
=====================================
|
|
3
3
|
|
|
4
|
+
|
|
4
5
|
## SYNOPSIS
|
|
5
6
|
|
|
6
7
|
gem versions <GEM>
|
|
7
8
|
|
|
9
|
+
|
|
8
10
|
## DESCRIPTION
|
|
9
11
|
|
|
10
|
-
The `gem versions` command can be used to show all versions of
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
The `gem versions` command can be used to show all versions of a gem
|
|
13
|
+
published on Rubygems.org. Versions you have installed locally are
|
|
14
|
+
asterisked.
|
|
15
|
+
|
|
16
|
+
Note you must use the exact name of the gem, not just a partial match.
|
|
17
|
+
|
|
18
|
+
It's like `gem list --both <GEM>` except:
|
|
19
|
+
|
|
20
|
+
- it shows only the exact gem you specify, rather than all gems whose
|
|
21
|
+
names start with that name;
|
|
22
|
+
- it shows the results inline, i.e. with local and remote gems merged.
|
|
23
|
+
|
|
13
24
|
|
|
14
25
|
## QUICK START
|
|
15
26
|
|
|
16
27
|
gem install gem-versions
|
|
17
28
|
gem versions rails
|
|
18
29
|
|
|
30
|
+
|
|
19
31
|
## INTELLECTUAL PROPERTY
|
|
20
32
|
|
|
21
33
|
Copyright 2011 Andy Stewart <boss@airbladesoftware.com>.
|
data/Rakefile
CHANGED
data/gem-versions.gemspec
CHANGED
|
@@ -3,7 +3,7 @@ $:.push File.expand_path('../lib', __FILE__)
|
|
|
3
3
|
|
|
4
4
|
Gem::Specification.new do |s|
|
|
5
5
|
s.name = 'gem-versions'
|
|
6
|
-
s.version = '0.0
|
|
6
|
+
s.version = '1.0.0'
|
|
7
7
|
s.authors = [ 'Andy Stewart' ]
|
|
8
8
|
s.email = 'boss@airbladesoftware.com'
|
|
9
9
|
s.homepage = 'https://github.com/airblade/gem-versions'
|
|
@@ -16,6 +16,10 @@ END
|
|
|
16
16
|
|
|
17
17
|
s.files = `git ls-files`.split("\n")
|
|
18
18
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
|
19
|
+
s.require_path = 'lib'
|
|
19
20
|
|
|
20
|
-
s.add_dependency
|
|
21
|
+
s.add_dependency 'httparty', '~> 0.8'
|
|
22
|
+
s.add_development_dependency 'rake', '0.8.7'
|
|
23
|
+
s.add_development_dependency 'fakeweb', '~> 1.3'
|
|
24
|
+
s.add_development_dependency 'flexmock', '~> 0.9'
|
|
21
25
|
end
|
|
@@ -24,7 +24,7 @@ class Gem::Commands::VersionsCommand < Gem::Command
|
|
|
24
24
|
|
|
25
25
|
begin
|
|
26
26
|
response = ::HTTParty.get "https://rubygems.org/api/v1/versions/#{name}.json"
|
|
27
|
-
rescue
|
|
27
|
+
rescue MultiJson::DecodeError # Rubygems' invalid JSON response of plain text trips up HTTParty.
|
|
28
28
|
puts "Unable to find #{name}."
|
|
29
29
|
return
|
|
30
30
|
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
HTTP/1.1 200 OK
|
|
2
|
+
Date: Thu, 22 Sep 2011 14:26:18 GMT
|
|
3
|
+
Server: Apache/2.2.3 (Red Hat) mod_ssl/2.2.3 OpenSSL/0.9.8e-fips-rhel5 Phusion_Passenger/3.0.0
|
|
4
|
+
X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.0
|
|
5
|
+
ETag: "d8c280009ec904441829f51809d7929c"
|
|
6
|
+
X-UA-Compatible: IE=Edge,chrome=1
|
|
7
|
+
X-Runtime: 0.036549
|
|
8
|
+
Cache-Control: max-age=0, private, must-revalidate
|
|
9
|
+
Status: 200
|
|
10
|
+
Transfer-Encoding: chunked
|
|
11
|
+
Content-Type: application/json; charset=utf-8
|
|
12
|
+
|
|
13
|
+
[{"number":"2.0.7","built_at":"2011-08-28T14:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":4119,"platform":"ruby"},{"number":"2.0.6","built_at":"2011-08-27T14:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":88,"platform":"ruby"},{"number":"1.4.7","built_at":"2011-08-27T14:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":494,"platform":"ruby"},{"number":"2.0.5","built_at":"2011-05-24T22:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":13307,"platform":"ruby"},{"number":"1.4.6","built_at":"2011-05-24T22:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":2833,"platform":"ruby"},{"number":"2.0.4","built_at":"2011-05-11T14:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":4063,"platform":"ruby"},{"number":"1.4.5","built_at":"2011-05-11T14:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":1153,"platform":"ruby"},{"number":"2.0.3","built_at":"2011-04-02T13:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":11136,"platform":"ruby"},{"number":"1.4.4","built_at":"2011-04-02T13:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":2564,"platform":"ruby"},{"number":"1.4.3","built_at":"2011-01-28T13:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":6983,"platform":"ruby"},{"number":"2.0.2","built_at":"2011-01-12T13:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":11530,"platform":"ruby"},{"number":"1.4.2","built_at":"2011-01-12T13:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":1146,"platform":"ruby"},{"number":"1.4.1","built_at":"2010-12-20T13:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":1830,"platform":"ruby"},{"number":"2.0.1","built_at":"2010-11-19T13:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":11510,"platform":"ruby"},{"number":"2.0.0","built_at":"2010-11-14T16:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":8697,"platform":"ruby"},{"number":"1.4.0","built_at":"2010-11-14T16:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":5864,"platform":"ruby"},{"number":"1.3.20","built_at":"2010-09-02T15:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":21253,"platform":"ruby"},{"number":"2.0.0.rc2","built_at":"2010-08-22T16:00:00Z","prerelease":true,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":4256,"platform":"ruby"},{"number":"1.3.19","built_at":"2010-08-22T16:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":2873,"platform":"ruby"},{"number":"2.0.0.rc1","built_at":"2010-07-01T14:00:00Z","prerelease":true,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":2832,"platform":"ruby"},{"number":"1.3.18","built_at":"2010-06-28T14:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":12386,"platform":"ruby"},{"number":"1.3.17","built_at":"2010-06-04T14:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":5323,"platform":"ruby"},{"number":"1.3.16","built_at":"2010-02-15T13:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":18169,"platform":"ruby"},{"number":"1.3.15","built_at":"2010-01-28T16:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":15079,"platform":"ruby"},{"number":"1.3.14","built_at":"2009-12-21T13:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":5716,"platform":"ruby"},{"number":"1.3.13","built_at":"2009-12-14T13:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":1141,"platform":"ruby"},{"number":"1.3.12","built_at":"2009-12-13T13:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":568,"platform":"ruby"},{"number":"1.3.11","built_at":"2009-12-11T13:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":2418,"platform":"ruby"},{"number":"1.3.10","built_at":"2009-12-09T13:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":769,"platform":"ruby"},{"number":"1.3.9","built_at":"2009-12-08T13:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":856,"platform":"ruby"},{"number":"1.3.8","built_at":"2009-12-01T13:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":1860,"platform":"ruby"},{"number":"1.3.7","built_at":"2009-11-28T13:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":789,"platform":"ruby"},{"number":"1.3.6","built_at":"2009-11-25T13:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":1011,"platform":"ruby"},{"number":"1.3.4","built_at":"2009-11-15T16:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":1278,"platform":"ruby"},{"number":"1.3.3","built_at":"2009-11-10T16:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":1090,"platform":"ruby"},{"number":"1.3.2","built_at":"2009-11-04T16:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":996,"platform":"ruby"},{"number":"1.3.1","built_at":"2009-11-03T16:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":673,"platform":"ruby"},{"number":"1.3.0","built_at":"2009-11-03T16:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":482,"platform":"ruby"},{"number":"1.2.13","built_at":"2009-10-31T16:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":816,"platform":"ruby"},{"number":"1.2.12","built_at":"2009-10-05T01:00:00Z","prerelease":false,"summary":"ActiveRecord/Rails Sphinx library","description":"A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.","authors":"Pat Allan","downloads_count":1610,"platform":"ruby"}]
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
HTTP/1.1 404 Not Found
|
|
2
|
+
Date: Thu, 22 Sep 2011 14:50:49 GMT
|
|
3
|
+
Server: Apache/2.2.3 (Red Hat) mod_ssl/2.2.3 OpenSSL/0.9.8e-fips-rhel5 Phusion_Passenger/3.0.0
|
|
4
|
+
X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.0
|
|
5
|
+
X-UA-Compatible: IE=Edge,chrome=1
|
|
6
|
+
X-Runtime: 0.004267
|
|
7
|
+
Cache-Control: no-cache
|
|
8
|
+
Status: 404
|
|
9
|
+
Transfer-Encoding: chunked
|
|
10
|
+
Content-Type: application/json; charset=utf-8
|
|
11
|
+
|
|
12
|
+
This rubygem could not be found.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
require 'test_helper'
|
|
2
|
+
|
|
3
|
+
class TestGemVersions < Test::Unit::TestCase
|
|
4
|
+
|
|
5
|
+
def test_found_gem
|
|
6
|
+
gem_name = 'thinking-sphinx'
|
|
7
|
+
stub_rubygems_api gem_name
|
|
8
|
+
command = Gem::Commands::VersionsCommand.new
|
|
9
|
+
command = flexmock(command, :local_versions => %w[ 1.3.16 1.4.0 2.0.1 2.0.4 ])
|
|
10
|
+
command.handle_options [gem_name]
|
|
11
|
+
|
|
12
|
+
expected = <<END
|
|
13
|
+
2.0.7
|
|
14
|
+
2.0.6
|
|
15
|
+
2.0.5
|
|
16
|
+
* 2.0.4
|
|
17
|
+
2.0.3
|
|
18
|
+
2.0.2
|
|
19
|
+
* 2.0.1
|
|
20
|
+
2.0.0
|
|
21
|
+
2.0.0.rc2
|
|
22
|
+
2.0.0.rc1
|
|
23
|
+
1.4.7
|
|
24
|
+
1.4.6
|
|
25
|
+
1.4.5
|
|
26
|
+
1.4.4
|
|
27
|
+
1.4.3
|
|
28
|
+
1.4.2
|
|
29
|
+
1.4.1
|
|
30
|
+
* 1.4.0
|
|
31
|
+
1.3.20
|
|
32
|
+
1.3.19
|
|
33
|
+
1.3.18
|
|
34
|
+
1.3.17
|
|
35
|
+
* 1.3.16
|
|
36
|
+
1.3.15
|
|
37
|
+
1.3.14
|
|
38
|
+
1.3.13
|
|
39
|
+
1.3.12
|
|
40
|
+
1.3.11
|
|
41
|
+
1.3.10
|
|
42
|
+
1.3.9
|
|
43
|
+
1.3.8
|
|
44
|
+
1.3.7
|
|
45
|
+
1.3.6
|
|
46
|
+
1.3.4
|
|
47
|
+
1.3.3
|
|
48
|
+
1.3.2
|
|
49
|
+
1.3.1
|
|
50
|
+
1.3.0
|
|
51
|
+
1.2.13
|
|
52
|
+
1.2.12
|
|
53
|
+
END
|
|
54
|
+
assert_output(expected) { command.execute }
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def test_not_found_gem
|
|
58
|
+
gem_name = 'thinking-sphinxx'
|
|
59
|
+
stub_rubygems_api gem_name
|
|
60
|
+
command = Gem::Commands::VersionsCommand.new
|
|
61
|
+
command.handle_options [gem_name]
|
|
62
|
+
|
|
63
|
+
assert_output("Unable to find thinking-sphinxx.\n") { command.execute }
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
end
|
data/test/test_helper.rb
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
require 'test/unit'
|
|
2
|
+
require 'fakeweb'
|
|
3
|
+
require 'flexmock/test_unit'
|
|
4
|
+
|
|
5
|
+
require File.expand_path('../../lib/rubygems/commands/versions_command', __FILE__)
|
|
6
|
+
|
|
7
|
+
FakeWeb.allow_net_connect = false
|
|
8
|
+
|
|
9
|
+
class Test::Unit::TestCase
|
|
10
|
+
include FlexMock::TestCase
|
|
11
|
+
|
|
12
|
+
def stub_rubygems_api(gem_name)
|
|
13
|
+
FakeWeb.register_uri :get,
|
|
14
|
+
"https://rubygems.org/api/v1/versions/#{gem_name}.json",
|
|
15
|
+
:response => fixture_file(gem_name)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def fixture_file(gem_name)
|
|
19
|
+
File.read File.expand_path("../fixtures/#{gem_name}.json", __FILE__)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# Thanks https://github.com/jnunemaker/gemwhois/blob/master/test/helpers/output.rb
|
|
23
|
+
def assert_output(expected, &block)
|
|
24
|
+
keep_stdout do |stdout|
|
|
25
|
+
block.call
|
|
26
|
+
if expected.is_a?(Regexp)
|
|
27
|
+
assert_match expected, stdout.string
|
|
28
|
+
else
|
|
29
|
+
assert_equal expected.to_s, stdout.string
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def keep_stdout(&block)
|
|
35
|
+
begin
|
|
36
|
+
orig_stream, $stdout = $stdout, StringIO.new
|
|
37
|
+
block.call($stdout)
|
|
38
|
+
ensure
|
|
39
|
+
s, $stdout = $stdout.string, orig_stream
|
|
40
|
+
s
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gem-versions
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 23
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
|
+
- 1
|
|
7
8
|
- 0
|
|
8
9
|
- 0
|
|
9
|
-
|
|
10
|
-
version: 0.0.2
|
|
10
|
+
version: 1.0.0
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Andy Stewart
|
|
@@ -33,6 +33,52 @@ dependencies:
|
|
|
33
33
|
version: "0.8"
|
|
34
34
|
type: :runtime
|
|
35
35
|
version_requirements: *id001
|
|
36
|
+
- !ruby/object:Gem::Dependency
|
|
37
|
+
name: rake
|
|
38
|
+
prerelease: false
|
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
|
40
|
+
none: false
|
|
41
|
+
requirements:
|
|
42
|
+
- - "="
|
|
43
|
+
- !ruby/object:Gem::Version
|
|
44
|
+
hash: 49
|
|
45
|
+
segments:
|
|
46
|
+
- 0
|
|
47
|
+
- 8
|
|
48
|
+
- 7
|
|
49
|
+
version: 0.8.7
|
|
50
|
+
type: :development
|
|
51
|
+
version_requirements: *id002
|
|
52
|
+
- !ruby/object:Gem::Dependency
|
|
53
|
+
name: fakeweb
|
|
54
|
+
prerelease: false
|
|
55
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
|
56
|
+
none: false
|
|
57
|
+
requirements:
|
|
58
|
+
- - ~>
|
|
59
|
+
- !ruby/object:Gem::Version
|
|
60
|
+
hash: 9
|
|
61
|
+
segments:
|
|
62
|
+
- 1
|
|
63
|
+
- 3
|
|
64
|
+
version: "1.3"
|
|
65
|
+
type: :development
|
|
66
|
+
version_requirements: *id003
|
|
67
|
+
- !ruby/object:Gem::Dependency
|
|
68
|
+
name: flexmock
|
|
69
|
+
prerelease: false
|
|
70
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
|
71
|
+
none: false
|
|
72
|
+
requirements:
|
|
73
|
+
- - ~>
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
hash: 25
|
|
76
|
+
segments:
|
|
77
|
+
- 0
|
|
78
|
+
- 9
|
|
79
|
+
version: "0.9"
|
|
80
|
+
type: :development
|
|
81
|
+
version_requirements: *id004
|
|
36
82
|
description: " The `gem versions` command can be used to show all versions of\n a gem published on Rubygems.org. Versions you have installed\n locally are asterisked.\n"
|
|
37
83
|
email: boss@airbladesoftware.com
|
|
38
84
|
executables: []
|
|
@@ -49,6 +95,10 @@ files:
|
|
|
49
95
|
- gem-versions.gemspec
|
|
50
96
|
- lib/rubygems/commands/versions_command.rb
|
|
51
97
|
- lib/rubygems_plugin.rb
|
|
98
|
+
- test/fixtures/thinking-sphinx.json
|
|
99
|
+
- test/fixtures/thinking-sphinxx.json
|
|
100
|
+
- test/test_gem-versions.rb
|
|
101
|
+
- test/test_helper.rb
|
|
52
102
|
has_rdoc: true
|
|
53
103
|
homepage: https://github.com/airblade/gem-versions
|
|
54
104
|
licenses: []
|
|
@@ -83,5 +133,8 @@ rubygems_version: 1.3.7
|
|
|
83
133
|
signing_key:
|
|
84
134
|
specification_version: 3
|
|
85
135
|
summary: List all published versions of a gem.
|
|
86
|
-
test_files:
|
|
87
|
-
|
|
136
|
+
test_files:
|
|
137
|
+
- test/fixtures/thinking-sphinx.json
|
|
138
|
+
- test/fixtures/thinking-sphinxx.json
|
|
139
|
+
- test/test_gem-versions.rb
|
|
140
|
+
- test/test_helper.rb
|