vidsy-cloudkit 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vidsy/cloudkit/app_config.rb +43 -0
- data/lib/vidsy/cloudkit/configuration.rb +24 -0
- data/lib/vidsy/cloudkit/version.rb +1 -1
- data/lib/vidsy/cloudkit.rb +7 -0
- data/vidsy-cloudkit.gemspec +2 -0
- metadata +17 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 481b562187f447cc2e565fbaeda6eec1d06c48b9
|
4
|
+
data.tar.gz: e01b24258a9d31d7d90ca3f22a876b018cefd9a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 478860600eceda87259967190c20c3558c8e6b82cd338b1d4719014f8690189a73dceedcf2051e3130abe7d9a04aacae7b47500554eea92809381351d9d5e514
|
7
|
+
data.tar.gz: 8006797d5390849efa68dd132008408ff7b932e40b8414fc0b4e6df649d712523592bfbe6f995f8a561a13f79575c8a788bc2b3fcaf3162257083aa3f0767bb7
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require "json"
|
2
|
+
require "ostruct"
|
3
|
+
require "vidsy/cloudkit/configuration"
|
4
|
+
|
5
|
+
module Vidsy
|
6
|
+
module Cloudkit
|
7
|
+
class AppConfig
|
8
|
+
def initialize
|
9
|
+
@json = parse
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
attr_reader :json
|
15
|
+
|
16
|
+
def configuration
|
17
|
+
Vidsy::Cloudkit::Configuration
|
18
|
+
end
|
19
|
+
|
20
|
+
def env
|
21
|
+
configuration.env
|
22
|
+
end
|
23
|
+
|
24
|
+
def path
|
25
|
+
File.join(
|
26
|
+
root, "config", "#{env}.config.json"
|
27
|
+
)
|
28
|
+
end
|
29
|
+
|
30
|
+
def parse
|
31
|
+
OpenStruct.new(
|
32
|
+
JSON.parse(
|
33
|
+
File.read path
|
34
|
+
)
|
35
|
+
)
|
36
|
+
end
|
37
|
+
|
38
|
+
def root
|
39
|
+
configuration.root
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require "vidsy/cloudkit/app_config"
|
2
|
+
|
3
|
+
module Vidsy
|
4
|
+
module Cloudkit
|
5
|
+
class Configuration
|
6
|
+
class << self
|
7
|
+
attr_accessor :root
|
8
|
+
|
9
|
+
def app_config
|
10
|
+
@app_config = AppConfig.new
|
11
|
+
end
|
12
|
+
|
13
|
+
def configure(&block)
|
14
|
+
yield self
|
15
|
+
self
|
16
|
+
end
|
17
|
+
|
18
|
+
def env
|
19
|
+
ENV["RACK_ENV"] || "development"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/vidsy/cloudkit.rb
CHANGED
data/vidsy-cloudkit.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vidsy-cloudkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Charlie Revett
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: json
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
description:
|
56
70
|
email:
|
57
71
|
- charlie@vidsy.co
|
@@ -61,6 +75,8 @@ extra_rdoc_files: []
|
|
61
75
|
files:
|
62
76
|
- Gemfile
|
63
77
|
- lib/vidsy/cloudkit.rb
|
78
|
+
- lib/vidsy/cloudkit/app_config.rb
|
79
|
+
- lib/vidsy/cloudkit/configuration.rb
|
64
80
|
- lib/vidsy/cloudkit/version.rb
|
65
81
|
- vidsy-cloudkit.gemspec
|
66
82
|
homepage: http://vidsy.co/jobs
|