path-install 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 403f15c5f5fb74a8da1b1ea0f322ade64024920fd1d1419bcc9a70574b8e30fc
4
+ data.tar.gz: e1e83e3c62d6dbc25c8322462a3b684883c82468a9636116761b308850352337
5
+ SHA512:
6
+ metadata.gz: 5b8e8a63bdbd290ee9f0ccc6004f25b0b1c7862b7cf7515b777fa32016c21d070e9fd21510a17cddde4c6c4f553ab18b6f74b52afabb2851ee79e78ece7454ee
7
+ data.tar.gz: 4e5af6e33feee98aefb4323f2ceadab635bc57fe7cd2aeaf8c26ba5dae548569a6cbb0cd7c56d42fa21f52f1641dd32343722f3e4d3d9baf071f658fabdd5528
@@ -0,0 +1,8 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in path-install.gemspec
6
+ gemspec
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 s3fxn
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,29 @@
1
+ # path-install
2
+
3
+ path-install can help you adding a new PATH to .bash_profile and /etc/profile.d/ .
4
+
5
+ ## Installation
6
+
7
+ $ gem install path-install
8
+
9
+ ## Usage
10
+
11
+ $ path-install file or directory...
12
+
13
+ ```
14
+ $ path-install /usr/local/ruby2.5.1/bin | tee -a ~/.bash_profile
15
+ export PATH=/usr/local/ruby2.5.1/bin:$PATH
16
+
17
+ $ path-install /usr/local/ruby2.5.1/bin/ruby | sudo tee -a /etc/profile.d/ruby.sh
18
+ test -x /usr/local/ruby2.5.1/bin/ruby && \
19
+ export PATH=/usr/local/ruby2.5.1/bin:$PATH
20
+
21
+ ```
22
+
23
+ ## Contributing
24
+
25
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/path-install.
26
+
27
+ ## License
28
+
29
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "path/install"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,4 @@
1
+
2
+ export PATH=/usr/local/ruby2.5.1/bin:$PATH
3
+
4
+ export PATH=/usr/local/ruby2.5.1/bin:$PATH
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ if ARGV == []
4
+ puts
5
+ puts "Usage: path-install file or directory..."
6
+ puts
7
+ puts "$ path-install /usr/local/ruby2.5.1/bin | tee -a ~/.bash_profile"
8
+ puts "export PATH=/usr/local/ruby2.5.1/bin:$PATH"
9
+ puts
10
+ puts "$ path-install /usr/local/ruby2.5.1/bin/ruby | sudo tee -a /etc/profile.d/ruby.sh"
11
+ puts "test -x /usr/local/ruby2.5.1/bin/ruby && \\"
12
+ puts "export PATH=/usr/local/ruby2.5.1/bin:$PATH"
13
+ puts
14
+ exit 1
15
+ end
16
+
17
+ ARGV.each {|path|
18
+ if FileTest.directory? path
19
+ path = File.expand_path('.', path)
20
+ puts "export PATH=#{path}:\$PATH"
21
+
22
+ elsif FileTest.file? path and FileTest.executable? path
23
+ file = File.expand_path('.', path)
24
+ path = File.dirname(path)
25
+ puts "test -x #{file} && \\"
26
+ puts "export PATH=#{path}:\$PATH"
27
+
28
+ else
29
+ puts "# skip: #{path}"
30
+ end
31
+ }
32
+
@@ -0,0 +1,7 @@
1
+ require "path/install/version"
2
+
3
+ module Path
4
+ module Install
5
+ # Your code goes here...
6
+ end
7
+ end
@@ -0,0 +1,5 @@
1
+ module Path
2
+ module Install
3
+ VERSION = "0.1.0"
4
+ end
5
+ end
@@ -0,0 +1,25 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "path/install/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "path-install"
8
+ spec.version = Path::Install::VERSION
9
+ spec.authors = ["s3fxn"]
10
+ spec.email = ["sssfxn@gmail.com"]
11
+
12
+ spec.summary = %q{path-install can help you adding a new PATH to .bash_profile and /etc/profile.d/}
13
+ spec.homepage = "https://github.com/s3fxn/path-install"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
17
+ f.match(%r{^(test|spec|features)/})
18
+ end
19
+ spec.bindir = "exe"
20
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
+ spec.require_paths = ["lib"]
22
+
23
+ spec.add_development_dependency "bundler", "~> 1.16"
24
+ spec.add_development_dependency "rake", "~> 10.0"
25
+ end
metadata ADDED
@@ -0,0 +1,86 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: path-install
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - s3fxn
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-10-04 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.16'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.16'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ description:
42
+ email:
43
+ - sssfxn@gmail.com
44
+ executables:
45
+ - ".bash_profile"
46
+ - path-install
47
+ extensions: []
48
+ extra_rdoc_files: []
49
+ files:
50
+ - ".gitignore"
51
+ - Gemfile
52
+ - LICENSE.txt
53
+ - README.md
54
+ - Rakefile
55
+ - bin/console
56
+ - bin/setup
57
+ - exe/.bash_profile
58
+ - exe/path-install
59
+ - lib/path/install.rb
60
+ - lib/path/install/version.rb
61
+ - path-install.gemspec
62
+ homepage: https://github.com/s3fxn/path-install
63
+ licenses:
64
+ - MIT
65
+ metadata: {}
66
+ post_install_message:
67
+ rdoc_options: []
68
+ require_paths:
69
+ - lib
70
+ required_ruby_version: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ required_rubygems_version: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
80
+ requirements: []
81
+ rubyforge_project:
82
+ rubygems_version: 2.7.6
83
+ signing_key:
84
+ specification_version: 4
85
+ summary: path-install can help you adding a new PATH to .bash_profile and /etc/profile.d/
86
+ test_files: []