firefly 1.2.0 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY +9 -0
- data/VERSION +1 -1
- data/firefly.gemspec +2 -2
- data/lib/firefly/url.rb +2 -0
- data/spec/firefly/api_spec.rb +8 -0
- data/views/index.haml +3 -1
- metadata +4 -4
data/HISTORY
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
= 1.2.1/1.2.2 / 2011-01-26
|
2
|
+
|
3
|
+
* 2011-01-26 - Added GUI support for custom short codes. [ariejan]
|
4
|
+
|
5
|
+
= 1.2.0 / 2011-01-26
|
6
|
+
|
7
|
+
* 2010-12-30 - Support for specifying one's own preferred short codes via the API. Also, invalid URL creations return a 422 code, not 200.
|
8
|
+
* 2010-12-30 - Make Barby optional to save some gems for those of us who don't need QR code generation. [mboeh]
|
9
|
+
|
1
10
|
= 1.1.0 / 2010-10-02
|
2
11
|
|
3
12
|
* 2010-10-02 - Generate a QR Code image when accessing http://:host/:code.png
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.2
|
data/firefly.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{firefly}
|
8
|
-
s.version = "1.2.
|
8
|
+
s.version = "1.2.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ariejan de Vroom"]
|
12
|
-
s.date = %q{2011-01-
|
12
|
+
s.date = %q{2011-01-28}
|
13
13
|
s.description = %q{FireFly is a simple URL shortner for personal use. It's powered by Sinatra and can be run with any Rack-capable web server.}
|
14
14
|
s.email = %q{ariejan@ariejan.net}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/firefly/url.rb
CHANGED
data/spec/firefly/api_spec.rb
CHANGED
@@ -21,6 +21,14 @@ describe "API" do
|
|
21
21
|
last_response.body.should eql("http://test.host/#{url.code}")
|
22
22
|
end
|
23
23
|
|
24
|
+
it "should generate a short code if `short` is blank" do
|
25
|
+
self.send verb, '/api/add', :url => "http://example.org", :short => "", :api_key => 'test'
|
26
|
+
url = Firefly::Url.first(:url => "http://example.org/")
|
27
|
+
|
28
|
+
last_response.should be_ok
|
29
|
+
last_response.body.should eql("http://test.host/#{url.code}")
|
30
|
+
end
|
31
|
+
|
24
32
|
it "should permit including a requested short code" do
|
25
33
|
self.send verb, '/api/add', :url => "http://example.org", :short => 'orz', :api_key => 'test'
|
26
34
|
|
data/views/index.haml
CHANGED
@@ -14,7 +14,9 @@
|
|
14
14
|
%form{ :action => '/api/add', :method => 'post' }
|
15
15
|
%input{ :type => "hidden", :name => "visual", :value => "1" }
|
16
16
|
%p
|
17
|
-
%input.big_url{ :type => 'text', :name => 'url', :id => 'url', :size =>
|
17
|
+
%input.big_url{ :type => 'text', :placeholder => "Paste your long URL here...", :name => 'url', :id => 'url', :size => 40, :autocomplete => "off", :spellcheck => 'false' }
|
18
|
+
%span{ :style => "font-size: 1.8em;" }= '>'
|
19
|
+
%input.big_url{ :type => 'text', :placeholder => "Optional short code", :name => 'short', :id => 'short', :size => 20, :autocomplete => "off", :spellcheck => 'false' }
|
18
20
|
%p
|
19
21
|
%input.big_url{ :type => 'submit', :name => 'submit', :id => 'submit', :value => "Make it short!" }
|
20
22
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: firefly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 1.2.
|
9
|
+
- 2
|
10
|
+
version: 1.2.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ariejan de Vroom
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-01-
|
18
|
+
date: 2011-01-28 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|