lita-substitution 0.1.0 → 0.1.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b829589eaf7fa00723960191133db5819b812ea8
4
- data.tar.gz: e190a09e0256fe230ffd6822938050f027508240
3
+ metadata.gz: 0ba755045bc3d02edd7fecc280533da8cc549b93
4
+ data.tar.gz: 81dde7527843ea7824be3450279f6d9efdd24074
5
5
  SHA512:
6
- metadata.gz: f1afe3cd369dd80b4732a6a64c74b7549744b2be35b9575add12c0b73bfab16468e670acc8161c7d157ae94a256d94347701a8210cd26af9f7f701d895baf4e3
7
- data.tar.gz: cf4e9406b6f2b806aaecfdc54a24caa6742b411a44178e445d6a8883d6e9a08da55b22f4510da2b4eaed2138adc09e032ada1eb901ff4ac42bb4258bc6accac8
6
+ metadata.gz: 6061d4650a25a01440cd0a1cc4d1f66359430091251332761b080f8ddea0f2b2c0a5236ecd1334591d76f515ba2b2e2f74d5a3caedbdb0087d01d6827c636fb4
7
+ data.tar.gz: 2dea854ac4be6dde8cc1ba1adcd8082ed0689beee8fad5745710cbf5a66f7ac4173f3b558854f6e6e867d24377e7e323c776f8f68bbf04930a6b12c91de02af3
@@ -0,0 +1,14 @@
1
+ # Change Log
2
+
3
+ ## [v0.1.1](https://github.com/braiden-vasco/lita-substitution/tree/v0.1.1) (2015-10-25)
4
+ [Full Changelog](https://github.com/braiden-vasco/lita-substitution/compare/v0.1.0...v0.1.1)
5
+
6
+ **Merged pull requests:**
7
+
8
+ - Allow embedded substitutions [\#2](https://github.com/braiden-vasco/lita-substitution/pull/2) ([braiden-vasco](https://github.com/braiden-vasco))
9
+ - Add instructions [\#1](https://github.com/braiden-vasco/lita-substitution/pull/1) ([braiden-vasco](https://github.com/braiden-vasco))
10
+
11
+ ## [v0.1.0](https://github.com/braiden-vasco/lita-substitution/tree/v0.1.0) (2015-10-25)
12
+
13
+
14
+ \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
data/README.md CHANGED
@@ -5,4 +5,39 @@ Lita::Handlers::Substitution
5
5
  [![Build Status](https://travis-ci.org/braiden-vasco/lita-substitution.svg)](https://travis-ci.org/braiden-vasco/lita-substitution)
6
6
  [![Coverage Status](https://coveralls.io/repos/braiden-vasco/lita-substitution/badge.svg)](https://coveralls.io/r/braiden-vasco/lita-substitution)
7
7
 
8
- Shell-like command substitution for the Lita chat bot.
8
+ Shell-like command substitution for the [Lita](http://lita.io) chat bot.
9
+
10
+ Allows you to use the output of commands as arguments to another command.
11
+ Hypothetical example:
12
+
13
+ ```
14
+ You: lita hello
15
+ Lita: Hello, World!
16
+ You: lita upcase qwerty
17
+ Lita: QWERTY
18
+ You: lita upcase $(hello)
19
+ Lita: HELLO, WORLD!
20
+ ```
21
+
22
+ You can get the most power by using it with
23
+ [lita-key-value](https://github.com/jimmycuadra/lita-key-value):
24
+
25
+ ```
26
+ You: lita kv set text $(get some text)
27
+ Lita: Set text to Here is some text.
28
+ You: lita upcase $(kv get text)
29
+ Lita: HERE IS SOME TEXT.
30
+ ```
31
+
32
+ Usage
33
+ -----
34
+
35
+ At first, see the documentation for Lita: http://docs.lita.io/
36
+
37
+ ### Installation
38
+
39
+ Add **lita-substitution** to your Lita instance's Gemfile:
40
+
41
+ ```ruby
42
+ gem 'lita-substitution', '~> 0.1.1'
43
+ ```
@@ -79,7 +79,11 @@ module Lita
79
79
 
80
80
  when '$'
81
81
  if s[i + 1] == '('
82
- last = substs[command.length] = '' if deep == 0
82
+ if deep > 0
83
+ last << '$('
84
+ else
85
+ last = substs[command.length] = ''
86
+ end
83
87
  i += 1
84
88
  deep += 1
85
89
  else
@@ -88,6 +92,7 @@ module Lita
88
92
 
89
93
  when ')'
90
94
  if deep > 0
95
+ last << ')' if deep > 1
91
96
  deep -= 1
92
97
  else
93
98
  command << ')'
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'lita-substitution'
5
- spec.version = '0.1.0'
5
+ spec.version = '0.1.1'
6
6
  spec.authors = ['Braiden Vasco']
7
7
  spec.email = ['braiden-vasco@users.noreply.github.com']
8
8
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-substitution
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Braiden Vasco
@@ -120,6 +120,7 @@ files:
120
120
  - ".rubocop.yml"
121
121
  - ".simplecov"
122
122
  - ".travis.yml"
123
+ - CHANGELOG.md
123
124
  - Gemfile
124
125
  - LICENSE
125
126
  - README.md