shawty-server 1.1.0 → 1.1.1

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.
data/README.markdown CHANGED
@@ -24,6 +24,12 @@ Imagine trying to fit that in a text message. Instead, how about:
24
24
 
25
25
  http://url.myapp.com/a7D
26
26
 
27
+ But that's so hard, right? Nope. (see shawty-client for details):
28
+
29
+ Shawty.new("http://url.myapp.com/").shrink("http://myapp.com/accounts/megacorp/invoices?single_access_token=5ASD32ADf89JKASF2346")
30
+ # => http://url.myapp.com/a7D
31
+ ## Saved on your url.myapp.com shawty server and usable immediately
32
+
27
33
  Way groovy.
28
34
 
29
35
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0
1
+ 1.1.1
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{shawty-server}
8
- s.version = "1.1.0"
8
+ s.version = "1.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jack Danger Canty"]
data/shawty.rb CHANGED
@@ -11,11 +11,18 @@ require 'alphadecimal'
11
11
  ## Application
12
12
 
13
13
  get '/' do
14
- "Post to '/' to save a url and receive a plaintext short url in response" +
15
- "<br />" +
16
- "Example: POST /http://some.url/at.someplace" +
17
- "<br />" +
18
- "<form action=/ method=POST onsubmit='if(\"\"==this.url.value)return false;else{this.action=\"/\"+this.url.value}'><input type=text name='url' /><input type=submit value='Get Shawty' /></form>"
14
+ %Q{
15
+ <body style='line-height: 1.8em; font-family: Archer, Museo, Helvetica, Georgia; font-size 25px; text-align: center; padding-top: 20%;'>
16
+ Post to '/' to save a url and receive a plaintext short url in response. Example:
17
+ <pre style='font-family: Iconsolata, monospace;background-color:#EEE'>curl -X POST http://#{request.host}/http://some.url/at.someplace</pre>
18
+ <br />
19
+ <form action=/ method=POST onsubmit='if(\"\"==this.url.value)return false;else{this.action=\"/\"+this.url.value}'>
20
+ <input type=text name='url' />
21
+ <input type=submit value='Get Shawty' />
22
+ </form>
23
+ <small>Also, try <a href='http://github.com/JackDanger/shawty-client'>the official Ruby client</a></small>
24
+ </body
25
+ }
19
26
  end
20
27
 
21
28
  get '/:id' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shawty-server
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jack Danger Canty