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
@@ -0,0 +1,26 @@
1
+ #
2
+ # TwitterIO is a child of StringIO that implements an interface compatible
3
+ # with the expectations of the Twitter gem. The twitter gem expects a File object
4
+ # when uploading media, not an in-memory string as we would like.
5
+ #
6
+ class Pry::SendTweet::TwitterIO < StringIO
7
+ def initialize(str, basename)
8
+ super(str)
9
+ @basename = basename
10
+ end
11
+
12
+ def basename
13
+ @basename
14
+ end
15
+
16
+ #
17
+ # For compatibility with File.basename, which attempts String coercion when
18
+ # given an object other than a String.
19
+ #
20
+ # @example
21
+ # File.basename(twitter_io) => {TwitterIO#basename}
22
+ #
23
+ def to_str
24
+ basename
25
+ end
26
+ end
@@ -0,0 +1,6 @@
1
+ class Pry
2
+ module SendTweet
3
+ VERSION = '1.22.0'
4
+ CODENAME = %q{#Charlie}
5
+ end
6
+ end
@@ -0,0 +1,14 @@
1
+ # time-ago-in-words
2
+
3
+ ## Introduction
4
+
5
+ Add `time_ago_in_words` method to Time class.
6
+
7
+ ## Credits
8
+
9
+ This subdirectory is a modified clone of https://github.com/sirupsen/time-ago-in-words.
10
+ `time-ago-in-words` is a fork of `time-lord` that focuses on a single feature
11
+ instead of many features.
12
+
13
+ * Credits to author(s) of `time-lord` RubyGem.
14
+ * Credits to the author of its fork, `time-ago-in-words`.
@@ -0,0 +1,37 @@
1
+ module TimeAgoInWords
2
+ require 'time'
3
+ VERSION = "0.0.5"
4
+
5
+ module Units
6
+ Second = 1
7
+ Minute = Second * 60
8
+ Hour = Minute * 60
9
+ Day = Hour * 24
10
+ Week = Day * 7
11
+ Month = Week * 4
12
+ Year = Day * 365
13
+ Decade = Year * 10
14
+ Century = Decade * 10
15
+ Millennium = Century * 10
16
+ Eon = 1.0/0
17
+ end
18
+
19
+ module_function
20
+ def time_ago_in_words(time)
21
+ time_difference = Time.now.to_i - time.to_i
22
+ if time_difference <= 0
23
+ return "0 seconds since Last Refresh"
24
+ end
25
+ unit = get_unit(time_difference)
26
+ unit_rep = time_difference > 1 ? "#{unit.to_s.downcase}s" : unit.to_s.downcase
27
+ unit_difference = time_difference / Units.const_get(unit.capitalize)
28
+ "#{unit_difference} #{unit_rep}"
29
+ end
30
+
31
+ private
32
+ def get_unit(time_difference)
33
+ Units.constants.each_cons(2) do |con|
34
+ return con.first if (Units.const_get(con[0])...Units.const_get(con[1])) === time_difference
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,14 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "time-ago-in-words"
4
+ Gem::Specification.new do |s|
5
+ s.name = "time-ago-in-words"
6
+ s.version = TimeAgoInWords::VERSION
7
+ s.platform = Gem::Platform::RUBY
8
+ s.authors = ["Kurtis Rainbolt-Greene", "sirupsen", "r-obert"]
9
+ s.homepage = "https://github.com/sirupsen/time-ago-in-words"
10
+ s.summary = %q{Represent a past tense Time object in words}
11
+ s.description = %q{Represent a past tense Time object in words}
12
+ s.files = Dir["*.{md,txt}", "lib/*.rb", "lib/**/*.rb"]
13
+ s.require_paths = ["lib"]
14
+ end
@@ -0,0 +1,23 @@
1
+ Kernel.require_relative 'lib/pry/send_tweet/version'
2
+ Gem::Specification.new do |spec|
3
+ spec.name = "pry-twitter"
4
+ spec.version = Pry::SendTweet::VERSION
5
+ spec.authors = ["Pry developers", "Fry developers", "trebor8"]
6
+ spec.email = "trebor.macg8@protonmail.com"
7
+ spec.summary = Pry::SendTweet::CODENAME
8
+ spec.description = spec.summary
9
+ spec.homepage = "https://gitlab.com/trebor8/fry-send_tweet.rb"
10
+ spec.licenses = ["BSD (3-Clause)"]
11
+ spec.require_paths = ["lib", "lib/time-ago-in-words/lib"]
12
+ spec.files = Dir[
13
+ "*file",
14
+ "art/*",
15
+ "vms/*",
16
+ "samples/*",
17
+ "*.{txt,gemspec,md,sh}",
18
+ "lib/**/*.{rb,gemspec,md}"
19
+ ]
20
+ spec.add_runtime_dependency "twitter", "~> 6.0"
21
+ spec.add_runtime_dependency "tty-box", "= 0.3.0"
22
+ spec.add_runtime_dependency "unicode-display_width", "~> 1.4"
23
+ end
@@ -0,0 +1,5 @@
1
+ export EDITOR="ee"
2
+ export PAGER="less"
3
+ export LANG="en_US.UTF-8"
4
+ export LC_ALL="en_US.UTF-8"
5
+ export RUBYLIB='/app/lib:/app/lib/time-ago-in-words/lib'
@@ -0,0 +1 @@
1
+ tmpfs_load="YES"
@@ -0,0 +1,11 @@
1
+ name: pry_send_tweet
2
+ root: /path/to/pry-send_tweet.rb
3
+
4
+ windows:
5
+ - twitter:
6
+ layout: even-horizontal
7
+ panes:
8
+ - source ~/.zshrc && cd /app && RUBYOPT="-W1" pry -r pry-send_tweet -e read-tweets
9
+ - source ~/.zshrc && cd /app && RUBYOPT="-W1" pry -r pry-send_tweet
10
+ - sh:
11
+ -
data/vms/freebsd.rb ADDED
@@ -0,0 +1,18 @@
1
+ def run(*cmd)
2
+ exit_method = cmd.last == :soft_fail ? cmd.pop : :hard_fail
3
+ Process.wait Kernel.spawn(*cmd)
4
+ if not $?.success?
5
+ message = cmd.join ' '
6
+ exit_method == :soft_fail ? warn(message) : raise(message)
7
+ end
8
+ end
9
+
10
+ ARGV.each do |argument|
11
+ case argument
12
+ when '--fresh' then run('vagrant', 'destroy', '--force')
13
+ end
14
+ end
15
+
16
+ run 'vagrant', 'plugin', 'install', 'vagrant-reload', :soft_fail
17
+ run 'vagrant', 'up'
18
+ run 'vagrant', 'ssh', '-c', 'tmuxinator start pry_send_tweet'
metadata ADDED
@@ -0,0 +1,145 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pry-twitter
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.22.0
5
+ platform: ruby
6
+ authors:
7
+ - Pry developers
8
+ - Fry developers
9
+ - trebor8
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2019-02-23 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: twitter
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - "~>"
20
+ - !ruby/object:Gem::Version
21
+ version: '6.0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - "~>"
27
+ - !ruby/object:Gem::Version
28
+ version: '6.0'
29
+ - !ruby/object:Gem::Dependency
30
+ name: tty-box
31
+ requirement: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - '='
34
+ - !ruby/object:Gem::Version
35
+ version: 0.3.0
36
+ type: :runtime
37
+ prerelease: false
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - '='
41
+ - !ruby/object:Gem::Version
42
+ version: 0.3.0
43
+ - !ruby/object:Gem::Dependency
44
+ name: unicode-display_width
45
+ requirement: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '1.4'
50
+ type: :runtime
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - "~>"
55
+ - !ruby/object:Gem::Version
56
+ version: '1.4'
57
+ description: "#Charlie"
58
+ email: trebor.macg8@protonmail.com
59
+ executables: []
60
+ extensions: []
61
+ extra_rdoc_files: []
62
+ files:
63
+ - CHANGELOG.md
64
+ - LICENSE.txt
65
+ - PRY_LICENSE.txt
66
+ - README.md
67
+ - Vagrantfile
68
+ - art/16-60174b5812.jpg
69
+ - art/16-a31deea6f0.jpg
70
+ - art/17-b3d5d6f6c2.jpg
71
+ - art/44-e44743a5bb.jpg
72
+ - art/51-5e4dc5fd92.jpg
73
+ - art/51-82bde81305.jpg
74
+ - art/51-ad821fa377.jpg
75
+ - art/51-b90d5dd6a6.jpg
76
+ - art/51-da43a4ef4f.jpg
77
+ - art/51-e94c3387e1.jpg
78
+ - art/52-eec4df2edf.jpg
79
+ - art/53-9d231893e1.jpg
80
+ - art/54-39b1063483.jpg
81
+ - art/55-e41f9896d0.jpg
82
+ - art/56-c82d4e5b61.jpg
83
+ - art/59-2a2c9cd962.jpg
84
+ - art/61-3970c79d47.jpg
85
+ - art/62-5704cc1652.jpg
86
+ - art/62-b0aceb0fa6.jpg
87
+ - art/62-da0faf972e.jpg
88
+ - art/frankewilde.jpg
89
+ - art/rollingstone.jpg
90
+ - art/tide.jpg
91
+ - art/windows10.png
92
+ - lib/pry-send_tweet.rb
93
+ - lib/pry/pager/system_pager.rb
94
+ - lib/pry/send_tweet/commands/base_command.rb
95
+ - lib/pry/send_tweet/commands/easter_eggs.rb
96
+ - lib/pry/send_tweet/commands/paging/paging_support.rb
97
+ - lib/pry/send_tweet/commands/read_tweets.rb
98
+ - lib/pry/send_tweet/commands/read_tweets/translate_actions.rb
99
+ - lib/pry/send_tweet/commands/send_tweet.rb
100
+ - lib/pry/send_tweet/commands/twitter_action.rb
101
+ - lib/pry/send_tweet/commands/twitter_action/delete_tweet_actions.rb
102
+ - lib/pry/send_tweet/commands/twitter_action/follow_actions.rb
103
+ - lib/pry/send_tweet/commands/twitter_action/like_actions.rb
104
+ - lib/pry/send_tweet/commands/twitter_action/mute_actions.rb
105
+ - lib/pry/send_tweet/commands/twitter_action/profile_actions.rb
106
+ - lib/pry/send_tweet/commands/twitter_action/suggested_actions.rb
107
+ - lib/pry/send_tweet/commands/twitter_search.rb
108
+ - lib/pry/send_tweet/renderers/tweet_renderer.rb
109
+ - lib/pry/send_tweet/renderers/user_renderer.rb
110
+ - lib/pry/send_tweet/tty-box.rb
111
+ - lib/pry/send_tweet/twitter_io.rb
112
+ - lib/pry/send_tweet/version.rb
113
+ - lib/time-ago-in-words/README.md
114
+ - lib/time-ago-in-words/lib/time-ago-in-words.rb
115
+ - lib/time-ago-in-words/time-ago-in-words.gemspec
116
+ - pry-send_tweet.gemspec
117
+ - samples/freebsd-zshrc
118
+ - samples/loader.conf
119
+ - samples/tmuxinator-vagrant.yml
120
+ - vms/freebsd.rb
121
+ homepage: https://gitlab.com/trebor8/fry-send_tweet.rb
122
+ licenses:
123
+ - BSD (3-Clause)
124
+ metadata: {}
125
+ post_install_message:
126
+ rdoc_options: []
127
+ require_paths:
128
+ - lib
129
+ - lib/time-ago-in-words/lib
130
+ required_ruby_version: !ruby/object:Gem::Requirement
131
+ requirements:
132
+ - - ">="
133
+ - !ruby/object:Gem::Version
134
+ version: '0'
135
+ required_rubygems_version: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
140
+ requirements: []
141
+ rubygems_version: 3.0.1
142
+ signing_key:
143
+ specification_version: 4
144
+ summary: "#Charlie"
145
+ test_files: []