gem-dandy 0.2.0 → 0.2.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/Rakefile +3 -3
- data/VERSION +1 -1
- data/gem-dandy.gemspec +6 -6
- data/lib/gem_dandy.rb +7 -7
- data/lib/gem_dandy/{rubyforge_profile.rb → rubygems_profile.rb} +5 -5
- metadata +8 -8
data/Rakefile
CHANGED
@@ -5,10 +5,10 @@ begin
|
|
5
5
|
require 'jeweler'
|
6
6
|
Jeweler::Tasks.new do |gem|
|
7
7
|
gem.name = "gem-dandy"
|
8
|
-
gem.summary = %Q{
|
9
|
-
gem.description = %Q{
|
8
|
+
gem.summary = %Q{Enjoy Gem management.}
|
9
|
+
gem.description = %Q{Utilities to use to manage your gems.}
|
10
10
|
gem.email = "ninja-loss@gmail.com"
|
11
|
-
gem.homepage = "http://github.com/
|
11
|
+
gem.homepage = "http://github.com/ninja-loss/gem-dandy"
|
12
12
|
gem.authors = ["ninja-loss"]
|
13
13
|
gem.add_development_dependency "rspec", ">= 1.2.9"
|
14
14
|
gem.add_dependency "trollop", "1.16.2"
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
data/gem-dandy.gemspec
CHANGED
@@ -5,13 +5,13 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{gem-dandy}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["ninja-loss"]
|
12
|
-
s.date = %q{2010-11-
|
12
|
+
s.date = %q{2010-11-10}
|
13
13
|
s.default_executable = %q{gemdandy}
|
14
|
-
s.description = %q{
|
14
|
+
s.description = %q{Utilities to use to manage your gems.}
|
15
15
|
s.email = %q{ninja-loss@gmail.com}
|
16
16
|
s.executables = ["gemdandy"]
|
17
17
|
s.extra_rdoc_files = [
|
@@ -32,16 +32,16 @@ Gem::Specification.new do |s|
|
|
32
32
|
"lib/gem_dandy/config_file.rb",
|
33
33
|
"lib/gem_dandy/configuration.rb",
|
34
34
|
"lib/gem_dandy/output.rb",
|
35
|
-
"lib/gem_dandy/
|
35
|
+
"lib/gem_dandy/rubygems_profile.rb",
|
36
36
|
"spec/gem-dandy_spec.rb",
|
37
37
|
"spec/spec.opts",
|
38
38
|
"spec/spec_helper.rb"
|
39
39
|
]
|
40
|
-
s.homepage = %q{http://github.com/
|
40
|
+
s.homepage = %q{http://github.com/ninja-loss/gem-dandy}
|
41
41
|
s.rdoc_options = ["--charset=UTF-8"]
|
42
42
|
s.require_paths = ["lib"]
|
43
43
|
s.rubygems_version = %q{1.3.7}
|
44
|
-
s.summary = %q{
|
44
|
+
s.summary = %q{Enjoy Gem management.}
|
45
45
|
s.test_files = [
|
46
46
|
"spec/gem-dandy_spec.rb",
|
47
47
|
"spec/spec_helper.rb"
|
data/lib/gem_dandy.rb
CHANGED
@@ -10,7 +10,7 @@ module GemDandy
|
|
10
10
|
autoload :ConfigFile, 'gem_dandy/config_file'
|
11
11
|
autoload :Configuration, 'gem_dandy/configuration'
|
12
12
|
autoload :Output, 'gem_dandy/output'
|
13
|
-
autoload :
|
13
|
+
autoload :RubygemsProfile, 'gem_dandy/rubygems_profile'
|
14
14
|
|
15
15
|
VERSION = File.read( "#{File.dirname __FILE__}/../VERSION" ).chomp
|
16
16
|
end
|
@@ -44,14 +44,14 @@ cmd_opts = case( cmd )
|
|
44
44
|
Trollop::options do
|
45
45
|
opt :clear, "Clear the ~/.gemdandyrc file"
|
46
46
|
opt :profile, "The name of the profile", :type => String
|
47
|
-
opt :key, "The
|
47
|
+
opt :key, "The RubyGems API key", :type => String
|
48
48
|
end
|
49
49
|
when "profile"
|
50
50
|
Trollop::options do
|
51
|
-
opt :active, "Show the currently active
|
52
|
-
opt :list, "List all of the configured
|
53
|
-
opt :show, "Show the configured
|
54
|
-
opt :switch, "Switch the currently active
|
51
|
+
opt :active, "Show the currently active RubyGems profile"
|
52
|
+
opt :list, "List all of the configured RubyGems profiles / API keys"
|
53
|
+
opt :show, "Show the configured RubyGems API key for profile <s>", :type => String, :short => "-z"
|
54
|
+
opt :switch, "Switch the currently active RubyGems profile to <s>", :type => String
|
55
55
|
end
|
56
56
|
else
|
57
57
|
Trollop::die "unknown command #{cmd.inspect}"
|
@@ -63,5 +63,5 @@ case( cmd )
|
|
63
63
|
when "config"
|
64
64
|
GemDandy::Configuration.new( cmd_opts ).perform_action
|
65
65
|
when "profile"
|
66
|
-
GemDandy::
|
66
|
+
GemDandy::RubygemsProfile.new( cmd_opts ).perform_action
|
67
67
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module GemDandy
|
2
|
-
class
|
2
|
+
class RubygemsProfile < Command
|
3
3
|
include ConfigFile
|
4
4
|
include Output
|
5
5
|
|
@@ -28,7 +28,7 @@ module GemDandy
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def display_active_profile
|
31
|
-
report "Active
|
31
|
+
report "Active RubyGems Profile: #{current_profile}"
|
32
32
|
end
|
33
33
|
|
34
34
|
def list_configured_profiles
|
@@ -38,7 +38,7 @@ module GemDandy
|
|
38
38
|
def show_configured_profile( identifier )
|
39
39
|
key = find_api_key( identifier )
|
40
40
|
msg = (key.nil? || key.empty?) ?
|
41
|
-
"There is no
|
41
|
+
"There is no RubyGems API key configured for the #{identifier} profile" :
|
42
42
|
"#{identifier}: #{key}"
|
43
43
|
report msg
|
44
44
|
end
|
@@ -48,10 +48,10 @@ module GemDandy
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def switch_profile_to( identifier )
|
51
|
-
report "Switching active
|
51
|
+
report "Switching active RubyGems profile to #{options[:switch]}..."
|
52
52
|
credentials_hash = deployed_key_hash || {}
|
53
53
|
unless key = find_api_key( identifier )
|
54
|
-
die "#{identifier} is not a configured
|
54
|
+
die "#{identifier} is not a configured RubyGems API profile."
|
55
55
|
end
|
56
56
|
credentials_hash.merge!( credentials_key => key )
|
57
57
|
remove_credentials_file
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gem-dandy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- ninja-loss
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-11-
|
18
|
+
date: 2010-11-10 00:00:00 -06:00
|
19
19
|
default_executable: gemdandy
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -50,7 +50,7 @@ dependencies:
|
|
50
50
|
version: 1.16.2
|
51
51
|
type: :runtime
|
52
52
|
version_requirements: *id002
|
53
|
-
description:
|
53
|
+
description: Utilities to use to manage your gems.
|
54
54
|
email: ninja-loss@gmail.com
|
55
55
|
executables:
|
56
56
|
- gemdandy
|
@@ -73,12 +73,12 @@ files:
|
|
73
73
|
- lib/gem_dandy/config_file.rb
|
74
74
|
- lib/gem_dandy/configuration.rb
|
75
75
|
- lib/gem_dandy/output.rb
|
76
|
-
- lib/gem_dandy/
|
76
|
+
- lib/gem_dandy/rubygems_profile.rb
|
77
77
|
- spec/gem-dandy_spec.rb
|
78
78
|
- spec/spec.opts
|
79
79
|
- spec/spec_helper.rb
|
80
80
|
has_rdoc: true
|
81
|
-
homepage: http://github.com/
|
81
|
+
homepage: http://github.com/ninja-loss/gem-dandy
|
82
82
|
licenses: []
|
83
83
|
|
84
84
|
post_install_message:
|
@@ -110,7 +110,7 @@ rubyforge_project:
|
|
110
110
|
rubygems_version: 1.3.7
|
111
111
|
signing_key:
|
112
112
|
specification_version: 3
|
113
|
-
summary:
|
113
|
+
summary: Enjoy Gem management.
|
114
114
|
test_files:
|
115
115
|
- spec/gem-dandy_spec.rb
|
116
116
|
- spec/spec_helper.rb
|