accesible_uy 0.0.0 → 0.0.001
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/config/accesible_uy.example.yml +4 -4
- data/lib/accesible_uy/configuration.rb +13 -23
- data/lib/accesible_uy.rb +2 -2
- metadata +6 -16
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: af28cfe817d70cab85e526ad7c1d668c96da4e06
|
|
4
|
+
data.tar.gz: ededf88b7674216c542ab2820637db01dff82455
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 817d5e233dfc04465d1ef4c8c7b0543d06e6fb2482f77327661ded3def1da10b9a56386f58449b0d57900f3cec7b3d92773130e309fdfa094c982fb7c31cb34c
|
|
7
|
+
data.tar.gz: 1634c464ab6e4e67c41ea45274ffdebebeac2c7ba5905a94f602c63075c57a6b3f22879eebbea1abf4d952ecc8aa72802ea75fcfe20c3b605b563e2f82561d42
|
|
@@ -1,39 +1,29 @@
|
|
|
1
1
|
module Configuration
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
@valid_config_keys = %w{ api_key api_secret }
|
|
2
|
+
@valid_config_keys = %w(api_key api_secret)
|
|
5
3
|
@config = {}
|
|
6
4
|
|
|
7
|
-
def
|
|
8
|
-
if @config.empty?
|
|
9
|
-
load_file(Rails.root.join('config', 'accesible_uy.yml'))
|
|
10
|
-
end
|
|
5
|
+
def config
|
|
6
|
+
load_file(Rails.root.join('config', 'accesible_uy.yml')) if @config.empty?
|
|
11
7
|
|
|
12
8
|
@config
|
|
13
9
|
end
|
|
14
10
|
|
|
15
|
-
def
|
|
11
|
+
def configure(opts = {})
|
|
16
12
|
opts.each do |key, value|
|
|
17
|
-
|
|
18
|
-
puts key
|
|
19
|
-
if @valid_config_keys.include? key
|
|
20
|
-
@config[key] = value
|
|
21
|
-
else
|
|
22
|
-
raise "invalid key: #{ key }"
|
|
23
|
-
end
|
|
13
|
+
@config[key] = value if @valid_config_keys.include? key
|
|
24
14
|
end
|
|
25
15
|
end
|
|
26
16
|
|
|
27
|
-
def
|
|
28
|
-
puts 'asdfsadfasdfasdfsdfasdfasdf'
|
|
17
|
+
def load_file(path_to_yaml_file)
|
|
29
18
|
begin
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
puts config
|
|
34
|
-
rescue => e
|
|
35
|
-
raise "YAML configuration file couldn't be found: #{e}"
|
|
19
|
+
config = YAML.load(IO.read(path_to_yaml_file))[Rails.env]
|
|
20
|
+
rescue => exception
|
|
21
|
+
raise "YAML configuration file couldn't be found: #{ exception }"
|
|
36
22
|
end
|
|
37
23
|
configure(config)
|
|
38
24
|
end
|
|
25
|
+
|
|
26
|
+
module_function :config
|
|
27
|
+
module_function :configure
|
|
28
|
+
module_function :load_file
|
|
39
29
|
end
|
data/lib/accesible_uy.rb
CHANGED
metadata
CHANGED
|
@@ -1,24 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: accesible_uy
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.001
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
- "<gabriel.osorio.montelius@gmail.com>,"
|
|
13
|
-
- Iuval
|
|
14
|
-
- Goldansky
|
|
15
|
-
- "<iuvalgoldansky@gmail.com>,"
|
|
16
|
-
- Clara
|
|
17
|
-
- Osorio
|
|
18
|
-
- "<osoriomontelius@gmail.com>,"
|
|
19
|
-
- Oscar
|
|
20
|
-
- Siniscalchi
|
|
21
|
-
- "<oscarsiniscalchi@gmail.com>"
|
|
7
|
+
- Clara Osorio <osoriomontelius@gmail.com>
|
|
8
|
+
- Gabriel Osorio <gabriel.osorio.montelius@gmail.com>
|
|
9
|
+
- Iuval Goldansky <iuvalgoldansky@gmail.com>
|
|
10
|
+
- Natalia Olij <natyolij@gmail.com>
|
|
11
|
+
- Oscar Siniscalchi <oscarsiniscalchi@gmail.com>
|
|
22
12
|
autorequire:
|
|
23
13
|
bindir: bin
|
|
24
14
|
cert_chain: []
|