shattered_support 0.4.0.1 → 0.5.0.1
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/lib/shattered_support/core_ext/file/search.rb +12 -0
- metadata +13 -12
@@ -39,6 +39,18 @@ module ShatteredSupport #:nodoc:
|
|
39
39
|
end
|
40
40
|
return files
|
41
41
|
end
|
42
|
+
|
43
|
+
# Finds the first file matching 'file' in the given paths.
|
44
|
+
def find(paths, file)
|
45
|
+
paths = [paths] if paths.is_a? ::String
|
46
|
+
paths.each do |path|
|
47
|
+
each_in_path(path) do |resource|
|
48
|
+
return resource if resource.ends_with?(file)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
raise StandardError.new("File not found #{file}")
|
52
|
+
end
|
53
|
+
|
42
54
|
# See File#find_by_extensions
|
43
55
|
def find_by_extension(paths, extension)
|
44
56
|
find_by_extensions(paths, extension)
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.
|
2
|
+
rubygems_version: 0.9.4
|
3
3
|
specification_version: 1
|
4
4
|
name: shattered_support
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.
|
7
|
-
date:
|
6
|
+
version: 0.5.0.1
|
7
|
+
date: 2007-06-22 00:00:00 -06:00
|
8
8
|
summary: "Shattered Support: Allows a common derivation point for shattered MVC."
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -25,29 +25,30 @@ required_ruby_version: !ruby/object:Gem::Version::Requirement
|
|
25
25
|
platform: ruby
|
26
26
|
signing_key:
|
27
27
|
cert_chain:
|
28
|
+
post_install_message:
|
28
29
|
authors: []
|
29
30
|
|
30
31
|
files:
|
31
|
-
- lib/shattered_support.rb
|
32
|
-
- lib/shattered_support/core_ext.rb
|
33
|
-
- lib/shattered_support/inflections.rb
|
34
|
-
- lib/shattered_support/inflector.rb
|
35
|
-
- lib/shattered_support/core_ext/class.rb
|
36
|
-
- lib/shattered_support/core_ext/dir.rb
|
37
|
-
- lib/shattered_support/core_ext/file.rb
|
38
|
-
- lib/shattered_support/core_ext/numeric.rb
|
39
|
-
- lib/shattered_support/core_ext/string.rb
|
40
32
|
- lib/shattered_support/core_ext/class/attribute_accessors.rb
|
41
33
|
- lib/shattered_support/core_ext/class/inheritable_attributes.rb
|
42
34
|
- lib/shattered_support/core_ext/class/removal.rb
|
35
|
+
- lib/shattered_support/core_ext/class.rb
|
43
36
|
- lib/shattered_support/core_ext/dir/search.rb
|
37
|
+
- lib/shattered_support/core_ext/dir.rb
|
44
38
|
- lib/shattered_support/core_ext/file/search.rb
|
39
|
+
- lib/shattered_support/core_ext/file.rb
|
45
40
|
- lib/shattered_support/core_ext/numeric/time.rb
|
41
|
+
- lib/shattered_support/core_ext/numeric.rb
|
46
42
|
- lib/shattered_support/core_ext/string/access.rb
|
47
43
|
- lib/shattered_support/core_ext/string/conversions.rb
|
48
44
|
- lib/shattered_support/core_ext/string/inflections.rb
|
49
45
|
- lib/shattered_support/core_ext/string/iterators.rb
|
50
46
|
- lib/shattered_support/core_ext/string/starts_ends_with.rb
|
47
|
+
- lib/shattered_support/core_ext/string.rb
|
48
|
+
- lib/shattered_support/core_ext.rb
|
49
|
+
- lib/shattered_support/inflections.rb
|
50
|
+
- lib/shattered_support/inflector.rb
|
51
|
+
- lib/shattered_support.rb
|
51
52
|
test_files: []
|
52
53
|
|
53
54
|
rdoc_options: []
|