wordbot 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wordbot.rb +2 -0
- data/lib/wordbot/cli/mutilator.rb +16 -0
- data/lib/wordbot/version.rb +1 -1
- data/wordbot.gemspec +1 -0
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f129a69132774c91c47e2a2bc9e1dcb64736f66b
|
4
|
+
data.tar.gz: 596fc000f8ff1d25aef7d22386c1c08b23356652
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41b54151d9c222dec3f0f81c8f2a64577d8ee4da0fc48849eb186005c9f24ba0316fb6da2db85f6d05c2779b88f25f8e23b9590c745e8d841b311cd36a9f527b
|
7
|
+
data.tar.gz: 51551a5f46fbcceb752cc7b98059b5d2ea0aa21bec01e44fc8c04cfc42083fbc29fe89dcec68ef6f814f2a585bfa016699790c9e102cff239e1d6acdbe677de8
|
data/lib/wordbot.rb
CHANGED
@@ -13,6 +13,22 @@ module Wordbot
|
|
13
13
|
def generate *words
|
14
14
|
puts Wordbot::Bot.mutilate words.join ' '
|
15
15
|
end
|
16
|
+
map %w(-g --generate) => :generate
|
17
|
+
|
18
|
+
desc 'tweet', 'Tweet the mutilated text'
|
19
|
+
def tweet *words
|
20
|
+
yaml = YAML.load File.open "#{ENV['HOME']}/.wordbotrc"
|
21
|
+
client = Twitter::REST::Client.new do |config|
|
22
|
+
config.consumer_key = yaml['twitter']['consumer']['key']
|
23
|
+
config.consumer_secret = yaml['twitter']['consumer']['secret']
|
24
|
+
config.access_token = yaml['twitter']['oauth']['token']
|
25
|
+
config.access_token_secret = yaml['twitter']['oauth']['secret']
|
26
|
+
end
|
27
|
+
|
28
|
+
tweet = Wordbot::Bot.mutilate words.join ' '
|
29
|
+
client.update tweet
|
30
|
+
end
|
31
|
+
map %w(-t --tweet) => :tweet
|
16
32
|
end
|
17
33
|
end
|
18
34
|
end
|
data/lib/wordbot/version.rb
CHANGED
data/wordbot.gemspec
CHANGED
@@ -19,6 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
21
|
spec.add_dependency 'thor', '~> 0.19'
|
22
|
+
spec.add_dependency 'twitter', '~> 5.0'
|
22
23
|
|
23
24
|
spec.add_development_dependency 'bundler', '~> 1.7'
|
24
25
|
spec.add_development_dependency 'rake', '~> 10.0'
|
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.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pikesley
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.19'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: twitter
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '5.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '5.0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|