accesible_uy 0.0.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 +7 -0
- data/config/accesible_uy.example.yml +11 -0
- data/lib/accesible_uy.rb +11 -0
- data/lib/accesible_uy/configuration.rb +39 -0
- metadata +60 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6c9f15d7d9529f37f55d6154cb776bd77ef2e49b
|
4
|
+
data.tar.gz: f72d11d78297f09f2560b99df188042c8d72f309
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7255e6351334dbf0d2a20b9a0049a48fbef8288f2af94325189a4ba4ea0206977cc534f321583fad9bf9c51602a09ddc6e1f63a99dff88ad47bbf7a90796dcce
|
7
|
+
data.tar.gz: c8c6eae952912ea03c60bd9e717b6a32244eecdfc11e1948a9eb4cd035cc24610008660d5c4f8a5f160a961a8cdbdc2a24388c770c92fbdbc4deccf223991383
|
data/lib/accesible_uy.rb
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
module Configuration
|
2
|
+
extend self
|
3
|
+
|
4
|
+
@valid_config_keys = %w{ api_key api_secret }
|
5
|
+
@config = {}
|
6
|
+
|
7
|
+
def self.config
|
8
|
+
if @config.empty?
|
9
|
+
load_file(Rails.root.join('config', 'accesible_uy.yml'))
|
10
|
+
end
|
11
|
+
|
12
|
+
@config
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.configure(opts = {})
|
16
|
+
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
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.load_file(path_to_yaml_file)
|
28
|
+
puts 'asdfsadfasdfasdfsdfasdfasdf'
|
29
|
+
begin
|
30
|
+
puts '333333333333'
|
31
|
+
config = YAML::load(IO.read(path_to_yaml_file))[Rails.env]
|
32
|
+
|
33
|
+
puts config
|
34
|
+
rescue => e
|
35
|
+
raise "YAML configuration file couldn't be found: #{e}"
|
36
|
+
end
|
37
|
+
configure(config)
|
38
|
+
end
|
39
|
+
end
|
metadata
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: accesible_uy
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Natalia
|
8
|
+
- Olij
|
9
|
+
- "<natyolij@gmail.com>,"
|
10
|
+
- Gabriel
|
11
|
+
- Osorio
|
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>"
|
22
|
+
autorequire:
|
23
|
+
bindir: bin
|
24
|
+
cert_chain: []
|
25
|
+
date: 2014-06-29 00:00:00.000000000 Z
|
26
|
+
dependencies: []
|
27
|
+
description: Create an app that uses AccesibleUY api!
|
28
|
+
email: accesibleuy@gmail.com
|
29
|
+
executables: []
|
30
|
+
extensions: []
|
31
|
+
extra_rdoc_files: []
|
32
|
+
files:
|
33
|
+
- config/accesible_uy.example.yml
|
34
|
+
- lib/accesible_uy.rb
|
35
|
+
- lib/accesible_uy/configuration.rb
|
36
|
+
homepage: http://rubygems.org/gems/accesible_uy
|
37
|
+
licenses:
|
38
|
+
- MIT
|
39
|
+
metadata: {}
|
40
|
+
post_install_message:
|
41
|
+
rdoc_options: []
|
42
|
+
require_paths:
|
43
|
+
- lib
|
44
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ">="
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
49
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
requirements: []
|
55
|
+
rubyforge_project:
|
56
|
+
rubygems_version: 2.2.2
|
57
|
+
signing_key:
|
58
|
+
specification_version: 4
|
59
|
+
summary: Wrapper for AccesibleUY api
|
60
|
+
test_files: []
|