localport 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3c7ff3c9256f3015eb79c2aaaf4bf1d9307552a2
4
+ data.tar.gz: dc3e89dfc3dd2a979ec3310ecee06b4ee889c3ad
5
+ SHA512:
6
+ metadata.gz: fc0232ecbcd5b506be99fd21aaf1b78cf5adf84e4f547f488f7e8f6a9984eb7d36ef892848eaff8141d1c8080c54fa16383e522e75369640bf5f7121f5eb9876
7
+ data.tar.gz: e510d166d820753c60b3dfe7aae36413e7c0528276fb04e33e3daf4a0477d53fcc7e3571252130f149419194cc2cb90db662c7901f04e09543079856a09ee44d
data/.gitignore ADDED
@@ -0,0 +1,56 @@
1
+ # ctags
2
+ tags
3
+
4
+ # rcov generated
5
+ coverage
6
+
7
+ # rdoc generated
8
+ rdoc
9
+
10
+ # yard generated
11
+ doc
12
+ .yardoc
13
+
14
+ # bundler
15
+ .bundle
16
+
17
+ # jeweler generated
18
+ pkg
19
+
20
+ # Lock file
21
+ Gemfile.lock
22
+
23
+ # Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
24
+ #
25
+ # * Create a file at ~/.gitignore
26
+ # * Include files you want ignored
27
+ # * Run: git config --global core.excludesfile ~/.gitignore
28
+ #
29
+ # After doing this, these files will be ignored in all your git projects,
30
+ # saving you from having to 'pollute' every project you touch with them
31
+ #
32
+ # Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
33
+ #
34
+ # For MacOS:
35
+ #
36
+ .DS_Store
37
+
38
+ # For TextMate
39
+ #*.tmproj
40
+ #tmtags
41
+
42
+ # For emacs:
43
+ #*~
44
+ #\#*
45
+ #.\#*
46
+
47
+ # For vim:
48
+ *.swp
49
+
50
+ # For redcar:
51
+ #.redcar
52
+
53
+ # For rubinius:
54
+ #*.rbc
55
+
56
+ .rspec
data/Gemfile CHANGED
@@ -10,5 +10,4 @@ group :development do
10
10
  gem "rspec"
11
11
  gem "yard"
12
12
  gem "bundler"
13
- gem "jeweler"
14
13
  end
data/Rakefile CHANGED
@@ -1,7 +1,10 @@
1
- # encoding: utf-8
1
+ # -*- encoding: utf-8 -*-
2
2
 
3
3
  require 'rubygems'
4
- require 'bundler'
4
+ require 'bundler/gem_tasks'
5
+ require 'rspec/core'
6
+ require 'rspec/core/rake_task'
7
+
5
8
  begin
6
9
  Bundler.setup(:default, :development)
7
10
  rescue Bundler::BundlerError => e
@@ -9,29 +12,9 @@ rescue Bundler::BundlerError => e
9
12
  $stderr.puts "Run `bundle install` to install missing gems"
10
13
  exit e.status_code
11
14
  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
15
 
28
- require 'rspec/core'
29
- require 'rspec/core/rake_task'
30
16
  RSpec::Core::RakeTask.new(:spec) do |spec|
31
17
  spec.pattern = FileList['spec/**/*_spec.rb']
32
18
  end
19
+ task default: :spec
33
20
 
34
- task :default => :spec
35
-
36
- require 'yard'
37
- YARD::Rake::YardocTask.new
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.4
data/bin/localport CHANGED
@@ -1,9 +1,28 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'rubygems'
4
+ require 'optparse'
5
+
4
6
  $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
5
7
 
6
8
  require 'localport'
9
+
10
+ options = OptionParser.new do |option|
11
+ option.banner = "Usage: #{__FILE__} [options] command"
12
+
13
+ option.separator ""
14
+
15
+ option.on("-h", "--help") {
16
+ puts LocalPort.usage
17
+ exit
18
+ }
19
+
20
+ option.on("-v", "--version") {
21
+ puts LocalPort::VERSION
22
+ exit
23
+ }
24
+ end.parse!(ARGV.dup)
25
+
7
26
  LocalPort.invoke(ARGV.dup)
8
27
 
9
28
  # vim: filetype=ruby
data/lib/localport.rb CHANGED
@@ -13,7 +13,7 @@ require 'localport/command'
13
13
  #
14
14
 
15
15
  module LocalPort
16
- VERSION = "0.0.0"
16
+ VERSION = "0.1.4"
17
17
 
18
18
  class << self
19
19
  def invoke(argv)
@@ -62,9 +62,12 @@ module LocalPort
62
62
 
63
63
  def usage
64
64
  <<-"USAGE"
65
- Usage: #{File.basename $0} <command> [app]
66
- command list:
67
- #{list_command.join("\n ")}
65
+ Usage:
66
+
67
+ #{File.basename $0} command [application_dir] | [--version | --help]
68
+
69
+ commands:
70
+ #{command.commands.map do |name, detail| name + ": " + detail[:description] end.join("\n ")}
68
71
  USAGE
69
72
  end
70
73
  end
@@ -18,6 +18,7 @@ module LocalPort
18
18
  register_command(
19
19
  :name => "install",
20
20
  :args => true,
21
+ :description => "Install specied application.",
21
22
  :exec => lambda {|args|
22
23
  if args.empty?
23
24
  raise LocalPort::CommandError, "must specify to installed application path."
@@ -29,6 +30,7 @@ module LocalPort
29
30
  register_command(
30
31
  :name => "update",
31
32
  :args => true,
33
+ :description => "Re create symlink each application.",
32
34
  :exec => lambda {|args|
33
35
  update args
34
36
  }
@@ -37,6 +39,7 @@ module LocalPort
37
39
  register_command(
38
40
  :name => "uninstall",
39
41
  :args => true,
42
+ :description => "Remove symlinks for application.",
40
43
  :exec => lambda {|args|
41
44
  uninstall args
42
45
  }
@@ -45,6 +48,7 @@ module LocalPort
45
48
  register_command(
46
49
  :name => "installed",
47
50
  :args => false,
51
+ :description => "List installed applications.",
48
52
  :exec => lambda {|args|
49
53
  if args.size > 0
50
54
  args.each do |app|
@@ -67,6 +71,7 @@ module LocalPort
67
71
  register_command(
68
72
  :name => "activate",
69
73
  :args => true,
74
+ :description => "Create symlink with no-suffix application. To use global.",
70
75
  :exec => lambda {|args|
71
76
  if args.empty?
72
77
  raise LocalPort::CommandError, "must specify verbose application name. {app}-{version}"
@@ -78,6 +83,7 @@ module LocalPort
78
83
  register_command(
79
84
  :name => "deactivate",
80
85
  :args => true,
86
+ :description => "Remove no-suffix symlink application. To not use global.",
81
87
  :exec => lambda {|args|
82
88
  if args.empty?
83
89
  raise LocalPort::CommandError, "must specify verbose application name. {app}-{version}"
data/localport.gemspec CHANGED
@@ -1,64 +1,28 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
1
  # -*- encoding: utf-8 -*-
5
2
 
3
+ lib = File.expand_path('../lib', __FILE__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require 'localport'
6
+
6
7
  Gem::Specification.new do |s|
7
8
  s.name = "localport"
8
- s.version = "0.1.3"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
+ s.version = LocalPort::VERSION
11
10
  s.authors = ["yoppi"]
11
+ s.email = "y.hirokazu@gmail.com"
12
12
  s.date = "2012-11-01"
13
13
  s.description = "localport is a local application management system"
14
- s.email = "y.hirokazu@gmail.com"
15
- s.executables = ["localport"]
16
- s.extra_rdoc_files = [
17
- "README.md"
18
- ]
19
- s.files = [
20
- ".travis.yml",
21
- "Gemfile",
22
- "README.md",
23
- "Rakefile",
24
- "VERSION",
25
- "bin/localport",
26
- "lib/localport.rb",
27
- "lib/localport/command.rb",
28
- "lib/localport/config.rb",
29
- "localport.gemspec",
30
- "spec/localport/command_spec.rb",
31
- "spec/localport_spec.rb",
32
- "spec/spec_helper.rb"
33
- ]
14
+ s.summary = "Local Application management system"
34
15
  s.homepage = "http://github.com/yoppi/localport"
35
16
  s.licenses = ["MIT"]
36
- s.require_paths = ["lib"]
37
- s.rubygems_version = "1.8.24"
38
- s.summary = "Local Application management system"
17
+ s.extra_rdoc_files = ["README.md"]
39
18
 
40
- if s.respond_to? :specification_version then
41
- s.specification_version = 3
19
+ s.files = `git ls-files`.split($/)
20
+ s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
21
+ s.require_paths = ["lib"]
42
22
 
43
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
44
- s.add_runtime_dependency(%q<highline>, [">= 0"])
45
- s.add_development_dependency(%q<rspec>, [">= 0"])
46
- s.add_development_dependency(%q<yard>, [">= 0"])
47
- s.add_development_dependency(%q<bundler>, [">= 0"])
48
- s.add_development_dependency(%q<jeweler>, [">= 0"])
49
- else
50
- s.add_dependency(%q<highline>, [">= 0"])
51
- s.add_dependency(%q<rspec>, [">= 0"])
52
- s.add_dependency(%q<yard>, [">= 0"])
53
- s.add_dependency(%q<bundler>, [">= 0"])
54
- s.add_dependency(%q<jeweler>, [">= 0"])
55
- end
56
- else
57
- s.add_dependency(%q<highline>, [">= 0"])
58
- s.add_dependency(%q<rspec>, [">= 0"])
59
- s.add_dependency(%q<yard>, [">= 0"])
60
- s.add_dependency(%q<bundler>, [">= 0"])
61
- s.add_dependency(%q<jeweler>, [">= 0"])
62
- end
23
+ s.add_dependency "highline"
24
+ s.add_development_dependency "bundler"
25
+ s.add_development_dependency "rspec"
26
+ s.add_development_dependency "yard"
63
27
  end
64
28
 
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: localport
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
5
- prerelease:
4
+ version: 0.1.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - yoppi
@@ -14,81 +13,57 @@ dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: highline
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
- name: rspec
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ! '>='
36
- - !ruby/object:Gem::Version
37
- version: '0'
38
- type: :development
39
- prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: '0'
46
- - !ruby/object:Gem::Dependency
47
- name: yard
28
+ name: bundler
48
29
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
30
  requirements:
51
- - - ! '>='
31
+ - - '>='
52
32
  - !ruby/object:Gem::Version
53
33
  version: '0'
54
34
  type: :development
55
35
  prerelease: false
56
36
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
37
  requirements:
59
- - - ! '>='
38
+ - - '>='
60
39
  - !ruby/object:Gem::Version
61
40
  version: '0'
62
41
  - !ruby/object:Gem::Dependency
63
- name: bundler
42
+ name: rspec
64
43
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
44
  requirements:
67
- - - ! '>='
45
+ - - '>='
68
46
  - !ruby/object:Gem::Version
69
47
  version: '0'
70
48
  type: :development
71
49
  prerelease: false
72
50
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
51
  requirements:
75
- - - ! '>='
52
+ - - '>='
76
53
  - !ruby/object:Gem::Version
77
54
  version: '0'
78
55
  - !ruby/object:Gem::Dependency
79
- name: jeweler
56
+ name: yard
80
57
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
58
  requirements:
83
- - - ! '>='
59
+ - - '>='
84
60
  - !ruby/object:Gem::Version
85
61
  version: '0'
86
62
  type: :development
87
63
  prerelease: false
88
64
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
65
  requirements:
91
- - - ! '>='
66
+ - - '>='
92
67
  - !ruby/object:Gem::Version
93
68
  version: '0'
94
69
  description: localport is a local application management system
@@ -99,6 +74,7 @@ extensions: []
99
74
  extra_rdoc_files:
100
75
  - README.md
101
76
  files:
77
+ - .gitignore
102
78
  - .travis.yml
103
79
  - Gemfile
104
80
  - README.md
@@ -115,29 +91,26 @@ files:
115
91
  homepage: http://github.com/yoppi/localport
116
92
  licenses:
117
93
  - MIT
94
+ metadata: {}
118
95
  post_install_message:
119
96
  rdoc_options: []
120
97
  require_paths:
121
98
  - lib
122
99
  required_ruby_version: !ruby/object:Gem::Requirement
123
- none: false
124
100
  requirements:
125
- - - ! '>='
101
+ - - '>='
126
102
  - !ruby/object:Gem::Version
127
103
  version: '0'
128
- segments:
129
- - 0
130
- hash: 1929482462854349642
131
104
  required_rubygems_version: !ruby/object:Gem::Requirement
132
- none: false
133
105
  requirements:
134
- - - ! '>='
106
+ - - '>='
135
107
  - !ruby/object:Gem::Version
136
108
  version: '0'
137
109
  requirements: []
138
110
  rubyforge_project:
139
- rubygems_version: 1.8.24
111
+ rubygems_version: 2.0.3
140
112
  signing_key:
141
- specification_version: 3
113
+ specification_version: 4
142
114
  summary: Local Application management system
143
115
  test_files: []
116
+ has_rdoc: