trufflepig 0.2.8 → 0.2.9
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/VERSION +1 -1
- data/lib/trufflepig/search.rb +3 -0
- data/spec/dummy_app/linked.html +19 -0
- data/spec/trufflepig/search_spec.rb +11 -0
- data/trufflepig.gemspec +4 -3
- metadata +5 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.9
|
data/lib/trufflepig/search.rb
CHANGED
@@ -13,6 +13,8 @@ module Trufflepig
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def perform
|
16
|
+
raise Errno::ENOENT unless File.exists? path
|
17
|
+
|
16
18
|
if File.directory?(path)
|
17
19
|
Dir.chdir path
|
18
20
|
files = {
|
@@ -32,6 +34,7 @@ module Trufflepig
|
|
32
34
|
end
|
33
35
|
|
34
36
|
def scan(file_path)
|
37
|
+
return unless File.exists? file_path
|
35
38
|
content = File.read file_path
|
36
39
|
|
37
40
|
features.each do |feature|
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en" manifest="cache.manifest">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>Heliogram</title>
|
6
|
+
<meta name="description" content="A simple photo camera app using getUserMedia">
|
7
|
+
<meta name="author" content="Sebastian Kippe">
|
8
|
+
<link rel="stylesheet" href="css/style.css">
|
9
|
+
<script src="js/jquery.min.js"></script>
|
10
|
+
<script src="js/app.js"></script>
|
11
|
+
</head>
|
12
|
+
<body>
|
13
|
+
<canvas id="canvas"></canvas>
|
14
|
+
<video id="video" autoplay></video>
|
15
|
+
<div id="filmroll"></div>
|
16
|
+
<!-- <button id="toggleVideo">toggle video</button> -->
|
17
|
+
<button id="snapshot">snapshot</button>
|
18
|
+
</body>
|
19
|
+
</html>
|
@@ -44,6 +44,17 @@ describe Trufflepig::Search do
|
|
44
44
|
@search.results.collect{|f| f["id"] }.must_include "getelementsbyclassname"
|
45
45
|
end
|
46
46
|
end
|
47
|
+
|
48
|
+
describe "symlinked file" do
|
49
|
+
before do
|
50
|
+
@search = Trufflepig::Search.new "#{dummy_app_path}/linked.html"
|
51
|
+
@search.perform
|
52
|
+
end
|
53
|
+
|
54
|
+
it "finds a truffle" do
|
55
|
+
@search.results.collect{|f| f["id"] }.must_include "video"
|
56
|
+
end
|
57
|
+
end
|
47
58
|
end
|
48
59
|
|
49
60
|
describe "with directory path" do
|
data/trufflepig.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "trufflepig"
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.9"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Sebastian Kippe", "Garret Alfert"]
|
12
|
-
s.date = "2012-
|
12
|
+
s.date = "2012-09-18"
|
13
13
|
s.description = "Detects Web platform feature usage in source files"
|
14
14
|
s.email = "rubygems@5apps.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -38,6 +38,7 @@ Gem::Specification.new do |s|
|
|
38
38
|
"spec/dummy_app/js/app.js",
|
39
39
|
"spec/dummy_app/js/jquery.js",
|
40
40
|
"spec/dummy_app/js/jquery.min.js",
|
41
|
+
"spec/dummy_app/linked.html",
|
41
42
|
"spec/helper.rb",
|
42
43
|
"spec/trufflepig/feature_list_spec.rb",
|
43
44
|
"spec/trufflepig/search_spec.rb",
|
@@ -47,7 +48,7 @@ Gem::Specification.new do |s|
|
|
47
48
|
s.homepage = "http://github.com/5apps/trufflepig"
|
48
49
|
s.licenses = ["MIT"]
|
49
50
|
s.require_paths = ["lib"]
|
50
|
-
s.rubygems_version = "1.8.
|
51
|
+
s.rubygems_version = "1.8.24"
|
51
52
|
s.summary = "Detects Web platform feature usage in source files"
|
52
53
|
|
53
54
|
if s.respond_to? :specification_version then
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trufflepig
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-09-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: purdytest
|
@@ -89,6 +89,7 @@ files:
|
|
89
89
|
- spec/dummy_app/js/app.js
|
90
90
|
- spec/dummy_app/js/jquery.js
|
91
91
|
- spec/dummy_app/js/jquery.min.js
|
92
|
+
- spec/dummy_app/linked.html
|
92
93
|
- spec/helper.rb
|
93
94
|
- spec/trufflepig/feature_list_spec.rb
|
94
95
|
- spec/trufflepig/search_spec.rb
|
@@ -109,7 +110,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
109
110
|
version: '0'
|
110
111
|
segments:
|
111
112
|
- 0
|
112
|
-
hash:
|
113
|
+
hash: 3939367268186195473
|
113
114
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
114
115
|
none: false
|
115
116
|
requirements:
|
@@ -118,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
119
|
version: '0'
|
119
120
|
requirements: []
|
120
121
|
rubyforge_project:
|
121
|
-
rubygems_version: 1.8.
|
122
|
+
rubygems_version: 1.8.24
|
122
123
|
signing_key:
|
123
124
|
specification_version: 3
|
124
125
|
summary: Detects Web platform feature usage in source files
|