schizm 0.0.15 → 0.0.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/schizm +22 -21
- data/lib/schizm/string.rb +5 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24fdbed1f01ab878a6c59c5f7350c159649184a8
|
4
|
+
data.tar.gz: e93d3a2e43bb0fb1d775b77419646573250de6d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c2451232ae4a25cc532d215683a0508896ae356378e149f3902cae86ed0afaa5ae93b6103ef2c33aef9f2536c633b06506121ccca4cce7fc7a2ebdbc2ccf8cc
|
7
|
+
data.tar.gz: 2429888c0a75c2f546a0722f6c9272005761a5f3eb3d56dde921ac7244a1834be5c89241ab72d4dad0530bcfed202d6adf8e9656e5bc586ac1fa03e8b5668f27
|
data/bin/schizm
CHANGED
@@ -7,26 +7,24 @@ require_relative "../lib/schizm/patterns.rb"
|
|
7
7
|
require_relative "../lib/schizm/markup.rb"
|
8
8
|
require_relative "../lib/schizm/string.rb"
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
when "vim-uninstall"
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
else
|
29
|
-
puts <<HELP
|
10
|
+
begin
|
11
|
+
case ARGV.shift
|
12
|
+
when "init"
|
13
|
+
Schizm::Env::Opts.init.order!
|
14
|
+
Schizm::Env.init
|
15
|
+
when "build"
|
16
|
+
Schizm::Env::Opts.build.order!
|
17
|
+
Schizm::Env.build
|
18
|
+
when "vim-install"
|
19
|
+
Schizm::Env::Opts.vim_install.order!
|
20
|
+
Schizm::Env.vim_install
|
21
|
+
when "vim-uninstall"
|
22
|
+
Schizm::Env::Opts.vim_uninstall.order!
|
23
|
+
Schizm::Env.vim_uninstall
|
24
|
+
when "home?"
|
25
|
+
puts Schizm::Env.home
|
26
|
+
else
|
27
|
+
puts <<HELP
|
30
28
|
Usage: schizm MODE [OPTIONS]
|
31
29
|
`schizm init [OPTIONS]`
|
32
30
|
\tNew project in working directory.
|
@@ -39,5 +37,8 @@ Usage: schizm MODE [OPTIONS]
|
|
39
37
|
`schizm home?`
|
40
38
|
\tDisplay schizm's install directory.
|
41
39
|
HELP
|
42
|
-
|
40
|
+
end
|
41
|
+
rescue Exception => exception
|
42
|
+
puts exception
|
43
|
+
exit 1
|
43
44
|
end
|
data/lib/schizm/string.rb
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
# Copyright (c) 2017-2018 M. Grady Saunders
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# Redistribution and use in source and binary forms, with or without
|
4
4
|
# modification, are permitted provided that the following conditions
|
5
5
|
# are met:
|
6
|
-
#
|
6
|
+
#
|
7
7
|
# 1. Redistributions of source code must retain the above
|
8
8
|
# copyright notice, this list of conditions and the following
|
9
9
|
# disclaimer.
|
10
|
-
#
|
10
|
+
#
|
11
11
|
# 2. Redistributions in binary form must reproduce the above
|
12
12
|
# copyright notice, this list of conditions and the following
|
13
13
|
# disclaimer in the documentation and/or other materials
|
14
14
|
# provided with the distribution.
|
15
|
-
#
|
15
|
+
#
|
16
16
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
17
17
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
18
18
|
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
@@ -174,7 +174,7 @@ class String < ::String
|
|
174
174
|
end
|
175
175
|
|
176
176
|
# For sentence-like strings. Truncate to +n+ characters and replace the
|
177
|
-
# final broken word with an ellipsis.
|
177
|
+
# final broken word with an ellipsis.
|
178
178
|
def truncate n
|
179
179
|
if size <= n
|
180
180
|
return String.new self
|