skiima 0.2.011 → 0.3.0
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 +8 -8
- data/README.md +20 -3
- data/Rakefile +4 -1
- data/lib/skiima.rb +4 -4
- data/lib/skiima/i18n.rb +5 -2
- data/lib/skiima/railties/skiima.rake +16 -7
- data/lib/skiima/version.rb +1 -1
- data/spec/db/skiima/dependencies.yml +23 -1
- data/spec/spec_helper.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YTA4YWVkN2QzYjFmYTkxNDYyODk1YTRiNDVmNDI5OTg1OGQxNWUwYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZmQ1YmFmNjE4Y2Q0ZWQzY2M1NDlmOGFmOWIxMzEzODM4NDFhMjNiNA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MzUyNzIxMTRlYzU0NGNhZjYyODhlYmFhNWI3N2M4YzY2NzMyZjQ0NTE0NDNi
|
10
|
+
N2E4ZmNiZTMwMTk5ZDYzOTk1ZjEzOTYyNWY3ZDcxYzg4YjcwODNkZWIzNmIz
|
11
|
+
MGNhMjNmZmUxNGY0NDE3OTYxZTFkOGY2OTUwNDkzODVmMzYxNWQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NzQ3OTg0NTg5YmMxYzZlOTZiZjg2NjM5NzlhMjgwMjU1ZWJjOGMzNTdjYzA4
|
14
|
+
ZTIwMzI1N2U5MTU2MThjNWEyYWJiMTEwYzExZGIxMDcwNTE4YzU5YzQ2MGVm
|
15
|
+
ZjljN2IwNWQxNDM3ZmJiMzJmYWYwMGNkYjU0MmI3ZWYzOWFmZTM=
|
data/README.md
CHANGED
@@ -76,12 +76,29 @@ script_group_name:
|
|
76
76
|
mysql:
|
77
77
|
current:
|
78
78
|
- view.script_name
|
79
|
-
default:
|
80
|
-
test:
|
81
|
-
- script_group_name
|
82
79
|
dependency_group_name:
|
83
80
|
- script_group_name
|
84
81
|
|
82
|
+
# load/drop these script groups with:
|
83
|
+
# `rake skiima:up` & `rake skiima:down`
|
84
|
+
# List migrations you have already squashed
|
85
|
+
# - IE migrations that you removed to rely on schema.rb
|
86
|
+
default:
|
87
|
+
- script_group_a
|
88
|
+
- script_group_b
|
89
|
+
- script_group_c
|
90
|
+
|
91
|
+
# load/drop these script groups with:
|
92
|
+
# `rake skiima:test:up` & `rake skiima:test:down`
|
93
|
+
# For tests/CI!
|
94
|
+
# List migrations that need to be run after a blank db is migrated
|
95
|
+
# - IE migrations that you squashed, if you are migrating from scratch on CI
|
96
|
+
# - If relying on db/schema.rb for CI, then list the groups you need for tests
|
97
|
+
test:
|
98
|
+
- script_group_a
|
99
|
+
- script_group_b
|
100
|
+
- script_group_c
|
101
|
+
|
85
102
|
```
|
86
103
|
|
87
104
|
#### Running tests with your new Skiima Script Group
|
data/Rakefile
CHANGED
@@ -16,9 +16,10 @@ task :default => :test
|
|
16
16
|
|
17
17
|
namespace :skiima do
|
18
18
|
|
19
|
+
desc "Run Skiima#setup as precursor to rake"
|
19
20
|
task :setup do
|
20
21
|
Skiima.setup do |config|
|
21
|
-
config.root_path =
|
22
|
+
config.root_path = File.join(Skiima.root_path, 'spec')
|
22
23
|
config.config_path = 'config'
|
23
24
|
config.scripts_path = 'db/skiima'
|
24
25
|
config.locale = :en
|
@@ -28,6 +29,7 @@ namespace :skiima do
|
|
28
29
|
namespace :setup do
|
29
30
|
namespace :db do
|
30
31
|
|
32
|
+
desc "Setup postgresql test databases to run specs"
|
31
33
|
task :postgresql => :'skiima:setup' do
|
32
34
|
env = :postgresql_root
|
33
35
|
test_env = :postgresql_test
|
@@ -37,6 +39,7 @@ namespace :skiima do
|
|
37
39
|
Skiima.up(env, :init_test_db, vars: vars)
|
38
40
|
end
|
39
41
|
|
42
|
+
desc "Setup postgresql test databases to run specs"
|
40
43
|
task :mysql => :'skiima:setup' do
|
41
44
|
env = :mysql_root
|
42
45
|
test_env = :mysql_test
|
data/lib/skiima.rb
CHANGED
@@ -32,20 +32,20 @@ module Skiima
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def self.setup
|
35
|
-
yield config
|
35
|
+
yield config if config && block_given?
|
36
36
|
set_translation_repository
|
37
37
|
end
|
38
38
|
|
39
39
|
require 'skiima/railtie' if defined?(Rails) && Rails::VERSION::MAJOR >= 3
|
40
40
|
|
41
41
|
def self.defaults
|
42
|
-
{ root_path: '
|
42
|
+
{ root_path: File.expand_path('.'),
|
43
43
|
config_path: 'config',
|
44
44
|
database_yml: 'database.yml',
|
45
45
|
scripts_path: 'db/skiima',
|
46
46
|
dependencies_yml: 'dependencies.yml',
|
47
47
|
interpolator: '&',
|
48
|
-
locale:
|
48
|
+
locale: :en,
|
49
49
|
logging_out: 'STDOUT',
|
50
50
|
logging_level: '3' }
|
51
51
|
end
|
@@ -88,4 +88,4 @@ module Skiima
|
|
88
88
|
class AdapterNotSpecified < BaseException; end
|
89
89
|
class LoadError < BaseException; end
|
90
90
|
class StatementInvalid < BaseException; end
|
91
|
-
end
|
91
|
+
end
|
data/lib/skiima/i18n.rb
CHANGED
@@ -2,27 +2,36 @@ require "skiima"
|
|
2
2
|
|
3
3
|
namespace :skiima do
|
4
4
|
|
5
|
-
desc "
|
6
|
-
task :
|
5
|
+
desc "Run Skiima#setup as precursor to rake"
|
6
|
+
task :setup do
|
7
|
+
Skiima.setup do |config|
|
8
|
+
config.config_path = 'config'
|
9
|
+
config.scripts_path = 'db/skiima'
|
10
|
+
config.locale = :en
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
desc "Runs Skiima.up for :default group in dependencies.yml (Run on Dev for squashed migrations)"
|
15
|
+
task :up, [:group, :skiima_env] => :setup do |t,args|
|
7
16
|
args.with_defaults(:skiima_env => 'development', :group => 'default')
|
8
17
|
Skiima.up(args.skiima_env.to_sym, args.group.to_sym)
|
9
18
|
end
|
10
19
|
|
11
20
|
desc "Runs Skiima.down for :default group in dependencies.yml"
|
12
|
-
task :down, [:
|
21
|
+
task :down, [:group, :skiima_env] => :setup do |t,args|
|
13
22
|
args.with_defaults(:skiima_env => 'development', :group => 'default')
|
14
23
|
Skiima.down(args.skiima_env.to_sym, args.group.to_sym)
|
15
24
|
end
|
16
25
|
|
17
|
-
namespace :test
|
18
|
-
desc "Runs Skiima.up for :test group in dependencies.yml"
|
19
|
-
task :up do
|
26
|
+
namespace :test do
|
27
|
+
desc "Runs Skiima.up for :test group in dependencies.yml (Run on CI for squashed migrations)"
|
28
|
+
task :up, [:group, :skiima_env] => :setup do |t,args|
|
20
29
|
args.with_defaults(:skiima_env => 'test', :group => 'test')
|
21
30
|
Skiima.up(args.skiima_env.to_sym, args.group.to_sym)
|
22
31
|
end
|
23
32
|
|
24
33
|
desc "Runs Skiima.down for :test group in dependencies.yml"
|
25
|
-
task :test, [:
|
34
|
+
task :test, [:group, :skiima_env] => :setup do |t,args|
|
26
35
|
args.with_defaults(:skiima_env => 'test', :group => 'test')
|
27
36
|
Skiima.down(args.skiima_env.to_sym, args.group.to_sym)
|
28
37
|
end
|
data/lib/skiima/version.rb
CHANGED
@@ -63,4 +63,26 @@ test_script_groups:
|
|
63
63
|
- test_table
|
64
64
|
- test_column_names
|
65
65
|
- test_index
|
66
|
-
- test_schema
|
66
|
+
- test_schema
|
67
|
+
|
68
|
+
|
69
|
+
# load/drop these script groups with:
|
70
|
+
# `rake skiima:test:up` & `rake skiima:test:down`
|
71
|
+
# List migrations you have already squashed
|
72
|
+
# - IE migrations that you removed to rely on schema.rb
|
73
|
+
#default:
|
74
|
+
#- script_group_a
|
75
|
+
#- script_group_b
|
76
|
+
#- script_group_c
|
77
|
+
|
78
|
+
# load/drop these script groups with:
|
79
|
+
# `rake skiima:test:up` & `rake skiima:test:down`
|
80
|
+
# For tests/CI!
|
81
|
+
# List migrations that need to be run after a blank db is migrated
|
82
|
+
# - IE migrations that you squashed, if you are migrating from scratch on CI
|
83
|
+
# - If relying on CI for
|
84
|
+
#test:
|
85
|
+
#- script_group_a
|
86
|
+
#- script_group_b
|
87
|
+
#- script_group_c
|
88
|
+
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: skiima
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Conner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-04-
|
11
|
+
date: 2013-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fast_gettext
|