ruboty-echo 0.0.1 → 0.1.0
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 +4 -4
- data/.rspec +1 -0
- data/CHANGELOG.md +2 -0
- data/README.md +8 -0
- data/lib/ruboty/echo.rb +1 -1
- data/lib/ruboty/echo/version.rb +1 -1
- data/ruboty-echo.gemspec +1 -0
- data/spec/ruboty/handlers/echo_spec.rb +34 -0
- data/spec/spec_helper.rb +16 -0
- metadata +23 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e83d44b5f3503fd9c6a71527a13152635397859
|
4
|
+
data.tar.gz: 23c4a8ce922463036d821f49d693241079ea0fbe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a032f42acab1e05286d54810c0966e7de3e79670c434ed7e6c9e019522fc585d513846c9f5c6e5e42e2ee2834004205727b9d6fd7627565073b0ee932445910b
|
7
|
+
data.tar.gz: 70007823a3b53248ce3dd604de8dfaec294e0a7c000909ea0cbc1420b9a113bc3d6c0ed3f6a49c14a9645609f190d5dfa4ffb3ef593317735dc8ef87bb6ade8e
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--require spec_helper
|
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -12,6 +12,14 @@ Add this line to your ruboty's Gemfile:
|
|
12
12
|
hubot image me deal with it
|
13
13
|
```
|
14
14
|
|
15
|
+
You can use ruboty as a timer combination with [ruboty-delay](https://github.com/taiki45/ruboty-delay).
|
16
|
+
|
17
|
+
```
|
18
|
+
> ruboty delay 1200 ruboty echo Finish 20 min period!
|
19
|
+
# ...20 minutes after
|
20
|
+
Finish 20 min period!
|
21
|
+
```
|
22
|
+
|
15
23
|
## Contributing
|
16
24
|
|
17
25
|
1. Fork it ( http://github.com/<my-github-username>/ruboty-echo/fork )
|
data/lib/ruboty/echo.rb
CHANGED
data/lib/ruboty/echo/version.rb
CHANGED
data/ruboty-echo.gemspec
CHANGED
@@ -0,0 +1,34 @@
|
|
1
|
+
RSpec.describe Ruboty::Handlers::Echo do
|
2
|
+
let(:robot) do
|
3
|
+
Ruboty::Robot.new
|
4
|
+
end
|
5
|
+
|
6
|
+
describe '#echo' do
|
7
|
+
shared_examples 'echoes given message' do
|
8
|
+
it 'echoes given message' do
|
9
|
+
expect(robot).to receive(:say).with(
|
10
|
+
hash_including(
|
11
|
+
body: given_message,
|
12
|
+
),
|
13
|
+
)
|
14
|
+
robot.receive(body: "#{robot.name} echo #{given_message}")
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
context 'without line break' do
|
19
|
+
let(:given_message) do
|
20
|
+
'test'
|
21
|
+
end
|
22
|
+
|
23
|
+
include_examples 'echoes given message'
|
24
|
+
end
|
25
|
+
|
26
|
+
context 'with line break' do
|
27
|
+
let(:given_message) do
|
28
|
+
"test\ntest"
|
29
|
+
end
|
30
|
+
|
31
|
+
include_examples 'echoes given message'
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'ruboty/echo'
|
2
|
+
|
3
|
+
RSpec.configure do |config|
|
4
|
+
config.expect_with :rspec do |expectations|
|
5
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
6
|
+
end
|
7
|
+
|
8
|
+
config.mock_with :rspec do |mocks|
|
9
|
+
mocks.verify_partial_doubles = true
|
10
|
+
end
|
11
|
+
|
12
|
+
config.disable_monkey_patching!
|
13
|
+
config.filter_run :focus
|
14
|
+
config.run_all_when_everything_filtered = true
|
15
|
+
config.warnings = true
|
16
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruboty-echo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Taiki ONO
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruboty
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 3.2.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 3.2.0
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: pry
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -74,6 +88,8 @@ extensions: []
|
|
74
88
|
extra_rdoc_files: []
|
75
89
|
files:
|
76
90
|
- ".gitignore"
|
91
|
+
- ".rspec"
|
92
|
+
- CHANGELOG.md
|
77
93
|
- Gemfile
|
78
94
|
- LICENSE.txt
|
79
95
|
- README.md
|
@@ -81,6 +97,8 @@ files:
|
|
81
97
|
- lib/ruboty/echo.rb
|
82
98
|
- lib/ruboty/echo/version.rb
|
83
99
|
- ruboty-echo.gemspec
|
100
|
+
- spec/ruboty/handlers/echo_spec.rb
|
101
|
+
- spec/spec_helper.rb
|
84
102
|
homepage: ''
|
85
103
|
licenses:
|
86
104
|
- MIT
|
@@ -105,5 +123,6 @@ rubygems_version: 2.2.2
|
|
105
123
|
signing_key:
|
106
124
|
specification_version: 4
|
107
125
|
summary: echo given command.
|
108
|
-
test_files:
|
109
|
-
|
126
|
+
test_files:
|
127
|
+
- spec/ruboty/handlers/echo_spec.rb
|
128
|
+
- spec/spec_helper.rb
|