user-configurations 0.0.1.pre → 0.0.1.pre1
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/README.md +23 -4
- data/lib/user-configurations.rb +1 -1
- data/lib/user_configurations/version.rb +1 -1
- metadata +11 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46f79d9f56154dd4cffb06a5453a4f0aa3446342
|
4
|
+
data.tar.gz: 42f1dc3b659e0eb0df3d93e1eba69a002c28e6e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e25a58e254693aa04847a05642f6562c4262b5af85056677365909f853e4a4a15a718f44190f020741f8dd9b17ce3bcf8869612330865e18c4c22c015eef03fc
|
7
|
+
data.tar.gz: e81fadfe17999a182d3a38010a856b95b9e3582258760ade74585fe939f128c04418dfb7bf58691989681f33946d121d95702e4f0bd872bb048e3df45b8c0582
|
data/README.md
CHANGED
@@ -1,6 +1,5 @@
|
|
1
|
-
|
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
|
-
|
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
|
data/lib/user-configurations.rb
CHANGED
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.
|
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.
|
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:
|