wordbot 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Guardfile +9 -0
- data/README.md +2 -1
- data/Rakefile +5 -2
- data/bin/mutilator +4 -0
- data/features/mutilator.feature +5 -0
- data/features/support/env.rb +6 -0
- data/lib/wordbot.rb +4 -0
- data/lib/wordbot/bot.rb +4 -0
- data/lib/wordbot/cli/mutilator.rb +18 -0
- data/lib/wordbot/version.rb +1 -1
- data/spec/wordbot/mutilator_spec.rb +27 -0
- data/wordbot.gemspec +10 -4
- metadata +97 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5fa93326eb4d212f2bb997d415642c7ee5dc14b
|
4
|
+
data.tar.gz: eb4ffb556bfa002cde260a06d79e2a440f9e43fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17cf1bba2a6c23b1166274eb75863684e909576c741a69c217e221092de48168d383da7ab1f833e7f80e808e76089d2da50d535d3086ac17102ca73984374212
|
7
|
+
data.tar.gz: 39436873f852445e03ff8752a3f26fdf4c605e98aceae63a683a4f26ff9a19a477ea942ddbc1c340cdb7e890c8bdaa694d44691dcdf61347ce94313d635e8c0a
|
data/Guardfile
CHANGED
@@ -65,3 +65,12 @@ guard :rspec, cmd: "bundle exec rspec" do
|
|
65
65
|
end
|
66
66
|
|
67
67
|
end
|
68
|
+
|
69
|
+
guard "cucumber" do
|
70
|
+
watch(%r{^features/.+\.feature$})
|
71
|
+
watch(%r{^features/support/.+$}) { "features" }
|
72
|
+
|
73
|
+
watch(%r{^features/step_definitions/(.+)_steps\.rb$}) do |m|
|
74
|
+
Dir[File.join("**/#{m[1]}.feature")][0] || "features"
|
75
|
+
end
|
76
|
+
end
|
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
[![Build Status](https://travis-ci.org/pikesley/wordbot.svg)](https://travis-ci.org/pikesley/wordbot)
|
2
2
|
[![Dependency Status](http://img.shields.io/gemnasium/pikesley/wordbot.svg)](https://gemnasium.com/pikesley/wordbot)
|
3
|
+
[![Coverage Status](http://img.shields.io/coveralls/pikesley/wordbot.svg)](https://coveralls.io/r/pikesley/wordbot)
|
3
4
|
[![Code Climate](http://img.shields.io/codeclimate/github/pikesley/wordbot.svg)](https://codeclimate.com/github/pikesley/wordbot)
|
4
5
|
[![Gem Version](http://img.shields.io/gem/v/wordbot.svg)](https://rubygems.org/gems/wordbot)
|
5
6
|
[![License](http://img.shields.io/:license-mit-blue.svg)](http://pikesley.mit-license.org)
|
6
|
-
[![Badges](http://img.shields.io/:badges-
|
7
|
+
[![Badges](http://img.shields.io/:badges-7/7-ff6799.svg)](https://github.com/badges/badgerbadgerbadger)
|
data/Rakefile
CHANGED
@@ -1,7 +1,10 @@
|
|
1
1
|
require 'bundler/gem_tasks'
|
2
|
-
|
3
2
|
require 'rspec/core/rake_task'
|
3
|
+
require 'cucumber/rake/task'
|
4
|
+
require 'coveralls/rake/task'
|
4
5
|
|
6
|
+
Coveralls::RakeTask.new
|
5
7
|
RSpec::Core::RakeTask.new
|
8
|
+
Cucumber::Rake::Task.new
|
6
9
|
|
7
|
-
task :default => [:spec]
|
10
|
+
task :default => [:spec, :cucumber, 'coveralls:push']
|
data/bin/mutilator
ADDED
data/lib/wordbot.rb
CHANGED
data/lib/wordbot/bot.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
module Wordbot
|
2
|
+
module CLI
|
3
|
+
class Mutilator < Thor
|
4
|
+
desc 'version', 'Print the version'
|
5
|
+
def version
|
6
|
+
puts "mutilator version %s" % [
|
7
|
+
VERSION
|
8
|
+
]
|
9
|
+
end
|
10
|
+
map %w(-v --version) => :version
|
11
|
+
|
12
|
+
desc 'generate', 'Generated some mutilated text'
|
13
|
+
def generate *words
|
14
|
+
puts Wordbot::Bot.mutilate words.join ' '
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/wordbot/version.rb
CHANGED
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Wordbot
|
4
|
+
describe Bot do
|
5
|
+
context 'Mutilate some strings' do
|
6
|
+
it 'should mutilate "This contains some words"' do
|
7
|
+
expect(Wordbot::Bot.mutilate 'This contains some words')
|
8
|
+
.to match /^T..s c......s s..e w...s$/
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'should mutilate "This has a 74 in it"' do
|
12
|
+
expect(Wordbot::Bot.mutilate 'This has a 74 embedded in it')
|
13
|
+
.to match /^T..s has a 74 e......d in it$/
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'should mutilate "What about a hyphenated-word?"' do
|
17
|
+
expect(Wordbot::Bot.mutilate 'What about a hyphenated-word?')
|
18
|
+
.to match /^W..t a...t a h........d-w..d\?$/
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'should mutilate "And some [other] bits \'of\' {punctuation}!"' do
|
22
|
+
expect(Wordbot::Bot.mutilate "And some [other] bits 'of' {punctuation}!")
|
23
|
+
.to match /^And s..e \[o...r\] b..s 'of' \{p.........n\}!/
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/wordbot.gemspec
CHANGED
@@ -18,10 +18,16 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
+
spec.add_dependency 'thor', '~> 0.19'
|
22
|
+
|
21
23
|
spec.add_development_dependency 'bundler', '~> 1.7'
|
22
24
|
spec.add_development_dependency 'rake', '~> 10.0'
|
23
|
-
spec.add_development_dependency 'rspec'
|
24
|
-
spec.add_development_dependency 'guard'
|
25
|
-
spec.add_development_dependency 'guard-rspec'
|
26
|
-
spec.add_development_dependency '
|
25
|
+
spec.add_development_dependency 'rspec', '~> 3.1'
|
26
|
+
spec.add_development_dependency 'guard', '~> 2.10'
|
27
|
+
spec.add_development_dependency 'guard-rspec', '~> 4.5'
|
28
|
+
spec.add_development_dependency 'cucumber', '~> 1.3'
|
29
|
+
spec.add_development_dependency 'aruba', '~> 0.6'
|
30
|
+
spec.add_development_dependency 'guard-cucumber', '~> 1.5'
|
31
|
+
spec.add_development_dependency 'terminal-notifier-guard', '~> 1.6'
|
32
|
+
spec.add_development_dependency 'coveralls', '~> 0.7'
|
27
33
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wordbot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pikesley
|
@@ -10,6 +10,20 @@ bindir: bin
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2014-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: thor
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.19'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.19'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -42,62 +56,119 @@ dependencies:
|
|
42
56
|
name: rspec
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
|
-
- - "
|
59
|
+
- - "~>"
|
46
60
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
61
|
+
version: '3.1'
|
48
62
|
type: :development
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
|
-
- - "
|
66
|
+
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
68
|
+
version: '3.1'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: guard
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
|
-
- - "
|
73
|
+
- - "~>"
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
75
|
+
version: '2.10'
|
62
76
|
type: :development
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
|
-
- - "
|
80
|
+
- - "~>"
|
67
81
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
82
|
+
version: '2.10'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: guard-rspec
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
|
-
- - "
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '4.5'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '4.5'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: cucumber
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '1.3'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1.3'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: aruba
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
74
116
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
117
|
+
version: '0.6'
|
76
118
|
type: :development
|
77
119
|
prerelease: false
|
78
120
|
version_requirements: !ruby/object:Gem::Requirement
|
79
121
|
requirements:
|
80
|
-
- - "
|
122
|
+
- - "~>"
|
81
123
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
124
|
+
version: '0.6'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: guard-cucumber
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '1.5'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '1.5'
|
83
139
|
- !ruby/object:Gem::Dependency
|
84
140
|
name: terminal-notifier-guard
|
85
141
|
requirement: !ruby/object:Gem::Requirement
|
86
142
|
requirements:
|
87
|
-
- - "
|
143
|
+
- - "~>"
|
88
144
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
145
|
+
version: '1.6'
|
90
146
|
type: :development
|
91
147
|
prerelease: false
|
92
148
|
version_requirements: !ruby/object:Gem::Requirement
|
93
149
|
requirements:
|
94
|
-
- - "
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '1.6'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: coveralls
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0.7'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
95
165
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
166
|
+
version: '0.7'
|
97
167
|
description: ''
|
98
168
|
email:
|
99
169
|
- sam@pikesley.org
|
100
|
-
executables:
|
170
|
+
executables:
|
171
|
+
- mutilator
|
101
172
|
extensions: []
|
102
173
|
extra_rdoc_files: []
|
103
174
|
files:
|
@@ -105,15 +176,19 @@ files:
|
|
105
176
|
- ".rspec"
|
106
177
|
- ".travis.yml"
|
107
178
|
- Gemfile
|
108
|
-
- Gemfile.lock
|
109
179
|
- Guardfile
|
110
180
|
- LICENSE.md
|
111
181
|
- README.md
|
112
182
|
- Rakefile
|
183
|
+
- bin/mutilator
|
184
|
+
- features/mutilator.feature
|
185
|
+
- features/support/env.rb
|
113
186
|
- lib/wordbot.rb
|
114
187
|
- lib/wordbot/bot.rb
|
188
|
+
- lib/wordbot/cli/mutilator.rb
|
115
189
|
- lib/wordbot/version.rb
|
116
190
|
- spec/spec_helper.rb
|
191
|
+
- spec/wordbot/mutilator_spec.rb
|
117
192
|
- spec/wordbot/scrambler_spec.rb
|
118
193
|
- spec/wordbot/splitter_spec.rb
|
119
194
|
- wordbot.gemspec
|
@@ -142,6 +217,9 @@ signing_key:
|
|
142
217
|
specification_version: 4
|
143
218
|
summary: Do some stuff with text
|
144
219
|
test_files:
|
220
|
+
- features/mutilator.feature
|
221
|
+
- features/support/env.rb
|
145
222
|
- spec/spec_helper.rb
|
223
|
+
- spec/wordbot/mutilator_spec.rb
|
146
224
|
- spec/wordbot/scrambler_spec.rb
|
147
225
|
- spec/wordbot/splitter_spec.rb
|