excalibur 0.0.6 → 0.0.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c85c0ba73e611090f63258ee7c7b8fa79e3632fa
4
- data.tar.gz: 8aebb1d1e7773f82e714dbf9fcddcccadcde6cb2
3
+ metadata.gz: b5f074fac5a564e6a17457bd53ea8fffee50a827
4
+ data.tar.gz: d5fdd647e9aa77ec0303bf2a68bbd956de41d77d
5
5
  SHA512:
6
- metadata.gz: 5ac3b09b2468035e81b06aa978b6586169452fa9df834af3a1def3b8580384396c571fad45b1034962823b2828e3e783d5c0aee5adf90152f4ce8e7b9f4dcc41
7
- data.tar.gz: dbe90aa2c8de7ecfa381514aee7c9959487f8f6680812d9841fdf3fe263d10204683e3d26c8011c27f93c72d937f39f3ef15939f7de7265610136ad49340477c
6
+ metadata.gz: 48d2ca4506c4db5a711f9fbbbd7cbb1fcc814333248de43192a7774ae0479f12a5cb07486b84b78bca44ec2ebdb5bba8178e78bb8328d847d9ecbe2e638591f2
7
+ data.tar.gz: a1ebdfe72c23fd43539d429f13ccc15f47d36bb6d13badb4b80ff417ef0094318b8578085e6e7fc1396f200fd14fea9a05794ea4c1bcb229d1b19d347372cfd4
@@ -58,9 +58,7 @@ module Excalibur
58
58
  obj = args.first || self
59
59
  subject = configuration.send($1)
60
60
 
61
- if subject.present?
62
- subject.to_s(obj)
63
- end
61
+ subject.to_s(obj) if subject.present?
64
62
  else
65
63
  super
66
64
  end
@@ -1,4 +1,4 @@
1
1
  # setting version number for the Excalibur gem
2
2
  module Excalibur
3
- VERSION = '0.0.6'
3
+ VERSION = '0.0.7'
4
4
  end
@@ -8,14 +8,14 @@ module Excalibur
8
8
 
9
9
  def quick_set(type, *args)
10
10
  case type
11
- when :title, :description
12
- section = args.shift
13
- excalibur_subject.configuration.send(type).send(
14
- "update_#{section}",
15
- *args
16
- )
17
- when :meta_tag
18
- excalibur_subject.configuration.set_meta_tag(*args)
11
+ when :title, :description
12
+ section = args.shift
13
+ excalibur_subject.configuration.send(type).send(
14
+ "update_#{section}",
15
+ *args
16
+ )
17
+ when :meta_tag
18
+ excalibur_subject.configuration.set_meta_tag(*args)
19
19
  end
20
20
  end
21
21
 
@@ -66,15 +66,14 @@ module Excalibur
66
66
  def excalibur_decorate_subject(object, options = {})
67
67
  class_name = if options.key?(:class_name)
68
68
  options.delete(:class_name)
69
- elsif object.is_a?(Draper::Decorator)
69
+ elsif object.is_a?(::Draper::Decorator)
70
70
  object.object.class.name
71
71
  else
72
72
  object.class.name
73
73
  end
74
74
 
75
- Object.const_get(
76
- "::Excalibur::#{class_name}Decorator"
77
- ).decorate(object, options)
75
+ "::Excalibur::#{class_name}Decorator".constantize.decorate(
76
+ object, options)
78
77
  end
79
78
  end
80
79
  end
@@ -17,7 +17,7 @@ module Excalibur
17
17
 
18
18
  describe '#entitle' do
19
19
  context 'when dealing with a blank object' do
20
- let(:obj) { Dummy.new }
20
+ let(:obj) { ::Dummy.new }
21
21
 
22
22
  it 'should try and decorate an object' do
23
23
  expect(DummyDecorator).to receive(:decorate).with(obj, {})
@@ -39,7 +39,7 @@ module Excalibur
39
39
  it 'should try and decorate an object from a class' do
40
40
  expect(DummyDecorator).to receive(:decorate).with(obj, {})
41
41
 
42
- helpers.entitle(obj, class_name: Dummy)
42
+ helpers.entitle(obj, class_name: ::Dummy)
43
43
  end
44
44
 
45
45
  it 'should try and decorate an object from a string' do
@@ -50,7 +50,7 @@ module Excalibur
50
50
  end
51
51
 
52
52
  context 'when dealing with a decorated object' do
53
- let(:origin) { Dummy.new }
53
+ let(:origin) { ::Dummy.new }
54
54
  let(:obj) { OtherDecorator.decorate(origin) }
55
55
 
56
56
  it 'should try and decorate an object' do
@@ -109,7 +109,7 @@ module Excalibur
109
109
  DummyDecorator.excalibur_set_title_content :body, 'New custom title'
110
110
  DummyDecorator.excalibur_set_title_content :prefix, '()==|::::::> '
111
111
 
112
- helpers.entitle(Dummy.new)
112
+ helpers.entitle(::Dummy.new)
113
113
  end
114
114
 
115
115
  it 'should return a title tag with the custom title content' do
@@ -134,7 +134,7 @@ module Excalibur
134
134
  DummyDecorator.excalibur_set_meta_tag :foo, :proc, proc { |obj| obj.class.to_s }
135
135
  DummyDecorator.excalibur_set_meta_tag :foo, :nil, nil
136
136
 
137
- helpers.entitle(Dummy.new)
137
+ helpers.entitle(::Dummy.new)
138
138
  end
139
139
 
140
140
  it 'should return a title tag with the custom title content' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: excalibur
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joost Elfering
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-15 00:00:00.000000000 Z
11
+ date: 2014-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails