user-configurations 0.0.1.pre → 0.0.1.pre1

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: 8ba776a1792dfcdcf240050bf38ecd316cec095f
4
- data.tar.gz: bef0f44caee78ca5f273ecb2153c2b6caf6c927c
3
+ metadata.gz: 46f79d9f56154dd4cffb06a5453a4f0aa3446342
4
+ data.tar.gz: 42f1dc3b659e0eb0df3d93e1eba69a002c28e6e3
5
5
  SHA512:
6
- metadata.gz: 552f316b1056bdea49bdbb009f5c54eaf4a4ebc827436d0a9fbdeefd54be0830b915141667bc4bb3189fe1c7a60a1d2dafbd64b3edfec91ba1b30ef351ce604d
7
- data.tar.gz: 74916acf45fa9cabdcd0d8a795aa4bf1a21a2b59834f7df95ef4273aa5dd792807087a151629591462e9098269eaba47185875ba2f7b0f43f3cb493fba38878c
6
+ metadata.gz: e25a58e254693aa04847a05642f6562c4262b5af85056677365909f853e4a4a15a718f44190f020741f8dd9b17ce3bcf8869612330865e18c4c22c015eef03fc
7
+ data.tar.gz: e81fadfe17999a182d3a38010a856b95b9e3582258760ade74585fe939f128c04418dfb7bf58691989681f33946d121d95702e4f0bd872bb048e3df45b8c0582
data/README.md CHANGED
@@ -1,6 +1,5 @@
1
- # User::Configurations
2
-
3
- TODO: Write a gem description
1
+ This gem will help you if you need to store and read user configurations on
2
+ environments, global or local files.
4
3
 
5
4
  ## Installation
6
5
 
@@ -18,7 +17,25 @@ Or install it yourself as:
18
17
 
19
18
  ## Usage
20
19
 
21
- TODO: Write usage instructions here
20
+ ### Reading
21
+
22
+ ```ruby
23
+ configs = UserConfigurations::Configuration.new('project')
24
+ configs['user_name']
25
+ ```
26
+
27
+ That will give to you the value of that configuration on a ENV variable, local,
28
+ or global variable (with that precedence).
29
+
30
+ ### Writing
31
+
32
+ ```ruby
33
+ configs = UserConfigurations::Configuration.new('project')
34
+ configs.store(user_name: 'stupied4ever')
35
+ ```
36
+
37
+ Will store on a local file placed on ```~/.project``` a [YAML][yaml] file with
38
+ ```user_name```.
22
39
 
23
40
  ## Contributing
24
41
 
@@ -27,3 +44,5 @@ TODO: Write usage instructions here
27
44
  3. Commit your changes (`git commit -am 'Add some feature'`)
28
45
  4. Push to the branch (`git push origin my-new-feature`)
29
46
  5. Create a new Pull Request
47
+
48
+ [yaml]: https://en.wikipedia.org/wiki/YAML
@@ -2,7 +2,7 @@ require 'yaml'
2
2
  require 'delegate'
3
3
 
4
4
  require_relative 'user_configurations/version'
5
- require_relative 'user_configurations/configurations'
5
+ require_relative 'user_configurations/configuration'
6
6
 
7
7
  module UserConfigurations
8
8
  end
@@ -1,3 +1,3 @@
1
1
  module UserConfigurations
2
- VERSION = '0.0.1.pre'
2
+ VERSION = '0.0.1.pre1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: user-configurations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.pre
4
+ version: 0.0.1.pre1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafael da Silva Almeida
@@ -14,14 +14,14 @@ dependencies:
14
14
  name: rspec
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '2.0'
20
20
  type: :development
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.0'
27
27
  description: |-
@@ -33,10 +33,10 @@ executables: []
33
33
  extensions: []
34
34
  extra_rdoc_files: []
35
35
  files:
36
- - .gitignore
37
- - .rspec
38
- - .rubocop.yml
39
- - .rubocop_todo.yml
36
+ - ".gitignore"
37
+ - ".rspec"
38
+ - ".rubocop.yml"
39
+ - ".rubocop_todo.yml"
40
40
  - Gemfile
41
41
  - LICENSE.txt
42
42
  - README.md
@@ -56,20 +56,21 @@ require_paths:
56
56
  - lib
57
57
  required_ruby_version: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  required_rubygems_version: !ruby/object:Gem::Requirement
63
63
  requirements:
64
- - - '>'
64
+ - - ">"
65
65
  - !ruby/object:Gem::Version
66
66
  version: 1.3.1
67
67
  requirements: []
68
68
  rubyforge_project:
69
- rubygems_version: 2.2.2
69
+ rubygems_version: 2.2.0
70
70
  signing_key:
71
71
  specification_version: 4
72
72
  summary: Configurations for a project
73
73
  test_files:
74
74
  - spec/spec_helper.rb
75
75
  - spec/user_configurations/configuration_spec.rb
76
+ has_rdoc: