merb_test_unit 0.9.3 → 0.9.4

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -1,49 +1,69 @@
1
1
  require 'rubygems'
2
+ require 'rubygems/specification'
2
3
  require 'rake/gempackagetask'
4
+ require "extlib"
5
+ require 'merb-core/tasks/merb_rake_helper'
6
+ require "spec/rake/spectask"
3
7
 
4
- PLUGIN = "merb_test_unit"
5
- NAME = "merb_test_unit"
6
- VERSION = "0.9.3"
7
- AUTHOR = "Yehuda Katz"
8
- EMAIL = "ykatz@engineyard.com"
9
- HOMEPAGE = "http://merb-plugins.rubyforge.org/merb-test_unit/"
10
- SUMMARY = "Merb plugin that provides Test::Unit support"
8
+ ##############################################################################
9
+ # Package && release
10
+ ##############################################################################
11
+ RUBY_FORGE_PROJECT = "merb"
12
+ PROJECT_URL = "http://merbivore.com"
13
+ PROJECT_SUMMARY = "Merb plugin that provides Test::Unit support"
14
+ PROJECT_DESCRIPTION = PROJECT_SUMMARY
15
+
16
+ GEM_AUTHOR = "Yehuda Katz"
17
+ GEM_EMAIL = "ykatz@engineyard.com"
18
+
19
+ GEM_NAME = "merb_test_unit"
20
+ PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
21
+ GEM_VERSION = (Merb::MORE_VERSION rescue "0.9.4") + PKG_BUILD
22
+
23
+ RELEASE_NAME = "REL #{GEM_VERSION}"
24
+
25
+ require "extlib/tasks/release"
11
26
 
12
27
  spec = Gem::Specification.new do |s|
13
- s.name = NAME
14
- s.version = VERSION
28
+ s.rubyforge_project = RUBY_FORGE_PROJECT
29
+ s.name = GEM_NAME
30
+ s.version = GEM_VERSION
15
31
  s.platform = Gem::Platform::RUBY
16
32
  s.has_rdoc = true
17
- s.extra_rdoc_files = ["README", "LICENSE", 'TODO']
18
- s.summary = SUMMARY
19
- s.description = s.summary
20
- s.author = AUTHOR
21
- s.email = EMAIL
22
- s.homepage = HOMEPAGE
23
- s.add_dependency('merb-core', '>= 0.9.3')
33
+ s.extra_rdoc_files = ["README", "LICENSE"]
34
+ s.summary = PROJECT_SUMMARY
35
+ s.description = PROJECT_DESCRIPTION
36
+ s.author = GEM_AUTHOR
37
+ s.email = GEM_EMAIL
38
+ s.homepage = PROJECT_URL
39
+ s.add_dependency('merb-core', '>= 0.9.4')
24
40
  s.require_path = 'lib'
25
- s.autorequire = PLUGIN
26
- s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,test_unit_generators}/**/*")
41
+ s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,test_unit_generators}/**/*")
27
42
  end
28
43
 
29
- windows = (PLATFORM =~ /win32|cygwin/) rescue nil
30
-
31
- SUDO = windows ? "" : "sudo"
32
-
33
44
  Rake::GemPackageTask.new(spec) do |pkg|
34
45
  pkg.gem_spec = spec
35
46
  end
36
47
 
37
- desc "Install merb_test_unit"
48
+ desc "create a gemspec file"
49
+ task :make_spec do
50
+ File.open("#{NAME}.gemspec", "w") do |file|
51
+ file.puts spec.to_ruby
52
+ end
53
+ end
54
+
55
+ ##############################################################################
56
+ # Installation
57
+ ##############################################################################
58
+
59
+ desc "Install the gem"
38
60
  task :install => [:package] do
39
- sh %{#{SUDO} gem install pkg/#{NAME}-#{VERSION} --no-rdoc --no-ri --no-update-sources}
61
+ sh %{#{sudo} gem install #{install_home} pkg/#{GEM_NAME}-#{GEM_VERSION} --no-update-sources}
40
62
  end
41
63
 
42
64
  namespace :jruby do
43
-
44
- desc "Run :package and install the resulting .gem with jruby"
65
+ "Run :package and install the resulting .gem with jruby"
45
66
  task :install => :package do
46
- sh %{#{SUDO} jruby -S gem install pkg/#{NAME}-#{Merb::VERSION}.gem --no-rdoc --no-ri}
67
+ sh %{#{sudo} jruby -S gem install #{install_home} pkg/#{GEM_NAME}-#{GEM_VERSION}.gem --no-rdoc --no-ri}
47
68
  end
48
-
49
69
  end
@@ -3,22 +3,22 @@ module Merb::Test::Unit::ControllerAsserts
3
3
  include Merb::Test::ControllerHelper
4
4
 
5
5
  def assert_redirect(target)
6
- assert [307, *(300..305)].include?(target.respond_to?(:status) ? target.status : target), redirect_failure_message(target)
6
+ assert([307, *(300..305)].include?(target.respond_to?(:status) ? target.status : target), redirect_failure_message(target))
7
7
  end
8
8
 
9
9
  def assert_redirect_to(expected, target)
10
10
  location = target.headers['Location']
11
11
 
12
12
  assert_redirect(target)
13
- assert_equal expected, location, redirect_to_failure_message(expected, location)
13
+ assert_equal(expected, location, redirect_to_failure_message(expected, location))
14
14
  end
15
15
 
16
16
  def assert_success(target)
17
- assert (200..207).include?(target.respond_to?(:status) ? target.status : target), success_failure_message(target)
17
+ assert((200..207).include?(target.respond_to?(:status) ? target.status : target), success_failure_message(target))
18
18
  end
19
19
 
20
20
  def assert_missing(target)
21
- assert (400..417).include?(target.respond_to?(:status) ? target.status : target), missing_failure_message(target)
21
+ assert((400..417).include?(target.respond_to?(:status) ? target.status : target), missing_failure_message(target))
22
22
  end
23
23
 
24
24
  private
@@ -39,9 +39,9 @@ module Merb::Test::Unit::HpricotAsserts
39
39
  end
40
40
 
41
41
  if(equality[:count] != 0)
42
- assert ret, "#{ message } \"#{ css_query }\" with \"#{ equality.inspect }\" was not found."
42
+ assert(ret, "#{ message } \"#{ css_query }\" with \"#{ equality.inspect }\" was not found.")
43
43
  else
44
- assert ret, "#{ message } \"#{ css_query }\" with \"#{ equality.reject{|k,v| k == :count}.inspect }\" was found, but you specified :count => 0."
44
+ assert(ret, "#{ message } \"#{ css_query }\" with \"#{ equality.reject{|k,v| k == :count}.inspect }\" was found, but you specified :count => 0.")
45
45
  end
46
46
  ret
47
47
  end
metadata CHANGED
@@ -1,25 +1,26 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: merb_test_unit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yehuda Katz
8
- autorequire: merb_test_unit
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-05-04 00:00:00 -05:00
12
+ date: 2008-08-03 00:00:00 +03:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: merb-core
17
+ type: :runtime
17
18
  version_requirement:
18
19
  version_requirements: !ruby/object:Gem::Requirement
19
20
  requirements:
20
21
  - - ">="
21
22
  - !ruby/object:Gem::Version
22
- version: 0.9.3
23
+ version: 0.9.4
23
24
  version:
24
25
  description: Merb plugin that provides Test::Unit support
25
26
  email: ykatz@engineyard.com
@@ -30,7 +31,6 @@ extensions: []
30
31
  extra_rdoc_files:
31
32
  - README
32
33
  - LICENSE
33
- - TODO
34
34
  files:
35
35
  - LICENSE
36
36
  - README
@@ -57,7 +57,7 @@ files:
57
57
  - test_unit_generators/merb_resource_controller_test
58
58
  - test_unit_generators/merb_resource_controller_test/merb_resource_controller_test_generator.rb
59
59
  has_rdoc: true
60
- homepage: http://merb-plugins.rubyforge.org/merb-test_unit/
60
+ homepage: http://merbivore.com
61
61
  post_install_message:
62
62
  rdoc_options: []
63
63
 
@@ -77,8 +77,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
77
  version:
78
78
  requirements: []
79
79
 
80
- rubyforge_project:
81
- rubygems_version: 1.0.1
80
+ rubyforge_project: merb
81
+ rubygems_version: 1.2.0
82
82
  signing_key:
83
83
  specification_version: 2
84
84
  summary: Merb plugin that provides Test::Unit support