gemcutter 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.textile ADDED
@@ -0,0 +1,45 @@
1
+ h1. gemcutter
2
+
3
+ Kickass and simple RubyGem hosting.
4
+
5
+ h2. Purpose
6
+
7
+ * Provide a better API for dealing with gems
8
+ * Create more transparent and accessible project pages
9
+ * Enable the community to improve and enhance the site
10
+
11
+ h2. Concerns
12
+
13
+ *How annoying will this be to upgrade?*<br />
14
+ The plan is to use Gemcutter as your canonical gem repository. All of the same gems that were available on RubyForge will be ready for your consumption. The gemcutter gem will hopefully make this very easy to switch over.
15
+
16
+ *How can the process for publishing gems get any easier?*<br />
17
+ Through one command- @gem push awesome-0.0.0.gem@.
18
+
19
+ *Will the process change for consumers?*<br />
20
+ No. In fact it will make their lives better: it will be easier to get to project pages with clearer information and the same data they're used to.
21
+
22
+ *Why is this better than GitHub gem hosting?*<br />
23
+ GitHub's gem system is great, but it's not the canonical source by default. The nice part is that it takes the approval process out, but the namespacing on gems makes it hard for those new to the community to determine what is the right copy to use. Also, the goals here are much different and the site as a whole can be improved over time by the community.
24
+
25
+ *How can I gain access of my gem that was available through RubyForge?*<br />
26
+ The plan currently is to provide a key to upload to your RubyForge account, and then Gemcutter will mark you as the owner based on that.
27
+
28
+ *How can I help?*<br />
29
+ Fork away, and read the next section! Feel free to bug qrush via a message or on FreeNode if you're interested.
30
+
31
+ h2. Next up
32
+
33
+ What's finished so far:
34
+
35
+ * Simple site (list, push, update)
36
+ * Releasing/updating gems via @gem push@
37
+ * Project pages
38
+ * Authentication/accounts
39
+ * Gem server up and running
40
+
41
+ What's coming:
42
+
43
+ * RubyForge migration for gem projects
44
+ * Fully fledged API documentation
45
+ * Search via the API and site
@@ -0,0 +1,20 @@
1
+ class Gem::Commands::DowngradeCommand < Gem::Command
2
+ DESCRIPTION = 'Return to using RubyForge as your primary gem source'
3
+
4
+ def description
5
+ DESCRIPTION
6
+ end
7
+
8
+ def initialize
9
+ super 'downgrade', DESCRIPTION
10
+ end
11
+
12
+ def execute
13
+ say "Your primary gem source is now gems.rubyforge.org"
14
+ Gem.sources.delete "http://gemcutter.org"
15
+ Gem.sources << "http://gems.rubyforge.org"
16
+ Gem.configuration.write
17
+ end
18
+ end
19
+
20
+ Gem::CommandManager.instance.register_command :downgrade
@@ -0,0 +1,41 @@
1
+ require 'yaml'
2
+ require 'net/http'
3
+
4
+ class Gem::Commands::PushCommand < Gem::Command
5
+ DESCRIPTION = 'Push a gem up to Gemcutter'
6
+
7
+ def description
8
+ DESCRIPTION
9
+ end
10
+
11
+ def arguments
12
+ "GEM built gem to push up"
13
+ end
14
+
15
+ def usage
16
+ "#{programe_name} GEM"
17
+ end
18
+
19
+ def initialize
20
+ super 'push', DESCRIPTION
21
+ end
22
+
23
+ def execute
24
+ say "Pushing gem to Gemcutter..."
25
+
26
+ name = get_one_gem_name
27
+ config = YAML.load_file(File.expand_path("~/.gemrc"))
28
+ site = ENV['TEST'] ? "local" : "org"
29
+ url = URI.parse("http://gemcutter.#{site}/gems")
30
+
31
+ request = Net::HTTP::Post.new(url.path)
32
+ request.body = File.open(name).read
33
+ request.content_length = request.body.size
34
+ request.basic_auth config[:gemcutter_email], config[:gemcutter_password]
35
+
36
+ response = Net::HTTP.new(url.host, url.port).start { |http| http.request(request) }
37
+ say response.body
38
+ end
39
+ end
40
+
41
+ Gem::CommandManager.instance.register_command :push
@@ -0,0 +1,20 @@
1
+ class Gem::Commands::UpgradeCommand < Gem::Command
2
+ DESCRIPTION = 'Upgrade your gem source to Gemcutter'
3
+
4
+ def description
5
+ DESCRIPTION
6
+ end
7
+
8
+ def initialize
9
+ super 'upgrade', DESCRIPTION
10
+ end
11
+
12
+ def execute
13
+ say "Upgrading your primary gem source to gems.gemcutter.org"
14
+ Gem.sources.delete "http://gems.rubyforge.org"
15
+ Gem.sources << "http://gemcutter.org"
16
+ Gem.configuration.write
17
+ end
18
+ end
19
+
20
+ Gem::CommandManager.instance.register_command :upgrade
@@ -0,0 +1,5 @@
1
+ require 'rubygems/command_manager'
2
+
3
+ require 'commands/downgrade'
4
+ require 'commands/push'
5
+ require 'commands/upgrade'
metadata ADDED
@@ -0,0 +1,59 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gemcutter
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Nick Quaranto
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-06-02 00:00:00 -04:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description:
17
+ email: nick@quaran.to
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - README.textile
24
+ files:
25
+ - lib/commands/downgrade.rb
26
+ - lib/commands/push.rb
27
+ - lib/commands/upgrade.rb
28
+ - lib/rubygems_plugin.rb
29
+ - README.textile
30
+ has_rdoc: true
31
+ homepage: http://github.com/qrush/gemcutter
32
+ licenses: []
33
+
34
+ post_install_message:
35
+ rdoc_options:
36
+ - --charset=UTF-8
37
+ require_paths:
38
+ - lib
39
+ required_ruby_version: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: "0"
44
+ version:
45
+ required_rubygems_version: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: "0"
50
+ version:
51
+ requirements: []
52
+
53
+ rubyforge_project: gemcutter
54
+ rubygems_version: 1.3.3
55
+ signing_key:
56
+ specification_version: 3
57
+ summary: Kickass gem hosting
58
+ test_files: []
59
+