console-style 0.0.1 → 0.0.2

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
  SHA256:
3
- metadata.gz: f782ed76f17c5c04e2977b84baeb2e85d87d638730f65edfcbad2fa21d103cfd
4
- data.tar.gz: ec060515afda83848b0e80ad1b568f52e4dafd444bcafe37817181a11989da08
3
+ metadata.gz: ad9917b2f4c155220298ceecaabd8843627ace4ec4b7d0fcafa4da772f5f977f
4
+ data.tar.gz: d96323daf9425457cfef91a08a3dd9d42d0420e757a4216dd25ac0e56e3894c2
5
5
  SHA512:
6
- metadata.gz: ea6dc99f813cde29201d5034f179b3a9f683372093165cc6222e0000577452506e6495b7ed9daeea31e0ca47aab5e80488086428c402abdabdeefa386711ea0e
7
- data.tar.gz: 3827575b0dc689d153bedd433a7415634148da5bf1544a2568b8c161e284323ca3d406e219350ec2c6889f9bf5e6d8df5c2cb7ca9d7fd948eae6b1ec01d70900
6
+ metadata.gz: 37fca6efac96119af043094310783d5b748b061727b0e86a693fbe89712daec08a1487aa167ec23e27d8b9c990d7e1789c60ac4005be493c997ccba14d02f3b7
7
+ data.tar.gz: 3c6e1fb042f06045b967aaeb9f265d155ba2a58e6a02efb035e37a6a68ff58b07d4a6e35207e694c5abb6ec9fe584a56d6fe8830da0d7a03c7e9a14c293ca344
data/Gemfile.lock CHANGED
@@ -1,23 +1,26 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- console-style (0.0.1)
4
+ console-style (0.0.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
9
  coderay (1.1.3)
10
- method_source (1.0.0)
11
- pry (0.14.1)
10
+ method_source (1.1.0)
11
+ pry (0.14.2)
12
12
  coderay (~> 1.1)
13
13
  method_source (~> 1.0)
14
14
 
15
15
  PLATFORMS
16
- arm64-darwin-20
16
+ arm64-darwin
17
+ arm64-darwin-23
18
+ ruby
19
+ x86_64-linux
17
20
 
18
21
  DEPENDENCIES
19
22
  console-style!
20
23
  pry
21
24
 
22
25
  BUNDLED WITH
23
- 2.3.5
26
+ 2.5.9
data/bin/make ADDED
@@ -0,0 +1,4 @@
1
+ #!/bin/bash
2
+ bundle
3
+ gem build console-style.gemspec
4
+ # gem push console-style
data/bin/setup CHANGED
@@ -5,4 +5,8 @@ set -vx
5
5
 
6
6
  bundle install
7
7
 
8
- # Do any other automated setup that you need to do here
8
+ bundle lock --add-platform arm64-darwin
9
+ bundle lock --add-platform x86_64-linux
10
+ bundle lock --add-platform ruby
11
+
12
+ bundle install
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ["trex22"]
9
9
  spec.email = ["contact@jasonchalom.com"]
10
10
 
11
- spec.summary = "A client for using the Console Style in Ruby."
12
- spec.description = "A client for using the Console Style in Ruby. This is an unofficial project."
11
+ spec.summary = "A set of helper methods to help print to console."
12
+ spec.description = "A set of helper methods to help print to console."
13
13
  spec.homepage = "https://github.com/TRex22/console-style"
14
14
  spec.license = "MIT"
15
15
 
@@ -35,6 +35,21 @@ module ConsoleStyle
35
35
  puts line
36
36
  end
37
37
 
38
+ # From: https://github.com/savonrb/nori
39
+ def snakecase(str)
40
+ str = str.dup
41
+
42
+ str.gsub!(/::/, '/')
43
+ str.gsub!(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
44
+ str.gsub!(/([a-z\d])([A-Z])/, '\1_\2')
45
+ str.gsub!(' ', '_')
46
+ str.tr!('.', '_')
47
+ str.tr!('-', '_')
48
+ str.downcase!
49
+
50
+ str
51
+ end
52
+
38
53
  # Execute commands
39
54
  def execute(command)
40
55
  `#{command}`.gsub(" \n", '').gsub("\n", '')
@@ -1,3 +1,3 @@
1
1
  module ConsoleStyle
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/console-style.rb CHANGED
@@ -4,3 +4,10 @@ require 'console-style/functions'
4
4
  module ConsoleStyle
5
5
  class Error < StandardError; end
6
6
  end
7
+
8
+ # Append to Strings
9
+ class String
10
+ def snakecase
11
+ ConsoleStyle::Functions.snakecase(self)
12
+ end
13
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: console-style
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - trex22
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-18 00:00:00.000000000 Z
11
+ date: 2024-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -24,7 +24,7 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- description: A client for using the Console Style in Ruby. This is an unofficial project.
27
+ description: A set of helper methods to help print to console.
28
28
  email:
29
29
  - contact@jasonchalom.com
30
30
  executables: []
@@ -39,6 +39,7 @@ files:
39
39
  - README.md
40
40
  - Rakefile
41
41
  - bin/console
42
+ - bin/make
42
43
  - bin/setup
43
44
  - console-style.gemspec
44
45
  - lib/console-style.rb
@@ -63,8 +64,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
63
64
  - !ruby/object:Gem::Version
64
65
  version: '0'
65
66
  requirements: []
66
- rubygems_version: 3.3.4
67
+ rubygems_version: 3.3.26
67
68
  signing_key:
68
69
  specification_version: 4
69
- summary: A client for using the Console Style in Ruby.
70
+ summary: A set of helper methods to help print to console.
70
71
  test_files: []