schema_to_scaffold 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,34 +1,41 @@
1
- # Schema to Scaffold #
1
+ Schema to Scaffold
2
+ ==================
2
3
 
3
- Generate rails scaffold pages based on a rails database schema you already have.
4
+ After I cross with rake db:schema:dump I felt that it could do a litle more in my case. So here it is.
4
5
 
5
- Use your schema.rb file from `<rails_app>/db` or generated with `rake db:schema:dump`
6
+ Usage
7
+ -------
6
8
 
9
+ The code is very simple and the usage is not friendly but almost.
7
10
 
8
- SchemaToScaffold will generate rails scaffolding scripts by table like this:
11
+ 1. download the zip (or copy paste de code)
12
+ 2. extract to folder
13
+ 3. cd folder
14
+ 4. if your projects are outside your user folder: edit the main.rb and change the path to point to your schema.rb (generated with the rake db:schema:dump)
15
+ 5. ruby main.rb
16
+ 6. chose the path to your schema.rb
17
+ 7. chose your table
18
+ 8. copy the rails generate scaffold command
9
19
 
10
- rails g scaffold users fname:string lname:string bdate:date email:string encrypted_password:string
20
+ * Eight quick steps that will save you a lot of time
21
+ * It will give some alerts if your names are not following the rails convention.
11
22
 
23
+ read a litle about [rails convention](http://itsignals.cascadia.com.au/?p=7)
12
24
 
13
- ## Installation ##
25
+ Contributing
26
+ ------------
14
27
 
15
- We assume you have rubygems-bundler installed, just type:
28
+ Want to contribute? Great!
16
29
 
17
- gem install schema_to_scaffold
30
+ 1. Fork it.
31
+ 2. Create a branch (`git checkout -b my_schema_to_scafold`)
32
+ 3. Commit your changes (`git commit -am "Added great stuff"`)
33
+ 4. Push to the branch (`git push origin my_schema_to_scafold`)
34
+ 5. Open a [Pull Request][1]
35
+ 6. That's all!!
18
36
 
37
+ [1]: http://github.com/frenesim/schema_to_scaffold/pulls
19
38
 
20
- ## Usage ##
21
-
22
- Just type:
23
-
24
- scaffold /path/to/your/schema.rb
25
-
26
- or if you are using linux you can use -c
27
-
28
- scaffold /path/to/your/schema.rb -c
29
-
30
- to have the script copied to your clipboard, you will need to have xclip installed(see below).
31
-
32
- ### To install xclip ###
33
-
34
- sudo apt-get install xclip
39
+ Colaborate
40
+ ------------
41
+ if you want to colaborate send me an email please.
@@ -1,3 +1,3 @@
1
1
  module SchemaToScaffold
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -7,7 +7,7 @@ Gem::Specification.new do |gem|
7
7
  gem.name = "schema_to_scaffold"
8
8
  gem.version = SchemaToScaffold::VERSION
9
9
  gem.authors = ["Humberto Pinto", "João Soares"]
10
- gem.email = ["h.lsp999@gmail.com", "jsoaresgeral@gmail.com"]
10
+ gem.email = ["hlsp999@gmail.com", "jsoaresgeral@gmail.com"]
11
11
  gem.description = <<-EOD
12
12
  Command line app which parses a schema.rb file obtained from your rails repo or by running rake:schema:dump
13
13
  EOD
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schema_to_scaffold
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,14 +10,14 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-11-26 00:00:00.000000000 Z
13
+ date: 2012-11-27 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: ! ' Command line app which parses a schema.rb file obtained from your
16
16
  rails repo or by running rake:schema:dump
17
17
 
18
18
  '
19
19
  email:
20
- - h.lsp999@gmail.com
20
+ - hlsp999@gmail.com
21
21
  - jsoaresgeral@gmail.com
22
22
  executables:
23
23
  - scaffold