turbo-generators 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +77 -1
- data/VERSION +1 -1
- data/turbo-generators.gemspec +1 -1
- metadata +1 -1
data/README.rdoc
CHANGED
@@ -1 +1,77 @@
|
|
1
|
-
|
1
|
+
= Welcome to turbo-generators
|
2
|
+
This is a work in progress. It's my first attempt at writing a gem. Well I say 'write' when I actually mean 'copy'.
|
3
|
+
Much of the code has been shamelessly stolen from ryanb's nifty-generators. Thanks ryan.
|
4
|
+
The reason I have created a brand new gem is because it does one or two extra things.
|
5
|
+
|
6
|
+
|
7
|
+
The gem is quite quirky right now in version 0.0.1 and is probably only really of use to myself in it's current state.
|
8
|
+
|
9
|
+
|
10
|
+
= Installation
|
11
|
+
|
12
|
+
First make sure that you have gemcutter gem installed and tumbled by doing:
|
13
|
+
gem install gemcutter
|
14
|
+
gem tumble
|
15
|
+
(don't forget to use 'sudo' command if you are on mac or linux)
|
16
|
+
|
17
|
+
Then install the turbo-generators:
|
18
|
+
|
19
|
+
gem install turbo-generators
|
20
|
+
|
21
|
+
|
22
|
+
= Usage:
|
23
|
+
I created the gem to be used along with my rails application template - http://github.com/murdoch/rails-templates
|
24
|
+
You can create a rails app using that template by typing:
|
25
|
+
rails my_app -m http://github.com/murdoch/rails-templates/raw/master/base_template.rb
|
26
|
+
|
27
|
+
= What do these generators do then?
|
28
|
+
|
29
|
+
You will now have access to two new generators that you can run from within your rails apps:
|
30
|
+
* sript/generate turbo_layout
|
31
|
+
* script/generate turbo_blog
|
32
|
+
|
33
|
+
= Gotchas
|
34
|
+
|
35
|
+
Presently the turbo_blog generator requires you to have a user model named user.rb. If you don't then it probably won't work. The easiest way to make sure you hae a model called user.rb is by ryanb' nifty_authentication generator.
|
36
|
+
I would like my gem to be more flexible so in future versions you will be able to accomodate different authentication setups.
|
37
|
+
|
38
|
+
Also, the blog resource that is setup by the turbo_blog generator is by default called Post. This suits me but you might not like that so in future version users will be able to specify a differnent name for the resource. For now though, blog resources will be available from localhost:3000/posts.....
|
39
|
+
You must create a user and login before you can create new posts.
|
40
|
+
|
41
|
+
= About turbo_layout
|
42
|
+
Right now it just creates a simple layout - I will work hard on improving this over the next few weeks as it's quite important to me to have a good starting point.
|
43
|
+
|
44
|
+
The turbo_layout uses blueprint css but it does not use compass or sas yet - this is coming soon once I've figured out how to use them myself.
|
45
|
+
|
46
|
+
Turbo_layout currently looks very dull and very boring but like I said, I'm going to work really hard on getting this up to the standard that I require for my apps.
|
47
|
+
|
48
|
+
= About turbo_blog
|
49
|
+
As mentioned, turbo_blog requires you to have a user model called user.rb setup. This can be achieved by installing ryanb's nifty-generators and running 'script/generate nifty_authenticaion' from within your rails app.
|
50
|
+
|
51
|
+
Future versions of the gem will allow you to specify the name of your user model.
|
52
|
+
|
53
|
+
= Example use
|
54
|
+
|
55
|
+
* create a new rails app by typing:
|
56
|
+
rails test
|
57
|
+
* run ryanb's nifty_authentication generator
|
58
|
+
script/generate nifty_authentication
|
59
|
+
* run turbo_layout generator
|
60
|
+
script/generate turbo_layout
|
61
|
+
* rub turbo_blog generater
|
62
|
+
script/generator turbo_blog
|
63
|
+
* run the migrations
|
64
|
+
rake db:create
|
65
|
+
rake db:migrate
|
66
|
+
|
67
|
+
= How do I see my blog posts?
|
68
|
+
Create a user by going to localhost:3000/signup - Login - Go to localhost:3000/posts
|
69
|
+
|
70
|
+
= Finally.
|
71
|
+
This is my first gem. This is new to me to be honest. I know my generated template presently lacks a lot of features but I need to start somewhere and this gem will get much better. I promise. There's much more to come. If you have any ideas, suggestions or complainst please email me at stephen@stephenmurdoch.eu and I'll see what I can do
|
72
|
+
|
73
|
+
Thanks - and yeah, I know, my code is quite messy, and my template is a bit plain and boring - but I am goign to fix all that soon.
|
74
|
+
|
75
|
+
Steve
|
76
|
+
|
77
|
+
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.1
|
data/turbo-generators.gemspec
CHANGED