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 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['dependencies', 'lib/**/*.rb', 'rdoc/**/*', '[A-Z]*', 'spec/**/*', 'vendor/**/*'].to_a
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
@@ -1,4 +1,4 @@
1
1
  ---
2
- :patch: 3
2
+ :patch: 4
3
3
  :major: 0
4
4
  :minor: 5
@@ -58,8 +58,8 @@ protected
58
58
  end
59
59
 
60
60
  def deps
61
- @deps ||= Dep.new(File.read(Dep.dependencies_file))
62
- rescue Dep::DependenciesFileNotFound
61
+ @deps ||= Dep.new(File.read("dependencies"))
62
+ rescue Errno::ENOENT
63
63
  flunk "No dependencies file found."
64
64
  end
65
65
 
@@ -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
@@ -23,5 +23,5 @@ Gem::Specification.new do |s|
23
23
  "test/vendor/baz-1.0/**/*"
24
24
  ].inspect %>
25
25
 
26
- s.add_dependency("thor", "~> 0.11")
26
+ s.add_dependency("wycats-thor", "~> 0.11")
27
27
  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\-_]+)\s*([<~=>]* ?[\d\.]+)?\s*(?: \(([\w, ]+)\))?\s*(?: ([a-z]+:\/\/.+?))?\s*$/
65
+ next unless line =~ /^([\w\-_]+) ?([<~=> \d\.]+)?(?: \(([\w, ]+)\))?(?: ([a-z]+:\/\/.+?))?$/
82
66
  @dependencies << Dependency.new($1, $2, $3, $4)
83
67
  end
84
68
  end
@@ -2,5 +2,4 @@ $:.unshift(File.expand_path(File.dirname(__FILE__)))
2
2
 
3
3
  require "dependencies/dep"
4
4
 
5
- Dep.new(File.read(Dep.dependencies_file)).require(ENV["RACK_ENV"].to_s)
6
-
5
+ Dep.new(File.read(File.join('..', '..', '.dependencies'))).require(ENV["RACK_ENV"].to_s)
@@ -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("#{DEP_BINARY} #{args}") do |stdin, stdout, stderr|
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.3
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
data/dependencies DELETED
@@ -1,7 +0,0 @@
1
- simple-rss 1.2
2
- rest-client 1.0.1
3
- json 1.1.3
4
- fakeweb 1.2.5
5
- crack 0.1.1
6
- moneta git://github.com/benschwarz/moneta.git
7
- dependencies git://github.com/benschwarz/dependencies.git