rego 0.0.1 → 1.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/README +43 -0
- data/bin/rego +15 -3
- data/lib/rego.rb +1 -1
- data/rego.gemspec +2 -2
- metadata +7 -6
data/README
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
NAME
|
2
|
+
|
3
|
+
rego
|
4
|
+
|
5
|
+
SYNOPSIS
|
6
|
+
|
7
|
+
rego
|
8
|
+
|
9
|
+
[options]+
|
10
|
+
|
11
|
+
DESCRIPTION
|
12
|
+
|
13
|
+
run arbitrary commands easily when files change
|
14
|
+
|
15
|
+
PARAMETERS
|
16
|
+
|
17
|
+
--help, -h
|
18
|
+
|
19
|
+
EXAMPLES
|
20
|
+
|
21
|
+
### gem install rego
|
22
|
+
|
23
|
+
|
24
|
+
# say hai whenever the file foo.txt changes
|
25
|
+
#
|
26
|
+
~> rego echo hai -- foo.txt
|
27
|
+
|
28
|
+
# say hai whenever any file (recursively) in bar changes
|
29
|
+
#
|
30
|
+
~> rego echo hai -- ./bar/
|
31
|
+
|
32
|
+
# echo *the file that changed* when any file (recursively) in bar changes
|
33
|
+
#
|
34
|
+
~> rego echo "@ was changed" -- ./bar/
|
35
|
+
|
36
|
+
# run a specific test whenever anything in lib, test, app, or config changes
|
37
|
+
#
|
38
|
+
~> rego ruby -Itest ./test/units/foo_test.rb --name teh_test -- {lib,test,app,config}
|
39
|
+
|
40
|
+
# run a specific test whenever it, or your app, has changed
|
41
|
+
#
|
42
|
+
~> rego ruby -Itest @ -- ./test
|
43
|
+
|
data/bin/rego
CHANGED
@@ -8,7 +8,7 @@ Main {
|
|
8
8
|
|
9
9
|
__
|
10
10
|
|
11
|
-
|
11
|
+
description <<-__
|
12
12
|
|
13
13
|
run arbitrary commands easily when files change
|
14
14
|
|
@@ -16,6 +16,9 @@ Main {
|
|
16
16
|
|
17
17
|
examples <<-__
|
18
18
|
|
19
|
+
### gem install rego
|
20
|
+
|
21
|
+
|
19
22
|
# say hai whenever the file foo.txt changes
|
20
23
|
#
|
21
24
|
~> rego echo hai -- foo.txt
|
@@ -46,6 +49,7 @@ Main {
|
|
46
49
|
def parse_the_command_line
|
47
50
|
pos = ARGV.index('--')
|
48
51
|
|
52
|
+
=begin
|
49
53
|
if pos
|
50
54
|
@command = ARGV[0...pos].join(' ')
|
51
55
|
@paths = ARGV[pos + 1 .. -1]
|
@@ -53,7 +57,14 @@ Main {
|
|
53
57
|
@command = ARGV[0..-1].join(' ')
|
54
58
|
@paths = []
|
55
59
|
end
|
56
|
-
|
60
|
+
=end
|
61
|
+
if pos
|
62
|
+
@paths = ARGV[0 ... pos]
|
63
|
+
@command = ARGV[pos + 1 .. -1].join(' ')
|
64
|
+
else
|
65
|
+
@paths = []
|
66
|
+
@command = ARGV[0..-1].join(' ')
|
67
|
+
end
|
57
68
|
@command = 'echo @' if @paths.empty?
|
58
69
|
@paths = %w[.] if @paths.empty?
|
59
70
|
|
@@ -154,7 +165,8 @@ Main {
|
|
154
165
|
|
155
166
|
|
156
167
|
BEGIN {
|
157
|
-
|
168
|
+
require 'pathname'
|
169
|
+
this = Pathname.new(__FILE__).realpath.to_s
|
158
170
|
bindir = File.dirname(this)
|
159
171
|
rootdir = File.dirname(bindir)
|
160
172
|
libdir = File.join(rootdir, 'lib')
|
data/lib/rego.rb
CHANGED
data/rego.gemspec
CHANGED
@@ -3,13 +3,13 @@
|
|
3
3
|
|
4
4
|
Gem::Specification::new do |spec|
|
5
5
|
spec.name = "rego"
|
6
|
-
spec.version = "0.0
|
6
|
+
spec.version = "1.0.0"
|
7
7
|
spec.platform = Gem::Platform::RUBY
|
8
8
|
spec.summary = "rego"
|
9
9
|
spec.description = "description: rego kicks the ass"
|
10
10
|
|
11
11
|
spec.files =
|
12
|
-
["Rakefile", "bin", "bin/rego", "lib", "lib/rego.rb", "rego.gemspec"]
|
12
|
+
["README", "Rakefile", "bin", "bin/rego", "lib", "lib/rego.rb", "rego.gemspec"]
|
13
13
|
|
14
14
|
spec.executables = ["rego"]
|
15
15
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rego
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-03-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: main
|
16
|
-
requirement: &
|
16
|
+
requirement: &70118988773040 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 4.8.1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70118988773040
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rb-fsevent
|
27
|
-
requirement: &
|
27
|
+
requirement: &70118988769120 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: 0.4.3.1
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70118988769120
|
36
36
|
description: ! 'description: rego kicks the ass'
|
37
37
|
email: ara.t.howard@gmail.com
|
38
38
|
executables:
|
@@ -40,6 +40,7 @@ executables:
|
|
40
40
|
extensions: []
|
41
41
|
extra_rdoc_files: []
|
42
42
|
files:
|
43
|
+
- README
|
43
44
|
- Rakefile
|
44
45
|
- bin/rego
|
45
46
|
- lib/rego.rb
|