firefly 1.5.2 → 1.5.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/Gemfile.lock +4 -12
- data/HISTORY +4 -0
- data/README.md +4 -0
- data/config.ru.example +4 -0
- data/firefly.gemspec +1 -1
- data/lib/firefly.rb +7 -0
- data/lib/firefly/server.rb +7 -0
- data/lib/firefly/version.rb +1 -1
- metadata +9 -9
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
firefly (1.5.
|
4
|
+
firefly (1.5.2)
|
5
5
|
dm-aggregates (~> 1.0.2)
|
6
6
|
dm-core (~> 1.0.2)
|
7
7
|
dm-migrations (~> 1.0.2)
|
@@ -9,7 +9,7 @@ PATH
|
|
9
9
|
dm-transactions (~> 1.0.2)
|
10
10
|
escape_utils (~> 0.2.3)
|
11
11
|
haml (~> 3.0.18)
|
12
|
-
sinatra (~> 1.2.
|
12
|
+
sinatra (~> 1.2.6)
|
13
13
|
|
14
14
|
GEM
|
15
15
|
remote: http://rubygems.org/
|
@@ -55,25 +55,17 @@ GEM
|
|
55
55
|
rspec-expectations (2.5.0)
|
56
56
|
diff-lcs (~> 1.1.2)
|
57
57
|
rspec-mocks (2.5.0)
|
58
|
-
sinatra (1.2.
|
58
|
+
sinatra (1.2.6)
|
59
59
|
rack (~> 1.1)
|
60
60
|
tilt (>= 1.2.2, < 2.0)
|
61
|
-
tilt (1.
|
61
|
+
tilt (1.3)
|
62
62
|
|
63
63
|
PLATFORMS
|
64
64
|
ruby
|
65
65
|
|
66
66
|
DEPENDENCIES
|
67
67
|
database_cleaner (~> 0.6.6)
|
68
|
-
dm-aggregates (~> 1.0.2)
|
69
|
-
dm-core (~> 1.0.2)
|
70
|
-
dm-migrations (~> 1.0.2)
|
71
|
-
dm-mysql-adapter (~> 1.0.2)
|
72
68
|
dm-sqlite-adapter (~> 1.0.2)
|
73
|
-
dm-transactions (~> 1.0.2)
|
74
|
-
escape_utils (~> 0.2.3)
|
75
69
|
firefly!
|
76
|
-
haml (~> 3.0.18)
|
77
70
|
rack-test (~> 0.5.4)
|
78
71
|
rspec (~> 2.5.0)
|
79
|
-
sinatra (~> 1.2.3)
|
data/HISTORY
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
- 1.5.3 - 2011-05-05
|
2
|
+
|
3
|
+
* 2011-05-05 Force all instances of Firefly to use the same session_secret so logins work properly with multi-instance setups (issue #30) [ariejan]
|
4
|
+
|
1
5
|
= 1.5.2 - 2011-05-02
|
2
6
|
|
3
7
|
* 2011-05-02 Fixed issue with sharing a link without a title (issue #26) [ariejan]
|
data/README.md
CHANGED
@@ -52,6 +52,10 @@ After you have installed the Firefly gem you should create a `config.ru` file th
|
|
52
52
|
|
53
53
|
# Set the TLDs (in URLs) that are allowed to be shortened
|
54
54
|
# set :sharing_domains, ["example.com", "mydomain.com"]
|
55
|
+
|
56
|
+
# Set your session secret here.
|
57
|
+
# If you're unsure what to use, open IRB console and run `'%x' % rand(2**255)`
|
58
|
+
set :session_secret, "change-me"
|
55
59
|
end
|
56
60
|
|
57
61
|
run app
|
data/config.ru.example
CHANGED
@@ -31,6 +31,10 @@ app = Firefly::Server.new do
|
|
31
31
|
# Set the TLDs (in URLs) that are allowed to be shortened
|
32
32
|
# set :sharing_domains, ["example.com", "mydomain.com"]
|
33
33
|
set :sharing_domain, []
|
34
|
+
|
35
|
+
# Set your session secret here.
|
36
|
+
# If you're unsure what to use, open IRB console and run `'%x' % rand(2**255)`
|
37
|
+
set :session_secret, "change-me"
|
34
38
|
end
|
35
39
|
|
36
40
|
run app
|
data/firefly.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
20
|
s.require_paths = ["lib"]
|
21
21
|
|
22
|
-
s.add_runtime_dependency("sinatra", ["~> 1.2.
|
22
|
+
s.add_runtime_dependency("sinatra", ["~> 1.2.6"])
|
23
23
|
s.add_runtime_dependency("dm-core", ["~> 1.0.2"])
|
24
24
|
s.add_runtime_dependency("dm-migrations", ["~> 1.0.2"])
|
25
25
|
s.add_runtime_dependency("dm-transactions", ["~> 1.0.2"])
|
data/lib/firefly.rb
CHANGED
@@ -25,6 +25,13 @@ if ENV['RACK_ENV'] == 'development'
|
|
25
25
|
DataMapper::Logger.new($stdout, :debug)
|
26
26
|
end
|
27
27
|
|
28
|
+
module Firefly
|
29
|
+
# Get the current environment
|
30
|
+
def self.environment
|
31
|
+
ENV['RACK_ENV'] || "development"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
28
35
|
require 'firefly/config'
|
29
36
|
require 'firefly/version'
|
30
37
|
require 'firefly/base62'
|
data/lib/firefly/server.rb
CHANGED
@@ -13,12 +13,17 @@ module Firefly
|
|
13
13
|
class Server < Sinatra::Base
|
14
14
|
enable :sessions
|
15
15
|
|
16
|
+
if Firefly.environment == "development"
|
17
|
+
enable :logging, :dump_errors, :raise_errors
|
18
|
+
end
|
19
|
+
|
16
20
|
dir = File.join(File.dirname(__FILE__), '..', '..')
|
17
21
|
|
18
22
|
set :views, "#{dir}/views"
|
19
23
|
set :public, "#{dir}/public"
|
20
24
|
set :haml, {:format => :html5 }
|
21
25
|
set :static, true
|
26
|
+
set :session_secret, nil
|
22
27
|
|
23
28
|
attr_accessor :config
|
24
29
|
|
@@ -154,6 +159,8 @@ module Firefly
|
|
154
159
|
@config = config
|
155
160
|
@highlight = nil
|
156
161
|
@title = "Firefly at http://#{@config[:hostname]}"
|
162
|
+
|
163
|
+
set :session_secret, @config[:session_secret]
|
157
164
|
end
|
158
165
|
|
159
166
|
get '/' do
|
data/lib/firefly/version.rb
CHANGED
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:
|
5
|
-
prerelease:
|
4
|
+
hash: 5
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 1.5.
|
9
|
+
- 3
|
10
|
+
version: 1.5.3
|
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-05-
|
18
|
+
date: 2011-05-05 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -26,12 +26,12 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
hash:
|
29
|
+
hash: 19
|
30
30
|
segments:
|
31
31
|
- 1
|
32
32
|
- 2
|
33
|
-
-
|
34
|
-
version: 1.2.
|
33
|
+
- 6
|
34
|
+
version: 1.2.6
|
35
35
|
type: :runtime
|
36
36
|
version_requirements: *id001
|
37
37
|
- !ruby/object:Gem::Dependency
|
@@ -288,7 +288,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
288
288
|
requirements: []
|
289
289
|
|
290
290
|
rubyforge_project: firefly
|
291
|
-
rubygems_version: 1.
|
291
|
+
rubygems_version: 1.5.0
|
292
292
|
signing_key:
|
293
293
|
specification_version: 3
|
294
294
|
summary: Firefly is your own personal URL shortener for your own domain.
|