localport 0.0.0
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/Gemfile +15 -0
- data/README +78 -0
- data/Rakefile +42 -0
- data/VERSION +1 -0
- data/bin/localport +9 -0
- data/lib/localport/command.rb +203 -0
- data/lib/localport/config.rb +95 -0
- data/lib/localport.rb +67 -0
- data/localport.gemspec +64 -0
- data/spec/spec_helper.rb +12 -0
- metadata +131 -0
data/Gemfile
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
# Add dependencies required to use your gem here.
|
3
|
+
# Example:
|
4
|
+
# gem "activesupport", ">= 2.3.5"
|
5
|
+
gem "highline"
|
6
|
+
|
7
|
+
# Add dependencies to develop your gem here.
|
8
|
+
# Include everything needed to run rake, tests, features, etc.
|
9
|
+
group :development do
|
10
|
+
gem "rspec", "~> 2.3.0"
|
11
|
+
gem "yard", "~> 0.6.0"
|
12
|
+
gem "bundler", "~> 1.0.0"
|
13
|
+
gem "jeweler", "~> 1.6.2"
|
14
|
+
gem "rcov", ">= 0"
|
15
|
+
end
|
data/README
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
== Local Application Port system
|
2
|
+
|
3
|
+
Local Application Management system. This application just like MacPorts on Mac
|
4
|
+
OS X.
|
5
|
+
An application has some versioned. But we use various version case by case.
|
6
|
+
For example Ruby application is now moving from 1.8 to 1.9.
|
7
|
+
So we must build Ruby 1.8 and Ruby 1.9 environment.
|
8
|
+
localport make us build multiversion environment easyly.
|
9
|
+
But there is some restrictions, following:
|
10
|
+
|
11
|
+
* When you install some application, you must specify one directory.
|
12
|
+
Like this,
|
13
|
+
/Users/user/apps
|
14
|
+
This directory is called "application directory".
|
15
|
+
|
16
|
+
* And, you must specify execute directory. Like this,
|
17
|
+
/Users/user/local/bin
|
18
|
+
This directory is called "executional directory"
|
19
|
+
|
20
|
+
Fox example, let's control Ruby-1.8.7.-p160 with localport.
|
21
|
+
|
22
|
+
1) Build, and Install Ruby-1.8.7-p160 to "application directory".
|
23
|
+
% tar zxvf ruby-1.8.7-p160.tar.gz
|
24
|
+
% cd ruby-1.8.7-p160
|
25
|
+
% ./configure --prefix=/Users/user/apps/ruby/ruby-1.8.7-p160
|
26
|
+
|
27
|
+
2) Install that to "execution directory"
|
28
|
+
% localport install /Users/user/apps/ruby/ruby-1.8.7-p160
|
29
|
+
This command make symbolic links that are Ruby applications in
|
30
|
+
/Users/user/apps/ruby/ruby-1.8.7-p160/bin.
|
31
|
+
|
32
|
+
3) Activate that.
|
33
|
+
% localport activate ruby-1.8.7-p160
|
34
|
+
This command make installed symbolic ruby-1.8.7-p160 point symbolic link.
|
35
|
+
apps/ruby/ruby-1.8.7-p160/bin/ruby
|
36
|
+
<- local/bin/ruby-1.8.7-p160
|
37
|
+
<- local/bin/ruby
|
38
|
+
|
39
|
+
4) Deactivate that.
|
40
|
+
If you want to execute another Ruby version with no specified version
|
41
|
+
command, 'ruby'.
|
42
|
+
% locaport deactivate ruby-1.8.7-p160
|
43
|
+
This command remove symbolic link 'local/bin/ruby'.
|
44
|
+
|
45
|
+
== Install
|
46
|
+
|
47
|
+
Just easy. Just run rake.
|
48
|
+
|
49
|
+
% Rake
|
50
|
+
|
51
|
+
== Usage
|
52
|
+
|
53
|
+
This application provide some commands. Like MacPorts.
|
54
|
+
|
55
|
+
= install
|
56
|
+
|
57
|
+
To specify an application path.
|
58
|
+
|
59
|
+
% localport install {app}
|
60
|
+
|
61
|
+
= installed
|
62
|
+
|
63
|
+
To list up installed applications.
|
64
|
+
|
65
|
+
% localport installed [app]
|
66
|
+
|
67
|
+
= activate
|
68
|
+
|
69
|
+
To activate installed application.
|
70
|
+
|
71
|
+
% localport activate {app}
|
72
|
+
|
73
|
+
= deactivate
|
74
|
+
|
75
|
+
To deactivate installed application.
|
76
|
+
Delete internal symbolic link.
|
77
|
+
|
78
|
+
% localport deactivate {app}
|
data/Rakefile
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
|
14
|
+
require 'jeweler'
|
15
|
+
Jeweler::Tasks.new do |gem|
|
16
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
|
+
gem.name = "localport"
|
18
|
+
gem.homepage = "http://github.com/yoppi/localport"
|
19
|
+
gem.license = "MIT"
|
20
|
+
gem.summary = %Q{Local Application management system}
|
21
|
+
gem.description = %Q{localport is a local application management system}
|
22
|
+
gem.email = "y.hirokazu@gmail.com"
|
23
|
+
gem.authors = ["yoppi"]
|
24
|
+
# dependencies defined in Gemfile
|
25
|
+
end
|
26
|
+
Jeweler::RubygemsDotOrgTasks.new
|
27
|
+
|
28
|
+
require 'rspec/core'
|
29
|
+
require 'rspec/core/rake_task'
|
30
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
31
|
+
spec.pattern = FileList['spec/**/*_spec.rb']
|
32
|
+
end
|
33
|
+
|
34
|
+
RSpec::Core::RakeTask.new(:rcov) do |spec|
|
35
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
36
|
+
spec.rcov = true
|
37
|
+
end
|
38
|
+
|
39
|
+
task :default => :spec
|
40
|
+
|
41
|
+
require 'yard'
|
42
|
+
YARD::Rake::YardocTask.new
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.0
|
data/bin/localport
ADDED
@@ -0,0 +1,203 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
#
|
3
|
+
# Definition localport commands
|
4
|
+
#
|
5
|
+
require 'localport/config'
|
6
|
+
|
7
|
+
module LocalPort
|
8
|
+
class Command
|
9
|
+
attr_reader :commands
|
10
|
+
|
11
|
+
def self.instance
|
12
|
+
@command ||= new
|
13
|
+
end
|
14
|
+
|
15
|
+
def initialize
|
16
|
+
@commands = {}
|
17
|
+
register_command(
|
18
|
+
:name => "install",
|
19
|
+
:args => true,
|
20
|
+
:exec => lambda {|args|
|
21
|
+
install args
|
22
|
+
}
|
23
|
+
)
|
24
|
+
|
25
|
+
register_command(
|
26
|
+
:name => "uninstall",
|
27
|
+
:args => true,
|
28
|
+
:exec => lambda {|args|
|
29
|
+
uninstall args
|
30
|
+
}
|
31
|
+
)
|
32
|
+
|
33
|
+
register_command(
|
34
|
+
:name => "installed",
|
35
|
+
:args => false,
|
36
|
+
:exec => lambda {|args|
|
37
|
+
if args.size > 0
|
38
|
+
args.each do |app|
|
39
|
+
puts "#{app}:"
|
40
|
+
config.installed[app].keys.each {|ver|
|
41
|
+
puts_version(app, ver)
|
42
|
+
}
|
43
|
+
end
|
44
|
+
else
|
45
|
+
config.installed.each do |app, versions|
|
46
|
+
puts "#{app}:"
|
47
|
+
versions.keys.each {|ver|
|
48
|
+
puts_version(app, ver)
|
49
|
+
}
|
50
|
+
end
|
51
|
+
end
|
52
|
+
}
|
53
|
+
)
|
54
|
+
|
55
|
+
register_command(
|
56
|
+
:name => "activate",
|
57
|
+
:args => true,
|
58
|
+
:exec => lambda {|args|
|
59
|
+
if args.size > 0
|
60
|
+
args.each {|app| activate app }
|
61
|
+
else
|
62
|
+
raise ArgumentError, "must specify verbose application name"
|
63
|
+
end
|
64
|
+
}
|
65
|
+
)
|
66
|
+
|
67
|
+
register_command(
|
68
|
+
:name => "deactivate",
|
69
|
+
:args => true,
|
70
|
+
:exec => lambda {|args|
|
71
|
+
if args
|
72
|
+
args.each {|app| deactivate app }
|
73
|
+
else
|
74
|
+
raise ArgumentError, "must specify verbose application name"
|
75
|
+
end
|
76
|
+
}
|
77
|
+
)
|
78
|
+
end
|
79
|
+
|
80
|
+
def puts_version(app, ver)
|
81
|
+
status = config.activated[app] == ver ? '*' : ' '
|
82
|
+
puts " %s #{ver}" % status
|
83
|
+
end
|
84
|
+
|
85
|
+
def install(paths)
|
86
|
+
if paths.size == 0
|
87
|
+
raise ArgumentError, "must specify to install application path"
|
88
|
+
end
|
89
|
+
|
90
|
+
paths.each do |path|
|
91
|
+
bins = Dir[sanitize(path) + "/bin/*"]
|
92
|
+
bins.each do |bin|
|
93
|
+
# e.g. /Users/user/apps/vim/vim-7.2/bin/vim
|
94
|
+
bin_app = bin.split('/')[-4] # => vim
|
95
|
+
bin_app_version = bin.split('/')[-3] # => vim-7.2
|
96
|
+
bin_version = bin_app_version.gsub(/^#{bin_app}/, '') # => -7.2
|
97
|
+
bin_name = File.basename bin # => vim
|
98
|
+
link = LocalPort::LINK_DIR + "/" + bin_name + bin_version
|
99
|
+
File.symlink(bin, link) unless File.exist? link
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
def uninstall(args)
|
105
|
+
# 指定されたアプリケーションがactivatedされていなければ,
|
106
|
+
# そのリンクを削除する
|
107
|
+
args.each do |arg|
|
108
|
+
app, ver = split_appver_to_app_ver arg
|
109
|
+
unless activated? app, ver
|
110
|
+
symlinks = config.installed[app][ver]
|
111
|
+
if symlinks
|
112
|
+
symlinks.each do |symlink|
|
113
|
+
File.unlink(symlink) if File.exist? symlink
|
114
|
+
end
|
115
|
+
else
|
116
|
+
puts "#{app}-#{ver} is not installed."
|
117
|
+
end
|
118
|
+
else
|
119
|
+
puts "#{app}-#{ver} is activated. Please deactivate this app before uninstalling"
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
def activate(appver)
|
125
|
+
# 指定されたアプリがactivateされていたら,エラーを吐いて終了
|
126
|
+
# NOTE: activatedされていたversionと指定したversionが同じであればactivateを実行する
|
127
|
+
# localportの問題点として,新にbin/以下に実行ファイルが追加される.
|
128
|
+
# その場合,install -> activateという流れを踏まなければならず,
|
129
|
+
# activateされているにもかかわらず同じバージョンの場合はactivate
|
130
|
+
# を実行しなければならない
|
131
|
+
# 違うバージョンのときのみにエラーを吐く
|
132
|
+
app, ver = split_appver_to_app_ver(appver)
|
133
|
+
if activated_ver = config.activated[app]
|
134
|
+
if activated_ver != ver
|
135
|
+
raise ArgumentError, "already activated *#{app}-#{activated_ver}*\nplease deactivate first"
|
136
|
+
end
|
137
|
+
end
|
138
|
+
create_symlink(app, ver)
|
139
|
+
end
|
140
|
+
|
141
|
+
def activated?(app, ver)
|
142
|
+
config.activated[app] == ver
|
143
|
+
end
|
144
|
+
|
145
|
+
def deactivate(name)
|
146
|
+
# 指定されたnameに対応するリンクを削除する
|
147
|
+
app, ver = split_appver_to_app_ver(name)
|
148
|
+
|
149
|
+
if config.activated[app] == ver
|
150
|
+
delete_symlink(app, ver)
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
def split_appver_to_app_ver(appver)
|
155
|
+
app = nil
|
156
|
+
config.installed.keys.each do |key|
|
157
|
+
app = key if /^#{key}/ =~ appver
|
158
|
+
end
|
159
|
+
ver = appver.gsub(/#{app}-?/, '')
|
160
|
+
|
161
|
+
[app, ver]
|
162
|
+
end
|
163
|
+
|
164
|
+
def register_command(arg)
|
165
|
+
@commands[arg[:name]] = arg
|
166
|
+
end
|
167
|
+
|
168
|
+
def find(name)
|
169
|
+
@commands[name]
|
170
|
+
end
|
171
|
+
|
172
|
+
def create_symlink(app, ver)
|
173
|
+
srcs = config.installed[app][ver]
|
174
|
+
srcs.each do |src|
|
175
|
+
new = src.gsub(/-?#{ver}/, '')
|
176
|
+
File.symlink(src, new) unless File.exist? new
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
def delete_symlink(app, ver)
|
181
|
+
srcs = config.installed[app][ver]
|
182
|
+
srcs.map {|src|
|
183
|
+
src.gsub(/-?#{ver}$/, '')
|
184
|
+
}.each {|src|
|
185
|
+
File.unlink src if File.exist? src
|
186
|
+
}
|
187
|
+
end
|
188
|
+
|
189
|
+
def sanitize(path)
|
190
|
+
# pathの最後から'/'を取り除く
|
191
|
+
raise ArgumentError, "#{path} does not exist." unless File.exist? path
|
192
|
+
if path[-1].chr == '/'
|
193
|
+
path = path.chop
|
194
|
+
end
|
195
|
+
path
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
def self.command
|
200
|
+
LocalPort::Command.instance
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
@@ -0,0 +1,95 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
#
|
3
|
+
# Cofigure localport
|
4
|
+
#
|
5
|
+
require 'rubygems' if RUBY_VERSION < "1.9"
|
6
|
+
require 'highline'
|
7
|
+
|
8
|
+
module LocalPort
|
9
|
+
HOME = ENV['HOME']
|
10
|
+
LocalPort::CONF_DIR = "#{HOME}/.localport"
|
11
|
+
LocalPort::CONF_FILE = LocalPort::CONF_DIR + "/config"
|
12
|
+
|
13
|
+
class Config
|
14
|
+
|
15
|
+
attr_reader :installed, :activated
|
16
|
+
|
17
|
+
def self.instance
|
18
|
+
@config ||= new
|
19
|
+
end
|
20
|
+
|
21
|
+
def initialize
|
22
|
+
@installed = {}
|
23
|
+
@activated = {}
|
24
|
+
end
|
25
|
+
|
26
|
+
def setup
|
27
|
+
ui = HighLine.new
|
28
|
+
apps_dir = ui.ask("Where is your applications directory: ")
|
29
|
+
link_dir = ui.ask("Where is your link directory: ")
|
30
|
+
config = template(apps_dir, link_dir)
|
31
|
+
Dir.mkdir(LocalPort::CONF_DIR) unless File.exist? LocalPort::CONF_DIR
|
32
|
+
File.open(LocalPort::CONF_FILE, 'w') {|io|
|
33
|
+
io << config
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
def template(apps_dir, link_dir)
|
38
|
+
"LocalPort::APPS_DIR = '%s'
|
39
|
+
LocalPort::LINK_DIR = '%s'" % [apps_dir, link_dir]
|
40
|
+
end
|
41
|
+
|
42
|
+
def installed_app
|
43
|
+
dir = LocalPort::LINK_DIR
|
44
|
+
symlinks = Dir["#{dir}/*"]
|
45
|
+
symlinks.each do |symlink|
|
46
|
+
next unless File.symlink? symlink
|
47
|
+
|
48
|
+
src = File.readlink symlink
|
49
|
+
same_dir_p = same_dir?(src, symlink)
|
50
|
+
if same_dir_p
|
51
|
+
symlink = src
|
52
|
+
src = File.readlink(src)
|
53
|
+
end
|
54
|
+
# APPS_DIRから各appの階層を計算する
|
55
|
+
# NOTE: APPS_DIRの直下がappであることを前提にしている
|
56
|
+
# e.g. /Users/user/apps/app1
|
57
|
+
# /app2
|
58
|
+
# => 4
|
59
|
+
level = LocalPort::APPS_DIR.split('/').size
|
60
|
+
app = src.split('/')[level]
|
61
|
+
|
62
|
+
# e.g. ruby-1.8.7-p160 => 1.8.7-p160
|
63
|
+
symlink_base = File.basename symlink
|
64
|
+
src_base = File.basename src
|
65
|
+
version = symlink_base.gsub(/#{src_base}-?/, '')
|
66
|
+
|
67
|
+
# srcがカレントにあるリンクを指しているのなら
|
68
|
+
# それがそのアプリのカレントファイルになる.
|
69
|
+
# @appsには追加しなくてよい
|
70
|
+
if same_dir_p
|
71
|
+
add_activated(app, version)
|
72
|
+
next
|
73
|
+
end
|
74
|
+
|
75
|
+
@installed[app] ||= {}
|
76
|
+
app_versions = @installed[app]
|
77
|
+
app_versions[version] ||= []
|
78
|
+
app_version = app_versions[version]
|
79
|
+
app_version << symlink unless app_version.include? symlink
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
def same_dir?(src, symlink)
|
84
|
+
File.dirname(src) == File.dirname(symlink)
|
85
|
+
end
|
86
|
+
|
87
|
+
def add_activated(app, version)
|
88
|
+
@activated[app] = version unless @activated[app]
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
def config
|
94
|
+
LocalPort::Config.instance
|
95
|
+
end
|
data/lib/localport.rb
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
#
|
3
|
+
# Add the directory containing this file to the start of the load path
|
4
|
+
# if it doesn't include alreadry.
|
5
|
+
libdir = File.dirname(__FILE__)
|
6
|
+
$LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include? libdir
|
7
|
+
|
8
|
+
require 'localport/config'
|
9
|
+
require 'localport/command'
|
10
|
+
|
11
|
+
##
|
12
|
+
# Local Application controll script.
|
13
|
+
#
|
14
|
+
|
15
|
+
module LocalPort
|
16
|
+
VERSION = "0.0.0"
|
17
|
+
|
18
|
+
class << self
|
19
|
+
def invoke(argv)
|
20
|
+
load_config() # to set location of applications
|
21
|
+
correct_installed_app() # correct installed applications
|
22
|
+
|
23
|
+
command, args = parse_args(argv)
|
24
|
+
command = find_command(command)
|
25
|
+
|
26
|
+
begin
|
27
|
+
command[:exec].call args
|
28
|
+
rescue => e
|
29
|
+
raise e
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def load_config
|
34
|
+
unless File.exist? LocalPort::CONF_FILE
|
35
|
+
config.setup
|
36
|
+
end
|
37
|
+
load LocalPort::CONF_FILE
|
38
|
+
end
|
39
|
+
|
40
|
+
def correct_installed_app
|
41
|
+
config.installed_app
|
42
|
+
end
|
43
|
+
|
44
|
+
def parse_args(args)
|
45
|
+
if args.size == 0
|
46
|
+
raise ArgumentError, usage
|
47
|
+
end
|
48
|
+
command = args.shift
|
49
|
+
[command, args]
|
50
|
+
end
|
51
|
+
|
52
|
+
def find_command(name)
|
53
|
+
command.find name
|
54
|
+
end
|
55
|
+
|
56
|
+
def usage
|
57
|
+
<<-"USAGE"
|
58
|
+
Usage: #{$1} {command} [app]
|
59
|
+
|
60
|
+
USAGE
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
if __FILE__ == $0
|
66
|
+
LocalPort.invoke(ARGV.dup)
|
67
|
+
end
|
data/localport.gemspec
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{localport}
|
8
|
+
s.version = "0.0.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = [%q{yoppi}]
|
12
|
+
s.date = %q{2011-12-28}
|
13
|
+
s.description = %q{localport is a local application management system}
|
14
|
+
s.email = %q{y.hirokazu@gmail.com}
|
15
|
+
s.executables = [%q{localport}]
|
16
|
+
s.extra_rdoc_files = [
|
17
|
+
"README"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
"Gemfile",
|
21
|
+
"README",
|
22
|
+
"Rakefile",
|
23
|
+
"VERSION",
|
24
|
+
"bin/localport",
|
25
|
+
"lib/localport.rb",
|
26
|
+
"lib/localport/command.rb",
|
27
|
+
"lib/localport/config.rb",
|
28
|
+
"localport.gemspec",
|
29
|
+
"spec/spec_helper.rb"
|
30
|
+
]
|
31
|
+
s.homepage = %q{http://github.com/yoppi/localport}
|
32
|
+
s.licenses = [%q{MIT}]
|
33
|
+
s.require_paths = [%q{lib}]
|
34
|
+
s.rubygems_version = %q{1.8.7}
|
35
|
+
s.summary = %q{Local Application management system}
|
36
|
+
|
37
|
+
if s.respond_to? :specification_version then
|
38
|
+
s.specification_version = 3
|
39
|
+
|
40
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
41
|
+
s.add_runtime_dependency(%q<highline>, [">= 0"])
|
42
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
|
43
|
+
s.add_development_dependency(%q<yard>, ["~> 0.6.0"])
|
44
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
45
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.6.2"])
|
46
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
47
|
+
else
|
48
|
+
s.add_dependency(%q<highline>, [">= 0"])
|
49
|
+
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
50
|
+
s.add_dependency(%q<yard>, ["~> 0.6.0"])
|
51
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
52
|
+
s.add_dependency(%q<jeweler>, ["~> 1.6.2"])
|
53
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
54
|
+
end
|
55
|
+
else
|
56
|
+
s.add_dependency(%q<highline>, [">= 0"])
|
57
|
+
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
58
|
+
s.add_dependency(%q<yard>, ["~> 0.6.0"])
|
59
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
60
|
+
s.add_dependency(%q<jeweler>, ["~> 1.6.2"])
|
61
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
3
|
+
require 'rspec'
|
4
|
+
require 'localport'
|
5
|
+
|
6
|
+
# Requires supporting files with custom matchers and macros, etc,
|
7
|
+
# in ./support/ and its subdirectories.
|
8
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
9
|
+
|
10
|
+
RSpec.configure do |config|
|
11
|
+
|
12
|
+
end
|
metadata
ADDED
@@ -0,0 +1,131 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: localport
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 0.0.0
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- yoppi
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2011-12-28 00:00:00 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: highline
|
17
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
19
|
+
requirements:
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: "0"
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: *id001
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: rspec
|
28
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
29
|
+
none: false
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 2.3.0
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: *id002
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: yard
|
39
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ~>
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: 0.6.0
|
45
|
+
type: :development
|
46
|
+
prerelease: false
|
47
|
+
version_requirements: *id003
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: bundler
|
50
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
52
|
+
requirements:
|
53
|
+
- - ~>
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: 1.0.0
|
56
|
+
type: :development
|
57
|
+
prerelease: false
|
58
|
+
version_requirements: *id004
|
59
|
+
- !ruby/object:Gem::Dependency
|
60
|
+
name: jeweler
|
61
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
62
|
+
none: false
|
63
|
+
requirements:
|
64
|
+
- - ~>
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: 1.6.2
|
67
|
+
type: :development
|
68
|
+
prerelease: false
|
69
|
+
version_requirements: *id005
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: rcov
|
72
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: "0"
|
78
|
+
type: :development
|
79
|
+
prerelease: false
|
80
|
+
version_requirements: *id006
|
81
|
+
description: localport is a local application management system
|
82
|
+
email: y.hirokazu@gmail.com
|
83
|
+
executables:
|
84
|
+
- localport
|
85
|
+
extensions: []
|
86
|
+
|
87
|
+
extra_rdoc_files:
|
88
|
+
- README
|
89
|
+
files:
|
90
|
+
- Gemfile
|
91
|
+
- README
|
92
|
+
- Rakefile
|
93
|
+
- VERSION
|
94
|
+
- bin/localport
|
95
|
+
- lib/localport.rb
|
96
|
+
- lib/localport/command.rb
|
97
|
+
- lib/localport/config.rb
|
98
|
+
- localport.gemspec
|
99
|
+
- spec/spec_helper.rb
|
100
|
+
homepage: http://github.com/yoppi/localport
|
101
|
+
licenses:
|
102
|
+
- MIT
|
103
|
+
post_install_message:
|
104
|
+
rdoc_options: []
|
105
|
+
|
106
|
+
require_paths:
|
107
|
+
- lib
|
108
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
109
|
+
none: false
|
110
|
+
requirements:
|
111
|
+
- - ">="
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
hash: 799121
|
114
|
+
segments:
|
115
|
+
- 0
|
116
|
+
version: "0"
|
117
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
118
|
+
none: false
|
119
|
+
requirements:
|
120
|
+
- - ">="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: "0"
|
123
|
+
requirements: []
|
124
|
+
|
125
|
+
rubyforge_project:
|
126
|
+
rubygems_version: 1.8.7
|
127
|
+
signing_key:
|
128
|
+
specification_version: 3
|
129
|
+
summary: Local Application management system
|
130
|
+
test_files: []
|
131
|
+
|