g5gem 0.1.0

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
+ pkg/*
2
+ *.gem
3
+ .bundle
4
+ Gemfile.lock
data/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm use --create 1.8.7-p299@g5gem
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in g5gem.gemspec
4
+ gemspec
data/README ADDED
@@ -0,0 +1 @@
1
+ g5gem - making it easier to deploy our gems
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
data/bin/g5gem ADDED
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'g5gem'
4
+ require 'thor'
5
+
6
+ class App < Thor
7
+ desc "release GEM", "release gem to uranus"
8
+ method_options :force => :boolean
9
+ def release(name)
10
+ if name[-3,3] == 'gem'
11
+ G5gem.transer_file_to_server(name)
12
+ G5gem.rebuild_index
13
+ say "#{name} deployed", :green
14
+ else
15
+ say "Sorry dude. Needs to be a gem", :red
16
+ end
17
+ end
18
+ end
19
+ App.start
data/g5gem.gemspec ADDED
@@ -0,0 +1,23 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "g5gem/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "g5gem"
7
+ s.version = G5gem::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Mark Turner"]
10
+ s.email = ["mark@amerine.net"]
11
+ s.homepage = ""
12
+ s.summary = "An easy way to install/update gems on the g5platform"
13
+ s.description = "An easy way to install/update gems on the g5platform"
14
+
15
+ s.rubyforge_project = "g5gem"
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
+ s.add_dependency('thor', '0.14.6')
22
+ s.add_dependency('net-scp', '1.0.4')
23
+ end
@@ -0,0 +1,3 @@
1
+ module G5gem
2
+ VERSION = "0.1.0"
3
+ end
data/lib/g5gem.rb ADDED
@@ -0,0 +1,16 @@
1
+ require 'net/ssh'
2
+ require 'net/scp'
3
+
4
+ module G5gem
5
+ def self.transer_file_to_server(file)
6
+ Net::SCP.start("util1", "g5search") do |scp|
7
+ scp.upload(File.expand_path(file), "/shared/gems/gems")
8
+ end
9
+ end
10
+
11
+ def self.rebuild_index
12
+ Net::SSH.start("util1", "g5search") do |ssh|
13
+ ssh.exec "/usr/bin/gem generate_index -d /shared/gems"
14
+ end
15
+ end
16
+ end
metadata ADDED
@@ -0,0 +1,107 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: g5gem
3
+ version: !ruby/object:Gem::Version
4
+ hash: 27
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 0
10
+ version: 0.1.0
11
+ platform: ruby
12
+ authors:
13
+ - Mark Turner
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-01-26 00:00:00 -08:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: thor
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - "="
28
+ - !ruby/object:Gem::Version
29
+ hash: 43
30
+ segments:
31
+ - 0
32
+ - 14
33
+ - 6
34
+ version: 0.14.6
35
+ type: :runtime
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ name: net-scp
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - "="
44
+ - !ruby/object:Gem::Version
45
+ hash: 31
46
+ segments:
47
+ - 1
48
+ - 0
49
+ - 4
50
+ version: 1.0.4
51
+ type: :runtime
52
+ version_requirements: *id002
53
+ description: An easy way to install/update gems on the g5platform
54
+ email:
55
+ - mark@amerine.net
56
+ executables:
57
+ - g5gem
58
+ extensions: []
59
+
60
+ extra_rdoc_files: []
61
+
62
+ files:
63
+ - .gitignore
64
+ - .rvmrc
65
+ - Gemfile
66
+ - README
67
+ - Rakefile
68
+ - bin/g5gem
69
+ - g5gem.gemspec
70
+ - lib/g5gem.rb
71
+ - lib/g5gem/version.rb
72
+ has_rdoc: true
73
+ homepage: ""
74
+ licenses: []
75
+
76
+ post_install_message:
77
+ rdoc_options: []
78
+
79
+ require_paths:
80
+ - lib
81
+ required_ruby_version: !ruby/object:Gem::Requirement
82
+ none: false
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ hash: 3
87
+ segments:
88
+ - 0
89
+ version: "0"
90
+ required_rubygems_version: !ruby/object:Gem::Requirement
91
+ none: false
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ hash: 3
96
+ segments:
97
+ - 0
98
+ version: "0"
99
+ requirements: []
100
+
101
+ rubyforge_project: g5gem
102
+ rubygems_version: 1.3.7
103
+ signing_key:
104
+ specification_version: 3
105
+ summary: An easy way to install/update gems on the g5platform
106
+ test_files: []
107
+