cocoa 0.1.2 → 0.1.3

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.md CHANGED
@@ -13,12 +13,16 @@ gem install cocoa
13
13
 
14
14
  ```ruby
15
15
  require 'cocoa'
16
- array = Cocoa::NSMutableArray.array
17
- array.addObject "head"
18
- array.addObject "tail"
19
- array.description
20
- => (
21
- head,
22
- tail
23
- )
16
+
17
+ Cocoa::NSAutoreleasePool.new
18
+
19
+ app = Cocoa::NSApplication.sharedApplication
20
+ app.setActivationPolicy Cocoa::NSApplicationActivationPolicyRegular
21
+ app.activateIgnoringOtherApps true
22
+
23
+ alert = Cocoa::NSAlert.alloc.init.autorelease
24
+ alert.setMessageText "Hello world!"
25
+ alert.runModal
24
26
  ```
27
+
28
+ ![alt tag](https://raw.githubusercontent.com/patrickhno/cocoa/gh-pages/hello_world.png)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
data/cocoa.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "cocoa"
8
- s.version = "0.1.2"
8
+ s.version = "0.1.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Patrick Hanevold"]
12
- s.date = "2014-03-26"
12
+ s.date = "2014-03-27"
13
13
  s.description = "Ruby FFI bindings for the OSX Cocoa API"
14
14
  s.email = "patrick.hanevold@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -23,6 +23,7 @@ Gem::Specification.new do |s|
23
23
  "Rakefile",
24
24
  "VERSION",
25
25
  "cocoa.gemspec",
26
+ "examples/hello_world.rb",
26
27
  "examples/window.rb",
27
28
  "lib/cocoa.rb",
28
29
  "lib/cocoa/bindings/CAAnimation.rb",
@@ -52,6 +53,7 @@ Gem::Specification.new do |s|
52
53
  "lib/cocoa/bindings/CIColor.rb",
53
54
  "lib/cocoa/bindings/CIFilter.rb",
54
55
  "lib/cocoa/bindings/CIImage.rb",
56
+ "lib/cocoa/bindings/Cocoa.rb",
55
57
  "lib/cocoa/bindings/NSATSTypesetter.rb",
56
58
  "lib/cocoa/bindings/NSActionCell.rb",
57
59
  "lib/cocoa/bindings/NSAffineTransform.rb",
@@ -415,6 +417,7 @@ Gem::Specification.new do |s|
415
417
  "lib/cocoa/helpers.rb",
416
418
  "lib/cocoa/objc.rb",
417
419
  "lib/cocoa/structs/NSPoint.rb",
420
+ "lib/cocoa/structs/NSRange.rb",
418
421
  "lib/cocoa/structs/NSRect.rb",
419
422
  "lib/cocoa/structs/NSSize.rb",
420
423
  "spec/cocoa/cocoa_spec.rb",
@@ -0,0 +1,10 @@
1
+ require 'cocoa'
2
+
3
+ Cocoa::NSAutoreleasePool.new
4
+ app = Cocoa::NSApplication.sharedApplication
5
+ app.setActivationPolicy Cocoa::NSApplicationActivationPolicyRegular
6
+ app.activateIgnoringOtherApps true
7
+
8
+ alert = Cocoa::NSAlert.alloc.init.autorelease
9
+ alert.setMessageText "Hello world!"
10
+ alert.runModal