benschwarz-smoke 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/VERSION.yml +1 -1
- data/vendor/dependencies/bin/dep +2 -2
- data/vendor/dependencies/dependencies.gemspec +1 -1
- data/vendor/dependencies/dependencies.gemspec.erb +1 -1
- data/vendor/dependencies/lib/dependencies/dep.rb +1 -17
- data/vendor/dependencies/lib/dependencies.rb +1 -2
- data/vendor/dependencies/test/dependencies_test.rb +1 -22
- metadata +1 -2
- data/dependencies +0 -7
data/Rakefile
CHANGED
@@ -10,7 +10,7 @@ begin
|
|
10
10
|
gem.email = "ben.schwarz@gmail.com"
|
11
11
|
gem.homepage = "http://github.com/benschwarz/smoke"
|
12
12
|
gem.authors = ["Ben Schwarz"]
|
13
|
-
gem.files = FileList['
|
13
|
+
gem.files = FileList['lib/**/*.rb', 'rdoc/**/*', '[A-Z]*', 'spec/**/*', 'vendor/**/*'].to_a
|
14
14
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
15
15
|
end
|
16
16
|
rescue LoadError
|
data/VERSION.yml
CHANGED
data/vendor/dependencies/bin/dep
CHANGED
@@ -11,5 +11,5 @@ Gem::Specification.new do |s|
|
|
11
11
|
|
12
12
|
s.files = ["README.markdown", "Rakefile", "bin/dep", "dependencies.gemspec", "lib/dependencies/dep.rb", "lib/dependencies.rb", "test/dependencies_test.rb", "test/foobaz-0.3.gem", "test/vendor/bar/lib", "test/vendor/barz-2.0/lib", "test/vendor/baz-1.0/lib"]
|
13
13
|
|
14
|
-
s.add_dependency("thor", "~> 0.11")
|
14
|
+
s.add_dependency("wycats-thor", "~> 0.11")
|
15
15
|
end
|
@@ -1,20 +1,4 @@
|
|
1
|
-
require "pathname"
|
2
|
-
|
3
1
|
class Dep
|
4
|
-
DependenciesFileNotFound = Class.new(StandardError)
|
5
|
-
|
6
|
-
def self.dependencies_file
|
7
|
-
current = Pathname.new(Dir.pwd)
|
8
|
-
|
9
|
-
until current.root?
|
10
|
-
filename = current.join("dependencies")
|
11
|
-
return filename if filename.exist? and filename.file?
|
12
|
-
current = current.parent
|
13
|
-
end
|
14
|
-
|
15
|
-
raise DependenciesFileNotFound
|
16
|
-
end
|
17
|
-
|
18
2
|
class Dependency
|
19
3
|
attr :name
|
20
4
|
attr :version
|
@@ -78,7 +62,7 @@ class Dep
|
|
78
62
|
@missing = []
|
79
63
|
|
80
64
|
dependencies.each_line do |line|
|
81
|
-
next unless line =~ /^([\w\-_]+)
|
65
|
+
next unless line =~ /^([\w\-_]+) ?([<~=> \d\.]+)?(?: \(([\w, ]+)\))?(?: ([a-z]+:\/\/.+?))?$/
|
82
66
|
@dependencies << Dependency.new($1, $2, $3, $4)
|
83
67
|
end
|
84
68
|
end
|
@@ -9,8 +9,6 @@ require "fileutils"
|
|
9
9
|
|
10
10
|
$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
|
11
11
|
|
12
|
-
DEP_BINARY = File.expand_path(File.join(File.dirname(__FILE__), "..", "bin", "dep"))
|
13
|
-
|
14
12
|
class Dep
|
15
13
|
# Override exit to allow the tests to keep running.
|
16
14
|
def exit(*attrs)
|
@@ -106,7 +104,7 @@ class DependenciesTest < Test::Unit::TestCase
|
|
106
104
|
def dep(args = nil)
|
107
105
|
out, err = nil
|
108
106
|
|
109
|
-
Open3.popen3("#{
|
107
|
+
Open3.popen3("#{File.expand_path(File.join("../bin/dep"))} #{args}") do |stdin, stdout, stderr|
|
110
108
|
out = stdout.read
|
111
109
|
err = stderr.read
|
112
110
|
end
|
@@ -129,29 +127,10 @@ class DependenciesTest < Test::Unit::TestCase
|
|
129
127
|
end
|
130
128
|
end
|
131
129
|
|
132
|
-
test "allow for arbitrary spaces in the declarations" do
|
133
|
-
with_dependencies "foo 1.0 (test)\nbar >= 3.1 (test)\nbaz 2.0 (development)" do
|
134
|
-
out, err = dep "list test"
|
135
|
-
assert_equal "foo 1.0 (test)\nbar >= 3.1 (test)\n", out
|
136
|
-
end
|
137
|
-
end
|
138
|
-
|
139
130
|
test "complains when no dependencies file found" do
|
140
131
|
out, err = dep "list"
|
141
132
|
assert_equal "No dependencies file found.\n", err
|
142
133
|
end
|
143
|
-
|
144
|
-
test "search recursively for the dependencies file" do
|
145
|
-
with_dependencies "foo 1.0 (test)\nbar (development)\nbarz 2.0\nbaz 0.1 (test)" do
|
146
|
-
FileUtils.rm_rf("dep-test")
|
147
|
-
FileUtils.mkdir("dep-test")
|
148
|
-
Dir.chdir("dep-test") do
|
149
|
-
out, err = dep "list test"
|
150
|
-
assert_equal "foo 1.0 (test)\nbarz 2.0\nbaz 0.1 (test)\n", out
|
151
|
-
end
|
152
|
-
FileUtils.rm_rf("dep-test")
|
153
|
-
end
|
154
|
-
end
|
155
134
|
end
|
156
135
|
|
157
136
|
context "vendor" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: benschwarz-smoke
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Schwarz
|
@@ -23,7 +23,6 @@ extra_rdoc_files:
|
|
23
23
|
- README.markdown
|
24
24
|
- LICENSE
|
25
25
|
files:
|
26
|
-
- dependencies
|
27
26
|
- lib/core_ext/hash.rb
|
28
27
|
- lib/core_ext/string.rb
|
29
28
|
- lib/smoke/cache.rb
|