constructor 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,11 @@
1
+ == 1.0.4 / 2009-12-01
2
+
3
+ * Building is now done with Jeweler.
4
+
5
+ == 1.0.3 / 2009-11-30
6
+
7
+ * Quick release to include ConstructorStruct.
8
+
1
9
  == 1.0.2 / 2008-05-07
2
10
 
3
11
  * An error is raised when constructor keys are passed in that already exist in the super class
@@ -1,7 +1,6 @@
1
1
  == Constructor
2
2
 
3
- * http://atomicobjectrb.rubyforge.org/constructor
4
- * http://rubyforge.org/projects/atomicobjectrb/
3
+ * http://atomicobject.github.com/constructor
5
4
 
6
5
  == DESCRIPTION:
7
6
 
data/Rakefile CHANGED
@@ -1,33 +1,33 @@
1
1
  require 'rubygems'
2
- require 'hoe'
3
- require './lib/constructor.rb'
4
- require 'spec/rake/spectask'
5
-
6
2
 
7
3
  desc 'Default: run specs'
8
4
  task :default => :spec
9
- Hoe.new('constructor', CONSTRUCTOR_VERSION) do |p|
10
- p.rubyforge_name = 'atomicobjectrb'
11
- p.author = 'Atomic Object'
12
- p.email = 'dev@atomicobject.com'
13
- p.summary = 'Declarative, named constructor arguments.'
14
- p.description = p.paragraphs_of('README.txt', 2).join("\n\n")
15
- p.url = p.paragraphs_of('README.txt', 1).first.gsub(/\* /,'').split(/\n/)
16
- p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
17
- end
18
5
 
6
+ require 'spec/rake/spectask'
19
7
  desc 'Run constructor specs'
20
8
  Spec::Rake::SpecTask.new(:spec) do |t|
21
9
  t.spec_files = FileList['specs/*_spec.rb']
22
10
  t.spec_opts << '-c -f s'
23
11
  end
24
12
 
25
- if File.exists?("../tools/")
26
- load "../tools/tasks/homepage.rake"
27
- load "../tools/tasks/release_tagging.rake"
28
- ReleaseTagging.new do |t|
29
- t.package = "constructor"
30
- t.version = CONSTRUCTOR_VERSION
13
+ begin
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gemspec|
16
+ $: << "lib"
17
+ require 'constructor.rb'
18
+ gemspec.name = 'constructor'
19
+ gemspec.version = CONSTRUCTOR_VERSION
20
+ gemspec.summary = 'Declarative named-argument object initialization.'
21
+ gemspec.description = 'Declarative means to define object properties by passing a hash to the constructor, which will set the corresponding ivars.'
22
+ gemspec.homepage = 'http://atomicobject.github.com/constructor'
23
+ gemspec.authors = 'Atomic Object'
24
+ gemspec.email = 'github@atomicobject.com'
25
+ gemspec.test_files = FileList['specs/*_spec.rb']
31
26
  end
27
+
28
+ Jeweler::GemcutterTasks.new
29
+
30
+ rescue LoadError
31
+ puts "(jeweler not installed)"
32
32
  end
33
33
 
@@ -0,0 +1,27 @@
1
+ Wed Nov 21 21:49:27 EST 2007
2
+ crosby
3
+
4
+ 1. Edit page_header.graffle
5
+ 2. Export as HTML imagemap
6
+ 3. Open ../sample_code/synopsis.rb
7
+ 4. Screen shot, save as sample_code.png
8
+ 5. rake (rewrites index.html)
9
+ 6. cd ..
10
+ 7. rake publish_docs
11
+
12
+ page_header.graffle
13
+ Export-as-HTML-Imagemap
14
+ Use png
15
+ Use 125% scale
16
+ Remember to use the style inspector to assign actions to things that should be links.
17
+
18
+ rake index
19
+ Rewrites index.html using index.erb and page_header.html (and some values in the Rakefile)
20
+
21
+ The code sample screenshot:
22
+ Taken with Snapz Pro X (this is important, as Snapz is providing the
23
+ dropshadow and about 28 extra pixels widthwise)
24
+
25
+ Should be 650 px wide to line up with the page header.
26
+
27
+ Transparency: be conscious of WHAT'S IN THE BACKGROUND
@@ -0,0 +1,15 @@
1
+ desc "Rewrite index.html using index.erb and publisher_homepage.html"
2
+ task :index do
3
+ require 'erb'
4
+ @title = "Constructor - atomicobject.rb"
5
+ @plugin_install = "$ script/plugin install svn://rubyforge.org/var/svn/atomicobjectrb/tags/constructor"
6
+ @header_html = File.read("page_header.html")
7
+ html = ERB.new(File.read("index.erb")).result(binding)
8
+ fname = "index.html"
9
+ File.open(fname,"w") do |f|
10
+ f.print html
11
+ end
12
+ puts "Wrote #{fname}"
13
+ end
14
+
15
+ task :default => :index
@@ -0,0 +1,27 @@
1
+ <html>
2
+ <head>
3
+ <title><%= @title %></title>
4
+ </head>
5
+ <style>
6
+ #rails_plugin_installation {
7
+ padding: 5px;
8
+ margin-bottom: 10px;
9
+ font: bold 10pt "Courier New", courier, serif
10
+ }
11
+ </style>
12
+
13
+ <body>
14
+
15
+ <div align="center">
16
+
17
+ <%= @header_html %>
18
+
19
+ <div id="rails_plugin_installation"><%= @plugin_install %></div>
20
+
21
+ <a href="rdoc/index.html"><img border=0 src="sample_code.png"></a>
22
+ </div>
23
+
24
+
25
+
26
+ </body>
27
+ </html>
@@ -0,0 +1,36 @@
1
+ <html>
2
+ <head>
3
+ <title>Constructor - atomicobject.rb</title>
4
+ </head>
5
+ <style>
6
+ #rails_plugin_installation {
7
+ padding: 5px;
8
+ margin-bottom: 10px;
9
+ font: bold 10pt "Courier New", courier, serif
10
+ }
11
+ </style>
12
+
13
+ <body>
14
+
15
+ <div align="center">
16
+
17
+ <map name="GraffleExport">
18
+ <area shape=rect coords="486,91,635,108" href="http://atomicobjectrb.rubyforge.org/">
19
+ <area shape=rect coords="485,120,635,187" href="rdoc/index.html">
20
+ <area shape=rect coords="310,120,463,187" href="http://rubyforge.org/frs/?group_id=4897&release_id=16546">
21
+ <area shape=rect coords="14,91,168,108" href="http://atomicobject.com">
22
+ <area shape=rect coords="572,16,627,71" href="http://atomicobjectrb.rubyforge.org/">
23
+ <area shape=rect coords="21,13,83,75" href="http://atomicobject.com">
24
+ </map>
25
+ <img border=0 src="page_header.png" usemap="#GraffleExport">
26
+
27
+
28
+ <div id="rails_plugin_installation">$ script/plugin install svn://rubyforge.org/var/svn/atomicobjectrb/tags/constructor</div>
29
+
30
+ <a href="rdoc/index.html"><img border=0 src="sample_code.png"></a>
31
+ </div>
32
+
33
+
34
+
35
+ </body>
36
+ </html>
@@ -0,0 +1,9 @@
1
+ <map name="GraffleExport">
2
+ <area shape=rect coords="486,91,635,108" href="http://atomicobjectrb.rubyforge.org/">
3
+ <area shape=rect coords="485,120,635,187" href="rdoc/index.html">
4
+ <area shape=rect coords="310,120,463,187" href="http://rubyforge.org/frs/?group_id=4897&release_id=16546">
5
+ <area shape=rect coords="14,91,168,108" href="http://atomicobject.com">
6
+ <area shape=rect coords="572,16,627,71" href="http://atomicobjectrb.rubyforge.org/">
7
+ <area shape=rect coords="21,13,83,75" href="http://atomicobject.com">
8
+ </map>
9
+ <img border=0 src="page_header.png" usemap="#GraffleExport">
Binary file
Binary file
@@ -0,0 +1,12 @@
1
+ require 'rubygems'
2
+ require 'constructor'
3
+
4
+ class Horse
5
+ constructor :name, :breed, :weight, :accessors => true
6
+ end
7
+
8
+ ed = Horse.new(:name => 'Ed', :breed => 'Mustang', :weight => 342)
9
+ puts ed.name
10
+ puts ed.breed
11
+ puts ed.weight
12
+
@@ -1,4 +1,4 @@
1
- CONSTRUCTOR_VERSION = '1.0.3' #:nodoc:#
1
+ CONSTRUCTOR_VERSION = '1.0.4' #:nodoc:#
2
2
 
3
3
  class Class #:nodoc:#
4
4
  def constructor(*attrs, &block)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: constructor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Atomic Object
@@ -9,50 +9,42 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-30 00:00:00 -05:00
12
+ date: 2009-12-01 00:00:00 -05:00
13
13
  default_executable:
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: hoe
17
- type: :development
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: 2.3.3
24
- version:
25
- description: |-
26
- == DESCRIPTION:
27
-
28
- Declarative means to define object properties by passing a hash
29
- to the constructor, which will set the corresponding ivars.
30
- email: dev@atomicobject.com
14
+ dependencies: []
15
+
16
+ description: Declarative means to define object properties by passing a hash to the constructor, which will set the corresponding ivars.
17
+ email: github@atomicobject.com
31
18
  executables: []
32
19
 
33
20
  extensions: []
34
21
 
35
22
  extra_rdoc_files:
36
- - History.txt
37
- - Manifest.txt
38
- - README.txt
23
+ - README.rdoc
39
24
  files:
40
- - History.txt
41
- - Manifest.txt
42
- - README.txt
25
+ - History.rdoc
26
+ - README.rdoc
43
27
  - Rakefile
28
+ - homepage/Notes.txt
29
+ - homepage/Rakefile
30
+ - homepage/index.erb
31
+ - homepage/index.html
32
+ - homepage/page_header.graffle
33
+ - homepage/page_header.html
34
+ - homepage/page_header.png
35
+ - homepage/sample_code.png
36
+ - homepage/sample_code.rb
44
37
  - lib/constructor.rb
45
38
  - lib/constructor_struct.rb
46
39
  - specs/constructor_spec.rb
47
40
  - specs/constructor_struct_spec.rb
48
41
  has_rdoc: true
49
- homepage: http://atomicobjectrb.rubyforge.org/constructor
42
+ homepage: http://atomicobject.github.com/constructor
50
43
  licenses: []
51
44
 
52
45
  post_install_message:
53
46
  rdoc_options:
54
- - --main
55
- - README.txt
47
+ - --charset=UTF-8
56
48
  require_paths:
57
49
  - lib
58
50
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -69,10 +61,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
61
  version:
70
62
  requirements: []
71
63
 
72
- rubyforge_project: atomicobjectrb
64
+ rubyforge_project:
73
65
  rubygems_version: 1.3.5
74
66
  signing_key:
75
67
  specification_version: 3
76
- summary: Declarative, named constructor arguments.
77
- test_files: []
78
-
68
+ summary: Declarative named-argument object initialization.
69
+ test_files:
70
+ - specs/constructor_spec.rb
71
+ - specs/constructor_struct_spec.rb
@@ -1,8 +0,0 @@
1
- History.txt
2
- Manifest.txt
3
- README.txt
4
- Rakefile
5
- lib/constructor.rb
6
- lib/constructor_struct.rb
7
- specs/constructor_spec.rb
8
- specs/constructor_struct_spec.rb