kpm 0.4.2 → 0.5.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 +4 -4
- data/README.md +25 -0
- data/Rakefile +8 -0
- data/kpm.gemspec +1 -0
- data/lib/kpm.rb +2 -0
- data/lib/kpm/account.rb +527 -0
- data/lib/kpm/database.rb +113 -0
- data/lib/kpm/plugins_directory.yml +6 -6
- data/lib/kpm/tasks.rb +105 -0
- data/lib/kpm/version.rb +1 -1
- data/spec/kpm/unit_mysql/account_spec.rb +424 -0
- data/spec/kpm/unit_mysql/account_spec.yml +12 -0
- data/spec/kpm/unit_mysql/account_test_ddl.sql +79 -0
- data/spec/spec_helper.rb +3 -0
- metadata +59 -20
@@ -0,0 +1,79 @@
|
|
1
|
+
|
2
|
+
/*! SET default_storage_engine=INNODB */;
|
3
|
+
|
4
|
+
DROP TABLE IF EXISTS accounts;
|
5
|
+
CREATE TABLE accounts (
|
6
|
+
record_id serial unique,
|
7
|
+
id varchar(36) NOT NULL,
|
8
|
+
external_key varchar(255) NULL,
|
9
|
+
email varchar(128) DEFAULT NULL,
|
10
|
+
name varchar(100) DEFAULT NULL,
|
11
|
+
first_name_length int DEFAULT NULL,
|
12
|
+
currency varchar(3) DEFAULT NULL,
|
13
|
+
billing_cycle_day_local int DEFAULT NULL,
|
14
|
+
parent_account_id varchar(36) DEFAULT NULL,
|
15
|
+
is_payment_delegated_to_parent boolean DEFAULT FALSE,
|
16
|
+
payment_method_id varchar(36) DEFAULT NULL,
|
17
|
+
time_zone varchar(50) NOT NULL,
|
18
|
+
locale varchar(5) DEFAULT NULL,
|
19
|
+
address1 varchar(100) DEFAULT NULL,
|
20
|
+
address2 varchar(100) DEFAULT NULL,
|
21
|
+
company_name varchar(50) DEFAULT NULL,
|
22
|
+
city varchar(50) DEFAULT NULL,
|
23
|
+
state_or_province varchar(50) DEFAULT NULL,
|
24
|
+
country varchar(50) DEFAULT NULL,
|
25
|
+
postal_code varchar(16) DEFAULT NULL,
|
26
|
+
phone varchar(25) DEFAULT NULL,
|
27
|
+
notes varchar(4096) DEFAULT NULL,
|
28
|
+
migrated boolean default false,
|
29
|
+
is_notified_for_invoices boolean NOT NULL,
|
30
|
+
created_date datetime NOT NULL,
|
31
|
+
created_by varchar(50) NOT NULL,
|
32
|
+
updated_date datetime DEFAULT NULL,
|
33
|
+
updated_by varchar(50) DEFAULT NULL,
|
34
|
+
tenant_record_id bigint /*! unsigned */ not null default 0,
|
35
|
+
PRIMARY KEY(record_id)
|
36
|
+
) /*! CHARACTER SET utf8 COLLATE utf8_bin */;
|
37
|
+
CREATE UNIQUE INDEX accounts_id ON accounts(id);
|
38
|
+
CREATE UNIQUE INDEX accounts_external_key ON accounts(external_key, tenant_record_id);
|
39
|
+
CREATE INDEX accounts_tenant_record_id ON accounts(tenant_record_id);
|
40
|
+
|
41
|
+
DROP TABLE IF EXISTS account_history;
|
42
|
+
CREATE TABLE account_history (
|
43
|
+
record_id serial unique,
|
44
|
+
id varchar(36) NOT NULL,
|
45
|
+
target_record_id bigint /*! unsigned */ not null,
|
46
|
+
external_key varchar(255) NULL,
|
47
|
+
email varchar(128) DEFAULT NULL,
|
48
|
+
name varchar(100) DEFAULT NULL,
|
49
|
+
first_name_length int DEFAULT NULL,
|
50
|
+
currency varchar(3) DEFAULT NULL,
|
51
|
+
billing_cycle_day_local int DEFAULT NULL,
|
52
|
+
parent_account_id varchar(36) DEFAULT NULL,
|
53
|
+
payment_method_id varchar(36) DEFAULT NULL,
|
54
|
+
is_payment_delegated_to_parent boolean default false,
|
55
|
+
time_zone varchar(50) NOT NULL,
|
56
|
+
locale varchar(5) DEFAULT NULL,
|
57
|
+
address1 varchar(100) DEFAULT NULL,
|
58
|
+
address2 varchar(100) DEFAULT NULL,
|
59
|
+
company_name varchar(50) DEFAULT NULL,
|
60
|
+
city varchar(50) DEFAULT NULL,
|
61
|
+
state_or_province varchar(50) DEFAULT NULL,
|
62
|
+
country varchar(50) DEFAULT NULL,
|
63
|
+
postal_code varchar(16) DEFAULT NULL,
|
64
|
+
phone varchar(25) DEFAULT NULL,
|
65
|
+
notes varchar(4096) DEFAULT NULL,
|
66
|
+
migrated boolean default false,
|
67
|
+
is_notified_for_invoices boolean NOT NULL,
|
68
|
+
change_type varchar(6) NOT NULL,
|
69
|
+
created_by varchar(50) NOT NULL,
|
70
|
+
created_date datetime NOT NULL,
|
71
|
+
updated_by varchar(50) NOT NULL,
|
72
|
+
updated_date datetime NOT NULL,
|
73
|
+
tenant_record_id bigint /*! unsigned */ not null default 0,
|
74
|
+
PRIMARY KEY(record_id)
|
75
|
+
) /*! CHARACTER SET utf8 COLLATE utf8_bin */;
|
76
|
+
CREATE INDEX account_history_target_record_id ON account_history(target_record_id);
|
77
|
+
CREATE INDEX account_history_tenant_record_id ON account_history(tenant_record_id);
|
78
|
+
|
79
|
+
SELECT DATABASE();
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,72 +1,73 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kpm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kill Bill core team
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
+
name: highline
|
14
15
|
requirement: !ruby/object:Gem::Requirement
|
15
16
|
requirements:
|
16
17
|
- - "~>"
|
17
18
|
- !ruby/object:Gem::Version
|
18
19
|
version: 1.6.21
|
19
|
-
name: highline
|
20
|
-
prerelease: false
|
21
20
|
type: :runtime
|
21
|
+
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 1.6.21
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
+
name: nexus_cli
|
28
29
|
requirement: !ruby/object:Gem::Requirement
|
29
30
|
requirements:
|
30
31
|
- - "~>"
|
31
32
|
- !ruby/object:Gem::Version
|
32
33
|
version: 4.1.0
|
33
|
-
name: nexus_cli
|
34
|
-
prerelease: false
|
35
34
|
type: :runtime
|
35
|
+
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 4.1.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
+
name: thor
|
42
43
|
requirement: !ruby/object:Gem::Requirement
|
43
44
|
requirements:
|
44
45
|
- - "~>"
|
45
46
|
- !ruby/object:Gem::Version
|
46
47
|
version: 0.19.1
|
47
|
-
name: thor
|
48
|
-
prerelease: false
|
49
48
|
type: :runtime
|
49
|
+
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 0.19.1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubyzip
|
56
57
|
requirement: !ruby/object:Gem::Requirement
|
57
58
|
requirements:
|
58
59
|
- - "~>"
|
59
60
|
- !ruby/object:Gem::Version
|
60
61
|
version: 1.2.0
|
61
|
-
name: rubyzip
|
62
|
-
prerelease: false
|
63
62
|
type: :runtime
|
63
|
+
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 1.2.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
70
71
|
requirement: !ruby/object:Gem::Requirement
|
71
72
|
requirements:
|
72
73
|
- - ">="
|
@@ -75,9 +76,8 @@ dependencies:
|
|
75
76
|
- - "<"
|
76
77
|
- !ruby/object:Gem::Version
|
77
78
|
version: 11.0.0
|
78
|
-
name: rake
|
79
|
-
prerelease: false
|
80
79
|
type: :development
|
80
|
+
prerelease: false
|
81
81
|
version_requirements: !ruby/object:Gem::Requirement
|
82
82
|
requirements:
|
83
83
|
- - ">="
|
@@ -87,19 +87,33 @@ dependencies:
|
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: 11.0.0
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
|
+
name: rspec
|
90
91
|
requirement: !ruby/object:Gem::Requirement
|
91
92
|
requirements:
|
92
93
|
- - "~>"
|
93
94
|
- !ruby/object:Gem::Version
|
94
95
|
version: 2.12.0
|
95
|
-
name: rspec
|
96
|
-
prerelease: false
|
97
96
|
type: :development
|
97
|
+
prerelease: false
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
100
|
- - "~>"
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: 2.12.0
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: killbill-client
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - "~>"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '1.0'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - "~>"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '1.0'
|
103
117
|
description: A package manager for Kill Bill.
|
104
118
|
email: killbilling-users@googlegroups.com
|
105
119
|
executables:
|
@@ -116,10 +130,12 @@ files:
|
|
116
130
|
- install_example.yml
|
117
131
|
- kpm.gemspec
|
118
132
|
- lib/kpm.rb
|
133
|
+
- lib/kpm/account.rb
|
119
134
|
- lib/kpm/base_artifact.rb
|
120
135
|
- lib/kpm/base_installer.rb
|
121
136
|
- lib/kpm/cli.rb
|
122
137
|
- lib/kpm/coordinates.rb
|
138
|
+
- lib/kpm/database.rb
|
123
139
|
- lib/kpm/formatter.rb
|
124
140
|
- lib/kpm/inspector.rb
|
125
141
|
- lib/kpm/installer.rb
|
@@ -153,12 +169,15 @@ files:
|
|
153
169
|
- spec/kpm/unit/sha1_checker_spec.rb
|
154
170
|
- spec/kpm/unit/sha1_test.yml
|
155
171
|
- spec/kpm/unit/uninstaller_spec.rb
|
172
|
+
- spec/kpm/unit_mysql/account_spec.rb
|
173
|
+
- spec/kpm/unit_mysql/account_spec.yml
|
174
|
+
- spec/kpm/unit_mysql/account_test_ddl.sql
|
156
175
|
- spec/spec_helper.rb
|
157
176
|
homepage: http://kill-bill.org
|
158
177
|
licenses:
|
159
178
|
- Apache License (2.0)
|
160
179
|
metadata: {}
|
161
|
-
post_install_message:
|
180
|
+
post_install_message:
|
162
181
|
rdoc_options:
|
163
182
|
- "--exclude"
|
164
183
|
- "."
|
@@ -175,9 +194,29 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
175
194
|
- !ruby/object:Gem::Version
|
176
195
|
version: '0'
|
177
196
|
requirements: []
|
178
|
-
rubyforge_project:
|
179
|
-
rubygems_version: 2.
|
180
|
-
signing_key:
|
197
|
+
rubyforge_project:
|
198
|
+
rubygems_version: 2.2.2
|
199
|
+
signing_key:
|
181
200
|
specification_version: 4
|
182
201
|
summary: Kill Bill package manager.
|
183
|
-
test_files:
|
202
|
+
test_files:
|
203
|
+
- spec/kpm/remote/base_artifact_spec.rb
|
204
|
+
- spec/kpm/remote/base_installer_spec.rb
|
205
|
+
- spec/kpm/remote/installer_spec.rb
|
206
|
+
- spec/kpm/remote/kaui_artifact_spec.rb
|
207
|
+
- spec/kpm/remote/killbill_plugin_artifact_spec.rb
|
208
|
+
- spec/kpm/remote/killbill_server_artifact_spec.rb
|
209
|
+
- spec/kpm/remote/migrations_spec.rb
|
210
|
+
- spec/kpm/remote/tomcat_manager_spec.rb
|
211
|
+
- spec/kpm/unit/base_artifact_spec.rb
|
212
|
+
- spec/kpm/unit/inspector_spec.rb
|
213
|
+
- spec/kpm/unit/installer_spec.rb
|
214
|
+
- spec/kpm/unit/plugins_directory_spec.rb
|
215
|
+
- spec/kpm/unit/plugins_manager_spec.rb
|
216
|
+
- spec/kpm/unit/sha1_checker_spec.rb
|
217
|
+
- spec/kpm/unit/sha1_test.yml
|
218
|
+
- spec/kpm/unit/uninstaller_spec.rb
|
219
|
+
- spec/kpm/unit_mysql/account_spec.rb
|
220
|
+
- spec/kpm/unit_mysql/account_spec.yml
|
221
|
+
- spec/kpm/unit_mysql/account_test_ddl.sql
|
222
|
+
- spec/spec_helper.rb
|