ruby_storm 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -2
- data/Gemfile.lock +1 -1
- data/README.md +12 -1
- data/bin/storm +2 -5
- data/generators/app.rb +0 -6
- data/generators/console.rb +0 -1
- data/generators/db/reset.rb +14 -0
- data/generators/db/seed.rb +9 -0
- data/generators/start.rb +0 -2
- data/generators/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d15153b99b083d3e2c8f183021c02d702c7f6816
|
4
|
+
data.tar.gz: d28541a7b614bf9164449a7a46cdb4316a60e1bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c68ca744edde8743a5fe522d4e4d14a968392251b0ae01419195d158b5a723841049c5b09799510e3cb1351f818e6ebea150cce28c5c57634ffbb213aa76963
|
7
|
+
data.tar.gz: 76bad960dbc4d9451ae822c0c3610a2e771af626d7bb2ce7065b2ad19bb33ac9fb71cf74080ee968910e528a1a027c65193b91de42dc4084a0465700113cd070
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
[![Ruby Storm](https://img.shields.io/badge/Ruby Storm-Ruby%20Stand%20alone%20object%20relational%20mapper-blue.svg)](Ruby Storm)
|
1
|
+
[![Ruby Storm](https://img.shields.io/badge/Ruby Storm-Ruby%20Stand%20alone%20object%20relational%20mapper-blue.svg)](Ruby Storm)
|
2
2
|
[![Gem Version](https://badge.fury.io/rb/ruby_storm.svg)](http://badge.fury.io/rb/ruby_storm)
|
3
3
|
[![Downloads](https://img.shields.io/gem/dt/ruby_storm/stable.svg)](https://img.shields.io/gem/dt/ruby_storm)
|
4
4
|
[![Inline docs](http://inch-ci.org/github/wouterken/ruby_storm.svg?branch=master)](http://inch-ci.org/github/wouterken/ruby_storm)
|
@@ -23,6 +23,17 @@ gem install ruby_storm
|
|
23
23
|
storm init my_new_project
|
24
24
|
cd my_new_project
|
25
25
|
````
|
26
|
+
|
27
|
+
* You can edit the ./db/database.yml file to use alternate DB configurations. Read the [ActiveRecord](https://github.com/rails/rails/tree/master/activerecord) documentation for more details.
|
28
|
+
|
29
|
+
* DB create/drop commands
|
30
|
+
|
31
|
+
|
32
|
+
````
|
33
|
+
storm db:create
|
34
|
+
storm db:drop
|
35
|
+
````
|
36
|
+
|
26
37
|
* Generating a new model (and migration in a project)
|
27
38
|
|
28
39
|
````
|
data/bin/storm
CHANGED
@@ -12,11 +12,8 @@ module Storm
|
|
12
12
|
generator(names)
|
13
13
|
|
14
14
|
if klass = generator(names)
|
15
|
-
|
15
|
+
Storm.load_environment unless [
|
16
16
|
"Storm::Init",
|
17
|
-
"Storm::Console",
|
18
|
-
"Storm::Start",
|
19
|
-
"Storm::App",
|
20
17
|
"Storm::Version"
|
21
18
|
].include? klass.name
|
22
19
|
klass.start(args[1..-1])
|
@@ -37,7 +34,7 @@ module Storm
|
|
37
34
|
require "awesome_print"
|
38
35
|
require 'bundler'
|
39
36
|
::Bundler.require(:default, :development)
|
40
|
-
Dir["./**/*.rb"].each{|file| next if /db
|
37
|
+
Dir["./**/*.rb"].each{|file| next if /db\// =~ file; require file }
|
41
38
|
end
|
42
39
|
|
43
40
|
def self.generator(names)
|
data/generators/app.rb
CHANGED
@@ -3,12 +3,6 @@ require 'fileutils'
|
|
3
3
|
module Storm
|
4
4
|
class App
|
5
5
|
def self.start(args)
|
6
|
-
require 'thread_safe'
|
7
|
-
require 'active_record'
|
8
|
-
require "awesome_print"
|
9
|
-
require 'bundler'
|
10
|
-
::Bundler.require(:default, :development)
|
11
|
-
Dir["./**/*.rb"].each{|file| next if /db\/migrate/ =~ file; require file }
|
12
6
|
project_name = File.basename(Dir.pwd)
|
13
7
|
class_name = Inflector::classify(project_name)
|
14
8
|
Inflector::constantize(class_name).send(ARGV[1], ARGV[2..-1])
|
data/generators/console.rb
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
require_relative "db_command"
|
2
|
+
require_relative "create"
|
3
|
+
require_relative "migrate"
|
4
|
+
require_relative "seed"
|
5
|
+
|
6
|
+
module Storm::Db
|
7
|
+
class Reset < Storm::DBCommand
|
8
|
+
def self.start (*args)
|
9
|
+
Storm::Db::Create.start(*args)
|
10
|
+
Storm::Db::Migrate.start(*args)
|
11
|
+
Storm::Db::Seed.start(*args)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/generators/start.rb
CHANGED
data/generators/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_storm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wouter Coppieters
|
@@ -116,7 +116,9 @@ files:
|
|
116
116
|
- generators/db/migrate.rb
|
117
117
|
- generators/db/migration_generator.rb
|
118
118
|
- generators/db/modify.rb
|
119
|
+
- generators/db/reset.rb
|
119
120
|
- generators/db/rollback.rb
|
121
|
+
- generators/db/seed.rb
|
120
122
|
- generators/db/version.rb
|
121
123
|
- generators/init.rb
|
122
124
|
- generators/start.rb
|