spicycode-micronaut 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/Rakefile CHANGED
@@ -11,6 +11,7 @@ begin
11
11
  s.description = "An excellent replacement for the wheel..."
12
12
  s.authors = ["Chad Humphries"]
13
13
  s.files = FileList["[A-Z]*", "{bin,lib,examples}/**/*"]
14
+ s.rubyforge_project = 'spicycode-depot'
14
15
  end
15
16
  rescue => e
16
17
  puts "Jeweler, or one of its dependencies blew right up. #{e}"
@@ -18,6 +19,34 @@ rescue LoadError
18
19
  puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
19
20
  end
20
21
 
22
+ # These are new tasks
23
+ begin
24
+ require 'rake/contrib/sshpublisher'
25
+ namespace :rubyforge do
26
+
27
+ desc "Release gem and RDoc documentation to RubyForge"
28
+ task :release => ["rubyforge:release:gem", "rubyforge:release:docs"]
29
+
30
+ namespace :release do
31
+ desc "Publish RDoc to RubyForge."
32
+ task :docs => [:rdoc] do
33
+ config = YAML.load(
34
+ File.read(File.expand_path('~/.rubyforge/user-config.yml'))
35
+ )
36
+
37
+ host = "#{config['username']}@rubyforge.org"
38
+ remote_dir = "/var/www/gforge-projects/the-perfect-gem/"
39
+ local_dir = 'rdoc'
40
+
41
+ Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
42
+ end
43
+ end
44
+ end
45
+ rescue LoadError
46
+ puts "Rake SshDirPublisher is unavailable or your rubyforge environment is not configured."
47
+ end
48
+
49
+
21
50
  desc "List files that don't have examples"
22
51
  task :untested do
23
52
  code = Dir["lib/**/*.rb"].map { |g| Dir.glob(g) }.flatten
@@ -29,6 +58,7 @@ task :untested do
29
58
  end
30
59
  end
31
60
 
61
+ puts "Running in Ruby #{RUBY_VERSION}"
32
62
  desc "Run all micronaut examples"
33
63
  Micronaut::RakeTask.new :examples do |t|
34
64
  t.pattern = "examples/**/*_example.rb"
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
- :minor: 2
3
- :patch: 8
2
+ :patch: 9
4
3
  :major: 0
4
+ :minor: 2
@@ -51,5 +51,4 @@ Micronaut.configure do |c|
51
51
  c.mock_with :mocha
52
52
  c.color_enabled = not_in_editor?
53
53
  c.filter_run :focused => true
54
- c.formatter = :documentation
55
54
  end
@@ -87,9 +87,9 @@ module Micronaut
87
87
  @metadata[:behaviour][:description] = args.shift || ''
88
88
  @metadata[:behaviour][:name] = "#{describes} #{description}".strip
89
89
  @metadata[:behaviour][:block] = extra_metadata.delete(:behaviour_block)
90
- @metadata[:behaviour][:caller] = caller(1)
91
- @metadata[:behaviour][:file_path] = @metadata[:behaviour][:caller][4].split(":")[0].strip
92
- @metadata[:behaviour][:line_number] = @metadata[:behaviour][:caller][4].split(":")[1].to_i
90
+ @metadata[:behaviour][:caller] = extra_metadata.delete(:caller) || caller(1)
91
+ @metadata[:behaviour][:file_path] = extra_metadata.delete(:file_path) || @metadata[:behaviour][:caller][4].split(":")[0].strip
92
+ @metadata[:behaviour][:line_number] = extra_metadata.delete(:line_number) || @metadata[:behaviour][:caller][4].split(":")[1].to_i
93
93
 
94
94
  @metadata.update(extra_metadata)
95
95
 
@@ -108,8 +108,8 @@ module Micronaut
108
108
  @metadata ||= { :behaviour => {} }
109
109
  end
110
110
 
111
- def self.name
112
- metadata[:behaviour][:name]
111
+ def self.name(friendly=true)
112
+ friendly ? metadata[:behaviour][:name] : super()
113
113
  end
114
114
 
115
115
  def self.describes
@@ -9,6 +9,11 @@ module Micronaut
9
9
  @metadata = @behaviour.metadata.dup
10
10
  @metadata[:description] = description
11
11
  @metadata[:execution_result] = {}
12
+ @metadata[:caller] = options.delete(:caller)
13
+ if @metadata[:caller]
14
+ @metadata[:file_path] = @metadata[:caller].split(":")[0].strip
15
+ @metadata[:line_number] = @metadata[:caller].split(":")[1].to_i
16
+ end
12
17
  @metadata.update(options)
13
18
  end
14
19
 
@@ -20,6 +25,10 @@ module Micronaut
20
25
  @metadata[:execution_result]
21
26
  end
22
27
 
28
+ def file_path
29
+ @metadata[:file_path] || behaviour.file_path
30
+ end
31
+
23
32
  def run_started
24
33
  record_results :started_at => Time.now
25
34
  end
@@ -108,7 +108,7 @@ module Micronaut
108
108
  end
109
109
 
110
110
  def read_failed_line(exception, example)
111
- original_file = example.behaviour.file_path.to_s.downcase
111
+ original_file = example.file_path.to_s.downcase
112
112
  matching_line = exception.backtrace.detect { |line| line.split(':').first.downcase == original_file.downcase }
113
113
 
114
114
  return "Unable to find matching line from backtrace" if matching_line.nil?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spicycode-micronaut
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chad Humphries
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-05-22 00:00:00 -07:00
12
+ date: 2009-05-23 00:00:00 -07:00
13
13
  default_executable: micronaut
14
14
  dependencies: []
15
15
 
@@ -101,7 +101,7 @@ files:
101
101
  - lib/micronaut/rake_task.rb
102
102
  - lib/micronaut/runner.rb
103
103
  - lib/micronaut/world.rb
104
- has_rdoc: true
104
+ has_rdoc: false
105
105
  homepage: http://github.com/spicycode/micronaut
106
106
  post_install_message:
107
107
  rdoc_options:
@@ -122,10 +122,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
122
  version:
123
123
  requirements: []
124
124
 
125
- rubyforge_project:
125
+ rubyforge_project: spicycode-depot
126
126
  rubygems_version: 1.2.0
127
127
  signing_key:
128
- specification_version: 2
128
+ specification_version: 3
129
129
  summary: An excellent replacement for the wheel...
130
130
  test_files:
131
131
  - examples/example_helper.rb