massimo 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,11 +1,11 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- massimo (0.8.0)
4
+ massimo (0.8.1)
5
5
  activesupport (~> 3.0.0)
6
6
  i18n (~> 0.4.0)
7
+ padrino-helpers (~> 0.9.0)
7
8
  rack (~> 1.2.0)
8
- sinatra_more (~> 0.3.0)
9
9
  thor (~> 0.14.0)
10
10
  tilt (~> 1.2.0)
11
11
  tzinfo (~> 0.3.0)
@@ -19,6 +19,9 @@ GEM
19
19
  diff-lcs (1.1.2)
20
20
  growl (1.0.3)
21
21
  haml (3.0.25)
22
+ http_router (0.5.3)
23
+ rack (>= 1.0.0)
24
+ url_mount (~> 0.2.1)
22
25
  i18n (0.4.2)
23
26
  jsmin (1.0.1)
24
27
  less (1.2.21)
@@ -28,6 +31,15 @@ GEM
28
31
  oyster (0.9.4)
29
32
  packr (3.1.0)
30
33
  oyster
34
+ padrino-core (0.9.20)
35
+ activesupport (>= 3.0.0)
36
+ http_router (~> 0.5.0)
37
+ sinatra (>= 1.1.0)
38
+ thor (>= 0.14.3)
39
+ tzinfo
40
+ padrino-helpers (0.9.20)
41
+ i18n (>= 0.4.1)
42
+ padrino-core (= 0.9.20)
31
43
  polyglot (0.3.1)
32
44
  rack (1.2.1)
33
45
  rack-test (0.5.7)
@@ -44,12 +56,6 @@ GEM
44
56
  sinatra (1.1.2)
45
57
  rack (~> 1.1)
46
58
  tilt (~> 1.2)
47
- sinatra_more (0.3.40)
48
- activesupport (>= 2.2.2)
49
- bundler (>= 0.9.2)
50
- sinatra (>= 0.9.2)
51
- thor (>= 0.11.8)
52
- tilt (>= 0.2)
53
59
  sprockets (1.0.2)
54
60
  test-construct (1.2.0)
55
61
  thor (0.14.6)
@@ -58,6 +64,8 @@ GEM
58
64
  polyglot (>= 0.3.1)
59
65
  tzinfo (0.3.24)
60
66
  unindent (0.9)
67
+ url_mount (0.2.1)
68
+ rack
61
69
  yui-compressor (0.9.3)
62
70
 
63
71
  PLATFORMS
@@ -74,11 +82,11 @@ DEPENDENCIES
74
82
  less (~> 1.2.0)
75
83
  massimo!
76
84
  packr (~> 3.1.0)
85
+ padrino-helpers (~> 0.9.0)
77
86
  rack (~> 1.2.0)
78
87
  rack-test (~> 0.5.0)
79
88
  rr (~> 1.0.0)
80
89
  rspec (~> 2.4.0)
81
- sinatra_more (~> 0.3.0)
82
90
  sprockets (~> 1.0.0)
83
91
  test-construct (~> 1.2.0)
84
92
  thor (~> 0.14.0)
@@ -1,19 +1,27 @@
1
1
  require 'rack/utils' # needed for sinatra_more...
2
- require 'sinatra_more/markup_plugin'
2
+ require 'padrino-helpers'
3
3
 
4
4
  module Massimo
5
5
  module Helpers
6
- include SinatraMore::OutputHelpers
7
- include SinatraMore::TagHelpers
8
- include SinatraMore::AssetTagHelpers
9
- include SinatraMore::FormHelpers
10
- include SinatraMore::FormatHelpers
6
+ include Padrino::Helpers::DomHelpers
7
+ include Padrino::Helpers::OutputHelpers
8
+ include Padrino::Helpers::TagHelpers
9
+ include Padrino::Helpers::AssetTagHelpers
10
+ include Padrino::Helpers::FormHelpers
11
+ include Padrino::Helpers::FormatHelpers
12
+ include Padrino::Helpers::NumberHelpers
13
+ include Padrino::Helpers::TranslationHelpers
11
14
 
12
15
  # Returns an instance of the Site
13
16
  def site
14
17
  Massimo.site
15
18
  end
16
19
 
20
+ # Returns the current Site configuration
21
+ def config
22
+ Massimo.config
23
+ end
24
+
17
25
  # Renders a view with the given locals. Kind of like `render :partial` in Rails
18
26
  def render(view_name, locals = {})
19
27
  view = Massimo::View.find(view_name)
@@ -1,3 +1,3 @@
1
1
  module Massimo
2
- VERSION = '0.8.1'
2
+ VERSION = '0.8.2'
3
3
  end
data/massimo.gemspec CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
15
15
  s.add_dependency 'activesupport', '~> 3.0.0'
16
16
  s.add_dependency 'i18n', '~> 0.4.0'
17
17
  s.add_dependency 'rack', '~> 1.2.0'
18
- s.add_dependency 'sinatra_more', '~> 0.3.0'
18
+ s.add_dependency 'padrino-helpers', '~> 0.9.0'
19
19
  s.add_dependency 'thor', '~> 0.14.0'
20
20
  s.add_dependency 'tilt', '~> 1.2.0'
21
21
  s.add_dependency 'tzinfo', '~> 0.3.0'
@@ -1,16 +1,19 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Massimo::Helpers do
4
- it { should include(SinatraMore::OutputHelpers) }
5
- it { should include(SinatraMore::TagHelpers) }
6
- it { should include(SinatraMore::AssetTagHelpers) }
7
- it { should include(SinatraMore::FormHelpers) }
8
- it { should include(SinatraMore::FormatHelpers) }
4
+ it { should include(Padrino::Helpers::DomHelpers) }
5
+ it { should include(Padrino::Helpers::OutputHelpers) }
6
+ it { should include(Padrino::Helpers::TagHelpers) }
7
+ it { should include(Padrino::Helpers::AssetTagHelpers) }
8
+ it { should include(Padrino::Helpers::FormHelpers) }
9
+ it { should include(Padrino::Helpers::FormatHelpers) }
10
+ it { should include(Padrino::Helpers::NumberHelpers) }
11
+ it { should include(Padrino::Helpers::TranslationHelpers) }
9
12
 
10
13
  let(:helpers) { Object.new.extend(Massimo::Helpers) }
11
14
 
12
15
  describe '#render' do
13
- it 'should render a view with the given locals' do
16
+ it 'renders a view with the given locals' do
14
17
  with_file 'views/partial.haml', '= local' do
15
18
  helpers.render('partial', :local => 'Local').should == "Local\n"
16
19
  end
@@ -18,9 +21,16 @@ describe Massimo::Helpers do
18
21
  end
19
22
 
20
23
  describe '#site' do
21
- it 'should return the current site instance' do
24
+ it 'returns the current site instance' do
22
25
  site = Massimo::Site.new
23
26
  helpers.site.should === site
24
27
  end
25
28
  end
29
+
30
+ describe '#config' do
31
+ it 'returns the current site configuration' do
32
+ site = Massimo::Site.new
33
+ helpers.config.should === site.config
34
+ end
35
+ end
26
36
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 8
8
- - 1
9
- version: 0.8.1
8
+ - 2
9
+ version: 0.8.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Pete Browne
@@ -63,7 +63,7 @@ dependencies:
63
63
  type: :runtime
64
64
  version_requirements: *id003
65
65
  - !ruby/object:Gem::Dependency
66
- name: sinatra_more
66
+ name: padrino-helpers
67
67
  prerelease: false
68
68
  requirement: &id004 !ruby/object:Gem::Requirement
69
69
  none: false
@@ -72,9 +72,9 @@ dependencies:
72
72
  - !ruby/object:Gem::Version
73
73
  segments:
74
74
  - 0
75
- - 3
75
+ - 9
76
76
  - 0
77
- version: 0.3.0
77
+ version: 0.9.0
78
78
  type: :runtime
79
79
  version_requirements: *id004
80
80
  - !ruby/object:Gem::Dependency