spicycode-micronaut-rails 0.1.8.1 → 0.1.9.0
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/README +4 -2
- data/Rakefile +8 -3
- data/examples/example_helper.rb +5 -0
- data/examples/lib/micronaut-rails_example.rb +10 -1
- data/lib/micronaut/rails/version.rb +2 -2
- metadata +3 -7
- data/lib/autotest/discover.rb +0 -3
- data/lib/autotest/micronaut-rails.rb +0 -48
- data/lib/autotest/micronaut_rails.rb +0 -48
data/README
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
= Micronaut Rails
|
2
2
|
|
3
3
|
* http://github.com/spicycode/micronaut-rails
|
4
|
+
* http://relevance.lighthouseapp.com/projects/22819-micronaut
|
4
5
|
|
5
6
|
== DESCRIPTION:
|
6
7
|
|
@@ -9,14 +10,15 @@ RSpec lite. Definitely pre alpha at the moment.
|
|
9
10
|
|
10
11
|
== REQUIREMENTS:
|
11
12
|
|
12
|
-
* Ruby 1.8.
|
13
|
+
* Ruby 1.8.6+
|
13
14
|
* ActionPack
|
14
15
|
* Micronaut (via spicycode-micronaut on GitHub) -- version numbers are kept in sync, excluding the fourth version part. So
|
15
16
|
micronaut-rails 0.1.7.5 should be compatible with micronaut 0.1.7, but micronaut-rails 0.1.8.0 would require micronaut >= 0.1.8.
|
16
17
|
|
17
18
|
== ISSUES
|
18
19
|
|
19
|
-
* No support for pure Rails fixtures
|
20
|
+
* No support for pure Rails fixtures, and no plans to add it - we use Factory Girl/Fixture Replacement instead, so send a patch if you want support for this).
|
21
|
+
* No support for Rails integration tests -- use Cucumber (http://github.com/aslakhellesoy/cucumber) instead!
|
20
22
|
* In use in real-world projects on Rails 2.2+ - older versions may have issues.
|
21
23
|
|
22
24
|
== CREDITS:
|
data/Rakefile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'rake/gempackagetask'
|
3
3
|
require 'rubygems/specification'
|
4
|
-
require
|
4
|
+
require File.join(File.dirname(__FILE__), *%w[. lib micronaut rails version])
|
5
5
|
|
6
6
|
GEM = "micronaut-rails"
|
7
7
|
GEM_VERSION = Micronaut::Rails::Version::STRING
|
@@ -33,18 +33,23 @@ Rake::GemPackageTask.new(spec) do |pkg|
|
|
33
33
|
pkg.gem_spec = spec
|
34
34
|
end
|
35
35
|
|
36
|
-
desc "
|
36
|
+
desc "Install the gem locally"
|
37
37
|
task :install => [:package] do
|
38
38
|
sh %{sudo gem install pkg/#{GEM}-#{GEM_VERSION}}
|
39
39
|
end
|
40
40
|
|
41
|
-
desc "
|
41
|
+
desc "Create a gemspec file"
|
42
42
|
task :make_gemspec do
|
43
43
|
File.open("#{GEM}.gemspec", "w") do |file|
|
44
44
|
file.puts spec.to_ruby
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
+
desc "Print the gemspec to stdout"
|
49
|
+
task :puts_gemspec do
|
50
|
+
puts spec.to_ruby
|
51
|
+
end
|
52
|
+
|
48
53
|
desc 'Run all examples'
|
49
54
|
task :examples do
|
50
55
|
examples = Dir["examples/**/*_example.rb"].map { |g| Dir.glob(g) }.flatten
|
data/examples/example_helper.rb
CHANGED
@@ -41,6 +41,11 @@ def use_color?
|
|
41
41
|
!ENV.has_key?('TM_MODE')
|
42
42
|
end
|
43
43
|
|
44
|
+
# allow including links to lighthouse tickets in examples, for regression tests, pending features, etc.
|
45
|
+
def ticket(number)
|
46
|
+
%[http://relevance.lighthouseapp.com/projects/22819-micronaut/tickets/#{number}]
|
47
|
+
end
|
48
|
+
|
44
49
|
Micronaut.configure do |config|
|
45
50
|
config.mock_with :mocha
|
46
51
|
config.color_enabled = use_color?
|
@@ -1,6 +1,15 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + "/../example_helper")
|
2
2
|
|
3
3
|
describe Micronaut::Rails do
|
4
|
-
|
5
4
|
|
5
|
+
it "should never include lib/autotest in the gemspec, as it breaks autotest for Micronaut - see #{ticket 4}" do
|
6
|
+
# We jump through hoops to make sure the Rake deprecation notice doesn't show up in the build (via stderr) or
|
7
|
+
# in the gemspec itself
|
8
|
+
silence_stream(STDERR) do
|
9
|
+
@spec_string = `rake --silent puts_gemspec`
|
10
|
+
end
|
11
|
+
@spec_string.gsub! /Gem::manage_gems is deprecated/, ""
|
12
|
+
gem_spec = eval(@spec_string)
|
13
|
+
gem_spec.files.each { |f| f.should_not match(%r|lib/autotest|) }
|
14
|
+
end
|
6
15
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spicycode-micronaut-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chad Humphries
|
@@ -9,7 +9,7 @@ autorequire: micronaut-rails
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2009-01-10 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -28,7 +28,7 @@ dependencies:
|
|
28
28
|
requirements:
|
29
29
|
- - ">="
|
30
30
|
- !ruby/object:Gem::Version
|
31
|
-
version: 0.1.
|
31
|
+
version: 0.1.9
|
32
32
|
version:
|
33
33
|
description: An excellent replacement for the wheel...
|
34
34
|
email: chad@spicycode.com
|
@@ -45,10 +45,6 @@ files:
|
|
45
45
|
- README
|
46
46
|
- RSPEC-LICENSE
|
47
47
|
- Rakefile
|
48
|
-
- lib/autotest
|
49
|
-
- lib/autotest/discover.rb
|
50
|
-
- lib/autotest/micronaut-rails.rb
|
51
|
-
- lib/autotest/micronaut_rails.rb
|
52
48
|
- lib/micronaut
|
53
49
|
- lib/micronaut/rails
|
54
50
|
- lib/micronaut/rails/configuration.rb
|
data/lib/autotest/discover.rb
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
require 'autotest'
|
2
|
-
|
3
|
-
Autotest.add_hook :initialize do |at|
|
4
|
-
at.clear_mappings
|
5
|
-
# watch out: Ruby bug (1.8.6):
|
6
|
-
# %r(/) != /\//
|
7
|
-
at.add_mapping(%r%^examples/.*_example.rb$%) { |filename, _|
|
8
|
-
filename
|
9
|
-
}
|
10
|
-
at.add_mapping(%r%^lib/(.*)\.rb$%) { |filename, m|
|
11
|
-
["examples/lib/#{m[1]}_example.rb"]
|
12
|
-
}
|
13
|
-
at.add_mapping(%r%^examples/(example_helper|shared/.*)\.rb$%) {
|
14
|
-
at.files_matching %r%^examples/.*_example\.rb$%
|
15
|
-
}
|
16
|
-
end
|
17
|
-
|
18
|
-
class MicronautCommandError < StandardError; end
|
19
|
-
|
20
|
-
class Autotest::Micronaut < Autotest
|
21
|
-
|
22
|
-
def initialize
|
23
|
-
super
|
24
|
-
self.failed_results_re = /^\d+\)\n(?:\e\[\d*m)?(?:.*?Error in )?'([^\n]*)'(?: FAILED)?(?:\e\[\d*m)?\n(.*?)\n\n/m
|
25
|
-
self.completed_re = /\n(?:\e\[\d*m)?\d* examples?/m
|
26
|
-
end
|
27
|
-
|
28
|
-
def consolidate_failures(failed)
|
29
|
-
filters = new_hash_of_arrays
|
30
|
-
failed.each do |spec, trace|
|
31
|
-
if trace =~ /\n(\.\/)?(.*example\.rb):[\d]+:\Z?/
|
32
|
-
filters[$2] << spec
|
33
|
-
end
|
34
|
-
end
|
35
|
-
return filters
|
36
|
-
end
|
37
|
-
|
38
|
-
def make_test_cmd(files_to_test)
|
39
|
-
return '' if files_to_test.empty?
|
40
|
-
|
41
|
-
examples = files_to_test.keys.flatten
|
42
|
-
|
43
|
-
examples.map! {|f| %Q(require "#{f}")}
|
44
|
-
|
45
|
-
return "#{ruby} -e '#{examples.join("; ")}'"
|
46
|
-
end
|
47
|
-
|
48
|
-
end
|
@@ -1,48 +0,0 @@
|
|
1
|
-
require 'autotest'
|
2
|
-
|
3
|
-
Autotest.add_hook :initialize do |at|
|
4
|
-
at.clear_mappings
|
5
|
-
# watch out: Ruby bug (1.8.6):
|
6
|
-
# %r(/) != /\//
|
7
|
-
at.add_mapping(%r%^examples/.*_example.rb$%) { |filename, _|
|
8
|
-
filename
|
9
|
-
}
|
10
|
-
at.add_mapping(%r%^lib/(.*)\.rb$%) { |filename, m|
|
11
|
-
["examples/lib/#{m[1]}_example.rb"]
|
12
|
-
}
|
13
|
-
at.add_mapping(%r%^examples/(example_helper|shared/.*)\.rb$%) {
|
14
|
-
at.files_matching %r%^examples/.*_example\.rb$%
|
15
|
-
}
|
16
|
-
end
|
17
|
-
|
18
|
-
class MicronautCommandError < StandardError; end
|
19
|
-
|
20
|
-
class Autotest::MicronautRails < Autotest
|
21
|
-
|
22
|
-
def initialize
|
23
|
-
super
|
24
|
-
self.failed_results_re = /^\d+\)\n(?:\e\[\d*m)?(?:.*?Error in )?'([^\n]*)'(?: FAILED)?(?:\e\[\d*m)?\n(.*?)\n\n/m
|
25
|
-
self.completed_re = /\n(?:\e\[\d*m)?\d* examples?/m
|
26
|
-
end
|
27
|
-
|
28
|
-
def consolidate_failures(failed)
|
29
|
-
filters = new_hash_of_arrays
|
30
|
-
failed.each do |spec, trace|
|
31
|
-
if trace =~ /\n(\.\/)?(.*example\.rb):[\d]+:\Z?/
|
32
|
-
filters[$2] << spec
|
33
|
-
end
|
34
|
-
end
|
35
|
-
return filters
|
36
|
-
end
|
37
|
-
|
38
|
-
def make_test_cmd(files_to_test)
|
39
|
-
return '' if files_to_test.empty?
|
40
|
-
|
41
|
-
examples = files_to_test.keys.flatten
|
42
|
-
|
43
|
-
examples.map! {|f| %Q(require "#{f}")}
|
44
|
-
|
45
|
-
return "#{ruby} -e '#{examples.join("; ")}'"
|
46
|
-
end
|
47
|
-
|
48
|
-
end
|