fake_gem_push 0.0.1
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/lib/fake_gem_push/version.rb +3 -0
- data/lib/rubygems/commands/fake_push_command.rb +19 -0
- data/lib/rubygems_plugin.rb +7 -0
- metadata +47 -0
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'rubygems/commands/push_command'
|
2
|
+
|
3
|
+
# Because of the way Gem commands are loaded, it isn't possible at this time to
|
4
|
+
# override the #send_gem method without resorting to monkey patching.
|
5
|
+
class Gem::Commands::PushCommand < Gem::Command
|
6
|
+
def execute
|
7
|
+
name = get_one_gem_name
|
8
|
+
gem_name, version = File.basename(name).scan(/(.*)-([\d\.]+).gem/).first
|
9
|
+
|
10
|
+
sleep 0.5
|
11
|
+
puts 'Pushing gem to RubyGems.org...'
|
12
|
+
|
13
|
+
sleep 2
|
14
|
+
puts "Successfully registered gem: #{gem_name} (#{version})"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
# Define the FakePushCommand class so the fake_push command also works.
|
19
|
+
Gem::Commands::FakePushCommand = Class.new(Gem::Commands::PushCommand)
|
@@ -0,0 +1,7 @@
|
|
1
|
+
require 'rubygems/command_manager'
|
2
|
+
|
3
|
+
# We have to require this here instead of relying on RubyGems own command
|
4
|
+
# loading code in order to ensure the monkey patch is loaded.
|
5
|
+
require 'rubygems/commands/fake_push_command'
|
6
|
+
|
7
|
+
Gem::CommandManager.instance.register_command :fake_push
|
metadata
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fake_gem_push
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Tyler Hunt
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2011-11-04 00:00:00.000000000Z
|
13
|
+
dependencies: []
|
14
|
+
description:
|
15
|
+
email:
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- lib/fake_gem_push/version.rb
|
21
|
+
- lib/rubygems/commands/fake_push_command.rb
|
22
|
+
- lib/rubygems_plugin.rb
|
23
|
+
homepage: http://github.com/tylerhunt/remockable
|
24
|
+
licenses: []
|
25
|
+
post_install_message:
|
26
|
+
rdoc_options: []
|
27
|
+
require_paths:
|
28
|
+
- lib
|
29
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
30
|
+
none: false
|
31
|
+
requirements:
|
32
|
+
- - ! '>='
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
36
|
+
none: false
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
requirements: []
|
42
|
+
rubyforge_project:
|
43
|
+
rubygems_version: 1.8.6
|
44
|
+
signing_key:
|
45
|
+
specification_version: 3
|
46
|
+
summary: Stubs out the gem push command for doing simulating pushes.
|
47
|
+
test_files: []
|