Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 133 lines (75 sloc) 5.686 kb
d3b4139 @kristianmandrup initial commit
authored
1 h1. Tiramizoo web app
2
3 Web application for customers to order deliveries and for various roles to sign up and maintain their profile and see stats.
4
5 h2. Infrastructure
6
7 * Rails 3 (web app framework)
8 * Mongoid 2 (Document oriented data store)
9 * Cream (Roles etc.)
10 * Devise (Authentication)
11 * CanCan (Authorization)
d6c7b20 @kristianmandrup using rspec 2
authored
12 * Slim (Template system) https://github.com/stonean/slim
13
14 h2. Setup
15
16 Rails Wizard (tiramizoo)
17
18 http://railswizard.org/f8c0bcd629a3378401cb
19
20 h3. RSpec 2 setup
21
22 In Gemfile
23 <pre>
24 gem "rspec-rails", ">= 2.0.1"
25 </pre>
26
27 Run generator
28 <pre>
29 script/rails generate rspec:install
30 </pre>
d3b4139 @kristianmandrup initial commit
authored
31
dbb0a82 @kristianmandrup updated model with more tests and validations
authored
32 h2. Validations
33
34 http://omgbloglol.com/post/392895742/improved-validations-in-rails-3
35 http://lindsaar.net/2010/1/31/validates_rails_3_awesome_is_true
36
2846ace @kristianmandrup updated README
authored
37 h2. CAPTCHA
38
39 https://github.com/ambethia/recaptcha
40
41 Get keys: http://www.google.com/recaptcha/whyrecaptcha
42
43 environment.rb
44 <pre>
45 recaptcha_tags :public_key => '6Lc6BAAAAAAAAChqRbQZcn_yyyyyyyyyyyyyyyyy'
46 </pre>
47
48 Later in a controller...
49
50 <pre>
51 verify_recaptcha :private_key => '6Lc6BAAAAAAAAKN3DRm6VA_xxxxxxxxxxxxxxxxx'
52 </pre>
53
54 h2. Image upload
55
971a043 @kristianmandrup updated README with formtastic and compass
authored
56 Carrierwave
57
2846ace @kristianmandrup updated README
authored
58 http://techblog.moviepilot.com/carrierwave-as-a-replacement-for-paperclip
59
971a043 @kristianmandrup updated README with formtastic and compass
authored
60 h2. Form builder
61
62 Formtastic
63
64 https://github.com/justinfrench/formtastic
65
66 h2. CSS with SASS
67
68 Compass (with blueprint?)
69
52532a8 @kristianmandrup added lemonade for css sprites
authored
70 https://github.com/chriseppstein/compass
71
72 Lemonade (CSS Sprites)
73
74 https://github.com/hagenburger/lemonade
971a043 @kristianmandrup updated README with formtastic and compass
authored
75
3d4ba5a @kristianmandrup infrastructure setup ok
authored
76 h2. Google Maps
77
78 https://github.com/jlecour/geokit-rails3/
79
80 - Distance calculations, for both flat and spherical environments. For example, given the location of two points on the earth, you can calculate the miles/Km between them.
81
82 - IP-based location lookup utilizing hostip.info. Provide an IP address, and get city name and latitude/longitude in return
83
84 - A before_filter helper to geocoder the user's location based on IP address, and retain the location in a cookie.
85
86 - Geocoding from multiple providers. It provides a fail-over mechanism, in case your input fails to geocode in one service. Geocoding is provided buy the Geokit gem, which you must have installed
87
88 h3. Google Maps with Rails – How to
89
90 http://www.developer.com/open/article.php/10930_3757576_1
91
92 Google map directions
93
94 http://code.google.com/apis/maps/documentation/javascript/v2/services.html
95
96 h3. Travel Modes
97
98 By default, directions are assumed to be driving directions though you may request other modes of travel by passing a GTravelMode when calling the Directions.load() method. The following travel modes are supported:
99
100 * G_TRAVEL_MODE_DRIVING indicates standard driving directions using the road network
101 * G_TRAVEL_MODE_WALKING requests walking directions via pedestrian paths & sidewalks (where available.)
102
103 Note: Walking directions may sometimes not include clear pedestrian paths, so walking directions are only supported if you have supplied a in the GDirections constructor; this is used to display a warning to the user in the returned turn-by-turn textual directions. If you do not have such a , a request for walking directions will return an error.
104
105 h3. Handling Returned Directions
106
107 If the GDirections object was constructed with a supplied GMap2 object, then the returned directions will contain a polyline overlay. If the GDirections object was constructed with a supplied element, then the returned directions will contain a GRoute object, containing a set of GStep objects. (If the directions consist of multi-point directions, the returned directions will contain multiple GRoute objects, each consisting of a series of GStep objects.)
108 Note that the directions object is not populated with this return information immediately. For this reason, the GDirections object defines a "load" event which you can intercept to determine this state.
109
110 Once directions are returned, by default, the map will display a polyline showing the route, while textual directions will display within the supplied for that purpose. The GDirections object will also internally store results which you can retrieve using GDirections.getPolyline() and/or GDirections.getRoute(i:Number) methods. Steps within a route can be retrieved using the GRoute.getStep(i:Number) method and the HTML summary of that step can be retrieved using GStep.getDescriptionHtml(). (See Routes and Steps below.)
111
112 The GDirections object also fires three events which you can intercept:
113
114 * "load": This event is triggered when a directions result successfully returns, but before any overlay elements are added to the map/panel.
115 * "addoverlay": This event is triggered after the polyline and/or textual directions components are added to the map and/or DIV elements.
116
117 h3. Routes and Steps
118
119 The GDirections object also supports multi-point directions, which can be constructed using the GDirections.loadFromWaypoints() method. This method takes an array of textual input addresses or textual lat/lon points. Each separate waypoint is computed as a separate route and returned in a separate GRoute object, each of which contains a series of GStep objects.
120
121 GRoute objects store the number of steps (of type GStep for that route, the starting and ending geocode for that route, and other computed information such as distance, duration, and exact lat/lon of the endpoint (which may be different than the ending geocode if the geocode does not lie on a road segment). Each GStep object as well contains the description for that text (e.g. "Merge onto US-101 S via the ramp to San Jose") plus computed information including the distance, duration, and exact lat/lon as well.
122
123 Example:
124
125 http://code.google.com/apis/maps/documentation/javascript/v2/examples/directions-simple.html
126
d3b4139 @kristianmandrup initial commit
authored
127 h2. Copyright
128
129 2010 Tiramizoo.com
130
131
132
Something went wrong with that request. Please try again.