sniffles 0.1.0.1 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sniffles/sniffers.rb +6 -4
- data/lib/sniffles/version.rb +1 -1
- metadata +11 -16
data/lib/sniffles/sniffers.rb
CHANGED
@@ -1,20 +1,22 @@
|
|
1
1
|
module Sniffles
|
2
2
|
module Sniffers
|
3
3
|
def self.use(response_body, name)
|
4
|
-
file = Dir.glob("lib/sniffles/sniffers/**/#{name.to_s}.rb").first
|
4
|
+
file = Dir.glob(File.dirname(__FILE__) + "/../../lib/sniffles/sniffers/**/#{name.to_s}.rb").first
|
5
5
|
class_name = get_sniffer_class(name.to_s)
|
6
|
-
require File.expand_path(
|
6
|
+
require File.expand_path(file)
|
7
7
|
eval("Sniffles::Sniffers::#{class_name}.new(response_body).output")
|
8
8
|
end
|
9
9
|
|
10
10
|
def self.list_all(group = "**")
|
11
|
-
Dir.glob("lib/sniffles/sniffers/#{group}/*.rb").collect do |sniffer|
|
11
|
+
Dir.glob(File.dirname(__FILE__) + "/../../lib/sniffles/sniffers/#{group}/*.rb").collect do |sniffer|
|
12
12
|
sniffer.match(/sniffers\/[a-z]+\/(.*)\.rb$/)[1].to_sym
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
16
|
def self.list_groups
|
17
|
-
Dir.glob("lib/sniffles/sniffers/**").collect { |group|
|
17
|
+
Dir.glob(File.dirname(__FILE__) + "/../../lib/sniffles/sniffers/**").collect { |group|
|
18
|
+
group.match(/sniffers\/(.*)$/)[1].to_sym
|
19
|
+
}
|
18
20
|
end
|
19
21
|
|
20
22
|
def self.list_all_by_group
|
data/lib/sniffles/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sniffles
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-03-
|
13
|
+
date: 2012-03-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: nokogiri
|
17
|
-
requirement: &
|
17
|
+
requirement: &2164683920 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: 1.5.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *2164683920
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: rspec
|
28
|
-
requirement: &
|
28
|
+
requirement: &2164683300 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: 2.8.0
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *2164683300
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: typhoeus
|
39
|
-
requirement: &
|
39
|
+
requirement: &2164682380 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ~>
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
version: 0.3.3
|
45
45
|
type: :development
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *2164682380
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: vcr
|
50
|
-
requirement: &
|
50
|
+
requirement: &2164681220 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ~>
|
@@ -55,7 +55,7 @@ dependencies:
|
|
55
55
|
version: 2.0.0
|
56
56
|
type: :development
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *2164681220
|
59
59
|
description: Detects popular CMS, Javascript libraries, and other items of interest.
|
60
60
|
email:
|
61
61
|
- zeke@templ.in
|
@@ -111,18 +111,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
111
111
|
- - ! '>='
|
112
112
|
- !ruby/object:Gem::Version
|
113
113
|
version: '0'
|
114
|
-
segments:
|
115
|
-
- 0
|
116
|
-
hash: 1752558879762973930
|
117
114
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
118
115
|
none: false
|
119
116
|
requirements:
|
120
117
|
- - ! '>='
|
121
118
|
- !ruby/object:Gem::Version
|
122
119
|
version: '0'
|
123
|
-
segments:
|
124
|
-
- 0
|
125
|
-
hash: 1752558879762973930
|
126
120
|
requirements: []
|
127
121
|
rubyforge_project:
|
128
122
|
rubygems_version: 1.8.17
|
@@ -144,3 +138,4 @@ test_files:
|
|
144
138
|
- spec/sniffles/text_spec.rb
|
145
139
|
- spec/sniffles_spec.rb
|
146
140
|
- spec/spec_helper.rb
|
141
|
+
has_rdoc:
|