tool-shed 0.0.14 → 0.0.15
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +2 -2
- data/README.md +4 -6
- data/lib/shed/rake/headers.rb +1 -1
- data/lib/shed/search.rb +2 -4
- data/lib/shed/version.rb +1 -1
- data/test/test_helper.rb +3 -3
- data/test/unit/test_search.rb +15 -6
- metadata +4 -7
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
tool-shed (0.0.
|
4
|
+
tool-shed (0.0.15)
|
5
5
|
rake (>= 0.9.2)
|
6
6
|
|
7
7
|
GEM
|
@@ -15,7 +15,7 @@ GEM
|
|
15
15
|
mocha (0.12.1)
|
16
16
|
metaclass (~> 0.0.1)
|
17
17
|
multi_json (1.3.6)
|
18
|
-
rake (
|
18
|
+
rake (10.1.0)
|
19
19
|
shoulda (3.1.1)
|
20
20
|
shoulda-context (~> 1.0)
|
21
21
|
shoulda-matchers (~> 1.2)
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Tool Shed
|
2
2
|
|
3
|
+
[![Build Status](https://secure.travis-ci.org/simongregory/tool-shed.png)](http://travis-ci.org/simongregory/tool-shed) [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/simongregory/tool-shed)
|
4
|
+
|
3
5
|
A collection of utility scripts and rake tasks to help working with ActionScript and Flex projects. They are under development, so **don't** expect too much reliability.
|
4
6
|
|
5
7
|
All tools have help available on the command line, to view use: `as-tool-name -h`
|
@@ -63,9 +65,9 @@ To generate a manifest.xml file for use when declaring namespaces to the flex co
|
|
63
65
|
t.output = 'src/Desktop-manifest.xml'
|
64
66
|
t.filter = 'bbc.ipd.view.components'
|
65
67
|
end
|
66
|
-
|
68
|
+
|
67
69
|
To make a version file from a template which contains the keys @major@, @minor@, @patch@, @revision@
|
68
|
-
|
70
|
+
|
69
71
|
version do |t|
|
70
72
|
t.template = 'etc/templates/Version.as'
|
71
73
|
t.major, t.minor, t.patch = 5, 0, 0
|
@@ -76,10 +78,6 @@ To make a version file from a template which contains the keys @major@, @minor@,
|
|
76
78
|
|
77
79
|
gem install tool-shed
|
78
80
|
|
79
|
-
## Authors
|
80
|
-
|
81
|
-
[Simon Gregory](http://simongregory.com)
|
82
|
-
|
83
81
|
## License
|
84
82
|
|
85
83
|
Released under the MIT License. Please see the accompanying [LICENSE](LICENSE) document for
|
data/lib/shed/rake/headers.rb
CHANGED
@@ -24,7 +24,7 @@ module FlexHeaders
|
|
24
24
|
Dir[ "{#{@paths}}/**/*.as" ].each do |uri|
|
25
25
|
src = IO.read( uri )
|
26
26
|
File.open( uri, 'w+' ) do |f|
|
27
|
-
f << src.sub(
|
27
|
+
f << src.sub( /.*?(?=package)/m, @header )
|
28
28
|
end
|
29
29
|
end
|
30
30
|
puts "Added copyright header to all .as files"
|
data/lib/shed/search.rb
CHANGED
@@ -31,7 +31,7 @@ module Search
|
|
31
31
|
#
|
32
32
|
# Scans the path and its children for empty directories.
|
33
33
|
#
|
34
|
-
def self.for_empties(dir,excluding=[
|
34
|
+
def self.for_empties(dir,excluding=[])
|
35
35
|
|
36
36
|
Find.find(dir) do |path|
|
37
37
|
|
@@ -43,9 +43,7 @@ module Search
|
|
43
43
|
yield path if Dir.entries(path).join =~ /^\.\.\.(\.(svn|git))?$/
|
44
44
|
end
|
45
45
|
end
|
46
|
-
|
47
46
|
end
|
48
|
-
|
49
47
|
end
|
50
48
|
|
51
|
-
end
|
49
|
+
end
|
data/lib/shed/version.rb
CHANGED
data/test/test_helper.rb
CHANGED
@@ -17,9 +17,9 @@ empties = ['test/fixtures/empty/borg',
|
|
17
17
|
'test/fixtures/empty/xorg',
|
18
18
|
'test/fixtures/empty/zorg',
|
19
19
|
'test/fixtures/unused-cla/src/org',
|
20
|
-
'test/fixtures/empty/
|
21
|
-
'test/fixtures/empty/
|
20
|
+
'test/fixtures/empty/svn/a',
|
21
|
+
'test/fixtures/empty/git/b/c']
|
22
22
|
|
23
23
|
empties.each { |f|
|
24
|
-
|
24
|
+
FileUtils.mkdir_p(f) unless File.exists?("#{f}")
|
25
25
|
}
|
data/test/unit/test_search.rb
CHANGED
@@ -52,25 +52,34 @@ class TestSearch < Test::Unit::TestCase
|
|
52
52
|
|
53
53
|
should "list all directories in a sub tree that are empty" do
|
54
54
|
Search.for_empties(@path) { |f| @found << f }
|
55
|
+
|
56
|
+
assert_match(/\/borg/, @found.to_s)
|
57
|
+
assert_match(/\/xorg/, @found.to_s)
|
58
|
+
assert_match(/\/zorg/, @found.to_s)
|
59
|
+
assert_match(/\/org/, @found.to_s)
|
60
|
+
assert_match(/\/git/, @found.to_s)
|
61
|
+
assert_match(/\/svn/, @found.to_s)
|
62
|
+
|
55
63
|
assert_equal(6, @found.length)
|
56
|
-
assert_match(/(b|s|g|x|z)org/, @found.to_s)
|
57
64
|
end
|
58
65
|
|
59
|
-
should "
|
60
|
-
Search.for_empties(@path, ['org', '
|
61
|
-
|
62
|
-
|
66
|
+
should "skip specified exclusions when searching for empty directories" do
|
67
|
+
Search.for_empties(@path, ['org', 'git', 'zorg']) { |f| @found << f }
|
68
|
+
|
69
|
+
assert_equal(3, @found.length)
|
63
70
|
end
|
64
71
|
|
65
|
-
context "
|
72
|
+
context "finds hidden directories by default" do
|
66
73
|
|
67
74
|
should "not recurse into svn directories" do
|
68
75
|
Search.for_empties(@path) { |f| @found << f }
|
76
|
+
|
69
77
|
assert_equal(6, @found.length)
|
70
78
|
end
|
71
79
|
|
72
80
|
should "not recurse into git directories" do
|
73
81
|
Search.for_empties(@path) { |f| @found << f }
|
82
|
+
|
74
83
|
assert_equal(6, @found.length)
|
75
84
|
end
|
76
85
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tool-shed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.15
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-07-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -182,7 +182,7 @@ files:
|
|
182
182
|
homepage: http://github.com/simongregory/tool-shed
|
183
183
|
licenses: []
|
184
184
|
post_install_message: ! "Welcome to the Tool-Shed\n========================\nGet Tooled
|
185
|
-
Up 0.0.
|
185
|
+
Up 0.0.15. Kick off.\n\nThanks for installing:\n\n as-asset-vacuum\n as-class-vacuum\n
|
186
186
|
\ as-concrete\n as-docp\n as-manifest\n as-style-vacuum\n as-vacuum\n\nThe tools
|
187
187
|
are under development so may be a little\ntempremental. When they 'just work' it's
|
188
188
|
likely\nthey're running from a project root, which contains\nsrc, test and lib dirs.\n\nSee
|
@@ -198,9 +198,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
198
198
|
- - ! '>='
|
199
199
|
- !ruby/object:Gem::Version
|
200
200
|
version: '0'
|
201
|
-
segments:
|
202
|
-
- 0
|
203
|
-
hash: -2925004270702309252
|
204
201
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
205
202
|
none: false
|
206
203
|
requirements:
|
@@ -209,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
209
206
|
version: 1.3.6
|
210
207
|
requirements: []
|
211
208
|
rubyforge_project:
|
212
|
-
rubygems_version: 1.8.
|
209
|
+
rubygems_version: 1.8.23
|
213
210
|
signing_key:
|
214
211
|
specification_version: 3
|
215
212
|
summary: ActionScript and Flex Project Tools
|