bizflow 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf5cc11a92f56b5e3470e220e28363ea4110ba57
|
4
|
+
data.tar.gz: 520b83aefd48673ac46073e06e6ad7c5a8b9978d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 365f84921c9f4b8d71db9b83fb8d55e3b3e6d4ca8b018af84ed9f70ad5be16079bbaf64f7e8a3d3d9ab94c558dd553363915795ca7a8c2df014504b9880c68b4
|
7
|
+
data.tar.gz: 8891c37a7c3d68e2f6228a98f96588a8b10d10510eb544b3d6e5fe35a02e3979da38e46db6cefb82c92510f0af044032d2c04ec6fa6bf4d43f69f935cef1487d
|
@@ -3,6 +3,7 @@ require "bizflow/command/help_command"
|
|
3
3
|
require "bizflow/command/clean_command"
|
4
4
|
require "bizflow/command/install_command"
|
5
5
|
require "bizflow/command/setup_command"
|
6
|
+
require "bizflow/command/migrate_command"
|
6
7
|
|
7
8
|
module Bizflow
|
8
9
|
class CommandHelper
|
@@ -12,7 +13,8 @@ module Bizflow
|
|
12
13
|
:build => Bizflow::BuildCommand,
|
13
14
|
:clean => Bizflow::CleanCommand,
|
14
15
|
:install => Bizflow::InstallComand,
|
15
|
-
:setup => Bizflow::SetupCommand
|
16
|
+
:setup => Bizflow::SetupCommand,
|
17
|
+
:migrate => Bizflow::MigrateCommand
|
16
18
|
}
|
17
19
|
|
18
20
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require "sqlite3"
|
2
|
+
require 'sequel'
|
3
|
+
require 'fileutils'
|
4
|
+
require 'pathname'
|
5
|
+
|
6
|
+
module Bizflow
|
7
|
+
class MigrateCommand
|
8
|
+
|
9
|
+
def self.run(config, args)
|
10
|
+
|
11
|
+
Sequel.extension :migration, :core_extensions
|
12
|
+
|
13
|
+
puts "Bizflow: Migrating database"
|
14
|
+
db_path = config[:db_path] || "bizflow_db/bf.db"
|
15
|
+
db_path = "#{Dir.pwd}/#{db_path}"
|
16
|
+
|
17
|
+
db = Sequel.sqlite(db_path)
|
18
|
+
|
19
|
+
Sequel::Migrator.run(db, File.expand_path("#{File.expand_path(File.dirname(__FILE__))}/../migrations"), :use_transactions=>true)
|
20
|
+
puts "Bizflow: Database migrated"
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -8,10 +8,8 @@ module Bizflow
|
|
8
8
|
|
9
9
|
def self.run(config, args)
|
10
10
|
|
11
|
-
Sequel.extension :migration, :core_extensions
|
12
|
-
|
13
11
|
# Create a database
|
14
|
-
puts "Creating and migrating database for processes..."
|
12
|
+
puts "Bizflow: Creating and migrating database for processes..."
|
15
13
|
|
16
14
|
db_path = config[:db_path] || "bizflow_db/bf.db"
|
17
15
|
db_path = "#{Dir.pwd}/#{db_path}"
|
@@ -21,8 +19,7 @@ module Bizflow
|
|
21
19
|
|
22
20
|
db = Sequel.sqlite(db_path)
|
23
21
|
|
24
|
-
|
25
|
-
puts "Database setup"
|
22
|
+
puts "Bizflow: Database setup"
|
26
23
|
end
|
27
24
|
|
28
25
|
end
|
data/lib/bizflow/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bizflow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DSljukic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sqlite3
|
@@ -137,6 +137,7 @@ files:
|
|
137
137
|
- lib/bizflow/command/command_helper.rb
|
138
138
|
- lib/bizflow/command/help_command.rb
|
139
139
|
- lib/bizflow/command/install_command.rb
|
140
|
+
- lib/bizflow/command/migrate_command.rb
|
140
141
|
- lib/bizflow/command/setup_command.rb
|
141
142
|
- lib/bizflow/config_generator.rb
|
142
143
|
- lib/bizflow/data_model/action.rb
|