conf_conf 2.0.2 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6266749f82f44ef3b88a7d50bfb5ad35f2ecbedc
4
- data.tar.gz: c9d7fa66ba405015c4546d4f36777d3b1494b19f
3
+ metadata.gz: 1efc182014912b9736644e508c7bda12a2111d4d
4
+ data.tar.gz: 48a0196bbf095e9f01ab78f258f8d61d6e9e858a
5
5
  SHA512:
6
- metadata.gz: a90bb66f10350795befb7573066f7f7883fd3c28028860aaceea3ebc05b45d7110e4d187ec6ea03da7039020fda67c02a14ec6d9c162772b6eb4f6ed0e47a504
7
- data.tar.gz: 8325c29e6630c1a2589a665ce82ced86914999b22ea323ab3f417cc94131894dd9859344c78650f9ad996a80ec86082b4efc76a780cadcbb9e30e71a32d73bc7
6
+ metadata.gz: 8d095286e0a142c77df39b0f97192560497e04427936953bc5ec3ea85faef7386a83e06f2fc3e8a20b2978c895babd7dbfa5cb0497d7754cf733c625254cf121
7
+ data.tar.gz: aad762d3a302254a3685f0168b1848618a88046c78095fbfa8947176134a5c71b4e9e2c2d0b03f72f92cdefd9308c5766a1f39bcee03d153340d135860597011
data/conf_conf.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = 'conf_conf'
7
- s.version = '2.0.2'
7
+ s.version = '2.0.3'
8
8
  s.licenses = ['MIT']
9
9
  s.authors = ['James Kassemi']
10
10
  s.email = ['jkassemi@gmail.com']
data/lib/conf_conf.rb CHANGED
@@ -1,6 +1,9 @@
1
1
  require 'multi_json'
2
2
  require 'ostruct'
3
3
 
4
+ require 'rbnacl/libsodium'
5
+ require 'rbnacl'
6
+
4
7
  require 'conf_conf/project'
5
8
  require 'conf_conf/configuration'
6
9
  require 'conf_conf/project/developer'
@@ -10,7 +13,7 @@ require 'conf_conf/project/environment/storage'
10
13
  require 'conf_conf/project/environments'
11
14
 
12
15
  module ConfConf
13
- VERSION = '2.0.2'
16
+ VERSION = '2.0.3'
14
17
 
15
18
  class MissingConfigurationValueError < StandardError; end;
16
19
  class InconsistentConfigurationError < StandardError
@@ -1,4 +1,4 @@
1
- require 'rbnacl'
1
+ require 'rbnacl/libsodium'
2
2
  require 'base64'
3
3
 
4
4
  module ConfConf
metadata CHANGED
@@ -1,125 +1,125 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conf_conf
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Kassemi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-27 00:00:00.000000000 Z
11
+ date: 2014-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpi
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: 2.2.4
20
20
  type: :runtime
21
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: 2.2.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: thor
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: 0.19.1
34
34
  type: :runtime
35
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: 0.19.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: colorize
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: 0.7.3
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
54
  version: 0.7.3
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: highline
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: 1.6.21
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
68
  version: 1.6.21
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rbnacl-libsodium
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: 0.5.0.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
82
  version: 0.5.0.1
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: multi_json
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: 1.10.1
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
96
  version: 1.10.1
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: dotenv
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ~>
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: 0.11.1
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ~>
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: 0.11.1
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rspec
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ~>
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
117
  version: '3.0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ~>
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: '3.0'
125
125
  description: Verify correctness of environment variables
@@ -130,7 +130,7 @@ executables:
130
130
  extensions: []
131
131
  extra_rdoc_files: []
132
132
  files:
133
- - .gitignore
133
+ - ".gitignore"
134
134
  - Gemfile
135
135
  - LICENSE
136
136
  - README.md
@@ -149,7 +149,6 @@ files:
149
149
  - lib/conf_conf/project/environment.rb
150
150
  - lib/conf_conf/project/environment/storage.rb
151
151
  - lib/conf_conf/project/environments.rb
152
- - lib/conf_conf/remote.rb
153
152
  - lib/conf_conf/user.rb
154
153
  - spec/project/developers_spec.rb
155
154
  - spec/project/environment/storage_spec.rb
@@ -165,17 +164,17 @@ require_paths:
165
164
  - lib
166
165
  required_ruby_version: !ruby/object:Gem::Requirement
167
166
  requirements:
168
- - - '>='
167
+ - - ">="
169
168
  - !ruby/object:Gem::Version
170
169
  version: '0'
171
170
  required_rubygems_version: !ruby/object:Gem::Requirement
172
171
  requirements:
173
- - - '>='
172
+ - - ">="
174
173
  - !ruby/object:Gem::Version
175
174
  version: '0'
176
175
  requirements: []
177
176
  rubyforge_project:
178
- rubygems_version: 2.0.14
177
+ rubygems_version: 2.2.2
179
178
  signing_key:
180
179
  specification_version: 4
181
180
  summary: A simple pattern and utility for verifying the correctness of the environment
@@ -1,40 +0,0 @@
1
- module ConfConf
2
- ## Interfaces with the conf_conf.io system
3
- module Remote
4
- SAVE_ENVIRONMENT_URL = "https://api.conf_conf.io/save"
5
- LOAD_ENVIRONMENT_URL = "https://api.conf_conf.io/load"
6
-
7
- def self.save_environment(environment)
8
- request = HTTPI::Request.new
9
- request.url = SAVE_ENVIRONMENT_URL
10
- request.body = {
11
- project: environment.project,
12
- name: environment.name,
13
- encrypted_env_variables: environment.encrypted_env_variables
14
- }
15
-
16
- response = HTTPI.post(request)
17
-
18
- raise ConfConf::Remote::SaveException.new(response.body) if response.error?
19
- end
20
-
21
- def self.load_environment(project, name)
22
- request = HTTPI::Request.new
23
- request.url = LOAD_ENVIRONMENT_URL
24
- request.body = {
25
- project: project,
26
- name: name
27
- }
28
-
29
- response = HTTPI.post(request)
30
-
31
- raise ConfConf::Remote::LoadException.new(response.body) if response.error?
32
-
33
- parsed_response = MultiJson.load(response.body)
34
-
35
- environment = Environment.new(parsed_response.project, parsed_response.name)
36
- environment.encrypted_env_variables = parsed_response.encrypted_env_variables
37
- environment
38
- end
39
- end
40
- end