rfortune 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/CHANGELOG.rdoc +6 -1
  2. data/lib/rfortune.rb +10 -10
  3. metadata +2 -2
@@ -1,6 +1,11 @@
1
1
  == Changelog
2
2
 
3
- === dev
3
+ === 0.2.3 (2010-01-14)
4
+
5
+ * Corrected spelling in method name 'format[t]ed'
6
+ * Deleted deprecated (and wrong spelled) method 'all_formated'
7
+
8
+ === 0.2.2 (2010-01-12)
4
9
 
5
10
  * Added options Hash to 'random_fortune' method
6
11
 
@@ -114,9 +114,8 @@ class RFortune
114
114
 
115
115
  end
116
116
 
117
-
118
117
  # Returns all cookies in cookie jar file format
119
- def formated
118
+ def formatted
120
119
 
121
120
  cookies = @cookies.collect { |c| c = "\n%\n" + c }
122
121
 
@@ -126,13 +125,13 @@ class RFortune
126
125
 
127
126
  end
128
127
 
129
-
130
- # Depricated, alias for formated
131
- def all_formated
132
- formated
128
+ # Depricated. I take the fact that nobody told me, the method name is
129
+ # spelled wrong as permission to drop it in a near future.
130
+ # Actually I just left it for this message.
131
+ def formated
132
+ formatted
133
133
  end
134
134
 
135
-
136
135
  # Saves the content of the jar to the file specified by argument given
137
136
  # to itself or to the initialize method
138
137
  def save new_file_path = nil
@@ -142,7 +141,7 @@ class RFortune
142
141
  new_file_path or new_file_path = @file_path or raise 'No file name given'
143
142
 
144
143
  # Write all cookies in cookie jar format to the file specified
145
- File.open( new_file_path, 'w') { |jar| jar.puts all_formated }
144
+ File.open( new_file_path, 'w') { |jar| jar.puts formatted }
146
145
 
147
146
  end
148
147
 
@@ -156,8 +155,9 @@ class RFortune
156
155
  # Returns a random fortune from fortune's fortunes. If a block is
157
156
  # given it passes one fortune per iteration to the block. Infinite.
158
157
  # That means FOREVER! So be careful!
159
- # Takes 'false' as an argument if you'd like to include offensive
160
- # fortunes.
158
+ #
159
+ # Possible options:
160
+ # :offensive includes offensive fortunes, defaults to false
161
161
  def self.random_fortune( options = {} )
162
162
 
163
163
  options.class != Hash and raise TypeError, 'Can\'t convert ' + options.class.to_s + ' to Hash'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rfortune
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Helge Rausch
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-12 00:00:00 +01:00
12
+ date: 2010-01-14 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies: []
15
15