spitball-client 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in spitball-client.gemspec
4
+ gemspec
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
data/bin/spitball ADDED
@@ -0,0 +1,60 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'spitball'
4
+ require 'optparse'
5
+ require 'net/http'
6
+ require 'fileutils'
7
+
8
+ STDOUT.sync = true
9
+
10
+ args = {}
11
+ opts = OptionParser.new do |opts|
12
+ opts.banner = "Usage: spitball [options] GEMFILE ARCHIVE"
13
+ opts.separator ""
14
+ opts.separator "options:"
15
+
16
+ opts.on('-h', '--host HOST', 'Get the tarball from a remote spitball server') do |host|
17
+ args[:host] = host
18
+ end
19
+
20
+ opts.on('-p', '--port PORT', 'Specify the remote server port. Default 8080') do |port|
21
+ args[:port] = port
22
+ end
23
+
24
+ opts.on('-v', '--version', 'Display the version and quit') do
25
+ puts Spitball::VERSION
26
+ exit!(0)
27
+ end
28
+
29
+ opts.on('--without a,b,c', Array, 'Excluded groups in the tarball. Does not apply to remote spitballs') do |without|
30
+ args[:without] = without
31
+ end
32
+
33
+ opts.on('-g', '--generate-only', "Only generate, don't download") do
34
+ args[:generate] = true
35
+ end
36
+
37
+ opts.separator ""
38
+ opts.separator "environment variables:"
39
+ opts.separator "\tSPITBALL_CACHE\t\t Specifies the cache dir. Defaults to /tmp/spitball"
40
+ opts.separator ""
41
+ end
42
+
43
+ opts.permute!(ARGV)
44
+
45
+ args[:gemfile] = ARGV[0]
46
+ args[:destination] = ARGV[1]
47
+
48
+ unless args[:gemfile] and args[:destination]
49
+ puts opts.help
50
+ exit 1
51
+ end
52
+
53
+ gemfile = File.read(args[:gemfile])
54
+ gemfile_lock = File.read("#{args[:gemfile]}.lock")
55
+
56
+ ball = args[:host] ?
57
+ Spitball::Remote.new(gemfile, gemfile_lock, :host => args[:host], :port => (args[:port] || 8080).to_i, :without => args[:without]) :
58
+ Spitball.new(gemfile, gemfile_lock, :without => args[:without])
59
+
60
+ args[:generate] ? ball.cache! : ball.copy_to(args[:destination])
@@ -0,0 +1,5 @@
1
+ module Spitball
2
+ module Client
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,23 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "spitball-client"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "spitball-client"
7
+ s.version = Spitball::Client::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Matt Freels", "Brandon Mitchell", "Joshua Hull"]
10
+ s.email = "freels@twitter.com"
11
+ s.homepage = ""
12
+ s.summary = %q{Use bundler to generate gem tarball packages -- client!}
13
+ s.description = %q{Use bundler to generate gem tarball packages - client!}
14
+
15
+ s.rubyforge_project = "spitball-client"
16
+
17
+ s.files = `git ls-files`.split("\n")
18
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
+ s.require_paths = ["lib"]
21
+
22
+ s.add_dependency 'spitball', '~> 0.5.0'
23
+ end
metadata ADDED
@@ -0,0 +1,89 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: spitball-client
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Matt Freels
14
+ - Brandon Mitchell
15
+ - Joshua Hull
16
+ autorequire:
17
+ bindir: bin
18
+ cert_chain: []
19
+
20
+ date: 2011-04-25 00:00:00 -07:00
21
+ default_executable:
22
+ dependencies:
23
+ - !ruby/object:Gem::Dependency
24
+ name: spitball
25
+ prerelease: false
26
+ requirement: &id001 !ruby/object:Gem::Requirement
27
+ none: false
28
+ requirements:
29
+ - - ~>
30
+ - !ruby/object:Gem::Version
31
+ hash: 11
32
+ segments:
33
+ - 0
34
+ - 5
35
+ - 0
36
+ version: 0.5.0
37
+ type: :runtime
38
+ version_requirements: *id001
39
+ description: Use bundler to generate gem tarball packages - client!
40
+ email: freels@twitter.com
41
+ executables:
42
+ - spitball
43
+ extensions: []
44
+
45
+ extra_rdoc_files: []
46
+
47
+ files:
48
+ - .gitignore
49
+ - Gemfile
50
+ - Rakefile
51
+ - bin/spitball
52
+ - lib/spitball-client.rb
53
+ - spitball-client.gemspec
54
+ has_rdoc: true
55
+ homepage: ""
56
+ licenses: []
57
+
58
+ post_install_message:
59
+ rdoc_options: []
60
+
61
+ require_paths:
62
+ - lib
63
+ required_ruby_version: !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ hash: 3
69
+ segments:
70
+ - 0
71
+ version: "0"
72
+ required_rubygems_version: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ hash: 3
78
+ segments:
79
+ - 0
80
+ version: "0"
81
+ requirements: []
82
+
83
+ rubyforge_project: spitball-client
84
+ rubygems_version: 1.6.2
85
+ signing_key:
86
+ specification_version: 3
87
+ summary: Use bundler to generate gem tarball packages -- client!
88
+ test_files: []
89
+