accesible_uy 0.0.0 → 0.0.001

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: 6c9f15d7d9529f37f55d6154cb776bd77ef2e49b
4
- data.tar.gz: f72d11d78297f09f2560b99df188042c8d72f309
3
+ metadata.gz: af28cfe817d70cab85e526ad7c1d668c96da4e06
4
+ data.tar.gz: ededf88b7674216c542ab2820637db01dff82455
5
5
  SHA512:
6
- metadata.gz: 7255e6351334dbf0d2a20b9a0049a48fbef8288f2af94325189a4ba4ea0206977cc534f321583fad9bf9c51602a09ddc6e1f63a99dff88ad47bbf7a90796dcce
7
- data.tar.gz: c8c6eae952912ea03c60bd9e717b6a32244eecdfc11e1948a9eb4cd035cc24610008660d5c4f8a5f160a961a8cdbdc2a24388c770c92fbdbc4deccf223991383
6
+ metadata.gz: 817d5e233dfc04465d1ef4c8c7b0543d06e6fb2482f77327661ded3def1da10b9a56386f58449b0d57900f3cec7b3d92773130e309fdfa094c982fb7c31cb34c
7
+ data.tar.gz: 1634c464ab6e4e67c41ea45274ffdebebeac2c7ba5905a94f602c63075c57a6b3f22879eebbea1abf4d952ecc8aa72802ea75fcfe20c3b605b563e2f82561d42
@@ -1,10 +1,10 @@
1
1
  development:
2
- api_key: 'mykey'
3
- api_secret: 'mysecret'
2
+ api_key: 'mykey'
3
+ api_secret: 'mysecret'
4
4
 
5
5
  test:
6
- api_key: 'mykey'
7
- api_secret: 'mysecret'
6
+ api_key: 'mykey'
7
+ api_secret: 'mysecret'
8
8
 
9
9
  production:
10
10
  api_key:
@@ -1,39 +1,29 @@
1
1
  module Configuration
2
- extend self
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 self.config
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 self.configure(opts = {})
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 self.load_file(path_to_yaml_file)
28
- puts 'asdfsadfasdfasdfsdfasdfasdf'
17
+ def load_file(path_to_yaml_file)
29
18
  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}"
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
@@ -1,11 +1,11 @@
1
1
  require 'accesible_uy/configuration'
2
2
 
3
3
  class AccesibleUY
4
- def self.do_stuff
4
+ def self.hello
5
5
  puts 'Hello world!'
6
6
  end
7
7
 
8
- def self.test
8
+ def self.config
9
9
  Configuration.config
10
10
  end
11
11
  end
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.0
4
+ version: 0.0.001
5
5
  platform: ruby
6
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>"
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: []