almanack 1.0.1 → 1.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 +4 -4
- data/README.md +2 -2
- data/{almanac.gemspec → almanack.gemspec} +0 -0
- data/lib/almanack/server.rb +16 -1
- data/lib/almanack/version.rb +1 -1
- data/spec/features/sass_features_spec.rb +15 -0
- data/spec/fixtures/themes/sassy/stylesheets/imported.scss +0 -0
- data/spec/fixtures/themes/sassy/stylesheets/imports.scss +1 -0
- metadata +9 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a615dead37656c50c8dda7c475f58be70bf83a5
|
4
|
+
data.tar.gz: 1b66ef25577bc35a31baebc9db5be31b59df785d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ef50d32c20ce5ebe045593c353708a3df7ba674a8ba6fd6c3e5cb4ca78318ff318d9c828e3b9b63ccb61bd129402d5f2d254a4d55d0c879a95da2db70d6058c
|
7
|
+
data.tar.gz: d933f1771604f7d4bc8cbf6cd2621ab1ad841ab018edb060dfac46e59c1721a486ce0433b6b65c8cbdcd137645fb0d8d18c0d5af24a48906cf31aab480fa5575
|
data/README.md
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
[](https://travis-ci.org/Aupajo/almanack)
|
4
4
|
[](https://codeclimate.com/github/Aupajo/almanack)
|
5
|
-
[](http://badge.fury.io/rb/almanack)
|
6
6
|
|
7
|
-
*This project was formerly Sinatra-GCal. A [legacy branch](https://github.com/Aupajo/almanack/tree/
|
7
|
+
*This project was formerly Sinatra-GCal. A [legacy branch](https://github.com/Aupajo/almanack/tree/sinatra-gcal) exists for that project.*
|
8
8
|
|
9
9
|
A calendar that combines events from different sources (such as Google Calendar, Meetup.com, and iCal feeds), and can be hosted for free on [Heroku](http://heroku.com).
|
10
10
|
|
File without changes
|
data/lib/almanack/server.rb
CHANGED
@@ -44,13 +44,18 @@ module Almanack
|
|
44
44
|
erb :error
|
45
45
|
end
|
46
46
|
|
47
|
+
error do
|
48
|
+
status 500
|
49
|
+
erb :error
|
50
|
+
end
|
51
|
+
|
47
52
|
def basename(file)
|
48
53
|
Pathname(file).split.last.to_s.split(".", 2).first
|
49
54
|
end
|
50
55
|
|
51
56
|
def locate_asset(name, within: path)
|
52
57
|
name = basename(name)
|
53
|
-
path =
|
58
|
+
path = settings.root.join(within)
|
54
59
|
available = Pathname.glob(path.join("*"))
|
55
60
|
asset = available.find { |path| basename(path) == name }
|
56
61
|
raise "Could not find stylesheet #{name} inside #{available}" if asset.nil?
|
@@ -67,6 +72,16 @@ module Almanack
|
|
67
72
|
auto_render_template locate_asset(*args)
|
68
73
|
end
|
69
74
|
|
75
|
+
def theme_stylesheet_path
|
76
|
+
settings.root.join('stylesheets')
|
77
|
+
end
|
78
|
+
|
79
|
+
before do
|
80
|
+
if !Sass.load_paths.include?(theme_stylesheet_path)
|
81
|
+
Sass.load_paths << theme_stylesheet_path
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
70
85
|
get "/" do
|
71
86
|
erb :events
|
72
87
|
end
|
data/lib/almanack/version.rb
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "Sass rendering", :feature do
|
4
|
+
before { Almanack.reset! }
|
5
|
+
|
6
|
+
it "can import sass" do
|
7
|
+
allow(Almanack.config).to receive(:theme_root) { fixture_theme('sassy') }
|
8
|
+
get "/stylesheets/imports.css"
|
9
|
+
raise last_response.errors unless last_response.errors.empty?
|
10
|
+
end
|
11
|
+
|
12
|
+
def fixture_theme(name)
|
13
|
+
Pathname(__dir__).parent.join('fixtures', 'themes', name)
|
14
|
+
end
|
15
|
+
end
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
@import 'imported';
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: almanack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pete Nicholls
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|
@@ -234,7 +234,7 @@ files:
|
|
234
234
|
- LICENSE.txt
|
235
235
|
- README.md
|
236
236
|
- Rakefile
|
237
|
-
-
|
237
|
+
- almanack.gemspec
|
238
238
|
- bin/almanack
|
239
239
|
- example.ru
|
240
240
|
- lib/almanack.rb
|
@@ -264,10 +264,13 @@ files:
|
|
264
264
|
- spec/event_source/static_spec.rb
|
265
265
|
- spec/event_spec.rb
|
266
266
|
- spec/features/calendar_feature_spec.rb
|
267
|
+
- spec/features/sass_features_spec.rb
|
267
268
|
- spec/features/subscription_feature_spec.rb
|
268
269
|
- spec/fixtures/responses/google_calendar.yml
|
269
270
|
- spec/fixtures/responses/meetup-without-location.yml
|
270
271
|
- spec/fixtures/responses/meetup.yml
|
272
|
+
- spec/fixtures/themes/sassy/stylesheets/imported.scss
|
273
|
+
- spec/fixtures/themes/sassy/stylesheets/imports.scss
|
271
274
|
- spec/spec_helper.rb
|
272
275
|
- spec/support/event_matchers.rb
|
273
276
|
- spec/support/server_support.rb
|
@@ -309,10 +312,13 @@ test_files:
|
|
309
312
|
- spec/event_source/static_spec.rb
|
310
313
|
- spec/event_spec.rb
|
311
314
|
- spec/features/calendar_feature_spec.rb
|
315
|
+
- spec/features/sass_features_spec.rb
|
312
316
|
- spec/features/subscription_feature_spec.rb
|
313
317
|
- spec/fixtures/responses/google_calendar.yml
|
314
318
|
- spec/fixtures/responses/meetup-without-location.yml
|
315
319
|
- spec/fixtures/responses/meetup.yml
|
320
|
+
- spec/fixtures/themes/sassy/stylesheets/imported.scss
|
321
|
+
- spec/fixtures/themes/sassy/stylesheets/imports.scss
|
316
322
|
- spec/spec_helper.rb
|
317
323
|
- spec/support/event_matchers.rb
|
318
324
|
- spec/support/server_support.rb
|