tone 0.0.0 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/README.adoc +21 -7
- data/lib/tone/aliaser.rb +1 -4
- data/lib/tone/client.rb +2 -0
- data/lib/tone/configuration/loader.rb +3 -2
- data/tone.gemspec +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 803a8df0924e05ab33d732bdcedcec8cec4a76c31fb5613127f2849425c8026b
|
4
|
+
data.tar.gz: d0247c2613d4ee0dcd776e829541b8af737b720ae3bc41bb3c2470df38544e5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a78cc339e5100a10fddc26d41f56550cc0961b2ee6f5c1da42d1ce2c3d5204be4ca0d1816657cc360c087e75dc6bd994f8db164da8073217e550d07eaa31c527
|
7
|
+
data.tar.gz: 2c5881cda025ebb59298c7e28a1ab108b14a00f38f025e8838f35881561ae1ce30ba2d9fa59e4a51a5430d8c741a0e891a03f2aa244bfc2a61051e2584d5bb79
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -18,31 +18,45 @@ toc::[]
|
|
18
18
|
* Provides aliasing of color configurations.
|
19
19
|
* Provides quick access to default and aliased styles.
|
20
20
|
|
21
|
+
== Screenshots
|
22
|
+
|
23
|
+
image::https://alchemists.io/images/projects/tone/screenshot.png[A screenshot of colors,width=200,height=900,role=focal_point]
|
24
|
+
|
21
25
|
== Requirements
|
22
26
|
|
23
27
|
. link:https://www.ruby-lang.org[Ruby].
|
24
28
|
|
25
29
|
== Setup
|
26
30
|
|
27
|
-
To install, run:
|
31
|
+
To install _with_ security, run:
|
28
32
|
|
29
|
-
[source,
|
33
|
+
[source,bash]
|
34
|
+
----
|
35
|
+
# 💡 Skip this line if you already have the public certificate installed.
|
36
|
+
gem cert --add <(curl --compressed --location https://alchemists.io/gems.pem)
|
37
|
+
gem install tone --trust-policy HighSecurity
|
38
|
+
----
|
39
|
+
|
40
|
+
To install _without_ security, run:
|
41
|
+
|
42
|
+
[source,bash]
|
30
43
|
----
|
31
44
|
gem install tone
|
32
45
|
----
|
33
46
|
|
34
|
-
You can also add the gem directly to your project
|
47
|
+
You can also add the gem directly to your project:
|
35
48
|
|
36
|
-
[source,
|
49
|
+
[source,bash]
|
37
50
|
----
|
38
51
|
bundle add tone
|
39
52
|
----
|
40
53
|
|
41
54
|
Once the gem is installed, you only need to require it:
|
42
55
|
|
43
|
-
|
56
|
+
[source,ruby]
|
57
|
+
----
|
44
58
|
require "tone"
|
45
|
-
|
59
|
+
----
|
46
60
|
|
47
61
|
== Usage
|
48
62
|
|
@@ -419,7 +433,7 @@ You use the IRB console for direct access to all objects:
|
|
419
433
|
bin/console
|
420
434
|
----
|
421
435
|
|
422
|
-
Lastly, there is a `bin/show` script which
|
436
|
+
Lastly, there is a `bin/show` script which will display all default styles for quick visual convenience. This is the same script that was used to generate the screenshot you saw at the top of this document.
|
423
437
|
|
424
438
|
[source,bash]
|
425
439
|
----
|
data/lib/tone/aliaser.rb
CHANGED
@@ -46,10 +46,7 @@ module Tone
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def check_duplicate key
|
49
|
-
|
50
|
-
|
51
|
-
fail Error, "Duplicate alias detected (already exists): #{kind}." if custom.key? key
|
52
|
-
fail Error, "Alias mustn't duplicate (override) default: #{kind}." if defaults.key? key
|
49
|
+
fail Error, "Alias mustn't duplicate (override) default: #{key.inspect}." if defaults.key? key
|
53
50
|
end
|
54
51
|
|
55
52
|
def check_style key, style
|
data/lib/tone/client.rb
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "pathname"
|
3
4
|
require "yaml"
|
4
5
|
|
5
6
|
module Tone
|
6
7
|
module Configuration
|
7
8
|
# Loads the default configuration into memory as a frozen hash.
|
8
9
|
class Loader
|
9
|
-
def initialize path
|
10
|
+
def initialize path = Pathname("#{__dir__}/defaults.yml")
|
10
11
|
@path = path
|
11
12
|
end
|
12
13
|
|
13
|
-
def call = YAML.
|
14
|
+
def call = YAML.safe_load_file path, symbolize_names: true, freeze: true
|
14
15
|
|
15
16
|
private
|
16
17
|
|
data/tone.gemspec
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tone
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
|
36
36
|
gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2023-04-
|
38
|
+
date: 2023-04-10 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: refinements
|
metadata.gz.sig
CHANGED
Binary file
|