almanack 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c39fea3d02a2700be92b1899af873e7ca32aafd4
4
- data.tar.gz: 29c54092d575add88cdac6dda027c653c60f7c0e
3
+ metadata.gz: 4a615dead37656c50c8dda7c475f58be70bf83a5
4
+ data.tar.gz: 1b66ef25577bc35a31baebc9db5be31b59df785d
5
5
  SHA512:
6
- metadata.gz: 46fadc971f44e0e7a0ebe0206e3ef1bc35f8499966d7a2801af61252ee26f821fb3dc5932ee8979631d558797f737fc9b8a01d86a7797dc46c0d872f00c939b9
7
- data.tar.gz: 4fbcc1013b4bf0b07792a7c121ae7965183a884dd041ba48cb0d469a84ef52988a670d4bdd165bd0ee40850162c22e28dde35e7ee4b4f6200efd5f06faa17f2a
6
+ metadata.gz: 7ef50d32c20ce5ebe045593c353708a3df7ba674a8ba6fd6c3e5cb4ca78318ff318d9c828e3b9b63ccb61bd129402d5f2d254a4d55d0c879a95da2db70d6058c
7
+ data.tar.gz: d933f1771604f7d4bc8cbf6cd2621ab1ad841ab018edb060dfac46e59c1721a486ce0433b6b65c8cbdcd137645fb0d8d18c0d5af24a48906cf31aab480fa5575
data/README.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  [![Build Status](https://travis-ci.org/Aupajo/almanack.svg)](https://travis-ci.org/Aupajo/almanack)
4
4
  [![Code Climate](https://codeclimate.com/github/Aupajo/almanack.png)](https://codeclimate.com/github/Aupajo/almanack)
5
- [![Code Climate](https://codeclimate.com/github/Aupajo/almanack/coverage.png)](https://codeclimate.com/github/Aupajo/almanack)
5
+ [![Gem Version](https://badge.fury.io/rb/almanack.svg)](http://badge.fury.io/rb/almanack)
6
6
 
7
- *This project was formerly Sinatra-GCal. A [legacy branch](https://github.com/Aupajo/almanack/tree/almanack) exists for that project.*
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
@@ -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 = options.root.join(within)
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
@@ -1,6 +1,6 @@
1
1
  module Almanack
2
2
  CODENAME = "Garlick"
3
- VERSION = "1.0.1"
3
+ VERSION = "1.0.2"
4
4
  HOMEPAGE = "https://github.com/Aupajo/sinatra-gcal"
5
5
  ISSUES = "https://github.com/Aupajo/sinatra-gcal/issues"
6
6
  end
@@ -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
@@ -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.1
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-23 00:00:00.000000000 Z
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
- - almanac.gemspec
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