qrush-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 API (list, push, update)
36
+ * Releasing/updating gems via @gem push@
37
+
38
+ What's coming:
39
+
40
+ * Getting the gem server up and running with the index (and hopefully improving its speed)
41
+ * Project pages
42
+ * Authentication/accounts (moving to Rails to support this, probably)
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://gems.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,37 @@
1
+ require 'net/http'
2
+
3
+ class Gem::Commands::PushCommand < Gem::Command
4
+ DESCRIPTION = 'Push a gem up to Gemcutter'
5
+
6
+ def description
7
+ DESCRIPTION
8
+ end
9
+
10
+ def arguments
11
+ "GEM built gem to push up"
12
+ end
13
+
14
+ def usage
15
+ "#{programe_name} GEM"
16
+ end
17
+
18
+ def initialize
19
+ super 'push', DESCRIPTION
20
+ end
21
+
22
+ def execute
23
+ say "Pushing gem to Gemcutter..."
24
+
25
+ gem = get_one_gem_name
26
+ url = URI.parse("http://gemcutter.org/gems")
27
+ request = Net::HTTP::Post.new(url.path)
28
+ request.body = File.open(gem).read
29
+ request.content_length = request.body.size
30
+ request.content_type = "application/octet-stream"
31
+
32
+ response = Net::HTTP.new(url.host, url.port).start { |http| http.request(request) }
33
+ say response.body
34
+ end
35
+ end
36
+
37
+ 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://gems.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,57 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: qrush-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-05-30 00:00:00 -07: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: false
31
+ homepage: http://github.com/qrush/gemcutter
32
+ post_install_message:
33
+ rdoc_options:
34
+ - --charset=UTF-8
35
+ require_paths:
36
+ - lib
37
+ required_ruby_version: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: "0"
42
+ version:
43
+ required_rubygems_version: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: "0"
48
+ version:
49
+ requirements: []
50
+
51
+ rubyforge_project:
52
+ rubygems_version: 1.2.0
53
+ signing_key:
54
+ specification_version: 3
55
+ summary: Kickass gem hosting
56
+ test_files: []
57
+