warp-dir 1.1.4 → 1.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1838ae6bcfd69ebc8bd9043ea689d4eba60839c6
4
- data.tar.gz: f44b27945e973dfa316130dcd30d4af126b0fab5
3
+ metadata.gz: b6ec44f13babd62ebe33c745d7d7092fb952a0a9
4
+ data.tar.gz: 05f95afa9a62f41cc6db11c34da440f1c198285a
5
5
  SHA512:
6
- metadata.gz: aafa1b87d2684660a1deb1427bb739436243e062c63d1ed586965c1d72cf5ccff995de6237a5dc4deb0a712093af4a17993ce909fb44a1b459fc0b605b82f3de
7
- data.tar.gz: 426c0b4b70fb781853803a727afd238e360dcd3fdd5fc31bcf59437d56e50fbe4814ae18176bcbaed95178602962611fbb96682765ac4dae29b220f9f3164e20
6
+ metadata.gz: d30616fa3c72e44bf067309e7c17439b9b7979f1a85a9990e1351fa0f1e14572fef2cd3b5f4b27ac1710832b8f3d53b7e3084dc5b2dbeebdacaa7956c9f6a41d
7
+ data.tar.gz: f91e1dd10053a0de0fd68791b42073c2c26ef75a48891aacb0c8828aaa9d89fb08b006878f3e7c88f69f7527efb1e93d83c08d3261747d4e0b9158ddad97781a
data/.gitignore CHANGED
@@ -5,6 +5,7 @@
5
5
  .yardoc
6
6
  InstalledFiles
7
7
  _yardoc
8
+ Gemfile
8
9
  Gemfile.lock
9
10
  coverage
10
11
  lib/bundler/man
data/README.md CHANGED
@@ -47,19 +47,13 @@ And then execute:
47
47
  Or install it yourself as:
48
48
 
49
49
  $ gem install warp-dir --no-ri --no-rdoc
50
-
51
- After the installation, you will have the `warp-dir` command in the path. You can use
52
- this command almost like `wd` except it can not warp you to another folder due to
53
- UNIX parent/child process restrictions. To do that you need to also install the shell
54
- function wrapper in your `~/.bashrc` or similar file:
55
-
56
- You can do like so (if you don't provide file, it will install in `~/.bashrc`, `~/.bash_profile`
57
- or `~/.profile` whichever works first, – so use `--file` to override it if you need to).
58
50
 
51
+ The last step is to install the `wd` bash function, which enables the `cd`-like behavior.
52
+ Choose
59
53
  $ warp-dir install [ --dotfile <file> ]
60
54
 
61
- And after that you need to restart your sheel, and then you should be able to get the
62
- helpful message below by typing:
55
+ And after that you need to restart your shell, and then you should get the command's
56
+ "help" message by typing:
63
57
 
64
58
  $ wd help
65
59
 
@@ -72,9 +66,9 @@ The usage of the tool is derived from `ZSH`-based inspiration. If it ain't broke
72
66
  I like how `wd` can be used with very short warp points, so it's so much less typing. I often name
73
67
  my points `pu` so that I can jump there with `wd pu`.
74
68
 
75
- Unlike ZSH counterpart, this tool includes full command line parsing, so
69
+ Unlike ZSH counterpart, this tool includes full command line parsing, so
76
70
  you can (if you want to) use flags to achieve the same effect with more
77
- characters to type, for example all below commands do the same thing.
71
+ characters to type, for example all below commands do the same thing.
78
72
 
79
73
  ```bash
80
74
  wd pu
@@ -85,7 +79,7 @@ characters to type, for example all below commands do the same thing.
85
79
  You can run a comman in the target directory without leaving the current via
86
80
  `wd ls pu`, but in this implementation you can also pass arguments to `ls` after
87
81
  the `--` in argument list, for example, to run `ls -1` I would do `wd ls pu -- -1`.
88
-
82
+
89
83
  Here is a full command / help summary.
90
84
 
91
85
  ![Image](doc/wd-help.png)
@@ -96,13 +90,13 @@ Here is a full command / help summary.
96
90
 
97
91
  These features will be added shortly:
98
92
 
99
- * for now `wd clean` is not supported
93
+ * for now `wd clean` is not supported
100
94
  * for now history is not supported
101
95
  * for now '-' is not supported
102
-
96
+
103
97
  ## Future Development
104
98
 
105
- I have so many cool ideas about where this can go, that I created a
99
+ I have so many cool ideas about where this can go, that I created a
106
100
  [dedicated page](ROADMAP.md) for the discussion of future features. Please head over
107
101
  there if you'ld like to participate.
108
102
 
data/Rakefile CHANGED
@@ -1,5 +1,4 @@
1
- task :install do
2
-
1
+ task :reinstall do
3
2
  [ %q(chmod -R o+r .),
4
3
  %q(rm -f *.gem),
5
4
  %q(rm -rf build),
@@ -20,10 +19,42 @@ task :install do
20
19
  EOF
21
20
  end
22
21
 
23
- require 'bundler'
24
- require "bundler/gem_tasks"
25
- require 'rake/clean'
22
+ namespace :gemfile do
23
+ desc 'Install dependencies by creating a temporary Gemfile'
24
+ task :install => [:setup, :cleanup]
25
+
26
+ task :setup do
27
+ sh %q{
28
+ echo "source 'https://rubygems.org'; gemspec" > Gemfile
29
+ [[ -n $(which bundle) ]] || gem install bundler --no-ri --no-rdoc
30
+ bundle install
31
+ }.gsub(%r{^\s+}m, '')
32
+ end
33
+
34
+ task :cleanup do
35
+ sh %q{ rm -f Gemfile }
36
+ end
26
37
 
38
+ namespace :bundler do
39
+ task :load do
40
+ require 'bundler'
41
+ require 'bundler/gem_tasks'
42
+ end
43
+ desc "Invoke Bundler's 'release' task to push the gem to RubyGems.org"
44
+ task :release => [ :setup, :load ] do
45
+ Rake::Task["release"].invoke
46
+ Rake::Task["gemfile:cleanup"].invoke
47
+ end
48
+
49
+ desc "Installs and invokes Bundler's 'release' task"
50
+ task :install => [ :setup, :load ] do
51
+ Rake::Task["install:local"].invoke
52
+ Rake::Task["gemfile:cleanup"].invoke
53
+ end
54
+ end
55
+ end
56
+
57
+ require 'rake/clean'
27
58
  CLEAN.include %w(pkg coverage *.gem)
28
59
 
29
60
  begin
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require "bundler/setup"
4
3
  require "colored"
5
4
  require "warp/dir"
6
5
 
@@ -4,8 +4,8 @@ module Warp
4
4
 
5
5
  module Dir
6
6
  # tried in order.
7
- DOTFILES = %w(~/.bashrc ~/.bash_profile ~/.profile)
8
-
7
+ DOTFILES = %w(.bash_profile .bashrc .profile .bash_login).map{|f| "~/#{f}" }
8
+ DOTFILE_CREATED='.bash_profile'
9
9
  SHELL_WRAPPER = "#{PROJECT_HOME}/bin/warp-dir.bash"
10
10
 
11
11
  class << self
@@ -64,4 +64,3 @@ class Object
64
64
  self.eql?('') || self.nil?
65
65
  end
66
66
  end
67
-
@@ -2,7 +2,7 @@ require 'warp/dir/command'
2
2
  module Warp
3
3
  module Dir
4
4
  class Command
5
- class LS < Warp::Dir::Command
5
+ class LS < ::Warp::Dir::Command
6
6
  description %q(List directory contents of a Warp Point)
7
7
  needs_a_point? true
8
8
  aliases :dir, :ll
@@ -1,6 +1,6 @@
1
1
  require 'warp/dir/command'
2
2
  class Warp::Dir::Command
3
- class Remove < Warp::Dir::Command
3
+ class Remove < ::Warp::Dir::Command
4
4
  description %q(Removes a given warp point from the database)
5
5
  needs_a_point? true
6
6
  aliases :rm, :delete
@@ -1,5 +1,6 @@
1
1
  require_relative '../errors'
2
2
  require_relative '../../dir'
3
+ require_relative 'base'
3
4
  module Warp
4
5
  module Dir
5
6
  module Serializer
@@ -1,7 +1,7 @@
1
1
  require_relative '../../colored'
2
2
  module Warp
3
3
  module Dir
4
- VERSION = '1.1.4'
4
+ VERSION = '1.1.5'
5
5
 
6
6
  @install_notice = <<-EOF
7
7
 
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
23
23
  s.required_ruby_version = '>= 2.0.0'
24
24
  s.required_rubygems_version = '>= 1.3.6'
25
25
 
26
- s.add_dependency('slop', '~> 4.2')
26
+ s.add_runtime_dependency('slop', '~> 4.2')
27
27
 
28
28
  s.add_development_dependency 'codeclimate-test-reporter', '~> 0.5'
29
29
  s.add_development_dependency 'bundler', '~> 1.11'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: warp-dir
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Gredeskoul
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-03-10 00:00:00.000000000 Z
11
+ date: 2016-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: slop
@@ -101,14 +101,12 @@ files:
101
101
  - ".rspec"
102
102
  - ".rubocop.yml"
103
103
  - ".travis.yml"
104
- - Gemfile
105
104
  - Guardfile
106
105
  - LICENSE
107
106
  - README.md
108
107
  - ROADMAP.md
109
108
  - Rakefile
110
109
  - bin/console
111
- - bin/setup
112
110
  - bin/warp-dir.bash
113
111
  - exe/warp-dir
114
112
  - lib/colored.rb
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in warp-dir.gemspec
4
- gemspec
data/bin/setup DELETED
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- gem install bundler --no-ri --no-rdoc
7
- bundle install
8
-
9
- # Do any other automated setup that you need to do here