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.
- data/History.txt +9 -0
- data/Manifest.txt +1 -0
- data/Rakefile +5 -0
- data/lib/s4t-utils/claims.rb +9 -1
- data/lib/s4t-utils/version.rb +1 -1
- metadata +5 -3
data/History.txt
ADDED
data/Manifest.txt
CHANGED
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
|
data/lib/s4t-utils/claims.rb
CHANGED
@@ -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
|
-
|
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
|
|
data/lib/s4t-utils/version.rb
CHANGED
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.
|
7
|
-
date: 2007-07-
|
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.
|
117
|
+
version: 1.2.2
|
116
118
|
version:
|