wip 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +0 -1
- data/.wiprc +1 -22
- data/Gemfile +4 -0
- data/README.mkd +188 -5
- data/Rakefile +12 -0
- data/bin/wip-ruby +1 -8
- data/doc/README.md +188 -5
- data/lib/wip/cli.rb +25 -3
- data/lib/wip/version.rb +1 -1
- data/wip.gemspec +99 -6
- metadata +90 -13
- data/bin/wip +0 -38
- data/bin/wip-bash +0 -24
- data/lib/rubygems_plugin.rb +0 -3
data/.gitignore
CHANGED
data/.wiprc
CHANGED
@@ -1,22 +1 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
echo "WIP'n wip!"
|
4
|
-
|
5
|
-
# if [ "" == "$TM_PROJECT_DIRECTORY" ] ; then
|
6
|
-
# # non-textmate (e.g., command line) setup...
|
7
|
-
# rvm use 1.8.7
|
8
|
-
# # else
|
9
|
-
# # TextMate (e.g., command line) setup...
|
10
|
-
# fi
|
11
|
-
#
|
12
|
-
# dbrebase() {
|
13
|
-
# SQL_FILE=$1
|
14
|
-
#
|
15
|
-
# rake db:drop:all
|
16
|
-
# rake db:create:all
|
17
|
-
#
|
18
|
-
# mysql -u root -p iwrtw_development < $SQL_FILE
|
19
|
-
# rake db:schema:dump
|
20
|
-
#
|
21
|
-
# rake db:migrate
|
22
|
-
# }
|
1
|
+
echo 'working on wip...'
|
data/Gemfile
ADDED
data/README.mkd
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
`wip` README
|
2
2
|
============================================================================
|
3
3
|
|
4
|
-
> NOTE:
|
4
|
+
> NOTE: `wip` is WIP
|
5
5
|
|
6
|
-
|
6
|
+
`wip` is a concept I'm playing with for streamlining the process of
|
7
7
|
coding for and documenting client and personal software projects.
|
8
8
|
|
9
9
|
While this document (specifically) and the idea (generally) are
|
@@ -12,13 +12,14 @@ and will, in fact, be using the techniques described herein for this project
|
|
12
12
|
itself.
|
13
13
|
|
14
14
|
|
15
|
-
|
15
|
+
`wip` *works* (in theory)
|
16
16
|
----------------------------------------------------------------------------
|
17
17
|
|
18
|
-
A
|
18
|
+
A *work* is made up of:
|
19
19
|
|
20
20
|
* Notes
|
21
21
|
* Code
|
22
|
+
* ...?
|
22
23
|
|
23
24
|
The goal is to create an experience in which working on a given client or
|
24
25
|
personal project is:
|
@@ -41,9 +42,190 @@ personal project is:
|
|
41
42
|
team-at-large, while allowing for "local" preferences as well.
|
42
43
|
|
43
44
|
|
45
|
+
`wip` *works* (NOW)
|
46
|
+
----------------------------------------------------------------------------
|
47
|
+
|
48
|
+
`wip`, currently, is a rubygem that installs an executable and a bash
|
49
|
+
function (`wip`, as it turns out) which together assist with navigating to
|
50
|
+
and "activating" a given *work* (project workspace, for now).
|
51
|
+
|
52
|
+
The following is an example shell session, using `wip` as it exists now:
|
53
|
+
|
54
|
+
# given `wip` is installed .............................................
|
55
|
+
|
56
|
+
|
57
|
+
# `wip index` ... list "works"
|
58
|
+
# ......................................................................
|
59
|
+
corey@computer ~ $ wip index .
|
60
|
+
|
61
|
+
corey@computer ~ $ echo "echo 'working on wip...'" > \
|
62
|
+
Workspace/com.github/coreyti/wip/.wiprc
|
63
|
+
|
64
|
+
corey@computer ~ $ wip index .
|
65
|
+
* wip
|
66
|
+
/Users/corey/Workspace/com.github/coreyti/wip
|
67
|
+
|
68
|
+
corey@computer ~ $ echo "echo 'working on help...'" > \
|
69
|
+
Workspace/help/.wiprc
|
70
|
+
|
71
|
+
corey@computer ~ $ wip index .
|
72
|
+
* help
|
73
|
+
/Users/corey/Workspace/help
|
74
|
+
* wip
|
75
|
+
/Users/corey/Workspace/com.github/coreyti/wip
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
# `wip index` ... narrowing the scope & speeding things up
|
80
|
+
# ......................................................................
|
81
|
+
corey@computer ~ $ wip index .
|
82
|
+
* help
|
83
|
+
/Users/corey/Workspace/help
|
84
|
+
* wip
|
85
|
+
/Users/corey/Workspace/com.github/coreyti/wip
|
86
|
+
|
87
|
+
corey@computer ~ $ wip index ~/Workspace/com.github
|
88
|
+
* wip
|
89
|
+
/Users/corey/Workspace/com.github/coreyti/wip
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
# `wip index` ... defaults
|
94
|
+
# ......................................................................
|
95
|
+
corey@computer ~ $ wip index # no arg to `wip index`
|
96
|
+
* help
|
97
|
+
/Users/corey/Workspace/help
|
98
|
+
* wip
|
99
|
+
/Users/corey/Workspace/com.github/coreyti/wip
|
100
|
+
|
101
|
+
corey@computer ~ $ wip # no arg to `wip`
|
102
|
+
* help
|
103
|
+
/Users/corey/Workspace/help
|
104
|
+
* wip
|
105
|
+
/Users/corey/Workspace/com.github/coreyti/wip
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
# `wip show` ... activate a "work"
|
110
|
+
# ......................................................................
|
111
|
+
corey@computer ~ $ pwd
|
112
|
+
/Users/corey
|
113
|
+
|
114
|
+
corey@computer ~ $ wip show wip
|
115
|
+
-------------------------------------------------------------------------------
|
116
|
+
work : /Users/corey/Workspace/com.github/coreyti/wip
|
117
|
+
-------------------------------------------------------------------------------
|
118
|
+
working on wip...
|
119
|
+
|
120
|
+
corey@computer wip (git::master) $ wip # scoped `wip index`
|
121
|
+
* wip
|
122
|
+
/Users/corey/Workspace/com.github/coreyti/wip
|
123
|
+
|
124
|
+
corey@computer wip (git::master) $ pwd
|
125
|
+
/Users/corey/Workspace/com.github/coreyti/wip
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
# `wip show` ... default: `wip ARG` to `wip show ARG`
|
130
|
+
# ......................................................................
|
131
|
+
corey@computer wip (git::master) $ cd ~
|
132
|
+
|
133
|
+
corey@computer ~ $ wip .
|
134
|
+
|
135
|
+
corey@computer ~ $ wip wip
|
136
|
+
------------------------------------------------------------------------
|
137
|
+
work : /Users/corey/Workspace/com.github/coreyti/wip
|
138
|
+
------------------------------------------------------------------------
|
139
|
+
working on wip...
|
140
|
+
|
141
|
+
corey@computer wip (git::master) $ wip .
|
142
|
+
------------------------------------------------------------------------
|
143
|
+
work : /Users/corey/Workspace/com.github/coreyti/wip
|
144
|
+
------------------------------------------------------------------------
|
145
|
+
working on wip...
|
146
|
+
|
147
|
+
corey@computer wip (git::master) $ pwd
|
148
|
+
/Users/corey/Workspace/com.github/coreyti/wip
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
# `wip show` ... with a path
|
153
|
+
# ......................................................................
|
154
|
+
corey@computer wip (git::master) $ cd ~
|
155
|
+
|
156
|
+
corey@computer ~ $ wip foo
|
157
|
+
|
158
|
+
corey@computer ~ $ wip show foo
|
159
|
+
|
160
|
+
corey@computer ~ $ wip show ~/Workspace/com.github/
|
161
|
+
|
162
|
+
corey@computer ~ $ wip show ~/Workspace/com.github/coreyti/wip
|
163
|
+
------------------------------------------------------------------------
|
164
|
+
work : /Users/corey/Workspace/com.github/coreyti/wip
|
165
|
+
------------------------------------------------------------------------
|
166
|
+
working on wip...
|
167
|
+
|
168
|
+
corey@computer wip (git::master) $ pwd
|
169
|
+
/Users/corey/Workspace/com.github/coreyti/wip
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
# `wip help`
|
174
|
+
# ......................................................................
|
175
|
+
corey@computer wip (git::master) $ cd ~
|
176
|
+
|
177
|
+
corey@computer ~ $ wip index .
|
178
|
+
* help
|
179
|
+
/Users/corey/Workspace/help
|
180
|
+
* wip
|
181
|
+
/Users/corey/Workspace/com.github/coreyti/wip
|
182
|
+
|
183
|
+
corey@computer ~ $ wip help
|
184
|
+
Tasks:
|
185
|
+
wip-ruby back # Move to and activate most recent 'work'
|
186
|
+
wip-ruby help [TASK] # Describe available tasks or one specific task
|
187
|
+
wip-ruby index # List all indexed 'works'
|
188
|
+
wip-ruby show # Move to and activate a 'work'
|
189
|
+
|
190
|
+
corey@computer ~ $ wip show help
|
191
|
+
------------------------------------------------------------------------
|
192
|
+
work : /Users/corey/Workspace/help
|
193
|
+
------------------------------------------------------------------------
|
194
|
+
working on help...
|
195
|
+
|
196
|
+
corey@computer help $ pwd
|
197
|
+
/Users/corey/Workspace/help
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
# `wip back`
|
202
|
+
# ......................................................................
|
203
|
+
corey@computer help $ cd ~
|
204
|
+
|
205
|
+
corey@computer ~ $ wip show wip
|
206
|
+
------------------------------------------------------------------------
|
207
|
+
work : /Users/corey/Workspace/com.github/coreyti/wip
|
208
|
+
------------------------------------------------------------------------
|
209
|
+
working on wip...
|
210
|
+
|
211
|
+
corey@computer wip (git::master) $ cd ~/Documents/
|
212
|
+
|
213
|
+
corey@computer Documents $ wip back
|
214
|
+
------------------------------------------------------------------------
|
215
|
+
work : /Users/corey/Workspace/com.github/coreyti/wip
|
216
|
+
------------------------------------------------------------------------
|
217
|
+
working on wip...
|
218
|
+
|
219
|
+
corey@computer wip (git::master) $ pwd
|
220
|
+
/Users/corey/Workspace/com.github/coreyti/wip
|
221
|
+
|
222
|
+
|
44
223
|
Assumptions & Intentional Limitations
|
45
224
|
----------------------------------------------------------------------------
|
46
225
|
|
226
|
+
> Most of the following are irrelevant for now. Once `wip` does more
|
227
|
+
> though...
|
228
|
+
|
47
229
|
1. I develop with:
|
48
230
|
* an Apple computer
|
49
231
|
* an iPhone
|
@@ -59,7 +241,8 @@ Assumptions & Intentional Limitations
|
|
59
241
|
On "Notes"
|
60
242
|
----------------------------------------------------------------------------
|
61
243
|
|
62
|
-
|
244
|
+
> Most of the following are irrelevant for now. Once `wip` does more
|
245
|
+
> though...
|
63
246
|
|
64
247
|
* backed by DropBox
|
65
248
|
* on-the-fly versioned, with git-wip
|
data/Rakefile
CHANGED
@@ -1,3 +1,15 @@
|
|
1
1
|
require 'bundler'
|
2
2
|
Bundler::GemHelper.install_tasks
|
3
3
|
|
4
|
+
module Bundler
|
5
|
+
class GemHelper
|
6
|
+
# override in order to see install output (we have a post-install hook)
|
7
|
+
def install_gem
|
8
|
+
built_gem_path = build_gem
|
9
|
+
out, err, code = sh_with_code("gem install #{built_gem_path}")
|
10
|
+
puts out
|
11
|
+
raise err if err[/ERROR/]
|
12
|
+
Bundler.ui.confirm "#{name} (#{version}) installed"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/bin/wip-ruby
CHANGED
@@ -1,8 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
# puts "wip-ruby..."
|
4
|
-
# puts " args... #{ARGV.inspect}"
|
5
|
-
|
6
3
|
BASH_COMMANDS = [:show]
|
7
4
|
|
8
5
|
begin
|
@@ -15,11 +12,7 @@ end
|
|
15
12
|
require 'wip/cli'
|
16
13
|
|
17
14
|
begin
|
18
|
-
|
19
|
-
|
20
|
-
if result && BASH_COMMANDS.include?(ARGV.first.intern)
|
21
|
-
STDOUT.print result
|
22
|
-
end
|
15
|
+
WIP::CLI::Shell.start
|
23
16
|
rescue WIP::WIPError => e
|
24
17
|
WIP.ui.error e.message
|
25
18
|
WIP.ui.error e.backtrace.join("\n") if ENV["WIP_DEBUG"]
|
data/doc/README.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
`wip` README
|
2
2
|
============================================================================
|
3
3
|
|
4
|
-
> NOTE:
|
4
|
+
> NOTE: `wip` is WIP
|
5
5
|
|
6
|
-
|
6
|
+
`wip` is a concept I'm playing with for streamlining the process of
|
7
7
|
coding for and documenting client and personal software projects.
|
8
8
|
|
9
9
|
While this document (specifically) and the idea (generally) are
|
@@ -12,13 +12,14 @@ and will, in fact, be using the techniques described herein for this project
|
|
12
12
|
itself.
|
13
13
|
|
14
14
|
|
15
|
-
|
15
|
+
`wip` *works* (in theory)
|
16
16
|
----------------------------------------------------------------------------
|
17
17
|
|
18
|
-
A
|
18
|
+
A *work* is made up of:
|
19
19
|
|
20
20
|
* Notes
|
21
21
|
* Code
|
22
|
+
* ...?
|
22
23
|
|
23
24
|
The goal is to create an experience in which working on a given client or
|
24
25
|
personal project is:
|
@@ -41,9 +42,190 @@ personal project is:
|
|
41
42
|
team-at-large, while allowing for "local" preferences as well.
|
42
43
|
|
43
44
|
|
45
|
+
`wip` *works* (NOW)
|
46
|
+
----------------------------------------------------------------------------
|
47
|
+
|
48
|
+
`wip`, currently, is a rubygem that installs an executable and a bash
|
49
|
+
function (`wip`, as it turns out) which together assist with navigating to
|
50
|
+
and "activating" a given *work* (project workspace, for now).
|
51
|
+
|
52
|
+
The following is an example shell session, using `wip` as it exists now:
|
53
|
+
|
54
|
+
# given `wip` is installed .............................................
|
55
|
+
|
56
|
+
|
57
|
+
# `wip index` ... list "works"
|
58
|
+
# ......................................................................
|
59
|
+
corey@computer ~ $ wip index .
|
60
|
+
|
61
|
+
corey@computer ~ $ echo "echo 'working on wip...'" > \
|
62
|
+
Workspace/com.github/coreyti/wip/.wiprc
|
63
|
+
|
64
|
+
corey@computer ~ $ wip index .
|
65
|
+
* wip
|
66
|
+
/Users/corey/Workspace/com.github/coreyti/wip
|
67
|
+
|
68
|
+
corey@computer ~ $ echo "echo 'working on help...'" > \
|
69
|
+
Workspace/help/.wiprc
|
70
|
+
|
71
|
+
corey@computer ~ $ wip index .
|
72
|
+
* help
|
73
|
+
/Users/corey/Workspace/help
|
74
|
+
* wip
|
75
|
+
/Users/corey/Workspace/com.github/coreyti/wip
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
# `wip index` ... narrowing the scope & speeding things up
|
80
|
+
# ......................................................................
|
81
|
+
corey@computer ~ $ wip index .
|
82
|
+
* help
|
83
|
+
/Users/corey/Workspace/help
|
84
|
+
* wip
|
85
|
+
/Users/corey/Workspace/com.github/coreyti/wip
|
86
|
+
|
87
|
+
corey@computer ~ $ wip index ~/Workspace/com.github
|
88
|
+
* wip
|
89
|
+
/Users/corey/Workspace/com.github/coreyti/wip
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
# `wip index` ... defaults
|
94
|
+
# ......................................................................
|
95
|
+
corey@computer ~ $ wip index # no arg to `wip index`
|
96
|
+
* help
|
97
|
+
/Users/corey/Workspace/help
|
98
|
+
* wip
|
99
|
+
/Users/corey/Workspace/com.github/coreyti/wip
|
100
|
+
|
101
|
+
corey@computer ~ $ wip # no arg to `wip`
|
102
|
+
* help
|
103
|
+
/Users/corey/Workspace/help
|
104
|
+
* wip
|
105
|
+
/Users/corey/Workspace/com.github/coreyti/wip
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
# `wip show` ... activate a "work"
|
110
|
+
# ......................................................................
|
111
|
+
corey@computer ~ $ pwd
|
112
|
+
/Users/corey
|
113
|
+
|
114
|
+
corey@computer ~ $ wip show wip
|
115
|
+
-------------------------------------------------------------------------------
|
116
|
+
work : /Users/corey/Workspace/com.github/coreyti/wip
|
117
|
+
-------------------------------------------------------------------------------
|
118
|
+
working on wip...
|
119
|
+
|
120
|
+
corey@computer wip (git::master) $ wip # scoped `wip index`
|
121
|
+
* wip
|
122
|
+
/Users/corey/Workspace/com.github/coreyti/wip
|
123
|
+
|
124
|
+
corey@computer wip (git::master) $ pwd
|
125
|
+
/Users/corey/Workspace/com.github/coreyti/wip
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
# `wip show` ... default: `wip ARG` to `wip show ARG`
|
130
|
+
# ......................................................................
|
131
|
+
corey@computer wip (git::master) $ cd ~
|
132
|
+
|
133
|
+
corey@computer ~ $ wip .
|
134
|
+
|
135
|
+
corey@computer ~ $ wip wip
|
136
|
+
------------------------------------------------------------------------
|
137
|
+
work : /Users/corey/Workspace/com.github/coreyti/wip
|
138
|
+
------------------------------------------------------------------------
|
139
|
+
working on wip...
|
140
|
+
|
141
|
+
corey@computer wip (git::master) $ wip .
|
142
|
+
------------------------------------------------------------------------
|
143
|
+
work : /Users/corey/Workspace/com.github/coreyti/wip
|
144
|
+
------------------------------------------------------------------------
|
145
|
+
working on wip...
|
146
|
+
|
147
|
+
corey@computer wip (git::master) $ pwd
|
148
|
+
/Users/corey/Workspace/com.github/coreyti/wip
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
# `wip show` ... with a path
|
153
|
+
# ......................................................................
|
154
|
+
corey@computer wip (git::master) $ cd ~
|
155
|
+
|
156
|
+
corey@computer ~ $ wip foo
|
157
|
+
|
158
|
+
corey@computer ~ $ wip show foo
|
159
|
+
|
160
|
+
corey@computer ~ $ wip show ~/Workspace/com.github/
|
161
|
+
|
162
|
+
corey@computer ~ $ wip show ~/Workspace/com.github/coreyti/wip
|
163
|
+
------------------------------------------------------------------------
|
164
|
+
work : /Users/corey/Workspace/com.github/coreyti/wip
|
165
|
+
------------------------------------------------------------------------
|
166
|
+
working on wip...
|
167
|
+
|
168
|
+
corey@computer wip (git::master) $ pwd
|
169
|
+
/Users/corey/Workspace/com.github/coreyti/wip
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
# `wip help`
|
174
|
+
# ......................................................................
|
175
|
+
corey@computer wip (git::master) $ cd ~
|
176
|
+
|
177
|
+
corey@computer ~ $ wip index .
|
178
|
+
* help
|
179
|
+
/Users/corey/Workspace/help
|
180
|
+
* wip
|
181
|
+
/Users/corey/Workspace/com.github/coreyti/wip
|
182
|
+
|
183
|
+
corey@computer ~ $ wip help
|
184
|
+
Tasks:
|
185
|
+
wip-ruby back # Move to and activate most recent 'work'
|
186
|
+
wip-ruby help [TASK] # Describe available tasks or one specific task
|
187
|
+
wip-ruby index # List all indexed 'works'
|
188
|
+
wip-ruby show # Move to and activate a 'work'
|
189
|
+
|
190
|
+
corey@computer ~ $ wip show help
|
191
|
+
------------------------------------------------------------------------
|
192
|
+
work : /Users/corey/Workspace/help
|
193
|
+
------------------------------------------------------------------------
|
194
|
+
working on help...
|
195
|
+
|
196
|
+
corey@computer help $ pwd
|
197
|
+
/Users/corey/Workspace/help
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
# `wip back`
|
202
|
+
# ......................................................................
|
203
|
+
corey@computer help $ cd ~
|
204
|
+
|
205
|
+
corey@computer ~ $ wip show wip
|
206
|
+
------------------------------------------------------------------------
|
207
|
+
work : /Users/corey/Workspace/com.github/coreyti/wip
|
208
|
+
------------------------------------------------------------------------
|
209
|
+
working on wip...
|
210
|
+
|
211
|
+
corey@computer wip (git::master) $ cd ~/Documents/
|
212
|
+
|
213
|
+
corey@computer Documents $ wip back
|
214
|
+
------------------------------------------------------------------------
|
215
|
+
work : /Users/corey/Workspace/com.github/coreyti/wip
|
216
|
+
------------------------------------------------------------------------
|
217
|
+
working on wip...
|
218
|
+
|
219
|
+
corey@computer wip (git::master) $ pwd
|
220
|
+
/Users/corey/Workspace/com.github/coreyti/wip
|
221
|
+
|
222
|
+
|
44
223
|
Assumptions & Intentional Limitations
|
45
224
|
----------------------------------------------------------------------------
|
46
225
|
|
226
|
+
> Most of the following are irrelevant for now. Once `wip` does more
|
227
|
+
> though...
|
228
|
+
|
47
229
|
1. I develop with:
|
48
230
|
* an Apple computer
|
49
231
|
* an iPhone
|
@@ -59,7 +241,8 @@ Assumptions & Intentional Limitations
|
|
59
241
|
On "Notes"
|
60
242
|
----------------------------------------------------------------------------
|
61
243
|
|
62
|
-
|
244
|
+
> Most of the following are irrelevant for now. Once `wip` does more
|
245
|
+
> though...
|
63
246
|
|
64
247
|
* backed by DropBox
|
65
248
|
* on-the-fly versioned, with git-wip
|
data/lib/wip/cli.rb
CHANGED
@@ -24,11 +24,28 @@ module WIP
|
|
24
24
|
|
25
25
|
check_unknown_options!
|
26
26
|
|
27
|
+
desc "route", "Route finder", :hide => true
|
28
|
+
def route(*args)
|
29
|
+
@_all_tasks ||= self.class.all_tasks
|
30
|
+
@_public_names ||= @_all_tasks.inject([]) do |memo, hash|
|
31
|
+
memo << hash[0] unless hash[1].hidden?
|
32
|
+
memo
|
33
|
+
end
|
34
|
+
|
35
|
+
# TODO: be sure we cannot loop (send :route)
|
36
|
+
if @_public_names.include?(args.first)
|
37
|
+
send(args.shift, *args)
|
38
|
+
else
|
39
|
+
# no matching task: see if there's a "work" to show
|
40
|
+
show(*args)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
27
44
|
desc "index", "List all indexed 'works'"
|
28
45
|
method_option "path", :type => :string,
|
29
46
|
:banner => "Specify a path to index",
|
30
47
|
:default => '. (working dir)'
|
31
|
-
def index(path = nil)
|
48
|
+
def index(path = nil, *)
|
32
49
|
@_index ||= WIP::CLI::Index.new(path || '.')
|
33
50
|
@_index.get(:sort => :name).each do |work|
|
34
51
|
WIP.ui.info " * #{work[:name]}\n #{work[:path]}"
|
@@ -39,9 +56,14 @@ module WIP
|
|
39
56
|
method_option "path", :type => :string,
|
40
57
|
:banner => "Specify a path to activate",
|
41
58
|
:default => '. (working dir)'
|
42
|
-
def show(path = nil)
|
59
|
+
def show(path = nil, *)
|
43
60
|
@_show ||= WIP::CLI::Show.new(path || '.')
|
44
|
-
@_show.get
|
61
|
+
WIP.ui.info @_show.get
|
62
|
+
end
|
63
|
+
|
64
|
+
desc "back", "Move to and activate most recent 'work'"
|
65
|
+
def back(*)
|
66
|
+
WIP.ui.info ENV['WIP_BACK']
|
45
67
|
end
|
46
68
|
end
|
47
69
|
end
|
data/lib/wip/version.rb
CHANGED
data/wip.gemspec
CHANGED
@@ -1,6 +1,33 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
$:.push File.expand_path("../lib", __FILE__)
|
3
|
-
|
3
|
+
|
4
|
+
require "wip/version"
|
5
|
+
|
6
|
+
BOOTSTRAP_VERSION = "1.0"
|
7
|
+
|
8
|
+
begin
|
9
|
+
require "rubygems"
|
10
|
+
gem "wip-bootstrap", "= #{BOOTSTRAP_VERSION}"
|
11
|
+
require "wip-bootstrap"
|
12
|
+
rescue LoadError => e
|
13
|
+
puts %{
|
14
|
+
WARNING:
|
15
|
+
#{e.message}wip-bootstrap must be pre-installed. I'll try to grab that now.
|
16
|
+
|
17
|
+
}
|
18
|
+
local = File.join(File.dirname(__FILE__), '..', 'wip-bootstrap')
|
19
|
+
|
20
|
+
if File.exist?(local)
|
21
|
+
`cd #{local} && rake install`
|
22
|
+
else
|
23
|
+
`gem install wip-bootstrap`
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
Gem.clear_paths
|
28
|
+
gem "wip-bootstrap", "= #{BOOTSTRAP_VERSION}"
|
29
|
+
require "wip-bootstrap"
|
30
|
+
WIP::Bootstrap.run
|
4
31
|
|
5
32
|
Gem::Specification.new do |s|
|
6
33
|
s.name ="wip"
|
@@ -16,16 +43,82 @@ Gem::Specification.new do |s|
|
|
16
43
|
|
17
44
|
s.files = `git ls-files`.split("\n")
|
18
45
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
|
-
s.executables = `git ls-files --
|
46
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
47
|
s.default_executable = "wip"
|
21
48
|
s.require_path = "lib"
|
22
49
|
|
23
|
-
s.
|
50
|
+
s.add_runtime_dependency 'wip-bootstrap', BOOTSTRAP_VERSION
|
51
|
+
s.add_development_dependency 'bundler', '~> 1.0.0'
|
52
|
+
|
53
|
+
s.post_install_message = %Q{
|
54
|
+
Thank you for installing #{s.name} v#{s.version}
|
55
|
+
------------------------------------------------------------------------------
|
56
|
+
|
57
|
+
What happened:
|
58
|
+
|
59
|
+
* First, `wip` depends on `wip-bootstrap`, which should have been installed
|
60
|
+
for you if it wasn't already around. `wip-bootstrap` simply adds a few
|
61
|
+
bash wrappers to `wip` and sets up your bash profile.
|
62
|
+
|
63
|
+
`wip-bootstrap` shouldn't have to be updated too often, and updates to
|
64
|
+
`wip` will not attempt to re-bootstrap, unless dependent on a new
|
65
|
+
bootstrap version.
|
66
|
+
|
67
|
+
If bootstrapping *was* run, you should have seen a related banner
|
68
|
+
preceding this one.
|
69
|
+
* `wip` provides ruby CLI utilities that are meant to assist with software
|
70
|
+
project workspace and workflow management (called 'works').
|
71
|
+
|
72
|
+
The executable doing most of the heavy lifting is:
|
73
|
+
|
74
|
+
wip-ruby
|
75
|
+
|
76
|
+
* However, one of the things `wip-bootstrap` takes care of is add a bash
|
77
|
+
function called `wip` to your environment. So,
|
24
78
|
|
25
|
-
|
79
|
+
wip
|
26
80
|
|
27
|
-
|
81
|
+
is your entry point (even though it doesn't show up with `which wip`).
|
28
82
|
|
29
|
-
|
83
|
+
|
84
|
+
Getting started:
|
85
|
+
|
86
|
+
* If this is your *first* time installing `wip` on this machine, you need
|
87
|
+
to `source ~/.wiprc` to get things activated for your current shell
|
88
|
+
session(s).
|
89
|
+
* Drop a `.wiprc` file into a project of your liking. Add some
|
90
|
+
project-specific setup to that file. To start, try this:
|
91
|
+
|
92
|
+
echo 'welcome to my cool project!'
|
93
|
+
|
94
|
+
* Next these a try:
|
95
|
+
|
96
|
+
wip help
|
97
|
+
|
98
|
+
wip index ~/workspace
|
99
|
+
# containing, perhaps, numerous 'works'
|
100
|
+
# returns a list of work names and paths
|
101
|
+
|
102
|
+
wip
|
103
|
+
# shortcut for `wip index .`
|
104
|
+
|
105
|
+
wip show WORK_NAME
|
106
|
+
# cd's to known (indexed) work and sources .wiprc, e.g.:
|
107
|
+
# welcome to my cool project!
|
108
|
+
|
109
|
+
wip WORK_NAME
|
110
|
+
# shortcut for `wip show`
|
111
|
+
|
112
|
+
wip .
|
113
|
+
# shortcut for `wip show .`
|
114
|
+
|
115
|
+
|
116
|
+
Feedback, complaints, suggestions, etc?
|
117
|
+
|
118
|
+
* email me:
|
119
|
+
support+wip@coolerator.net
|
120
|
+
|
121
|
+
------------------------------------------------------------------------------
|
30
122
|
}
|
123
|
+
|
31
124
|
end
|
metadata
CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
+
- 1
|
8
9
|
- 0
|
9
|
-
|
10
|
-
version: 0.0.2
|
10
|
+
version: 0.1.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Corey Innis
|
@@ -15,13 +15,28 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-11-01 00:00:00 -07:00
|
19
19
|
default_executable: wip
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
-
name:
|
22
|
+
name: wip-bootstrap
|
23
23
|
prerelease: false
|
24
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - "="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 15
|
30
|
+
segments:
|
31
|
+
- 1
|
32
|
+
- 0
|
33
|
+
version: "1.0"
|
34
|
+
type: :runtime
|
35
|
+
version_requirements: *id001
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: bundler
|
38
|
+
prerelease: false
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
25
40
|
none: false
|
26
41
|
requirements:
|
27
42
|
- - ~>
|
@@ -33,12 +48,12 @@ dependencies:
|
|
33
48
|
- 0
|
34
49
|
version: 1.0.0
|
35
50
|
type: :development
|
36
|
-
version_requirements: *
|
51
|
+
version_requirements: *id002
|
37
52
|
description: "'wip' provides tools to assist with the creation/maintenance of and collaboration on software projects"
|
38
53
|
email:
|
39
54
|
- support+wip@coolerator.net
|
40
|
-
executables:
|
41
|
-
|
55
|
+
executables:
|
56
|
+
- wip-ruby
|
42
57
|
extensions: []
|
43
58
|
|
44
59
|
extra_rdoc_files: []
|
@@ -46,14 +61,12 @@ extra_rdoc_files: []
|
|
46
61
|
files:
|
47
62
|
- .gitignore
|
48
63
|
- .wiprc
|
64
|
+
- Gemfile
|
49
65
|
- README.mkd
|
50
66
|
- Rakefile
|
51
|
-
- bin/wip
|
52
|
-
- bin/wip-bash
|
53
67
|
- bin/wip-ruby
|
54
68
|
- doc/README.md
|
55
69
|
- doc/TEMPLATE.md
|
56
|
-
- lib/rubygems_plugin.rb
|
57
70
|
- lib/wip.rb
|
58
71
|
- lib/wip/cli.rb
|
59
72
|
- lib/wip/cli/base.rb
|
@@ -92,11 +105,75 @@ homepage: http://github.com/coreyti/wip
|
|
92
105
|
licenses: []
|
93
106
|
|
94
107
|
post_install_message: |
|
95
|
-
**************************************************
|
96
108
|
|
97
|
-
|
109
|
+
Thank you for installing wip v0.1.0
|
110
|
+
------------------------------------------------------------------------------
|
111
|
+
|
112
|
+
What happened:
|
113
|
+
|
114
|
+
* First, `wip` depends on `wip-bootstrap`, which should have been installed
|
115
|
+
for you if it wasn't already around. `wip-bootstrap` simply adds a few
|
116
|
+
bash wrappers to `wip` and sets up your bash profile.
|
117
|
+
|
118
|
+
`wip-bootstrap` shouldn't have to be updated too often, and updates to
|
119
|
+
`wip` will not attempt to re-bootstrap, unless dependent on a new
|
120
|
+
bootstrap version.
|
121
|
+
|
122
|
+
If bootstrapping *was* run, you should have seen a related banner
|
123
|
+
preceding this one.
|
124
|
+
* `wip` provides ruby CLI utilities that are meant to assist with software
|
125
|
+
project workspace and workflow management (called 'works').
|
126
|
+
|
127
|
+
The executable doing most of the heavy lifting is:
|
128
|
+
|
129
|
+
wip-ruby
|
130
|
+
|
131
|
+
* However, one of the things `wip-bootstrap` takes care of is add a bash
|
132
|
+
function called `wip` to your environment. So,
|
133
|
+
|
134
|
+
wip
|
135
|
+
|
136
|
+
is your entry point (even though it doesn't show up with `which wip`).
|
137
|
+
|
138
|
+
|
139
|
+
Getting started:
|
140
|
+
|
141
|
+
* If this is your *first* time installing `wip` on this machine, you need
|
142
|
+
to `source ~/.wiprc` to get things activated for your current shell
|
143
|
+
session(s).
|
144
|
+
* Drop a `.wiprc` file into a project of your liking. Add some
|
145
|
+
project-specific setup to that file. To start, try this:
|
146
|
+
|
147
|
+
echo 'welcome to my cool project!'
|
148
|
+
|
149
|
+
* Next these a try:
|
150
|
+
|
151
|
+
wip help
|
152
|
+
|
153
|
+
wip index ~/workspace
|
154
|
+
# containing, perhaps, numerous 'works'
|
155
|
+
# returns a list of work names and paths
|
156
|
+
|
157
|
+
wip
|
158
|
+
# shortcut for `wip index .`
|
159
|
+
|
160
|
+
wip show WORK_NAME
|
161
|
+
# cd's to known (indexed) work and sources .wiprc, e.g.:
|
162
|
+
# welcome to my cool project!
|
163
|
+
|
164
|
+
wip WORK_NAME
|
165
|
+
# shortcut for `wip show`
|
166
|
+
|
167
|
+
wip .
|
168
|
+
# shortcut for `wip show .`
|
169
|
+
|
170
|
+
|
171
|
+
Feedback, complaints, suggestions, etc?
|
172
|
+
|
173
|
+
* email me:
|
174
|
+
support+wip@coolerator.net
|
98
175
|
|
99
|
-
|
176
|
+
------------------------------------------------------------------------------
|
100
177
|
|
101
178
|
rdoc_options: []
|
102
179
|
|
data/bin/wip
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
|
3
|
-
# TODO:
|
4
|
-
# * ask a Ruby option parser to get us the options for bash.
|
5
|
-
# * allow passing args through:
|
6
|
-
# wip work-name --flag -- RAILS_ENV=production
|
7
|
-
|
8
|
-
cmd="$1"
|
9
|
-
|
10
|
-
case "${cmd:-index}" in
|
11
|
-
help)
|
12
|
-
# $ wip help --> wip-ruby... ["help"]
|
13
|
-
wip-ruby "help" $2
|
14
|
-
;;
|
15
|
-
index)
|
16
|
-
# $ wip --> wip-ruby... ["index", "."]
|
17
|
-
# $ wip index --> wip-ruby... ["index", "."]
|
18
|
-
# $ wip index . --> wip-ruby... ["index", "."]
|
19
|
-
# $ wip index ~/Workspace --> wip-ruby... ["index", "/Users/corey/Workspace"]
|
20
|
-
|
21
|
-
wip-ruby "index" "${2:-.}"
|
22
|
-
;;
|
23
|
-
show)
|
24
|
-
# $ wip show --> wip-bash... show '.'
|
25
|
-
# $ wip show . --> wip-bash... show '.'
|
26
|
-
# $ wip show work-name --> wip-bash... show 'work-name'
|
27
|
-
# $ wip show ~/Workspace/work-path --> wip-bash... show '/Users/corey/Workspace/work-path'
|
28
|
-
|
29
|
-
wip-bash "show" "${2:-.}"
|
30
|
-
;;
|
31
|
-
*)
|
32
|
-
# $ wip . --> wip-bash... show '.'
|
33
|
-
# $ wip work-name --> wip-bash... show 'work-name'
|
34
|
-
# $ wip ~/Workspace/work-path --> wip-bash... show '/Users/corey/Workspace/work-path'
|
35
|
-
|
36
|
-
wip-bash "$1"
|
37
|
-
;;
|
38
|
-
esac
|
data/bin/wip-bash
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
|
3
|
-
cmd="$1"
|
4
|
-
|
5
|
-
# echo "wip-bash..."
|
6
|
-
|
7
|
-
wip-show() {
|
8
|
-
# echo " show... name: $1"
|
9
|
-
}
|
10
|
-
|
11
|
-
case "$cmd" in
|
12
|
-
show)
|
13
|
-
wip-show $2
|
14
|
-
;;
|
15
|
-
*)
|
16
|
-
wip-show $1
|
17
|
-
;;
|
18
|
-
esac
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
# for wiprc in "$HOME/.wiprc" "./.wiprc" ; do
|
23
|
-
#
|
24
|
-
# done
|
data/lib/rubygems_plugin.rb
DELETED