s4t-utils 1.0.0 → 1.0.2

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.
@@ -0,0 +1,9 @@
1
+ Version 1.0.2
2
+ * Added user_denies as an alias for user_disputes.
3
+
4
+ Version 1.0.1
5
+ * Added user_is_bewildered to claims.rb
6
+
7
+ Version 1.0.0
8
+ * Made into a gem.
9
+ * Minor improvements to some methods.
@@ -1,3 +1,4 @@
1
+ History.txt
1
2
  LICENSE.txt
2
3
  Manifest.txt
3
4
  NOTES.txt
data/Rakefile CHANGED
@@ -11,3 +11,8 @@ MyRdocFiles = FileList.new("lib/#{MyFileSystemName}.rb",
11
11
  "lib/#{MyFileSystemName}/*.rb").exclude('**/third-party/**')
12
12
 
13
13
  require 's4t-utils/rakefile-common'
14
+
15
+ desc "Push new version of project homepage."
16
+ task 'homepage' do
17
+ `cd homepage; scp * marick@rubyforge.org:/var/www/gforge-projects/#{MyFileSystemName}/`
18
+ end
@@ -6,7 +6,7 @@ module S4tUtils
6
6
  # is actually false. The _block_ is called to provide the exception
7
7
  # message.
8
8
  def user_claims(fact, &block)
9
- raise StandardError.new(block.call) unless fact
9
+ user_is_bewildered(block.call) unless fact
10
10
  end
11
11
 
12
12
  # A StandardError is thrown if the _fact_ the user disputes is
@@ -15,6 +15,14 @@ module S4tUtils
15
15
  def user_disputes(fact, &block)
16
16
  user_claims(!fact, &block)
17
17
  end
18
+ alias_method :user_denies, :user_disputes
19
+
20
+ # An unconditional claim that the user is bewildered by something
21
+ # that should not have happened. Most usually, it's that the code
22
+ # should never have gotten to this point.
23
+ def user_is_bewildered(msg = "How could this point be reached?")
24
+ raise StandardError.new(msg)
25
+ end
18
26
  end
19
27
 
20
28
 
@@ -1,3 +1,3 @@
1
1
  module S4tUtils
2
- Version = '1.0.0'
2
+ Version = '1.0.2'
3
3
  end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: s4t-utils
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.0.0
7
- date: 2007-07-11 00:00:00 -05:00
6
+ version: 1.0.2
7
+ date: 2007-07-27 00:00:00 -05:00
8
8
  summary: _Everyday Scripting with Ruby_ utilities.
9
9
  require_paths:
10
10
  - lib
@@ -29,6 +29,7 @@ post_install_message:
29
29
  authors:
30
30
  - Brian Marick
31
31
  files:
32
+ - History.txt
32
33
  - LICENSE.txt
33
34
  - Manifest.txt
34
35
  - NOTES.txt
@@ -93,6 +94,7 @@ rdoc_options:
93
94
  - --main
94
95
  - README.txt
95
96
  extra_rdoc_files:
97
+ - History.txt
96
98
  - LICENSE.txt
97
99
  - Manifest.txt
98
100
  - NOTES.txt
@@ -112,5 +114,5 @@ dependencies:
112
114
  requirements:
113
115
  - - ">="
114
116
  - !ruby/object:Gem::Version
115
- version: 1.2.1
117
+ version: 1.2.2
116
118
  version: