map_by_method 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +6 -0
- data/License.txt +20 -0
- data/Manifest.txt +13 -1
- data/Rakefile +3 -124
- data/Rakefile.old +125 -0
- data/config/hoe.rb +73 -0
- data/config/requirements.rb +17 -0
- data/lib/map_by_method.rb +10 -6
- data/lib/map_by_method/version.rb +1 -1
- data/log/debug.log +0 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/{scripts → script}/txt2html +10 -3
- data/setup.rb +1585 -0
- data/tasks/deployment.rake +27 -0
- data/tasks/environment.rake +7 -0
- data/tasks/website.rake +17 -0
- data/test/test_map_by_method.rb +2 -1
- data/test/test_respond_to.rb +7 -0
- data/website/index.html +7 -12
- data/website/template.rhtml +5 -10
- metadata +17 -3
@@ -0,0 +1,27 @@
|
|
1
|
+
desc 'Release the website and new gem version'
|
2
|
+
task :deploy => [:check_version, :website, :release] do
|
3
|
+
puts "Remember to create SVN tag:"
|
4
|
+
puts "svn copy svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/trunk " +
|
5
|
+
"svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/tags/REL-#{VERS} "
|
6
|
+
puts "Suggested comment:"
|
7
|
+
puts "Tagging release #{CHANGES}"
|
8
|
+
end
|
9
|
+
|
10
|
+
desc 'Runs tasks website_generate and install_gem as a local deployment of the gem'
|
11
|
+
task :local_deploy => [:website_generate, :install_gem]
|
12
|
+
|
13
|
+
task :check_version do
|
14
|
+
unless ENV['VERSION']
|
15
|
+
puts 'Must pass a VERSION=x.y.z release version'
|
16
|
+
exit
|
17
|
+
end
|
18
|
+
unless ENV['VERSION'] == VERS
|
19
|
+
puts "Please update your version.rb to match the release version, currently #{VERS}"
|
20
|
+
exit
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
desc 'Install the package as a gem, without generating documentation(ri/rdoc)'
|
25
|
+
task :install_gem_no_doc => [:clean, :package] do
|
26
|
+
sh "#{'sudo ' unless Hoe::WINDOZE }gem install pkg/*.gem --no-rdoc --no-ri"
|
27
|
+
end
|
data/tasks/website.rake
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
desc 'Generate website files'
|
2
|
+
task :website_generate => :ruby_env do
|
3
|
+
(Dir['website/**/*.txt'] - Dir['website/version*.txt']).each do |txt|
|
4
|
+
sh %{ #{RUBY_APP} script/txt2html #{txt} > #{txt.gsub(/txt$/,'html')} }
|
5
|
+
end
|
6
|
+
end
|
7
|
+
|
8
|
+
desc 'Upload website files to rubyforge'
|
9
|
+
task :website_upload do
|
10
|
+
host = "#{rubyforge_username}@rubyforge.org"
|
11
|
+
remote_dir = "/var/www/gforge-projects/#{RUBYFORGE_PROJECT}/"
|
12
|
+
local_dir = 'website'
|
13
|
+
sh %{rsync -aCv #{local_dir}/ #{host}:#{remote_dir}}
|
14
|
+
end
|
15
|
+
|
16
|
+
desc 'Generate and upload website files'
|
17
|
+
task :website => [:website_generate, :website_upload, :publish_docs]
|
data/test/test_map_by_method.rb
CHANGED
data/website/index.html
CHANGED
@@ -29,11 +29,11 @@
|
|
29
29
|
</head>
|
30
30
|
<body>
|
31
31
|
<div id="main">
|
32
|
-
|
33
|
-
<h1
|
34
|
-
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/
|
35
|
-
Get Version
|
36
|
-
<a href="http://rubyforge.org/projects/
|
32
|
+
|
33
|
+
<h1>Map By Method</h1>
|
34
|
+
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/map_by_method"; return false'>
|
35
|
+
<p>Get Version</p>
|
36
|
+
<a href="http://rubyforge.org/projects/map_by_method" class="numbers">0.8.2</a>
|
37
37
|
</div>
|
38
38
|
<h1><code>["1","2","3"]. map_by_to_i => [1,2,3]</code></h1>
|
39
39
|
|
@@ -104,17 +104,12 @@ other stories and things.</p>
|
|
104
104
|
|
105
105
|
<p>Comments are welcome. Send an email to <a href="mailto:drnicwilliams@gmail.com">Dr Nic Williams</a> via the <a href="http://groups.google.com/group/drnicutilities">forum</a></p>
|
106
106
|
<p class="coda">
|
107
|
-
<a href="
|
107
|
+
<a href="drnicwilliams@gmail.com">Dr Nic Williams</a>, 11th August 2007<br>
|
108
108
|
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
|
109
109
|
</p>
|
110
110
|
</div>
|
111
111
|
|
112
|
-
|
113
|
-
</script>
|
114
|
-
<script type="text/javascript">
|
115
|
-
_uacct = "UA-567811-2";
|
116
|
-
urchinTracker();
|
117
|
-
</script>
|
112
|
+
<!-- insert site tracking codes here, like Google Urchin -->
|
118
113
|
|
119
114
|
</body>
|
120
115
|
</html>
|
data/website/template.rhtml
CHANGED
@@ -29,25 +29,20 @@
|
|
29
29
|
</head>
|
30
30
|
<body>
|
31
31
|
<div id="main">
|
32
|
-
|
33
|
-
<h1
|
32
|
+
|
33
|
+
<h1><%= title %></h1>
|
34
34
|
<div id="version" class="clickable" onclick='document.location = "<%= download %>"; return false'>
|
35
|
-
Get Version
|
35
|
+
<p>Get Version</p>
|
36
36
|
<a href="<%= download %>" class="numbers"><%= version %></a>
|
37
37
|
</div>
|
38
38
|
<%= body %>
|
39
39
|
<p class="coda">
|
40
|
-
<a href="
|
40
|
+
<a href="drnicwilliams@gmail.com">Dr Nic Williams</a>, <%= modified.pretty %><br>
|
41
41
|
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
|
42
42
|
</p>
|
43
43
|
</div>
|
44
44
|
|
45
|
-
|
46
|
-
</script>
|
47
|
-
<script type="text/javascript">
|
48
|
-
_uacct = "UA-567811-2";
|
49
|
-
urchinTracker();
|
50
|
-
</script>
|
45
|
+
<!-- insert site tracking codes here, like Google Urchin -->
|
51
46
|
|
52
47
|
</body>
|
53
48
|
</html>
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4.3
|
|
3
3
|
specification_version: 1
|
4
4
|
name: map_by_method
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.8.
|
7
|
-
date: 2007-09-
|
6
|
+
version: 0.8.2
|
7
|
+
date: 2007-09-07 00:00:00 +02:00
|
8
8
|
summary: Replacement for map {|obj| obj.action} and Symbol.to_proc which is much cleaner and prettier NOW WORKS with ActiveRecord Associations!!
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -30,17 +30,29 @@ authors:
|
|
30
30
|
- Dr Nic Williams
|
31
31
|
files:
|
32
32
|
- History.txt
|
33
|
+
- License.txt
|
33
34
|
- Manifest.txt
|
34
35
|
- README.txt
|
35
36
|
- Rakefile
|
37
|
+
- Rakefile.old
|
38
|
+
- config/hoe.rb
|
39
|
+
- config/requirements.rb
|
36
40
|
- install.rb
|
37
41
|
- lib/map_by_method.rb
|
38
42
|
- lib/map_by_method/version.rb
|
39
|
-
-
|
43
|
+
- log/debug.log
|
44
|
+
- script/destroy
|
45
|
+
- script/generate
|
46
|
+
- script/txt2html
|
47
|
+
- setup.rb
|
48
|
+
- tasks/deployment.rake
|
49
|
+
- tasks/environment.rake
|
50
|
+
- tasks/website.rake
|
40
51
|
- test/test_ar_association_proxy.rb
|
41
52
|
- test/test_helper.rb
|
42
53
|
- test/test_map_by_method.rb
|
43
54
|
- test/test_multiple_methods.rb
|
55
|
+
- test/test_respond_to.rb
|
44
56
|
- website/index.html
|
45
57
|
- website/index.txt
|
46
58
|
- website/javascripts/rounded_corners_lite.inc.js
|
@@ -51,11 +63,13 @@ test_files:
|
|
51
63
|
- test/test_helper.rb
|
52
64
|
- test/test_map_by_method.rb
|
53
65
|
- test/test_multiple_methods.rb
|
66
|
+
- test/test_respond_to.rb
|
54
67
|
rdoc_options:
|
55
68
|
- --main
|
56
69
|
- README.txt
|
57
70
|
extra_rdoc_files:
|
58
71
|
- History.txt
|
72
|
+
- License.txt
|
59
73
|
- Manifest.txt
|
60
74
|
- README.txt
|
61
75
|
- website/index.txt
|