schizm 0.0.15 → 0.0.16

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/schizm +22 -21
  3. data/lib/schizm/string.rb +5 -5
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 74bc927ef6f3af9381ef7897d35b00d805927aa8
4
- data.tar.gz: 08908c377f6f0868cdeb479a80e3847d252c6ef8
3
+ metadata.gz: 24fdbed1f01ab878a6c59c5f7350c159649184a8
4
+ data.tar.gz: e93d3a2e43bb0fb1d775b77419646573250de6d2
5
5
  SHA512:
6
- metadata.gz: c2bac1ac664e4c772e1a313d5f0eb718cd689fe3f388fd44874f87916daf098789dbb5b2fc7be7ee8a8f8de0b0692d7134a4d9042030ef808afae52331f63338
7
- data.tar.gz: 76e248942d8ee1806ad00897cde958c003b94031c0e583a79a4e06b72ab45aa3734b74d1a37405526e956ea662e8c55433c83d9f4acc9a3b1a5d97cc848d0f9d
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
- case ARGV.shift
11
- when "init"
12
- Schizm::Env::Opts.init.order!
13
- Schizm::Env.init
14
- when "build"
15
- Schizm::Env::Opts.build.order!
16
- Schizm::Env.build
17
- when "vim-install"
18
- Schizm::Env::Opts.vim_install.order!
19
- Schizm::Env.vim_install
20
- exit 0
21
- when "vim-uninstall"
22
- Schizm::Env::Opts.vim_uninstall.order!
23
- Schizm::Env.vim_uninstall
24
- exit 0
25
- when "home?"
26
- puts Schizm::Env.home
27
- exit 0
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
- exit 0
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schizm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
4
+ version: 0.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - M. Grady Saunders