ruby_storm 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +84 -1
- data/generators/console.rb +1 -0
- data/generators/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c7e6151c5ed4d97e2d7dc22b9b2f2d2878c91d0
|
4
|
+
data.tar.gz: 350cf19b627ea46f0356b3f75add71d455ae0552
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 483ccedac53f7f5b6648d3c3e1b404f4dc63c38ecd29ac876247a14b77412d8d68056496cc290ea01b4c6dc36162d4f36005c25a5b93eceaa7cbe703b016b65f
|
7
|
+
data.tar.gz: 8c4ead33b151c54b1652e70239cf59cc3b4731adc7edb3fc8149e577ba45ac19976189d0ef5be8c1483611011868978ba7710ff9c912f82f3b246b4f00ca0bad
|
data/README.md
CHANGED
@@ -1 +1,84 @@
|
|
1
|
-
Ruby Storm
|
1
|
+
[![Ruby Storm](https://img.shields.io/badge/Ruby Storm-Ruby%20Stand%20alone%20object%20relational%20mapper-blue.svg)](Ruby Storm)
|
2
|
+
[![Gem Version](https://badge.fury.io/rb/ruby_storm.svg)](http://badge.fury.io/rb/ruby_storm)
|
3
|
+
[![Downloads](https://img.shields.io/gem/dt/ruby_storm/stable.svg)](https://img.shields.io/gem/dt/ruby_storm)
|
4
|
+
[![Inline docs](http://inch-ci.org/github/wouterken/ruby_storm.svg?branch=master)](http://inch-ci.org/github/wouterken/ruby_storm)
|
5
|
+
|
6
|
+
### Ruby Storm
|
7
|
+
|
8
|
+
Ruby Storm is a light-weight **st**and-alone ***o***bject **r**elational **m**apper wrapping the functionality of the Rails active record library into a light-weight tool.
|
9
|
+
|
10
|
+
You can use ruby storm to generate minimal applications with full support for active-record, migrations, basic model generation and an interactive console.
|
11
|
+
|
12
|
+
#### Installation
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
gem install ruby_storm
|
16
|
+
```
|
17
|
+
|
18
|
+
#### Usage
|
19
|
+
|
20
|
+
* Generating a new project
|
21
|
+
|
22
|
+
````
|
23
|
+
storm init my_new_project
|
24
|
+
cd my_new_project
|
25
|
+
````
|
26
|
+
* Generating a new model (and migration in a project)
|
27
|
+
|
28
|
+
````
|
29
|
+
storm db:generate MyModel first_name:string last_name:string order:integer happy:boolean
|
30
|
+
````
|
31
|
+
* Performing migrations
|
32
|
+
|
33
|
+
```
|
34
|
+
storm db:migrate
|
35
|
+
```
|
36
|
+
|
37
|
+
* Rollbacks
|
38
|
+
|
39
|
+
```
|
40
|
+
storm db:rollback
|
41
|
+
STEP=5 storm db:rollback
|
42
|
+
```
|
43
|
+
* Version
|
44
|
+
|
45
|
+
```
|
46
|
+
storm db:version
|
47
|
+
```
|
48
|
+
|
49
|
+
* Update existing models
|
50
|
+
|
51
|
+
```
|
52
|
+
storm db:modify MyModel
|
53
|
+
```
|
54
|
+
|
55
|
+
### Storm console
|
56
|
+
The storm console can be started from the project root directory and will auto-load all of your storm models.
|
57
|
+
|
58
|
+
```
|
59
|
+
storm console
|
60
|
+
```
|
61
|
+
|
62
|
+
### Storm application
|
63
|
+
You storm app can function as a traditional c-style application and has a 'main' entry point in the generated application file.
|
64
|
+
You can start your storm app by executing the following from the project directory.
|
65
|
+
|
66
|
+
```
|
67
|
+
storm start
|
68
|
+
```
|
69
|
+
|
70
|
+
### Tasks
|
71
|
+
You can add additional tasks to your storm application similar to Rake tasks.
|
72
|
+
In the application file add a class function with the name of the task you wish to add. You can then execute that task from the command line with an optional number of arguments.
|
73
|
+
|
74
|
+
```ruby
|
75
|
+
## In main app file.
|
76
|
+
def self.my_task(args)
|
77
|
+
print args
|
78
|
+
end
|
79
|
+
|
80
|
+
## From command line
|
81
|
+
storm app my_task arg1 arg2
|
82
|
+
|
83
|
+
# Outputs => ["arg1", "arg2"]
|
84
|
+
```
|
data/generators/console.rb
CHANGED
data/generators/version.rb
CHANGED