thingfish-metastore-pg 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/History.md +5 -0
- data/README.md +3 -4
- data/Rakefile +5 -5
- data/lib/thingfish/metastore/pg.rb +16 -24
- metadata +11 -11
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4cdd72c7d05eaa055da73c33c61c3a3855afea33
|
4
|
+
data.tar.gz: 24db84cda188e699a5085b0fc15563d2150eb4c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f89915de236b45a95618a7063f4f274b1577236ee95b893afb58bc1a8aebef86baf6b7dcf3f0e92d368ceec1d5b8a6b3fa9150f3a98e3397eb823bcdb18640f2
|
7
|
+
data.tar.gz: 1139f3da4841b1586d99a9f4f4bb1ab748fec95cf207951f0497d017f48e67d8b09d7505329e9e81cc519a8f7efda5696c4022488a31c2b08c85a7804535a270
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/History.md
CHANGED
data/README.md
CHANGED
@@ -41,9 +41,8 @@ Here's an example configuration file that enables this plugin.
|
|
41
41
|
---
|
42
42
|
thingfish:
|
43
43
|
metastore: pg
|
44
|
-
|
45
|
-
|
46
|
-
uri: postgres://thingfish:password@db.example.com/database
|
44
|
+
pg_metastore:
|
45
|
+
uri: postgres://thingfish:password@db.example.com/database
|
47
46
|
|
48
47
|
|
49
48
|
When Thingfish starts, it will install the necessary database schema
|
@@ -52,7 +51,7 @@ automatically.
|
|
52
51
|
|
53
52
|
## License
|
54
53
|
|
55
|
-
Copyright (c) 2014-
|
54
|
+
Copyright (c) 2014-2017, Michael Granger and Mahlon E. Smith.
|
56
55
|
|
57
56
|
All rights reserved.
|
58
57
|
|
data/Rakefile
CHANGED
@@ -31,10 +31,10 @@ hoespec = Hoe.spec 'thingfish-metastore-pg' do |spec|
|
|
31
31
|
spec.developer 'Michael Granger', 'ged@FaerieMUD.org'
|
32
32
|
spec.developer 'Mahlon E. Smith', 'mahlon@martini.nu'
|
33
33
|
|
34
|
-
spec.dependency 'thingfish', '~> 0.
|
35
|
-
spec.dependency 'loggability', '~> 0.
|
36
|
-
spec.dependency 'configurability', '~>
|
37
|
-
spec.dependency 'sequel', '~> 4.
|
34
|
+
spec.dependency 'thingfish', '~> 0.6'
|
35
|
+
spec.dependency 'loggability', '~> 0.12'
|
36
|
+
spec.dependency 'configurability', '~> 3.1'
|
37
|
+
spec.dependency 'sequel', '~> 4.41'
|
38
38
|
spec.dependency 'pg', '~> 0.19'
|
39
39
|
|
40
40
|
spec.dependency 'hoe-deveiate', '~> 0.8', :development
|
@@ -80,7 +80,7 @@ end
|
|
80
80
|
|
81
81
|
task :gemspec => GEMSPEC
|
82
82
|
file GEMSPEC => [ __FILE__, 'ChangeLog' ] do |task|
|
83
|
-
spec =
|
83
|
+
spec = hoespec.spec.dup
|
84
84
|
spec.files.delete( '.gemtest' )
|
85
85
|
spec.signing_key = nil
|
86
86
|
spec.version = "#{spec.version.bump}.0.pre#{Time.now.strftime("%Y%m%d%H%M%S")}"
|
@@ -24,13 +24,12 @@ class Thingfish::Metastore::PG < Thingfish::Metastore
|
|
24
24
|
|
25
25
|
|
26
26
|
# Package version
|
27
|
-
VERSION = '0.
|
27
|
+
VERSION = '0.2.0'
|
28
28
|
|
29
29
|
# Version control revision
|
30
|
-
REVISION = %q$Revision:
|
30
|
+
REVISION = %q$Revision: 257c0fa94884 $
|
31
31
|
|
32
32
|
# The data directory that contains migration files.
|
33
|
-
#
|
34
33
|
DATADIR = if ENV['THINGFISH_METASTORE_PG_DATADIR']
|
35
34
|
Pathname.new( ENV['THINGFISH_METASTORE_PG_DATADIR'] )
|
36
35
|
elsif Gem.datadir( 'thingfish-metastore-pg' )
|
@@ -40,31 +39,28 @@ class Thingfish::Metastore::PG < Thingfish::Metastore
|
|
40
39
|
'data' + 'thingfish-metastore-pg'
|
41
40
|
end
|
42
41
|
|
43
|
-
# The default config values
|
44
|
-
DEFAULT_CONFIG = {
|
45
|
-
uri: 'postgres:/thingfish',
|
46
|
-
slow_query_seconds: 0.01,
|
47
|
-
}
|
48
|
-
|
49
42
|
|
50
43
|
# Loggability API -- use a separate logger
|
51
44
|
log_as :thingfish_metastore_pg
|
52
45
|
|
53
|
-
# Configurability API --
|
54
|
-
|
46
|
+
# Configurability API -- add settings and defaults for the pg metastore
|
47
|
+
configurability( 'thingfish.pg_metastore' ) do
|
48
|
+
|
49
|
+
##
|
50
|
+
# The URI of the database to use for the metastore
|
51
|
+
setting :uri, default: 'postgres:/thingfish'
|
52
|
+
|
53
|
+
##
|
54
|
+
# The number of seconds to consider a "slow" query
|
55
|
+
setting :slow_query_seconds, default: 0.01
|
56
|
+
|
57
|
+
end
|
55
58
|
|
56
|
-
##
|
57
|
-
# The URI of the database to use for the metastore
|
58
|
-
singleton_attr_accessor :uri
|
59
59
|
|
60
60
|
##
|
61
61
|
# The Sequel::Database that's used to access the metastore tables
|
62
62
|
singleton_attr_accessor :db
|
63
63
|
|
64
|
-
##
|
65
|
-
# The number of seconds to consider a "slow" query
|
66
|
-
singleton_attr_accessor :slow_query_seconds
|
67
|
-
|
68
64
|
|
69
65
|
### Set up the metastore database and migrate to the latest version.
|
70
66
|
def self::setup_database
|
@@ -102,12 +98,8 @@ class Thingfish::Metastore::PG < Thingfish::Metastore
|
|
102
98
|
### Configurability API -- set up the metastore with the `pg_metastore` section of
|
103
99
|
### the config file.
|
104
100
|
def self::configure( config=nil )
|
105
|
-
|
106
|
-
|
107
|
-
self.uri = config[:uri]
|
108
|
-
self.slow_query_seconds = config[:slow_query_seconds]
|
109
|
-
|
110
|
-
self.setup_database
|
101
|
+
super
|
102
|
+
self.setup_database if self.uri
|
111
103
|
end
|
112
104
|
|
113
105
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thingfish-metastore-pg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Granger
|
@@ -36,7 +36,7 @@ cert_chain:
|
|
36
36
|
w8aNA5re5+Rt/Vvjxj5AcEnZnZiz5x959NaddQocX32Z1unHw44pzRNUur1GInfW
|
37
37
|
p4vpx2kUSFSAGjtCbDGTNV2AH8w9OU4xEmNz8c5lyoA=
|
38
38
|
-----END CERTIFICATE-----
|
39
|
-
date:
|
39
|
+
date: 2017-01-16 00:00:00.000000000 Z
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: thingfish
|
@@ -44,56 +44,56 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0.
|
47
|
+
version: '0.6'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0.
|
54
|
+
version: '0.6'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: loggability
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0.
|
61
|
+
version: '0.12'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0.
|
68
|
+
version: '0.12'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: configurability
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '3.1'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '3.1'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: sequel
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '4.
|
89
|
+
version: '4.41'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '4.
|
96
|
+
version: '4.41'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: pg
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -241,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
241
241
|
version: '0'
|
242
242
|
requirements: []
|
243
243
|
rubyforge_project:
|
244
|
-
rubygems_version: 2.
|
244
|
+
rubygems_version: 2.6.8
|
245
245
|
signing_key:
|
246
246
|
specification_version: 4
|
247
247
|
summary: This is a metadata storage plugin for the Thingfish digital asset manager
|
metadata.gz.sig
CHANGED
Binary file
|