dailyshare 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,7 @@ module DailyShare
|
|
4
4
|
|
5
5
|
get '/' do
|
6
6
|
context = context_from_date(Date.today)
|
7
|
-
@title = "#{CONFIG['title']} - day #{context[:count]}"
|
7
|
+
@title = "#{CONFIG['seo']['title']} - day #{context[:count]}"
|
8
8
|
slim :index, :locals => context
|
9
9
|
end
|
10
10
|
|
@@ -19,7 +19,7 @@ module DailyShare
|
|
19
19
|
begin
|
20
20
|
date = date_from_params(params)
|
21
21
|
context = context_from_date(date)
|
22
|
-
@title = "#{CONFIG['title']} - day #{context[:count]}"
|
22
|
+
@title = "#{CONFIG['seo']['title']} - day #{context[:count]}"
|
23
23
|
rescue
|
24
24
|
pass
|
25
25
|
end
|
@@ -10,10 +10,12 @@ module DailyShare
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def context_from_date(date)
|
13
|
+
edition = (date.strftime('%Y').to_i)-(CONFIG['dailyshare']['start'].strftime('%Y').to_i)
|
13
14
|
{
|
14
15
|
:ymd => date.strftime('%Y-%m-%d'),
|
15
16
|
:date => date,
|
16
|
-
:
|
17
|
+
:year => (edition+1).en.numwords,
|
18
|
+
:count => (((date-CONFIG['dailyshare']['start']).to_i)-((edition)*365).to_i).en.numwords,
|
17
19
|
:photos => Member.all_with_photo_for(date)
|
18
20
|
}
|
19
21
|
end
|
@@ -38,8 +40,8 @@ module DailyShare
|
|
38
40
|
else
|
39
41
|
photo.save
|
40
42
|
send_email(
|
41
|
-
CONFIG['email']['
|
42
|
-
"
|
43
|
+
CONFIG['email']['to'],
|
44
|
+
"new submisson",
|
43
45
|
slim(:'emails/uploaded', {:locals=>{:photo=>photo},:layout=>false})
|
44
46
|
)
|
45
47
|
end
|
data/lib/dailyshare/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dailyshare
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-01-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: linguistics
|
@@ -136,3 +136,4 @@ signing_key:
|
|
136
136
|
specification_version: 3
|
137
137
|
summary: 356 Projects for Sinatra/Sequel
|
138
138
|
test_files: []
|
139
|
+
has_rdoc:
|