lita-retrotext 0.0.1 → 0.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0623217975e0e9a5dd139df4601e9260d66473772d421aeba9342c23cd9233b6'
4
- data.tar.gz: b02e6c524ff0a1324887ce62e86df78fc1bcef713d9a6e43b38c25cc219b561b
3
+ metadata.gz: 1ead45b22cabafdc0d5aa7b33336ba9bdacc03685202438cfb6ba92025d709a7
4
+ data.tar.gz: 6fb6d3d18ce99aa4e8993f2e1b303fccb447f43845e7835b7da494814aef2633
5
5
  SHA512:
6
- metadata.gz: d37ca06c6b98db6eee2810bd81f81e07ec85cb492ad67d85ba6b7aacbf42b86442f9f3f9efec3017577b7dfae9e657f649cf36b083ce9a6ae24cbd777a2515f8
7
- data.tar.gz: 7e2f380524b85aec44bd8ecadefc457e19a3cd85c56d2aa4804c4393d2424184ac3c8fac163a45d949099ba4a93ebf7b76128461a8c688b3eb60d1970e0fbc78
6
+ metadata.gz: 92186327e63e61bec2f508999555005cee6b6f7ab8b853f66c8e201510dd00852c358023470614d6416b0abaa26b9038acf7b76be36c85a4dba20e488a754f09
7
+ data.tar.gz: 70ebd3a27eb3c5f0e445c270b5d08511f36bd6584011ce7aac304c4335888e34664f894df3d5a69a8003db47bdb46ef3ad7fa38c013243965dc99bb9ab580439
data/README.md ADDED
@@ -0,0 +1,27 @@
1
+ # lita-retrotext
2
+
3
+ This plugin allows you to create text images from the retro-wave effect found on [photofunia](https://photofunia.com/effects/retro-wave?redirect=false).
4
+
5
+ ## Installation
6
+
7
+ Add lita-retrotext to your Lita instance's Gemfile:
8
+
9
+ ``` bash
10
+ gem "lita-retrotext"
11
+ ```
12
+
13
+ ## Configuration
14
+
15
+ There is no special configuration
16
+
17
+ ## Usage
18
+
19
+ To use, simply run the command:
20
+
21
+ ```
22
+ [BOT_NAME] retro Top_text Middle_text Bottom_text
23
+ ```
24
+
25
+ And the bot will generate an image like the following:
26
+
27
+ ![sample image](resources/sample.jpg)
@@ -35,7 +35,6 @@ module Lita
35
35
  top = response.matches.first[0].tr("_", " ")
36
36
  middle = response.matches.first[1].tr("_", " ")
37
37
  bottom = response.matches.first[2].tr("_", " ")
38
- puts("generating image with top text: #{top} | middle text: #{middle} | bottom text: #{bottom}")
39
38
  server = rand(9) + 1
40
39
  uri_prefix = "http://photofunia.com"
41
40
  uri_string = "#{uri_prefix}/categories/all_effects/retro-wave?server=#{server}"
@@ -44,7 +43,6 @@ module Lita
44
43
  tries = 0
45
44
 
46
45
  loop do
47
- puts(uri_string)
48
46
  uri = URI.parse(uri_string)
49
47
  res = Net::HTTP.post_form(
50
48
  uri,
@@ -79,7 +77,6 @@ module Lita
79
77
  for i in a do
80
78
  text = i.text.delete(" ").strip
81
79
  if text == "Large"
82
- puts(i['href'].split("?")[0])
83
80
  url = i['href'].split("?")[0]
84
81
  end
85
82
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-retrotext"
3
- spec.version = "0.0.1"
3
+ spec.version = "0.0.2"
4
4
  spec.authors = ["Richard Grable"]
5
5
  spec.email = ["richard.grable@gmail.com"]
6
6
  spec.description = "Generates a retro text image"
Binary file
Binary file
@@ -7,7 +7,7 @@ describe Lita::Handlers::RetroText, lita_handler: true do
7
7
 
8
8
  describe "#retrotext" do
9
9
  it 'should display the url' do
10
- send_message("Lita retro TOP_TEXT MIDDLE_TEXT BOTTOM_TEXT")
10
+ send_message("Lita retro Top_text Middle_text Bottom_text")
11
11
  expect(replies[0]).to match(/^http:\/\/([a-zA-Z0-9\/_\-.]+)\.jpg/i)
12
12
  end
13
13
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-retrotext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Grable
@@ -103,11 +103,14 @@ extra_rdoc_files: []
103
103
  files:
104
104
  - ".gitignore"
105
105
  - Gemfile
106
+ - README.md
106
107
  - Rakefile
107
108
  - lib/lita-retrotext.rb
108
109
  - lib/lita/handlers/retrotext.rb
109
110
  - lita-retrotext.gemspec
110
111
  - locales/en.yml
112
+ - pkg/lita-retrotext-0.0.1.gem
113
+ - resources/sample.jpg
111
114
  - spec/lita/handlers/retrotext_spec.rb
112
115
  - spec/spec_helper.rb
113
116
  homepage: https://github.com/rgrable/lita_retrotext