mac_bacon 1.2 → 1.2.1

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/RDOX CHANGED
@@ -84,7 +84,7 @@ Bacon::Context
84
84
 
85
85
  Bacon::Context empty
86
86
 
87
- Bacon::Error: not #<Proc:0x200c25960 (lambda)>.raise?(Bacon::Error) failed
87
+ Bacon::Error: not #<Proc:0x200b9d840 (lambda)>.raise?(Bacon::Error) failed
88
88
  /Users/eloy/Documents/DEVELOPMENT/MacRuby/MacBacon/lib/mac_bacon.rb:426:in `satisfy': Bacon - should have should.be.close
89
89
  /Users/eloy/Documents/DEVELOPMENT/MacRuby/MacBacon/lib/mac_bacon.rb:440:in `method_missing:'
90
90
  /Users/eloy/Documents/DEVELOPMENT/MacRuby/MacBacon/test/spec_bacon.rb:9:in `block'
data/Rakefile CHANGED
@@ -27,7 +27,7 @@ def git_tree_version
27
27
  #$: << "lib"
28
28
  #require 'mac_bacon'
29
29
  #@tree_version = Bacon::VERSION
30
- @tree_version = "1.2"
30
+ @tree_version = "1.2.1"
31
31
  end
32
32
  @tree_version
33
33
  end
data/bin/macbacon CHANGED
@@ -38,7 +38,7 @@ opts = OptionParser.new("", 24, ' ') { |opts|
38
38
  }
39
39
 
40
40
  opts.separator ""
41
- opts.separator "bacon options:"
41
+ opts.separator "macbacon options:"
42
42
 
43
43
  opts.on("-s", "--specdox", "do AgileDox-like output (default)") {
44
44
  output = 'SpecDoxOutput'
@@ -86,7 +86,7 @@ opts = OptionParser.new("", 24, ' ') { |opts|
86
86
 
87
87
  opts.on_tail("--version", "Show version") do
88
88
  require 'mac_bacon'
89
- puts "bacon #{Bacon::VERSION}"
89
+ puts "macbacon #{Bacon::VERSION}"
90
90
  exit
91
91
  end
92
92
 
data/lib/mac_bacon.rb CHANGED
@@ -11,7 +11,7 @@ framework "Cocoa"
11
11
  require "mac_bacon/helpers"
12
12
 
13
13
  module Bacon
14
- VERSION = "1.1"
14
+ VERSION = "1.2.1"
15
15
 
16
16
  Counter = Hash.new(0)
17
17
  ErrorLog = ""
@@ -2,10 +2,14 @@ require 'tmpdir'
2
2
 
3
3
  module Bacon
4
4
  module Helpers
5
+ # A cache of XIB files converted to the compiled NIB format.
5
6
  def self.converted_xibs
6
7
  @converted_xibs ||= {}
7
8
  end
8
9
 
10
+ # Checks if the given file path points to a compiled NIB file and if so
11
+ # returns the same path. If it's a XIB file it will be compiled with
12
+ # +ibtool+ as a tmp file and the new path will be returned instead.
9
13
  def self.ensure_nib(path)
10
14
  if File.extname(path) == '.xib'
11
15
  if cached = Helpers.converted_xibs[path]
@@ -23,6 +27,23 @@ module Bacon
23
27
  end
24
28
  end
25
29
 
30
+ # Loads the NIB at +nib_path+ with the specified +files_owner+ as the
31
+ # <tt>File's owner</tt>.
32
+ #
33
+ # All top-level objects in the NIB are returned as an array, although
34
+ # you'll generally just deal with the controller, in which case you can
35
+ # ignore them.
36
+ #
37
+ # describe "PreferencesController" do
38
+ # before do
39
+ # @controller = PreferencesController.new
40
+ # nib_path = File.join(SRC_ROOT, 'app/views/PreferencesWindow.xib')
41
+ # @top_level_objects = load_nib(nib_path, @controller)
42
+ # end
43
+ #
44
+ # # tests...
45
+ #
46
+ # end
26
47
  def load_nib(nib_path, files_owner)
27
48
  nib_path = Helpers.ensure_nib(nib_path)
28
49
  url = NSURL.fileURLWithPath(nib_path)
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mac_bacon
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- version: "1.2"
9
+ - 1
10
+ version: 1.2.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - "Eloy Dur\xC3\xA1n"
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2011-02-28 00:00:00 +01:00
18
+ date: 2011-03-01 00:00:00 +01:00
18
19
  default_executable:
19
20
  dependencies: []
20
21