activerse 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -2
- data/lib/activerse/dsl.rb +3 -3
- data/lib/activerse/version.rb +1 -1
- data/lib/generators/activerse/fill_generator.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 130cf95c7db20938d080b2ce3368044e799dcd2281044ee764585adf393e4ab2
|
4
|
+
data.tar.gz: 957fd7006bbb703181a3fa24ba5fc33d9f37c47aad383558b0792d8e81e99794
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb924497e97a3c12801247c10137574b5170b2ad0ddbbc524bcb63c424539a046426411bf629d082c7ad6ebcb757836d5c30bd91efcea31807db055eeb1cc35d
|
7
|
+
data.tar.gz: 824f79ed68514a282daf1cdbb7b129a837aa97549fd206ed34a4ab2c24d453527b8a8c3144334a445d5a20ab92f2573bbb853fd7e5ecf221a9e68c9911dcd276
|
data/README.md
CHANGED
@@ -19,7 +19,6 @@ end
|
|
19
19
|
```
|
20
20
|
See the wiki for more informations.
|
21
21
|
|
22
|
-
|
23
22
|
When ready to fill your credentials run:
|
24
23
|
```bash
|
25
24
|
$ rails g activerse:fill
|
@@ -57,7 +56,6 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/pietro
|
|
57
56
|
## License
|
58
57
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
59
58
|
|
60
|
-
|
61
59
|
## Code of Conduct
|
62
60
|
|
63
61
|
Everyone interacting in the Activerse project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/pietromoro/activerse/blob/master/CODE_OF_CONDUCT.md).
|
data/lib/activerse/dsl.rb
CHANGED
@@ -23,12 +23,12 @@ module Activerse
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def set key, to: nil
|
26
|
-
last = @current_keys.inject(@credentials) { |structure,
|
26
|
+
last = @current_keys.inject(@credentials) { |structure, s_key| structure[s_key] ||= {} }
|
27
27
|
last[key.to_sym] = to
|
28
28
|
end
|
29
29
|
|
30
30
|
def get key
|
31
|
-
last = @current_keys.inject(@credentials) { |structure,
|
31
|
+
last = @current_keys.inject(@credentials) { |structure, s_key| structure[s_key] ||= {} }
|
32
32
|
last[key.to_sym]
|
33
33
|
end
|
34
34
|
|
@@ -42,7 +42,7 @@ module Activerse
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def ask_and_set key, question, *args
|
45
|
-
last = @current_keys.inject(@credentials) { |structure,
|
45
|
+
last = @current_keys.inject(@credentials) { |structure, s_key| structure[s_key] ||= {} }
|
46
46
|
last_value = last[key.to_sym].nil? ? "" : last[key.to_sym]
|
47
47
|
response = ask("#{question} (#{last_value})", *args)
|
48
48
|
last[key.to_sym] = response.blank? ? last_value : response
|
data/lib/activerse/version.rb
CHANGED
@@ -6,7 +6,7 @@ module Activerse
|
|
6
6
|
desc "Fill out the credentials file and run startup code"
|
7
7
|
|
8
8
|
def fill_out
|
9
|
-
current_credentials = YAML.
|
9
|
+
current_credentials = YAML.safe_load(Rails.application.credentials.read)
|
10
10
|
current_credentials.symbolize_keys!
|
11
11
|
dsl = Activerse::Dsl.new(current_credentials)
|
12
12
|
dsl.instance_eval(&Activerse::Configs.internal_structure)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerse
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pietro Moro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 6.
|
19
|
+
version: '6.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 6.
|
26
|
+
version: '6.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: sqlite3
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|