geordi 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +21 -11
- data/bin/cleanup-directory +13 -0
- data/bin/remove-executable-flags +2 -2
- data/bin/rspec-and-cucumber +17 -0
- data/lib/geordi/version.rb +1 -1
- metadata +7 -5
- data/bin/tests +0 -19
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
Geordi
|
2
|
-
|
2
|
+
======
|
3
3
|
|
4
4
|
Geordi is a collection of command line tools we use in our daily work with Ruby, Rails and Linux at [makandra](http://makandra.com/).
|
5
5
|
|
@@ -30,6 +30,16 @@ Runs the given command under `bundle exec` if a `Gemfile` is present in your wor
|
|
30
30
|
More information at http://makandra.com/notes/684-automatically-run-bundle-exec-if-required
|
31
31
|
|
32
32
|
|
33
|
+
cleanup-directory
|
34
|
+
-----------------
|
35
|
+
|
36
|
+
Removes unnecessary files from your project directory:
|
37
|
+
|
38
|
+
cleanup-directory
|
39
|
+
|
40
|
+
More information at http://makandra.com/notes/951-shell-script-to-clean-up-a-project-directory
|
41
|
+
|
42
|
+
|
33
43
|
dump-for
|
34
44
|
--------
|
35
45
|
|
@@ -101,21 +111,21 @@ Recursively removes executable flags from files in the working directory that pr
|
|
101
111
|
More information at http://makandra.com/notes/659-recursively-remove-unnecessary-execute-flags
|
102
112
|
|
103
113
|
|
104
|
-
|
105
|
-
|
114
|
+
rspec-and-cucumber
|
115
|
+
--------------
|
106
116
|
|
107
|
-
|
117
|
+
Runs both RSpec and Cucumber. Call from any project directory:
|
108
118
|
|
109
|
-
|
119
|
+
rspec-and-cucumber
|
110
120
|
|
111
|
-
More information at http://makandra.com/notes/
|
121
|
+
More information at http://makandra.com/notes/1197-bash-script-to-run-specs-and-features
|
112
122
|
|
113
123
|
|
114
|
-
|
115
|
-
|
124
|
+
shell-for
|
125
|
+
---------
|
116
126
|
|
117
|
-
|
127
|
+
Opens an SSH shell on the given [Capistrano multistage](https://github.com/capistrano/capistrano/wiki/2.x-Multistage-Extension) deployment target:
|
118
128
|
|
119
|
-
|
129
|
+
shell-for production
|
120
130
|
|
121
|
-
More information at http://makandra.com/notes/
|
131
|
+
More information at http://makandra.com/notes/1209-script-to-open-an-ssh-shell-to-a-capistrano-deployment-target
|
@@ -0,0 +1,13 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
puts 'Removing:'
|
4
|
+
for pattern in %w[ webrat-* capybara-* tmp/webrat-* tmp/capybara-* tmp/rtex/* log/*.log ]
|
5
|
+
puts "- #{pattern}"
|
6
|
+
puts `rm -vfR #{pattern}`
|
7
|
+
end
|
8
|
+
|
9
|
+
puts 'Finding recursively and removing:'
|
10
|
+
for pattern in %w[ *~ ]
|
11
|
+
puts "- #{pattern}"
|
12
|
+
`find . -name #{pattern} -exec rm {} ';'`
|
13
|
+
end
|
data/bin/remove-executable-flags
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
puts "Removing executable-flags:"
|
4
|
-
for pattern in %w[*.rb *.html *.erb *.haml *.yml *.css *.sass *.rake *.png *.jpg *.gif *.pdf *.txt *.rdoc Rakefile VERSION README Capfile]
|
4
|
+
for pattern in %w[ *.rb *.html *.erb *.haml *.yml *.css *.sass *.rake *.png *.jpg *.gif *.pdf *.txt *.rdoc Rakefile VERSION README Capfile ]
|
5
5
|
puts "- #{pattern}"
|
6
|
-
`find . -name "#{pattern}" -exec chmod -x {}
|
6
|
+
`find . -name "#{pattern}" -exec chmod -x {} ';'`
|
7
7
|
end
|
8
8
|
puts "Done."
|
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
File.delete 'rerun.txt' if FileTest.exists? 'rerun.txt'
|
3
|
+
|
4
|
+
if File.open('Gemfile').read.scan(/rspec_spinner/).any?
|
5
|
+
spec = "script/spec -r rspec_spinner -f RspecSpinner::Bar -c spec"
|
6
|
+
else
|
7
|
+
spec = "script/spec spec"
|
8
|
+
end
|
9
|
+
|
10
|
+
if File.open('Gemfile').read.scan(/cucumber_spinner/).any?
|
11
|
+
cucumber = "script/cucumber --format CucumberSpinner::CuriousProgressBarFormatter features"
|
12
|
+
else
|
13
|
+
cucumber = "script/cucumber --format progress features"
|
14
|
+
end
|
15
|
+
|
16
|
+
exec "bundle exec #{spec} && bundle exec #{cucumber}"
|
17
|
+
|
data/lib/geordi/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geordi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 7
|
10
|
+
version: 0.2.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Henning Koch
|
@@ -25,6 +25,7 @@ email:
|
|
25
25
|
executables:
|
26
26
|
- apache-site
|
27
27
|
- b
|
28
|
+
- cleanup-directory
|
28
29
|
- dump-for
|
29
30
|
- dumple
|
30
31
|
- install-gems-remotely
|
@@ -33,8 +34,8 @@ executables:
|
|
33
34
|
- power-rake
|
34
35
|
- remotify-local-branch
|
35
36
|
- remove-executable-flags
|
37
|
+
- rspec-and-cucumber
|
36
38
|
- shell-for
|
37
|
-
- tests
|
38
39
|
extensions: []
|
39
40
|
|
40
41
|
extra_rdoc_files: []
|
@@ -46,6 +47,7 @@ files:
|
|
46
47
|
- Rakefile
|
47
48
|
- bin/apache-site
|
48
49
|
- bin/b
|
50
|
+
- bin/cleanup-directory
|
49
51
|
- bin/dump-for
|
50
52
|
- bin/dumple
|
51
53
|
- bin/install-gems-remotely
|
@@ -54,8 +56,8 @@ files:
|
|
54
56
|
- bin/power-rake
|
55
57
|
- bin/remotify-local-branch
|
56
58
|
- bin/remove-executable-flags
|
59
|
+
- bin/rspec-and-cucumber
|
57
60
|
- bin/shell-for
|
58
|
-
- bin/tests
|
59
61
|
- geordi.gemspec
|
60
62
|
- lib/geordi/version.rb
|
61
63
|
has_rdoc: true
|
data/bin/tests
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
rm -f rerun.txt
|
3
|
-
|
4
|
-
grep rspec_spinner Gemfile > /dev/null
|
5
|
-
if [ "$?" -eq "0" ]; then
|
6
|
-
spec="script/spec -r rspec_spinner -f RspecSpinner::Bar -c spec"
|
7
|
-
else
|
8
|
-
spec="script/spec spec"
|
9
|
-
fi
|
10
|
-
|
11
|
-
grep cucumber_spinner Gemfile > /dev/null
|
12
|
-
if [ "$?" -eq "0" ]; then
|
13
|
-
cucumber="script/cucumber --format CucumberSpinner::CuriousProgressBarFormatter features"
|
14
|
-
else
|
15
|
-
cucumber="script/cucumber --format progress features"
|
16
|
-
fi
|
17
|
-
|
18
|
-
bundle exec $spec && bundle exec $cucumber
|
19
|
-
|