post-it 1.0.2 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -67,9 +67,13 @@ You can define default values for both the `title` and the `subtitle` when you c
67
67
 
68
68
  post_it = PostIt::Notification.new({:title => "My Title", :subtitle => "My Subtitle"})
69
69
 
70
- You can override the default titles and also pass the `prepare` option when you are sending the notification:
70
+ You can override the default titles when you are sending the notification:
71
71
 
72
- post_it.send(message,{:prepare => true,:title => "My Title"})
72
+ post_it.send(message,{:title => "My Title",:subtitle => "Post-It"})
73
+
74
+ You can prepare a notification to be posted by having it open inside a SN window:
75
+
76
+ post_it.prepare(message,{:title => "Optional"})
73
77
 
74
78
  Its probably a good idea to check for errors when you are using Post-It. Exceptions will be raised in two scenarios:
75
79
 
@@ -41,9 +41,11 @@ Prepare a message in SN:
41
41
  Quick and dirty notifications:
42
42
  post_it = PostIt::Notification.new()
43
43
  post_it.send("My Message")
44
+ post_it.prepare("Prepare My Message")
44
45
 
45
46
  You can define default values:
46
47
  post_it = PostIt::Notification.new({:title => "My Title", :subtitle => "My Subtitle"})
47
48
 
48
49
  Pass options to send method:
49
- post_it.send(message,{:prepare => true,:title => "My Title"})
50
+ post_it.send(message,{:title => "My Title",:subtitle => "Post-It"})
51
+ post_it.prepare(message,{:title => "My Title"})
@@ -1,4 +1,4 @@
1
- Feature: Send notifications to Notification Center via Sticky Notifications.app
1
+ Feature: Command line usage
2
2
  So that I have a nice way of getting feedback from my script
3
3
  I want send notifications to Notification Center via Sticky Notifications.app
4
4
 
@@ -14,5 +14,4 @@ Feature: Send notifications to Notification Center via Sticky Notifications.app
14
14
  |--version|
15
15
  |--title|
16
16
  |--subtitle|
17
- |--prepare|
18
-
17
+ |--prepare|
@@ -40,5 +40,10 @@ module PostIt
40
40
  raise e.message
41
41
  end
42
42
  end
43
+
44
+ def prepare(message,options={})
45
+ options[:prepare] = true
46
+ self.send(message,options)
47
+ end
43
48
  end
44
49
  end
@@ -1,3 +1,3 @@
1
1
  module PostIt
2
- VERSION = "1.0.2"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: post-it
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-13 00:00:00.000000000 Z
12
+ date: 2012-10-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rdoc
@@ -111,21 +111,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
111
111
  - - ! '>='
112
112
  - !ruby/object:Gem::Version
113
113
  version: '0'
114
- segments:
115
- - 0
116
- hash: -2397353941164454281
117
114
  required_rubygems_version: !ruby/object:Gem::Requirement
118
115
  none: false
119
116
  requirements:
120
117
  - - ! '>='
121
118
  - !ruby/object:Gem::Version
122
119
  version: '0'
123
- segments:
124
- - 0
125
- hash: -2397353941164454281
126
120
  requirements: []
127
121
  rubyforge_project:
128
- rubygems_version: 1.8.24
122
+ rubygems_version: 1.8.23
129
123
  signing_key:
130
124
  specification_version: 3
131
125
  summary: A simple utlity that uses `Sticky Notificiations.app` to post messages to