cutep 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,3 +1,17 @@
1
+ 2007-06-14 Kouichirou Eto <2007 eto.com>
2
+
3
+ * lib/qp/version.rb: Version up to 0.0.2
4
+
5
+ * scripts/txt2html: Update to qp.
6
+
7
+ * scripts/makemanifest.rb: New file.
8
+ from http://d.hatena.ne.jp/bellbind/20070605/1180979599
9
+
10
+ * spec/qp_spec.rb: Update a rule.
11
+
12
+ * Rakefile: Add a CLEAN rule.
13
+ * Rakefile: Add a path "lib".
14
+
1
15
  2007-06-13 Kouichirou Eto <2007 eto.com>
2
16
 
3
17
  * lib/qp.rb: Added.
data/Manifest.txt CHANGED
@@ -1,18 +1,19 @@
1
- ChangeLog
2
- History.txt
3
- License.txt
4
- Manifest.txt
5
- Manifest.txt~
6
- README.txt
7
- Rakefile
8
- lib/qp.rb
9
- scripts/txt2html
10
- setup.rb
11
- spec/qp_spec.rb
12
- spec/spec.opts
13
- spec/spec_helper.rb
14
- website/index.html
15
- website/index.txt
16
- website/javascripts/rounded_corners_lite.inc.js
17
- website/stylesheets/screen.css
18
- website/template.rhtml
1
+ ChangeLog
2
+ History.txt
3
+ License.txt
4
+ Manifest.txt
5
+ README.txt
6
+ Rakefile
7
+ lib/qp.rb
8
+ lib/qp/version.rb
9
+ scripts/makemanifest.rb
10
+ scripts/txt2html
11
+ setup.rb
12
+ spec/qp_spec.rb
13
+ spec/spec.opts
14
+ spec/spec_helper.rb
15
+ website/index.html
16
+ website/index.txt
17
+ website/javascripts/rounded_corners_lite.inc.js
18
+ website/stylesheets/screen.css
19
+ website/template.rhtml
data/Rakefile CHANGED
@@ -17,7 +17,7 @@ rescue LoadError
17
17
  end
18
18
 
19
19
  include FileUtils
20
- require File.join(File.dirname(__FILE__), 'lib', 'qp')
20
+ require File.join(File.dirname(__FILE__), 'lib', 'qp', 'version')
21
21
 
22
22
  AUTHOR = 'Kouichirou Eto'
23
23
  EMAIL = "2007@eto.com.please.do.not.send.spam.example.com"
@@ -36,6 +36,7 @@ ERROR: No rubyforge config file found: #{@config_file}"
36
36
  Run 'rubyforge setup' to prepare your env for access to Rubyforge
37
37
  - See http://newgem.rubyforge.org/rubyforge.html for more details
38
38
  EOS
39
+ # "
39
40
  exit
40
41
  end
41
42
  end
@@ -45,6 +46,7 @@ end
45
46
  RUBYFORGE_PROJECT = 'cutep' # The unix name for your project
46
47
  HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
47
48
  DOWNLOAD_PATH = "http://rubyforge.org/projects/#{RUBYFORGE_PROJECT}"
49
+ RUBYFORGE_ACCOUNT = 'eto'
48
50
 
49
51
  NAME = "cutep"
50
52
  REV = nil
@@ -52,6 +54,7 @@ REV = nil
52
54
  # REV = `svn info`.each {|line| if line =~ /^Revision:/ then k,v = line.split(': '); break v.chomp; else next; end} rescue nil
53
55
  VERS = QP::VERSION::STRING + (REV ? ".#{REV}" : "")
54
56
  CLEAN.include ['**/.*.sw?', '*.gem', '.config', '**/.DS_Store']
57
+ CLEAN.include ['*~']
55
58
  RDOC_OPTS = ['--quiet', '--title', 'cutep documentation',
56
59
  "--opname", "index.html",
57
60
  "--line-numbers",
@@ -131,6 +134,24 @@ desc "Run the specs under spec/models"
131
134
  Spec::Rake::SpecTask.new do |t|
132
135
  t.spec_opts = ['--options', "spec/spec.opts"]
133
136
  t.spec_files = FileList['spec/*_spec.rb']
137
+ t.libs << "lib"
138
+ end
139
+
140
+ Rake::RDocTask.new do |rdoc|
141
+ rdoc.rdoc_dir = 'html'
142
+ rdoc.options += RDOC_OPTS
143
+ rdoc.template = "#{ENV['template']}.rb" if ENV['template']
144
+ if ENV['DOC_FILES']
145
+ rdoc.rdoc_files.include(ENV['DOC_FILES'].split(/,\s*/))
146
+ else
147
+ rdoc.rdoc_files.include('README.txt', 'ChangeLog')
148
+ rdoc.rdoc_files.include('lib/**/*.rb')
149
+ end
150
+ end
151
+
152
+ desc "Publish to RubyForge"
153
+ task :publish_rubyforge => [:rdoc, :package] do
154
+ Rake::RubyForgePublisher.new(RUBYFORGE_PROJECT, RUBYFORGE_ACCOUNT).upload
134
155
  end
135
156
 
136
157
  desc "Default task is to run specs"
data/lib/qp.rb CHANGED
@@ -1,25 +1,20 @@
1
1
  # Copyright (C) 2003-2007 Kouichirou Eto, All rights reserved.
2
2
  # License: Ruby License
3
3
 
4
- module QP #:nodoc:
5
- module VERSION #:nodoc:
6
- MAJOR = 0
7
- MINOR = 0
8
- TINY = 1
9
- STRING = [MAJOR, MINOR, TINY].join('.')
10
- end
4
+ require 'qp/version'
11
5
 
12
- def caller_msg(ca)
6
+ module QP #:nodoc:
7
+ def caller_msg(ca) #:nodoc:
13
8
  file, linenum, msg = ca.first.split(/:([0-9]+):/)
14
9
  msg = $1 if /\Ain \`(.+)\'\z/ =~ msg
15
10
  File.basename(file)+':'+linenum.to_s+':'+msg.to_s
16
11
  end
17
12
 
18
- def ar_inspect(ar)
13
+ def ar_inspect(ar) #:nodoc:
19
14
  '['+ar.map {|arg| arg.inspect }.join(', ')+']'
20
15
  end
21
16
 
22
- def runtime
17
+ def runtime #:nodoc:
23
18
  $__qp_t__ = Time.now unless defined? $__qp_t__
24
19
  sprintf('%.1f', Time.now - $__qp_t__)
25
20
  end
@@ -49,7 +44,6 @@ if $0 == __FILE__
49
44
  end
50
45
 
51
46
  if defined?($__test_qp__) && $__test_qp__
52
- #require 'qwik/testunit'
53
47
  require 'test/unit'
54
48
  require 'test/unit/ui/console/testrunner'
55
49
 
data/lib/qp/version.rb ADDED
@@ -0,0 +1,11 @@
1
+ # Copyright (C) 2003-2007 Kouichirou Eto, All rights reserved.
2
+ # License: Ruby License
3
+
4
+ module QP #:nodoc:
5
+ module VERSION #:nodoc:
6
+ MAJOR = 0
7
+ MINOR = 0
8
+ TINY = 2
9
+ STRING = [MAJOR, MINOR, TINY].join('.')
10
+ end
11
+ end
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/ruby
2
+
3
+ base_dir = File.join(File.dirname(__FILE__), "..")
4
+ glob_pattern = File.join("**", "*")
5
+ exclude_patterns = [
6
+ /^pkg/,/^doc/,
7
+ ]
8
+
9
+ Dir.chdir(base_dir)
10
+ files = Dir.glob(glob_pattern).delete_if do |fname|
11
+ File.directory?(fname) or
12
+ exclude_patterns.find do |pattern|
13
+ pattern =~ fname
14
+ end
15
+ end
16
+ manifest = File.new("Manifest.txt", "w")
17
+ manifest.puts files.sort.join("\n")
18
+ manifest.close
19
+
20
+ puts "Manifest.txt updated"
data/scripts/txt2html CHANGED
@@ -4,9 +4,9 @@ require 'rubygems'
4
4
  require 'redcloth'
5
5
  require 'syntax/convertors/html'
6
6
  require 'erb'
7
- require File.dirname(__FILE__) + '/../lib/cutep/version.rb'
7
+ require File.dirname(__FILE__) + '/../lib/qp/version.rb'
8
8
 
9
- version = Cutep::VERSION::STRING
9
+ version = QP::VERSION::STRING
10
10
  download = 'http://rubyforge.org/projects/cutep'
11
11
 
12
12
  class Fixnum
data/spec/qp_spec.rb CHANGED
@@ -4,6 +4,6 @@ require 'qp'
4
4
  describe QP do
5
5
  it "should return" do
6
6
  QP.ar_inspect([1, 'a']).should == "[1, \"a\"]"
7
- QP.runtime.should == /\d+\.\d/
7
+ QP.runtime.should =~ /\d+\.\d/
8
8
  end
9
9
  end
data/website/index.html CHANGED
@@ -1,11 +1,92 @@
1
- <html>
2
- <head>
3
- <meta http-equiv="Content-type" content="text/html; charset=utf-8">
4
- <title>cutep</title>
5
-
6
- </head>
7
- <body id="body">
8
- <p>This page has not yet been created for RubyGem <code>cutep</code></p>
9
- <p>To the developer: To generate it, update website/index.txt and run the rake task <code>website</code> to generate this <code>index.html</code> file.</p>
10
- </body>
11
- </html>
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <link rel="stylesheet" href="stylesheets/screen.css" type="text/css" media="screen" />
6
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
+ <title>
8
+ cutep
9
+ </title>
10
+ <script src="javascripts/rounded_corners_lite.inc.js" type="text/javascript"></script>
11
+ <style>
12
+
13
+ </style>
14
+ <script type="text/javascript">
15
+ window.onload = function() {
16
+ settings = {
17
+ tl: { radius: 10 },
18
+ tr: { radius: 10 },
19
+ bl: { radius: 10 },
20
+ br: { radius: 10 },
21
+ antiAlias: true,
22
+ autoPad: true,
23
+ validTags: ["div"]
24
+ }
25
+ var versionBox = new curvyCorners(settings, document.getElementById("version"));
26
+ versionBox.applyCornersToAll();
27
+ }
28
+ </script>
29
+ </head>
30
+ <body>
31
+ <div id="main">
32
+
33
+ <h1>cutep</h1>
34
+ <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/cutep"; return false'>
35
+ <p>Get Version</p>
36
+ <a href="http://rubyforge.org/projects/cutep" class="numbers">0.0.2</a>
37
+ </div>
38
+ <h1>&#x2192; &#8216;cutep&#8217;</h1>
39
+
40
+
41
+ <h2>What</h2>
42
+
43
+
44
+ <h2>Installing</h2>
45
+
46
+
47
+ <pre syntax="ruby">sudo gem install cutep</pre>
48
+
49
+ <h2>The basics</h2>
50
+
51
+
52
+ <h2>Demonstration of usage</h2>
53
+
54
+
55
+ <h2>Forum</h2>
56
+
57
+
58
+ <p><a href="http://groups.google.com/group/cutep">http://groups.google.com/group/cutep</a></p>
59
+
60
+
61
+ <p><span class="caps">TODO</span> &#8211; create Google Group &#8211; cutep</p>
62
+
63
+
64
+ <h2>How to submit patches</h2>
65
+
66
+
67
+ <p>Read the <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/">8 steps for fixing other people&#8217;s code</a> and for section <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups">8b: Submit patch to Google Groups</a>, use the Google Group above.</p>
68
+
69
+
70
+ <p>The trunk repository is <code>svn://rubyforge.org/var/svn/cutep/trunk</code> for anonymous access.</p>
71
+
72
+
73
+ <h2>License</h2>
74
+
75
+
76
+ <p>This code is free to use under the terms of the <span class="caps">MIT</span> license.</p>
77
+
78
+
79
+ <h2>Contact</h2>
80
+
81
+
82
+ <p>Comments are welcome. Send an email to <a href="mailto:FIXME"><span class="caps">FIXME</span> full name</a> email.</p>
83
+ <p class="coda">
84
+ <a href="mailto:drnicwilliams@gmail.com">Dr Nic</a>, 13th June 2007<br>
85
+ Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
86
+ </p>
87
+ </div>
88
+
89
+ <!-- insert site tracking codes here, like Google Urchin -->
90
+
91
+ </body>
92
+ </html>
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: cutep
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.1
7
- date: 2007-06-13 00:00:00 +09:00
6
+ version: 0.0.2
7
+ date: 2007-06-15 00:00:00 +09:00
8
8
  summary: "\"Cute p\" provide more human readable \"p\" function."
9
9
  require_paths:
10
10
  - lib
@@ -33,10 +33,11 @@ files:
33
33
  - History.txt
34
34
  - License.txt
35
35
  - Manifest.txt
36
- - Manifest.txt~
37
36
  - README.txt
38
37
  - Rakefile
39
38
  - lib/qp.rb
39
+ - lib/qp/version.rb
40
+ - scripts/makemanifest.rb
40
41
  - scripts/txt2html
41
42
  - setup.rb
42
43
  - spec/qp_spec.rb
data/Manifest.txt~ DELETED
@@ -1,16 +0,0 @@
1
- History.txt
2
- License.txt
3
- Manifest.txt
4
- README.txt
5
- Rakefile
6
- lib/cutep.rb
7
- lib/cutep/version.rb
8
- scripts/txt2html
9
- setup.rb
10
- spec/cutep.rb_spec
11
- spec/helper.rb_spec
12
- website/index.html
13
- website/index.txt
14
- website/javascripts/rounded_corners_lite.inc.js
15
- website/stylesheets/screen.css
16
- website/template.rhtml