pry-twitter 1.22.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +13 -0
  3. data/LICENSE.txt +24 -0
  4. data/PRY_LICENSE.txt +25 -0
  5. data/README.md +546 -0
  6. data/Vagrantfile +48 -0
  7. data/art/16-60174b5812.jpg +0 -0
  8. data/art/16-a31deea6f0.jpg +0 -0
  9. data/art/17-b3d5d6f6c2.jpg +0 -0
  10. data/art/44-e44743a5bb.jpg +0 -0
  11. data/art/51-5e4dc5fd92.jpg +0 -0
  12. data/art/51-82bde81305.jpg +0 -0
  13. data/art/51-ad821fa377.jpg +0 -0
  14. data/art/51-b90d5dd6a6.jpg +0 -0
  15. data/art/51-da43a4ef4f.jpg +0 -0
  16. data/art/51-e94c3387e1.jpg +0 -0
  17. data/art/52-eec4df2edf.jpg +0 -0
  18. data/art/53-9d231893e1.jpg +0 -0
  19. data/art/54-39b1063483.jpg +0 -0
  20. data/art/55-e41f9896d0.jpg +0 -0
  21. data/art/56-c82d4e5b61.jpg +0 -0
  22. data/art/59-2a2c9cd962.jpg +0 -0
  23. data/art/61-3970c79d47.jpg +0 -0
  24. data/art/62-5704cc1652.jpg +0 -0
  25. data/art/62-b0aceb0fa6.jpg +0 -0
  26. data/art/62-da0faf972e.jpg +0 -0
  27. data/art/frankewilde.jpg +0 -0
  28. data/art/rollingstone.jpg +0 -0
  29. data/art/tide.jpg +0 -0
  30. data/art/windows10.png +0 -0
  31. data/lib/pry-send_tweet.rb +77 -0
  32. data/lib/pry/pager/system_pager.rb +25 -0
  33. data/lib/pry/send_tweet/commands/base_command.rb +72 -0
  34. data/lib/pry/send_tweet/commands/easter_eggs.rb +564 -0
  35. data/lib/pry/send_tweet/commands/paging/paging_support.rb +16 -0
  36. data/lib/pry/send_tweet/commands/read_tweets.rb +93 -0
  37. data/lib/pry/send_tweet/commands/read_tweets/translate_actions.rb +94 -0
  38. data/lib/pry/send_tweet/commands/send_tweet.rb +164 -0
  39. data/lib/pry/send_tweet/commands/twitter_action.rb +118 -0
  40. data/lib/pry/send_tweet/commands/twitter_action/delete_tweet_actions.rb +19 -0
  41. data/lib/pry/send_tweet/commands/twitter_action/follow_actions.rb +66 -0
  42. data/lib/pry/send_tweet/commands/twitter_action/like_actions.rb +23 -0
  43. data/lib/pry/send_tweet/commands/twitter_action/mute_actions.rb +23 -0
  44. data/lib/pry/send_tweet/commands/twitter_action/profile_actions.rb +60 -0
  45. data/lib/pry/send_tweet/commands/twitter_action/suggested_actions.rb +20 -0
  46. data/lib/pry/send_tweet/commands/twitter_search.rb +36 -0
  47. data/lib/pry/send_tweet/renderers/tweet_renderer.rb +103 -0
  48. data/lib/pry/send_tweet/renderers/user_renderer.rb +17 -0
  49. data/lib/pry/send_tweet/tty-box.rb +73 -0
  50. data/lib/pry/send_tweet/twitter_io.rb +26 -0
  51. data/lib/pry/send_tweet/version.rb +6 -0
  52. data/lib/time-ago-in-words/README.md +14 -0
  53. data/lib/time-ago-in-words/lib/time-ago-in-words.rb +37 -0
  54. data/lib/time-ago-in-words/time-ago-in-words.gemspec +14 -0
  55. data/pry-send_tweet.gemspec +23 -0
  56. data/samples/freebsd-zshrc +5 -0
  57. data/samples/loader.conf +1 -0
  58. data/samples/tmuxinator-vagrant.yml +11 -0
  59. data/vms/freebsd.rb +18 -0
  60. metadata +145 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: b254f0396621ebe391b786e7b61a5cf65bb04e2240e8d1bc3ba85395dfd7c433
4
+ data.tar.gz: a6d8ef24a96ef8254fc9ff8d9d51c9995cd48a684bcb73b932395601afab2cbd
5
+ SHA512:
6
+ metadata.gz: 8bd5214391222b1f6686423431948dddde0ef81e7592e2fcb906fb4304086260da2f447c36fdab66753a42be7d69a898f1925621d9f0c1d38f25cd6bd8573408
7
+ data.tar.gz: ce03edcf541fcdaf8c6f1ff6766fc683df16e5b0c079a3aba81f91bb4151ad8a7bec440645fca28e24adbdb78d967133755bbc737de9c75a2dd1e6c69d7969ba
data/CHANGELOG.md ADDED
@@ -0,0 +1,13 @@
1
+ # CHANGELOG
2
+
3
+ ## v1.22.0 (#Charlie)
4
+
5
+ - Add art
6
+
7
+ - Fix boot errors when 'config.twitter' is absent.
8
+
9
+ - Automatically install the 'vagrant-reload' plugin when running 'vms/freebsd.rb'.
10
+
11
+ - Change codename for the v1.22 series to '#Charlie #Tango #Pig #Gardai'.
12
+
13
+
data/LICENSE.txt ADDED
@@ -0,0 +1,24 @@
1
+ Copyright (c) 2018, Robert McIntyre
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are met:
6
+ * Redistributions of source code must retain the above copyright
7
+ notice, this list of conditions and the following disclaimer.
8
+ * Redistributions in binary form must reproduce the above copyright
9
+ notice, this list of conditions and the following disclaimer in the
10
+ documentation and/or other materials provided with the distribution.
11
+ * Neither the name of the Fry|Pry organisations nor the
12
+ names of its contributors may be used to endorse or promote products
13
+ derived from this software without specific prior written permission.
14
+
15
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18
+ DISCLAIMED. IN NO EVENT SHALL Fry|Pry (The Copyright Holders) BE LIABLE FOR ANY
19
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/PRY_LICENSE.txt ADDED
@@ -0,0 +1,25 @@
1
+ License
2
+ -------
3
+
4
+ (The MIT License)
5
+
6
+ Copyright (c) 2011-2019 The Pry Team
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining
9
+ a copy of this software and associated documentation files (the
10
+ 'Software'), to deal in the Software without restriction, including
11
+ without limitation the rights to use, copy, modify, merge, publish,
12
+ distribute, sublicense, and/or sell copies of the Software, and to
13
+ permit persons to whom the Software is furnished to do so, subject to
14
+ the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be
17
+ included in all copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
20
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
23
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
24
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
25
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,546 @@
1
+ # fry-send_tweet.rb
2
+
3
+ * [Introduction](#introduction)
4
+ * [API Access](#api-access)
5
+ * [Configuration - required](#configuration)
6
+ * [Usage](#usage)
7
+ * [Sending Tweets](#sending-tweets)
8
+ * [Reading Tweets](#reading-tweets)
9
+ * [Deleting Tweets](#deleting-tweets)
10
+ * [Liking Tweets](#liking-tweets)
11
+ * [Following / unfollowing](#following-unfollowing)
12
+ * [Searching Twitter](#searching-twitter)
13
+ * [Retweets](#retweets)
14
+ * [Profile Actions](#profile-actions)
15
+ * [Twitter Suggestions](#twitter-suggestions)
16
+ * [Muting other users](#muting-other-users)
17
+ * [Sticky local variable: `_twitter_` ](#special-variable-_twitter_)
18
+ * [Tip: Command Aliases](#tip)
19
+ * [Multi-tasking: tmux / screen](#multi-tasking)
20
+ * [Install](#install)
21
+ * [Rubygem](#install-rubygem)
22
+ * [Virtual Machines](#vms)
23
+ * [FreeBSD](#vms-freebsd)
24
+ * [Screenshots](#screenshots)
25
+ * [License](#license)
26
+
27
+ ## <a id='Introduction'>Introduction</a>
28
+
29
+ An extensible Twitter client that lives inside the Pry and Fry REPLs.
30
+
31
+ ## <a id='api-access'>API Access</a>
32
+
33
+ Using the Twitter API requires a developer account.
34
+ Follow the instructions at [https://developer.twitter.com](https://developer.twitter.com)
35
+ if you haven't already setup access to the Twitter API.
36
+
37
+ ## <a id='configuration'>Configuration (required)</a>
38
+
39
+ The placeholder keys and tokens in the below example can be replaced
40
+ by those from your developer account. pry-send_tweet.rb can be configured from
41
+ a `.pryrc` file using Ruby, or through a YAML file located at
42
+ `$HOME/.pry-send_tweet.yml`
43
+
44
+ __1. Ruby__
45
+
46
+ ```ruby
47
+ # .pryrc
48
+ Pry.configure do |config|
49
+ config.twitter = Pry::Config.from_hash({
50
+ # Required
51
+ consumer_key: '<consumer key>',
52
+ consumer_secret: '<consumer secret>',
53
+ access_token: '<access token>',
54
+ access_token_secret: '<access token secret>',
55
+ # Optional
56
+ # The number of tweets to request from Twitter when reading tweets via
57
+ # its API. The default is 200, a lower number could speed up requests if
58
+ # you find them to be slow.
59
+ default_read_size: 100,
60
+ # Optional
61
+ # The User-Agent to use when making requests to the Twitter API.
62
+ # Default is: 'pry-send_tweet.rb vX.Y.Z'.
63
+ user_agent: 'Custom User-Agent',
64
+ # Optional
65
+ # The width of a box that contains a tweet or user. The default width is 100.
66
+ box_width: 120,
67
+ # Optional
68
+ # A Yandex API key for translating tweets when using `read-tweets -x`.
69
+ yandex_key: 'xxx',
70
+ # Optional
71
+ # The language tweets should be translated to, the default is 'en' (English).
72
+ yandex_lang: 'ru'
73
+ })
74
+ end
75
+ ```
76
+
77
+ __2. YAML__
78
+
79
+ `$HOME/.pry-send_tweet.yml`:
80
+
81
+ ```yaml
82
+ ---
83
+ # Required
84
+ consumer_key: '<consumer key>'
85
+ consumer_secret: '<consumer secret>'
86
+ access_token: '<access token>'
87
+ access_token_secret: '<access token secret>'
88
+ # Optional
89
+ default_read_size: 100
90
+ # Optional
91
+ user_agent: 'Your User-Agent string'
92
+ # Optional
93
+ box_width: 120
94
+ # Optional
95
+ yandex_key: xxx
96
+ yandex_lang: xx
97
+ ```
98
+
99
+ ## <a id='usage'>Usage</a>
100
+
101
+ There are four commands added to Pry by this plugin, those commands are:
102
+
103
+ * `send-tweet`
104
+ For sending tweets.
105
+
106
+ * `read-tweets`
107
+ For reading tweets.
108
+
109
+ * `twitter-action` (aliased as: `on-twitter`)
110
+ For performing misc actions on Twitter, such as following, unfollowing, etc.
111
+
112
+ * `twitter-search`
113
+ For searching Twitter.
114
+
115
+ Each command provides help, that can be shown by appending `--help` to the
116
+ command. Example:
117
+
118
+ [1] pry(main)> send-tweet --help
119
+
120
+ ### <a id='sending-tweets'>Sending tweets</a>
121
+
122
+
123
+ * Send a tweet:
124
+
125
+ # Your editor opens (`_pry_.editor`), compose a tweet then hit save & close.
126
+ # You'll then get the url for your tweet:
127
+ [1] pry(main)> send-tweet
128
+ https://twitter.com/xxx/status/xxx
129
+
130
+
131
+ * Send a tweet with an image attached:
132
+
133
+ [1] pry(main)> send-tweet --file #{File.join ENV['HOME'], 'photos', 'image.jpg'}
134
+
135
+
136
+ * Send a tweet with multiple images attached:
137
+
138
+ [1] pry(main)> send-tweet --file #{%w[1.jpg 2.jpg 3.jpg].join(',')}
139
+
140
+ * Reply to a tweet:
141
+
142
+ [1] pry(main)> send-tweet --reply-to https://twitter.com/username/status/1
143
+
144
+ * Send a tweet that will self-destruct after 70 seconds.
145
+ It's worth adding that if the Pry process exits this operation will be cancelled:
146
+
147
+ [1] pry(main)> send-tweet --self-destruct=70
148
+
149
+ * Send a tweet that will be published 70 seconds in the future.
150
+ It's worth adding that if the Pry process exits, this operation will be cancelled:
151
+
152
+ [1] pry(main)> send-tweet --delay=70
153
+
154
+ * Delay sending a tweet until 12AM, today. `--self-destruct` also supports this
155
+ syntax:
156
+
157
+ [1] pry(main)> send-tweet --delay=00:00
158
+
159
+ ### <a id='reading-tweets'>Reading tweets</a>
160
+
161
+ By default the tweets displayed by the `read-tweets` command are automatically
162
+ refreshed every 5 minutes.
163
+
164
+ That can be changed to a custom interval by setting `Pry.config.twitter.refresh_interval`
165
+ to a number of seconds, or to `false` if you want to disable this feature.
166
+
167
+ * Read recent tweets from your timeline:
168
+
169
+ [1] pry(main)> read-tweets
170
+
171
+ * Read recent tweets from the timeline of another user:
172
+
173
+ [1] pry(main)> read-tweets -t rubygems
174
+
175
+ * Read recent tweets that `@mention` you:
176
+
177
+ [1] pry(main)> read-tweets --mentions
178
+
179
+ * Read recent tweets that you've liked:
180
+
181
+ [1] pry(main) read-tweets --likes
182
+
183
+ * Read recent tweets liked by another user:
184
+
185
+ [1] pry(main)> read-tweets --likes ladygaga
186
+
187
+ * Read recent tweets sent as replies by a given user, the example uses `@github`:
188
+
189
+ [1] pry(main)> read-tweets --replies github
190
+
191
+ * Read a translated copy of a tweet, using the
192
+ [Yandex translation API](https://translate.yandex.com/developers).
193
+ The configuration instructions for Yandex are included in the [configuration section](#configuration).
194
+
195
+ [1] pry(main)> read-tweets -x https://twitter.com/user/status/1
196
+
197
+ * Read a translated copy of a piece of text:
198
+
199
+ [1] pry(main)> read-tweets -tx='#{File.binread "persian.txt"}'
200
+ [2] pry(main)> read-tweets -tx='Guten Tag'
201
+ [3] pry(main)> read-tweets -tx='Hola'
202
+
203
+ * Sometimes Yandex cannot detect the language of the text or tweet being
204
+ translated, or it will guess the source language incorrectly. In case
205
+ this happens, the source language can be set explicitly:
206
+
207
+ [1] pry(main)> read-tweets --source-lang=fa -x https://url/to/farsi/tweet
208
+ [1] pry(main)> read-tweets --source-lang=sw -tx='Habari yako'
209
+
210
+ * Read 100 recent tweets instead of the default 200 recent tweets.
211
+ **Tip:** `--count` can be combined with all of the options described above.
212
+
213
+ [1] pry(main)> read-tweets --count 100
214
+
215
+ * By default retweets are not displayed.
216
+ To display retweets, pass the `--with-retweets` option.
217
+
218
+ [1] pry(main)> read-tweets --with-retweets
219
+
220
+ ### <a id='deleting-tweets'>Deleting tweets</a>
221
+
222
+ * Delete one or more tweets with a comma separated list:
223
+
224
+ [1] pry(main)> on-twitter --delete-tweet https://twitter.com/username/status/1,https://twitter.com/username/status/2
225
+
226
+ * Delete one or more retweets with a comma separated list:
227
+
228
+ [1] pry(main)> on-twitter --delete-retweet https://twitter.com/username/status/1,https://twitter.com/username/status/2
229
+
230
+ ### <a id='liking-tweets'>Liking tweets</a>
231
+
232
+ * Like one or more tweets with a comma separated list:
233
+
234
+ [1] pry(main)> on-twitter --like https://twitter.com/user/status/1,https://twitter.com/user/status/2
235
+
236
+ * Unlike one or more tweets with a comma separated list:
237
+
238
+ [1] pry(main)> on-twitter --unlike https://twitter.com/user/status/1,https://twitter.com/user/status/2
239
+
240
+ ### <a id='following-unfollowing'> Following / unfollowing </a>
241
+
242
+ * Follow one or more tweeters with a comma separated list:
243
+
244
+ [1] pry(main)> on-twitter --follow user1,user2,user3
245
+
246
+ * Unfollow one or more tweeters with a comma separated list:
247
+
248
+ [1] pry(main)> on-twitter --unfollow user1,user2,user3,user4
249
+
250
+ * Show the tweeters who are following you:
251
+
252
+ [1] pry(main)> on-twitter --show-followers
253
+
254
+ * Show the tweeters who you follow:
255
+
256
+ [1] pry(main)> on-twitter --show-following
257
+
258
+ * Both `--show-following` and `--show-followers` accept an optional argument
259
+ that can be used to filter the result set.
260
+
261
+ [1] pry(main)> on-twitter --show-following=[0-9]$
262
+
263
+ ### <a id='searching-twitter'>Searching Twitter</a>
264
+
265
+ The `twitter-search` command can be used to search Twitter.
266
+
267
+ * Search Twitter using a given hashtag:
268
+
269
+ [1] pry(main)> twitter-search #ruby
270
+
271
+ ### <a id='retweets'>Retweets</a>
272
+
273
+ * Retweet one or more tweets with a comma separated list:
274
+
275
+ [1] pry(main)> on-twitter --retweet https://twitter.com/user/status/1,https://twitter.com/user/status/2
276
+
277
+ ### <a id='profile-actions'>Profile actions</a>
278
+
279
+ * Set the name visible on your profile:
280
+
281
+ [1] pry(main)> on-twitter --set-profile-name=<name>
282
+
283
+ * Set the profile bio / description visible on your profile:
284
+
285
+ # An editor opens (`_pry_.editor`), write your bio then hit save & close.
286
+ # Your profiles bio will be updated after closing the editor.
287
+ [1] pry(main)> on-twitter --set-profile-bio
288
+
289
+ * Set the location visible on your profile:
290
+
291
+ # An editor opens (`_pry_.editor`), write a location then hit save & close.
292
+ # Your profiles location will be updated after closing the editor.
293
+ [1] pry(main)> on-twitter --set-profile-location
294
+
295
+ * Set the color (as a hex value) of links that appear on your profiles timeline:
296
+
297
+ [1] pry(main)> on-twitter --set-profile-link-color=#CC0000
298
+
299
+ * Set the URL visible on your profile:
300
+
301
+ [1] pry(main)> on-twitter --set-profile-url=https://github.com/you
302
+
303
+ * Set profile image:
304
+
305
+ [1] pry(main)> on-twitter --set-profile-image /path/to/image.jpg
306
+
307
+ * Set the banner image visible on your profile:
308
+
309
+ [1] pry(main)> on-twitter --set-profile-banner-image /path/to/image.jpg
310
+
311
+
312
+ ### <a id='twitter-suggestions'>Twitter Suggestions</a>
313
+
314
+ * View a list of suggested topics, optionally restricted to Spanish:
315
+
316
+ [1] pry(main)> on-twitter --suggested-lang=es --suggested-topics
317
+
318
+ * View a list of suggested users from a given topic, optionally restricted to
319
+ Spanish:
320
+
321
+ [1] pry(main)> on-twitter --suggested-lang=es --suggested-users=<topic>
322
+
323
+
324
+ ### <a id='muting-other-users'>Muting other users</a>
325
+
326
+ * Mute one or more users with a comma separated list:
327
+
328
+ [1] pry(main)> on-twitter --mute-user=user1,user2,user3
329
+
330
+ * Unmute one or more users with a comma separated list:
331
+
332
+ [1] pry(main)> on-twitter --unmute-user=user1,user2,user3,user4
333
+
334
+
335
+ ### <a id='special-variable-_twitter_'>Sticky local variable: `_twitter_`</a>
336
+
337
+ The local variable `_twitter_` is inserted into the active Binding, providing
338
+ a programmable API accessible to Ruby code as well as a lower level of access to
339
+ the Twitter API. It is meant for exploration, development, and debugging.
340
+ The local variable is considered reserved.
341
+
342
+ The local variable returns an instance of `Twitter::REST::Client`:
343
+
344
+ [1] pry(main)> _twitter_
345
+ => #<Twitter::REST::Client:0x00007ff44cd6dce0
346
+ @access_token="xxx",
347
+ @access_token_secret="xxx",
348
+ @consumer_key="xxx",
349
+ @consumer_secret="xxx",
350
+ @user_agent="pry-send_tweet.rb v0.7.0">
351
+
352
+ ### <a id='tip'>Tip: Command Aliases</a>
353
+
354
+ When there are Twitter accounts you read often, it can turn out to be faster
355
+ to create command aliases for reading those accounts. An example follows, a
356
+ hyphen is included in the aliased commands to avoid collisions with Ruby code.
357
+
358
+ ```ruby
359
+ # .pryrc
360
+ Pry.commands.alias_command "prez-trump", "read-tweets -t realdonaldtrump"
361
+ Pry.commands.alias_command "prez-obama", "read-tweets -t barackobama"
362
+ ```
363
+
364
+ ## <a id='multi-tasking'>Multi-tasking: tmux / screen</a>
365
+
366
+ To get the most out of `pry-send_tweet.rb` I use tmux to manage a pane for reading
367
+ tweets and another for writing tweets. I've found this to be the best way since
368
+ a single shell does not allow for multi tasking but tmux and screen do.
369
+
370
+ I use [tmuxinator](https://github.com/tmuxinator/tmuxinator) to manage my tmux
371
+ sessions. The tmuxinator configuration I use is checked into the repo in the
372
+ hope that it might be useful to others.
373
+
374
+ * [tmuxinator-vagrant.yml](./samples/tmuxinator-vagrant.yml)
375
+
376
+ ## <a id='vms'>Virtual Machines</a>
377
+
378
+ Before getting started with a Virtual Machine, download and install the
379
+ following tools if you didn't already, they're free:
380
+
381
+ * [VirtualBox](https://www.virtualbox.org/)
382
+ * [Vagrant](https://www.vagrantup.com/)
383
+ * `vagrant-reload` (Run `vagrant plugin install vagrant-reload`)
384
+
385
+ Next, configure access to the Twitter API by adding `.pryrc` file to the root of
386
+ the repository. That's covered in the [configuration](#configuration) section.
387
+
388
+ ### Shared space
389
+
390
+ While exploring, developing or tweeting on one of the available VMs sometimes
391
+ you want to bring files from the 'host' machine to the virtual machine, which
392
+ is known as the guest machine.
393
+
394
+ __Syncing files__
395
+
396
+ `vagrant rsync-auto` can see edits made to the cloned repo on the host
397
+ machine and sync those changes back to the guest machine. To set this up, from
398
+ the root of the repo on the host machine run:
399
+
400
+ $ vagrant rsync-auto
401
+
402
+ __Tweeting media__
403
+
404
+ To tweet media such as an image or video from the VM, what I do is drop those
405
+ files into `/app/shared-space` and then reference `/app/shared-space` when
406
+ sharing them, eg `send-tweet -f /app/shared-space/photo.jpg`.
407
+
408
+ ### <a id='vms-freebsd'>FreeBSD</a>
409
+
410
+ [FreeBSD 12](https://freebsd.org) Virtual Machine
411
+
412
+ Vagrant will use Amazon to download the box image. Sometimes the download can be
413
+ slow, sometimes the download can stall..
414
+
415
+ Keep trying if this happens, a download should always resume from the point
416
+ where it finished. FreeBSD is worth the perseverance. :)
417
+
418
+ $ git clone https://github.com/r-obert/pry-send_tweet.rb
419
+ $ cd pry-send_tweet.rb
420
+ $ ruby vms/freebsd.rb
421
+
422
+ Screenshots __#1__, __#2__ in the [screenshots](#screenshots) section show the
423
+ type of experience to expect when running `ruby vms/freebsd.rb`.
424
+
425
+ A virtual machine can be destroyed and a new VM instance created by appending
426
+ the `--fresh` option:
427
+
428
+ $ ruby vms/freebsd.rb --fresh
429
+
430
+ The default time settings are set to CET (Central European Time). This can be
431
+ changed with an environment variable.
432
+
433
+ $ VMTZ=Asia/Tehran ruby vms/freebsd.rb
434
+
435
+ A complete list of time zones are available in the VM:
436
+
437
+ $ ls /usr/share/zoneinfo
438
+
439
+ ## <a id='install'>Install</a>
440
+
441
+ ### <a id='install-rubygem'>Rubygem</a>
442
+
443
+ $ gem install pry-send_tweet.rb
444
+
445
+ ## <a id='screenshots'>Screenshots</a>
446
+
447
+ __#1__ Running FreeBSD 12 with Vagrant, Tmux
448
+
449
+ ![FreeBSD-1](/art/44-e44743a5bb.jpg)
450
+
451
+ __#2__ Composing a tweet on FreeBSD 12 - with Vagrant, Tmux.
452
+
453
+ ![FreeBSD-2](/art/52-eec4df2edf.jpg)
454
+
455
+ __#3__ The `-g`, `--grep` feature - with Vagrant, Tmux on FreeBSD 12.
456
+
457
+ ![FreeBSD-3](/art/51-da43a4ef4f.jpg)
458
+
459
+ __#4__ Trying to get in touch with @realdonaldtrump on FreeBSD 12.
460
+
461
+ ![FreeBSD-4](/art/51-e94c3387e1.jpg)
462
+
463
+ __#5__ Translating a tweet - with Vagrant, Tmux on FreeBSD 12.
464
+
465
+ ![FreeBSD-5](/art/51-ad821fa377.jpg)
466
+
467
+ __#6__ Matching a pattern - with Vagrant, Tmux on FreeBSD 12.
468
+
469
+ ![FreeBSD-6](/art/51-5e4dc5fd92.jpg)
470
+
471
+ __#7__ Still speedin' - with Vagrant, Tmux on FreeBSD 12.
472
+
473
+ ![FreeBSD-7](/art/51-b90d5dd6a6.jpg)
474
+
475
+ __#8__ Leprechauns - with Vagrant, Tmux on FreeBSD 12.
476
+
477
+ ![FeeeBSD-8](/art/51-82bde81305.jpg)
478
+
479
+ __#9__ The king of Spain is a BITCH.
480
+
481
+ ![FreeBSD-9](/art/53-9d231893e1.jpg)
482
+
483
+ __#10__ So tell me ...
484
+
485
+ ![FreeBSD-10](/art/55-e41f9896d0.jpg)
486
+
487
+ __#11__ 0Day. Maybe.
488
+
489
+ ![FreeBSD-11](/art/54-39b1063483.jpg)
490
+
491
+ __#12__ Love story.
492
+
493
+ ![FreeBSD-12](/art/56-c82d4e5b61.jpg)
494
+
495
+ __#13__ Colours reflecting across the sea.
496
+
497
+ ![FreeBSD-13](/art/16-a31deea6f0.jpg)
498
+
499
+ __#14__ Tada
500
+
501
+ ![FreeBSD-14](/art/16-60174b5812.jpg)
502
+
503
+ __#15__ Los Hermanos, Los Hermanas. #Dutch
504
+
505
+ ![FreeBSD-15](/art/17-b3d5d6f6c2.jpg)
506
+
507
+ __#16__ King Faisal was a king of Saudi Arabia during a very turbulent time, like this period, in my opinion he died for God.
508
+
509
+ ![FreeBSD-16](/art/59-2a2c9cd962.jpg)
510
+
511
+ __#17__ What color is this tide? I drank it yesterday, as a cup of tea.
512
+
513
+ ![FreeBSD-17](/art/tide.jpg)
514
+
515
+ __#18__ A song from Mick Jagger.
516
+
517
+ ![FreeBSD-18](/art/rollingstone.jpg)
518
+
519
+ __#19__ Franke wilde. Research that.
520
+
521
+ ![FreeBSD-19](/art/frankewilde.jpg)
522
+
523
+ __#20__ Put a ring on it.
524
+
525
+ ![FreeBSD-20](/art/61-3970c79d47.jpg)
526
+
527
+ __#21__ Joined the Away side.
528
+
529
+ ![FreeBSD-21](/art/62-da0faf972e.jpg)
530
+
531
+ __#22__ Chilling
532
+
533
+ ![FreeBSD-22](/art/62-5704cc1652.jpg)
534
+
535
+ __#23__ pablo@freebsd.org
536
+
537
+ ![FreeBSD-23](/art/62-b0aceb0fa6.jpg)
538
+
539
+ __#24__ Running FreeBSD 12 on a Windows host
540
+
541
+ ![FreeBSD-24](/art/windows10.png)
542
+
543
+ ## <a id='license'>License</a>
544
+
545
+ This project uses the 3-Clause BSD license, see [LICENSE.txt](./LICENSE.txt) for details.
546
+ Pry had the MIT license (at time of fork), see [PRY_LICENSE.txt](/.PRY_LICENSE.txt) for details.