opensteam 0.9.0

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.
Files changed (134) hide show
  1. data/History.txt +0 -0
  2. data/License.txt +4 -0
  3. data/Manifest.txt +131 -0
  4. data/Manifest.txt.bak +132 -0
  5. data/README.txt +92 -0
  6. data/generators/opensteam/opensteam_generator.rb +295 -0
  7. data/generators/opensteam/templates/controllers/administration/customers_controller.rb +23 -0
  8. data/generators/opensteam/templates/controllers/administration/inventories_controller.rb +88 -0
  9. data/generators/opensteam/templates/controllers/administration/orders_controller.rb +61 -0
  10. data/generators/opensteam/templates/controllers/administration_controller.rb +80 -0
  11. data/generators/opensteam/templates/controllers/checkout_controller.rb +142 -0
  12. data/generators/opensteam/templates/controllers/webshop_controller.rb +68 -0
  13. data/generators/opensteam/templates/fixtures/inventories.yml +221 -0
  14. data/generators/opensteam/templates/fixtures/inventories_properties.yml +127 -0
  15. data/generators/opensteam/templates/fixtures/product_animals.yml +73 -0
  16. data/generators/opensteam/templates/fixtures/product_dog_foods.yml +7 -0
  17. data/generators/opensteam/templates/fixtures/properties.yml +42 -0
  18. data/generators/opensteam/templates/helpers/webshop_helper.rb +29 -0
  19. data/generators/opensteam/templates/init/opensteam.rb +30 -0
  20. data/generators/opensteam/templates/migrations/create_addresses.rb +17 -0
  21. data/generators/opensteam/templates/migrations/create_customers.rb +16 -0
  22. data/generators/opensteam/templates/migrations/create_dummy_users.rb +16 -0
  23. data/generators/opensteam/templates/migrations/create_inventories.rb +20 -0
  24. data/generators/opensteam/templates/migrations/create_inventories_properties.rb +14 -0
  25. data/generators/opensteam/templates/migrations/create_order_items.rb +16 -0
  26. data/generators/opensteam/templates/migrations/create_orders.rb +18 -0
  27. data/generators/opensteam/templates/migrations/create_payment_types.rb +13 -0
  28. data/generators/opensteam/templates/migrations/create_properties.rb +12 -0
  29. data/generators/opensteam/templates/migrations/create_sessions.rb +16 -0
  30. data/generators/opensteam/templates/migrations/create_users.rb +19 -0
  31. data/generators/opensteam/templates/models/administration_mailer.rb +18 -0
  32. data/generators/opensteam/templates/models/inventories_property.rb +10 -0
  33. data/generators/opensteam/templates/models/inventory.rb +57 -0
  34. data/generators/opensteam/templates/public/images/bullet_arrow_down.png +0 -0
  35. data/generators/opensteam/templates/public/images/bullet_arrow_up.png +0 -0
  36. data/generators/opensteam/templates/public/images/cancel.png +0 -0
  37. data/generators/opensteam/templates/public/images/folder_database.png +0 -0
  38. data/generators/opensteam/templates/public/images/indicator.gif +0 -0
  39. data/generators/opensteam/templates/public/images/indicator_big.gif +0 -0
  40. data/generators/opensteam/templates/public/images/minus.png +0 -0
  41. data/generators/opensteam/templates/public/images/opensteam_logo_small.jpg +0 -0
  42. data/generators/opensteam/templates/public/images/opensteam_logo_web.jpg +0 -0
  43. data/generators/opensteam/templates/public/images/palette.png +0 -0
  44. data/generators/opensteam/templates/public/images/plus.png +0 -0
  45. data/generators/opensteam/templates/public/images/rails.png +0 -0
  46. data/generators/opensteam/templates/public/index.html +297 -0
  47. data/generators/opensteam/templates/public/stylesheets/webshop.css +262 -0
  48. data/generators/opensteam/templates/tasks/opensteam.rake +114 -0
  49. data/generators/opensteam/templates/views/administration/_address.html.erb +4 -0
  50. data/generators/opensteam/templates/views/administration/_nav.html.erb +11 -0
  51. data/generators/opensteam/templates/views/administration/_update_tree.html.erb +18 -0
  52. data/generators/opensteam/templates/views/administration/admin_info.html.erb +12 -0
  53. data/generators/opensteam/templates/views/administration/customers.html.erb +44 -0
  54. data/generators/opensteam/templates/views/administration/customers/index.html.erb +27 -0
  55. data/generators/opensteam/templates/views/administration/customers/show.html.erb +27 -0
  56. data/generators/opensteam/templates/views/administration/index.html.erb +9 -0
  57. data/generators/opensteam/templates/views/administration/inventories/edit.html.erb +48 -0
  58. data/generators/opensteam/templates/views/administration/inventories/index.html.erb +27 -0
  59. data/generators/opensteam/templates/views/administration/inventories/new.html.erb +41 -0
  60. data/generators/opensteam/templates/views/administration/inventories/show.html.erb +45 -0
  61. data/generators/opensteam/templates/views/administration/login.html.erb +16 -0
  62. data/generators/opensteam/templates/views/administration/order.html.erb +22 -0
  63. data/generators/opensteam/templates/views/administration/orders.html.erb +32 -0
  64. data/generators/opensteam/templates/views/administration/orders/_order_item.html.erb +22 -0
  65. data/generators/opensteam/templates/views/administration/orders/index.html.erb +32 -0
  66. data/generators/opensteam/templates/views/administration/orders/show.html.erb +25 -0
  67. data/generators/opensteam/templates/views/administration/products.html.erb +7 -0
  68. data/generators/opensteam/templates/views/administration/properties.html.erb +7 -0
  69. data/generators/opensteam/templates/views/administration/show_order_item.html.erb +5 -0
  70. data/generators/opensteam/templates/views/administration/signup.html.erb +65 -0
  71. data/generators/opensteam/templates/views/administration/tree.html.erb +15 -0
  72. data/generators/opensteam/templates/views/administration/update_products.html.erb +5 -0
  73. data/generators/opensteam/templates/views/administration/update_properties.html.erb +5 -0
  74. data/generators/opensteam/templates/views/administration/update_tree.rjs +3 -0
  75. data/generators/opensteam/templates/views/administration_mailer/order_admin.erb +27 -0
  76. data/generators/opensteam/templates/views/administration_mailer/order_customer.erb +24 -0
  77. data/generators/opensteam/templates/views/checkout/intro.html.erb +5 -0
  78. data/generators/opensteam/templates/views/checkout/outro.html.erb +6 -0
  79. data/generators/opensteam/templates/views/checkout/payment.html.erb +8 -0
  80. data/generators/opensteam/templates/views/checkout/shipping.html.erb +39 -0
  81. data/generators/opensteam/templates/views/checkout/show_cart.html.erb +13 -0
  82. data/generators/opensteam/templates/views/checkout/update_cart_content.rjs +2 -0
  83. data/generators/opensteam/templates/views/common/_cart.html.erb +11 -0
  84. data/generators/opensteam/templates/views/common/_cart_content.html.erb +19 -0
  85. data/generators/opensteam/templates/views/common/_header.html.erb +15 -0
  86. data/generators/opensteam/templates/views/layouts/administration.html.erb +29 -0
  87. data/generators/opensteam/templates/views/layouts/webshop.html.erb +36 -0
  88. data/generators/opensteam/templates/views/webshop/_cart.html.erb +11 -0
  89. data/generators/opensteam/templates/views/webshop/_cart_content.html.erb +23 -0
  90. data/generators/opensteam/templates/views/webshop/_header.html.erb +15 -0
  91. data/generators/opensteam/templates/views/webshop/_inventory_content.html.erb +12 -0
  92. data/generators/opensteam/templates/views/webshop/add_inventory_to_cart.rjs +2 -0
  93. data/generators/opensteam/templates/views/webshop/add_to_cart_with_parameters.rjs +2 -0
  94. data/generators/opensteam/templates/views/webshop/del_item.rjs +1 -0
  95. data/generators/opensteam/templates/views/webshop/index.html.erb +12 -0
  96. data/generators/opensteam/templates/views/webshop/inventory.rjs +2 -0
  97. data/generators/opensteam/templates/views/webshop/show.html.erb +40 -0
  98. data/generators/opensteam_product/opensteam_product_generator.rb +115 -0
  99. data/generators/opensteam_product/templates/controllers/product_controller.rb +104 -0
  100. data/generators/opensteam_product/templates/migration.rb +16 -0
  101. data/generators/opensteam_product/templates/models/product.rb +3 -0
  102. data/generators/opensteam_product/templates/views/_attr_product.html.erb +8 -0
  103. data/generators/opensteam_product/templates/views/_attr_property.html.erb +9 -0
  104. data/generators/opensteam_product/templates/views/_details.html.erb +29 -0
  105. data/generators/opensteam_product/templates/views/administration/_attributes.html.erb +21 -0
  106. data/generators/opensteam_product/templates/views/administration/_get_products.html.erb +8 -0
  107. data/generators/opensteam_product/templates/views/administration/_inventories.html.erb +27 -0
  108. data/generators/opensteam_product/templates/views/administration/edit.html.erb +13 -0
  109. data/generators/opensteam_product/templates/views/administration/index.html.erb +36 -0
  110. data/generators/opensteam_product/templates/views/administration/new.html.erb +16 -0
  111. data/generators/opensteam_product/templates/views/administration/show.html.erb +15 -0
  112. data/generators/opensteam_property/opensteam_property_generator.rb +126 -0
  113. data/generators/opensteam_property/templates/controllers/property_controller.rb +86 -0
  114. data/generators/opensteam_property/templates/migration.rb +14 -0
  115. data/generators/opensteam_property/templates/models/property.rb +3 -0
  116. data/generators/opensteam_property/templates/views/administration/edit.html.erb +19 -0
  117. data/generators/opensteam_property/templates/views/administration/index.html.erb +24 -0
  118. data/generators/opensteam_property/templates/views/administration/new.html.erb +18 -0
  119. data/generators/opensteam_property/templates/views/administration/show.html.erb +10 -0
  120. data/lib/opensteam.rb +49 -0
  121. data/lib/opensteam/base.rb +121 -0
  122. data/lib/opensteam/checkout.rb +89 -0
  123. data/lib/opensteam/config.rb +31 -0
  124. data/lib/opensteam/finder.rb +145 -0
  125. data/lib/opensteam/inventory_base.rb +79 -0
  126. data/lib/opensteam/order_base.rb +58 -0
  127. data/lib/opensteam/product_base.rb +222 -0
  128. data/lib/opensteam/property_base.rb +63 -0
  129. data/lib/opensteam/shopping_cart.rb +343 -0
  130. data/lib/opensteam/user_base.rb +165 -0
  131. data/lib/opensteam/version.rb +9 -0
  132. data/test/test_helper.rb +2 -0
  133. data/test/test_opensteam.rb +11 -0
  134. metadata +189 -0
@@ -0,0 +1,29 @@
1
+ # Methods added to this helper will be available to all templates in the application.
2
+ module <%= file_name.classify %>Helper
3
+
4
+ # return first partial-file that exist in *a
5
+ def existing_partial( *a )
6
+ a.each { |v| return v if File.exist?( "#{RAILS_ROOT}/app/views/#{File.split(v)[0]}/_#{File.split(v)[1]}.html.erb" ) }
7
+ end
8
+
9
+ def ordinalized_time(time = Time.now)
10
+ time.strftime("%d-%m-%Y %H:%M:%S")
11
+ end
12
+
13
+ def error_messages_for_product( product )
14
+ unless product.property_errors.empty?
15
+ html = {}
16
+ error_properties = product.property_errors.map do |property|
17
+ content_tag( :li, property )
18
+ end
19
+ content_tag( :div,
20
+ content_tag(:p, "Please select a ..") <<
21
+ content_tag( :ul, error_properties ), html )
22
+ end
23
+
24
+
25
+ end
26
+
27
+
28
+
29
+ end
@@ -0,0 +1,30 @@
1
+ ####
2
+ # extend Array
3
+ class Array
4
+
5
+ # convert Array to Hash using a block for the key
6
+ def to_h2() inject({}) { |h,o| h[yield(o)] ? h[yield(o)] << o : h[yield(o)] = [o] ; h } ; end
7
+
8
+ # calculate permutations of an array, e.g. [[1,2], [3,4]].perm --> [[1,3], [1,4], [2,3], [2,4]]
9
+ def perm(i=0, *h) return [h] if i == size ; self[i].map { |x| perm(i+1, *(h + [x])) }.inject([]) { |r,v| r + v } ; end
10
+
11
+ end
12
+
13
+ class Class
14
+ # get all subclasses of the given klass
15
+ def self.get_subclasses(klass)
16
+ ObjectSpace.enum_for(:each_object, class << klass ; self ; end ).to_a
17
+ end
18
+ end
19
+
20
+ require 'opensteam/inventory_base'
21
+ Inventory = Opensteam::InventoryBase::Inventory
22
+
23
+ # require all models
24
+ Dir.glob("#{RAILS_ROOT}/app/models/*.rb").collect { |f| require f }
25
+
26
+ # define property_accessors for Inventory-objects
27
+ Inventory.define_property_accessors
28
+
29
+
30
+
@@ -0,0 +1,17 @@
1
+ class CreateAddresses < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :addresses do |t|
4
+ t.references :user
5
+ t.string :street
6
+ t.string :postal
7
+ t.string :city
8
+ t.string :land
9
+
10
+ t.timestamps
11
+ end
12
+ end
13
+
14
+ def self.down
15
+ drop_table :addresses
16
+ end
17
+ end
@@ -0,0 +1,16 @@
1
+ class CreateCustomers < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :customers do |t|
4
+ t.string :firstname
5
+ t.string :lastname
6
+ t.string :ip
7
+ t.string :email, :null => false
8
+
9
+ t.timestamps
10
+ end
11
+ end
12
+
13
+ def self.down
14
+ drop_table :customers
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ class CreateDummyUsers < ActiveRecord::Migration
2
+ def self.up
3
+ c = "admin"
4
+ Opensteam::UserBase::Admin.create :firstname => c, :lastname => c, :salt => "qwert",
5
+ :email => "#{c}@shop.com", :password => c,
6
+ :password_confirmation => c, :login => c
7
+
8
+
9
+ end
10
+
11
+ def self.down
12
+ Opensteam::UserBase::Admin.find_by_firstname("admin").destroy rescue nil
13
+
14
+ end
15
+
16
+ end
@@ -0,0 +1,20 @@
1
+ class CreateInventories < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :inventories do |t|
4
+ t.decimal :price, :precision => 9, :scale => 2
5
+ t.text :description
6
+ t.string :version
7
+ t.integer :active, :default => 0
8
+ t.integer :back_ordered
9
+ t.integer :storage
10
+
11
+ t.references :product, :polymorphic => true
12
+
13
+ t.timestamps
14
+ end
15
+ end
16
+
17
+ def self.down
18
+ drop_table :inventories
19
+ end
20
+ end
@@ -0,0 +1,14 @@
1
+ class CreateInventoriesProperties < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :inventories_properties do |t|
4
+ t.references :inventory
5
+ t.references :property, :polymorphic => true
6
+
7
+ t.timestamps
8
+ end
9
+ end
10
+
11
+ def self.down
12
+ drop_table :inventories_properties
13
+ end
14
+ end
@@ -0,0 +1,16 @@
1
+ class CreateOrderItems < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :order_items do |t|
4
+ t.references :order
5
+ t.integer :quantity
6
+ t.string :itemid
7
+ t.references :inventory
8
+
9
+ t.timestamps
10
+ end
11
+ end
12
+
13
+ def self.down
14
+ drop_table :order_items
15
+ end
16
+ end
@@ -0,0 +1,18 @@
1
+ class CreateOrders < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :orders do |t|
4
+ t.references :customer
5
+ t.references :payment_type
6
+ t.references :shipping_address
7
+ t.references :payment_address
8
+ t.integer :shipped, :default => 0
9
+ t.integer :paid, :default => 0
10
+
11
+ t.timestamps
12
+ end
13
+ end
14
+
15
+ def self.down
16
+ drop_table :orders
17
+ end
18
+ end
@@ -0,0 +1,13 @@
1
+ class CreatePaymentTypes < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :payment_types do |t|
4
+ t.string :name
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+
10
+ def self.down
11
+ drop_table :payment_types
12
+ end
13
+ end
@@ -0,0 +1,12 @@
1
+ class CreateProperties < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :properties do |t|
4
+ t.string :type
5
+ t.timestamps
6
+ end
7
+ end
8
+
9
+ def self.down
10
+ drop_table :properties
11
+ end
12
+ end
@@ -0,0 +1,16 @@
1
+ class CreateSessions < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :sessions do |t|
4
+ t.string :session_id, :null => false
5
+ t.text :data
6
+ t.timestamps
7
+ end
8
+
9
+ add_index :sessions, :session_id
10
+ add_index :sessions, :updated_at
11
+ end
12
+
13
+ def self.down
14
+ drop_table :sessions
15
+ end
16
+ end
@@ -0,0 +1,19 @@
1
+ class CreateUsers < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :users do |t|
4
+ t.string :type
5
+ t.string :firstname
6
+ t.string :lastname
7
+ t.string :login
8
+ t.string :salt
9
+ t.string :hashed_password
10
+ t.string :email
11
+
12
+ t.timestamps
13
+ end
14
+ end
15
+
16
+ def self.down
17
+ drop_table :users
18
+ end
19
+ end
@@ -0,0 +1,18 @@
1
+ class AdministrationMailer < ActionMailer::Base
2
+
3
+ def order_customer(order, sent_at = Time.now )
4
+ recipients order.customer.email
5
+ subject "your order @ opensteam-petstore"
6
+ body :order => order
7
+ from 'petstore@opensteam.net'
8
+ sent_on sent_at
9
+ end
10
+
11
+ def order_admin(order, sent_at = Time.now)
12
+ recipients "m.schaerfer@diamonddogs.cc"
13
+ subject "new order @ opensteam petstore"
14
+ body :order => order
15
+ from 'petstore@opensteam.net'
16
+ sent_on sent_at
17
+ end
18
+ end
@@ -0,0 +1,10 @@
1
+ class InventoriesProperty < ActiveRecord::Base
2
+ belongs_to :inventory
3
+ belongs_to :property, :polymorphic => true
4
+
5
+ alias :real_property :property
6
+ def property() return !property_type ? nil : !property_id ? property_type.constantize.find(:all) : real_property ; end
7
+
8
+
9
+
10
+ end
@@ -0,0 +1,57 @@
1
+
2
+
3
+
4
+
5
+ class Inventory < ActiveRecord::Base
6
+
7
+ def self.property_tables
8
+ @@property_tables ||= Opensteam::Find.find_property_tables
9
+ end
10
+
11
+ #has_many :inventories_products_properties, :dependent => :destroy
12
+ #has_many :products_properties, :through => :inventories_products_properties
13
+ has_many :order_items, :class_name => "Opensteam::OrderBase::OrderItem"
14
+
15
+ belongs_to :product, :polymorphic => true
16
+ has_many_polymorphs :properties, :from => Inventory.property_tables
17
+
18
+ validates_presence_of :price, :storage
19
+
20
+
21
+
22
+
23
+
24
+
25
+ # alias :real_properties :properties
26
+ # def properties
27
+ # inventories_properties.collect(&:property).flatten
28
+ # end
29
+
30
+ # def properties() inventories_properties.collect { |x| x.property }.flatten ; end
31
+
32
+ def self.override_property_accessors
33
+ Opensteam::Find.find_property_tables.each { |accessor|
34
+ new_accessor = ("real_" + accessor.to_s).to_sym
35
+ self.class_eval do
36
+ alias_method new_accessor, accessor
37
+ define_method( accessor ) do
38
+ InventoriesProperty.find(:all, :conditions => { :inventory_id => self.id, :property_id => nil,
39
+ :property_type => accessor.to_s.classify } ).empty? ? self.send( new_accessor ) : accessor.to_s.classify.constantize.find(:all)
40
+ end
41
+ end
42
+ }
43
+
44
+ end
45
+
46
+
47
+ def is_active?() active == 1 ; end
48
+ def is_available?() storage > 0 && is_active? ; end
49
+
50
+ def self.find_by_properties( p )
51
+ find( :all ).collect(&:properties).each { |pp| return (pp - p == [] ) ? true : false }
52
+ end
53
+
54
+
55
+ #Inventory.override_property_accessors
56
+
57
+ end
@@ -0,0 +1,297 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html>
4
+ <head>
5
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
6
+ <title>Ruby on Rails: Welcome aboard</title>
7
+ <style type="text/css" media="screen">
8
+ body {
9
+ margin: 0;
10
+ margin-bottom: 25px;
11
+ padding: 0;
12
+ background-color: #f0f0f0;
13
+ font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana";
14
+ font-size: 13px;
15
+ color: #333;
16
+ }
17
+
18
+ h1 {
19
+ font-size: 28px;
20
+ color: #000;
21
+ }
22
+
23
+ a {color: #03c}
24
+ a:hover {
25
+ background-color: #03c;
26
+ color: white;
27
+ text-decoration: none;
28
+ }
29
+
30
+
31
+ #page {
32
+ background-color: #f0f0f0;
33
+ width: 850px;
34
+ margin: 0;
35
+ margin-left: auto;
36
+ margin-right: auto;
37
+ }
38
+
39
+ #content {
40
+ float: left;
41
+ background-color: white;
42
+ border: 3px solid #aaa;
43
+ border-top: none;
44
+ padding: 25px;
45
+ width: 575px;
46
+ }
47
+
48
+ #sidebar {
49
+ float: right;
50
+ width: 175px;
51
+ }
52
+
53
+ #footer {
54
+ clear: both;
55
+ }
56
+
57
+
58
+ #header, #about, #getting-started {
59
+ padding-left: 75px;
60
+ padding-right: 30px;
61
+ }
62
+
63
+ #header2 {
64
+ padding-left: 150px;
65
+ padding-right: 10px;
66
+ }
67
+
68
+
69
+ #header {
70
+ background-image: url("images/opensteam_logo_web.jpg");
71
+ background-repeat: no-repeat;
72
+ background-position: top left;
73
+ height: 64px;
74
+ }
75
+ #header h1, #header h2 {margin: 0}
76
+ #header h2 {
77
+ color: #888;
78
+ font-weight: normal;
79
+ font-size: 16px;
80
+ }
81
+
82
+
83
+ #about h3 {
84
+ margin: 0;
85
+ margin-bottom: 10px;
86
+ font-size: 14px;
87
+ }
88
+
89
+ #about-content {
90
+ background-color: #ffd;
91
+ border: 1px solid #fc0;
92
+ margin-left: -11px;
93
+ }
94
+ #about-content table {
95
+ margin-top: 10px;
96
+ margin-bottom: 10px;
97
+ font-size: 11px;
98
+ border-collapse: collapse;
99
+ }
100
+ #about-content td {
101
+ padding: 10px;
102
+ padding-top: 3px;
103
+ padding-bottom: 3px;
104
+ }
105
+ #about-content td.name {color: #555}
106
+ #about-content td.value {color: #000}
107
+
108
+ #about-content.failure {
109
+ background-color: #fcc;
110
+ border: 1px solid #f00;
111
+ }
112
+ #about-content.failure p {
113
+ margin: 0;
114
+ padding: 10px;
115
+ }
116
+
117
+
118
+ #getting-started {
119
+ border-top: 1px solid #ccc;
120
+ margin-top: 25px;
121
+ padding-top: 15px;
122
+ }
123
+ #getting-started h1 {
124
+ margin: 0;
125
+ font-size: 20px;
126
+ }
127
+ #getting-started h2 {
128
+ margin: 0;
129
+ font-size: 14px;
130
+ font-weight: normal;
131
+ color: #333;
132
+ margin-bottom: 25px;
133
+ }
134
+ #getting-started ol {
135
+ margin-left: 0;
136
+ padding-left: 0;
137
+ }
138
+ #getting-started li {
139
+ font-size: 18px;
140
+ color: #888;
141
+ margin-bottom: 25px;
142
+ }
143
+ #getting-started li h2 {
144
+ margin: 0;
145
+ font-weight: normal;
146
+ font-size: 18px;
147
+ color: #333;
148
+ }
149
+ #getting-started li p {
150
+ color: #555;
151
+ font-size: 13px;
152
+ }
153
+
154
+
155
+ #search {
156
+ margin: 0;
157
+ padding-top: 10px;
158
+ padding-bottom: 10px;
159
+ font-size: 11px;
160
+ }
161
+ #search input {
162
+ font-size: 11px;
163
+ margin: 2px;
164
+ }
165
+ #search-text {width: 170px}
166
+
167
+
168
+ #sidebar ul {
169
+ margin-left: 0;
170
+ padding-left: 0;
171
+ }
172
+ #sidebar ul h3 {
173
+ margin-top: 25px;
174
+ font-size: 16px;
175
+ padding-bottom: 10px;
176
+ border-bottom: 1px solid #ccc;
177
+ }
178
+ #sidebar li {
179
+ list-style-type: none;
180
+ }
181
+ #sidebar ul.links li {
182
+ margin-bottom: 5px;
183
+ }
184
+
185
+ </style>
186
+ <script type="text/javascript" src="javascripts/prototype.js"></script>
187
+ <script type="text/javascript" src="javascripts/effects.js"></script>
188
+ <script type="text/javascript">
189
+ function about() {
190
+ if (Element.empty('about-content')) {
191
+ new Ajax.Updater('about-content', 'rails/info/properties', {
192
+ method: 'get',
193
+ onFailure: function() {Element.classNames('about-content').add('failure')},
194
+ onComplete: function() {new Effect.BlindDown('about-content', {duration: 0.25})}
195
+ });
196
+ } else {
197
+ new Effect[Element.visible('about-content') ?
198
+ 'BlindUp' : 'BlindDown']('about-content', {duration: 0.25});
199
+ }
200
+ }
201
+
202
+ window.onload = function() {
203
+ $('search-text').value = '';
204
+ $('search').onsubmit = function() {
205
+ $('search-text').value = 'site:rubyonrails.org ' + $F('search-text');
206
+ }
207
+ }
208
+ </script>
209
+ </head>
210
+ <body>
211
+ <div id="page">
212
+ <div id="sidebar">
213
+ <ul id="sidebar-items">
214
+ <li>
215
+ <form id="search" action="http://www.google.com/search" method="get">
216
+ <input type="hidden" name="hl" value="en" />
217
+ <input type="text" id="search-text" name="q" value="site:rubyonrails.org " />
218
+ <input type="submit" value="Search" /> the Rails site
219
+ </form>
220
+ </li>
221
+ <li>
222
+ <h3>OpenSteam</h3>
223
+ <ul class="links">
224
+ <li><a href="http://www.opensteam.net">OpenSteam Wiki</a></li>
225
+ <li><a href="http://www.diamonddogs.cc">DiamondDogs</a></li>
226
+ </ul>
227
+ </li>
228
+
229
+ <li>
230
+ <h3>Join the community</h3>
231
+ <ul class="links">
232
+ <li><a href="http://www.rubyonrails.org/">Ruby on Rails</a></li>
233
+ <li><a href="http://weblog.rubyonrails.org/">Official weblog</a></li>
234
+ <li><a href="http://lists.rubyonrails.org/">Mailing lists</a></li>
235
+ <li><a href="http://wiki.rubyonrails.org/rails/pages/IRC">IRC channel</a></li>
236
+ <li><a href="http://wiki.rubyonrails.org/">Wiki</a></li>
237
+ <li><a href="http://dev.rubyonrails.org/">Bug tracker</a></li>
238
+ </ul>
239
+ </li>
240
+
241
+ <li>
242
+ <h3>Browse the documentation</h3>
243
+ <ul class="links">
244
+ <li><a href="http://api.rubyonrails.org/">Rails API</a></li>
245
+ <li><a href="http://stdlib.rubyonrails.org/">Ruby standard library</a></li>
246
+ <li><a href="http://corelib.rubyonrails.org/">Ruby core</a></li>
247
+ </ul>
248
+ </li>
249
+ </ul>
250
+ </div>
251
+
252
+ <div id="content">
253
+ <div id="header">
254
+ <div id="header2">
255
+ <h1>Welcome aboard</h1>
256
+ <h2>You&rsquo;re riding Ruby on Rails with OpenSteam!</h2>
257
+ </div>
258
+ </div>
259
+
260
+ <div id="about">
261
+ <h3><br /><br /><a href="rails/info/properties" onclick="about(); return false">About your application&rsquo;s environment</a></h3>
262
+ <div id="about-content" style="display: none"></div>
263
+ </div>
264
+
265
+ <div id="getting-started">
266
+ <h1>Getting started</h1>
267
+ <h2>Here&rsquo;s how to get rolling:</h2>
268
+
269
+ <ol>
270
+ <li>
271
+ <h2>Create your databases and edit <tt>config/database.yml</tt></h2>
272
+ <p>Rails needs to know your login and password.</p>
273
+ </li>
274
+
275
+ <li>
276
+ <h2>Use <tt>script/generate opensteam_product &lt;Product&gt;</tt> to create products</h2>
277
+ <p>To see all available options, run it without parameters.</p>
278
+ </li>
279
+
280
+ <li>
281
+ <h2>Use <tt>script/generate opensteam_property &lt;Property&gt;<</tt> to create product-properties</h2>
282
+ <p>To see all available options, run it without parameters.</p>
283
+ </li>
284
+
285
+ <li>
286
+ <h2>Go to <tt>/administration</tt> to configure your products</h2>
287
+ <p>Login: admin<br />Password: admin</p>
288
+ </li>
289
+
290
+ </ol>
291
+ </div>
292
+ </div>
293
+
294
+ <div id="footer">&nbsp;</div>
295
+ </div>
296
+ </body>
297
+ </html>