pry-send_tweet.rb 0.1.0 → 0.2.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/README.md +12 -1
- data/lib/pry-send_tweet.rb +7 -0
- data/pry-send_tweet.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c578f34e335ebbefdebc48fd2c8455bb01e5254e9f2b885e8247c68cb790c97f
|
4
|
+
data.tar.gz: 5cc2b991ef40b6cde0355de9d703732ca635b7275bb93ab15c2fb6717fe222aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b45804086d9a4920edcc32ef1c1a043a044f58770cf910907795c95010c71fc4931a26b9da7d3d566f0ed4eb222208bf93f0525f1397ac6e2a606c9e25c7ca68
|
7
|
+
data.tar.gz: d409b2daccb1492dbab618b1577e92192e899c2e12021c2334ab1c7605a715cbe745093387ea1390f7bcef5b9a863f22f5e1231912ce59cdc50e2d0ea2ea05b0
|
data/README.md
CHANGED
@@ -29,13 +29,24 @@ end
|
|
29
29
|
|
30
30
|
## Usage
|
31
31
|
|
32
|
+
__1.__
|
33
|
+
|
34
|
+
Sending a tweet:
|
35
|
+
|
32
36
|
[1] pry(main)> send-tweet Hello twitter, speaking from #pry
|
33
37
|
https://twitter.com/xxx/status/xxx
|
34
38
|
|
39
|
+
__2.__
|
40
|
+
|
41
|
+
Sending a tweet, with eval'ed ruby:
|
42
|
+
|
43
|
+
[2] pry(main)> send-tweet #{rand(100)}
|
44
|
+
https://twitter.com/xxx/status/xxx
|
45
|
+
|
35
46
|
## Install
|
36
47
|
|
37
48
|
gem install pry-send_tweet.rb
|
38
49
|
|
39
50
|
## License
|
40
51
|
|
41
|
-
MIT
|
52
|
+
[MIT](./LICENSE.txt)
|
data/lib/pry-send_tweet.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'pry' if not defined?(Pry::ClassCommand)
|
1
2
|
Pry.commands.add_command Class.new(Pry::ClassCommand) {
|
2
3
|
require 'twitter'
|
3
4
|
match 'send-tweet'
|
@@ -14,6 +15,12 @@ Pry.commands.add_command Class.new(Pry::ClassCommand) {
|
|
14
15
|
end
|
15
16
|
|
16
17
|
def client
|
18
|
+
if _pry_.config.twitter == nil
|
19
|
+
raise Pry::CommandError, "_pry_.config.twitter is nil!\n" \
|
20
|
+
"Please set the required keys and tokens to send " \
|
21
|
+
"tweets using Twitters API. \n" \
|
22
|
+
"Visit https://github.com/r-obert/pry-send_tweet.rb#readme to learn how."
|
23
|
+
end
|
17
24
|
@client ||= begin
|
18
25
|
Twitter::REST::Client.new {|config|
|
19
26
|
config.consumer_key = _pry_.config.twitter.consumer_key
|
data/pry-send_tweet.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "pry-send_tweet.rb"
|
3
|
-
spec.version = "0.
|
3
|
+
spec.version = "0.2.0"
|
4
4
|
spec.authors = ["Robert Gleeson"]
|
5
5
|
spec.email = "trebor.g@protonmail.com"
|
6
6
|
spec.summary = "pry-send_tweet.rb adds a Pry command that can send tweets using your personal twitter account."
|