confluence 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/confluence.gemspec +1 -1
- data/lib/confluence/railties/resolver.rb +6 -2
- data/spec/confluence/railties/resolver_spec.rb +17 -0
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.3
|
data/confluence.gemspec
CHANGED
@@ -10,8 +10,8 @@ module Confluence
|
|
10
10
|
handler = _get_handler_from_nothing
|
11
11
|
source = _get_source_from_path(partial_path)
|
12
12
|
identifier = _get_identifier name, prefix
|
13
|
-
|
14
|
-
|
13
|
+
normalized_details = _normalize_details(partial_path, details)
|
14
|
+
_get_templates( source, identifier, handler, normalized_details )
|
15
15
|
else
|
16
16
|
[]
|
17
17
|
end
|
@@ -19,6 +19,10 @@ module Confluence
|
|
19
19
|
|
20
20
|
private
|
21
21
|
|
22
|
+
def _normalize_details( path, details )
|
23
|
+
details.merge( :virtual_path => path )
|
24
|
+
end
|
25
|
+
|
22
26
|
def _checks
|
23
27
|
@_checks ||= [
|
24
28
|
lambda do |not_null|
|
@@ -25,6 +25,23 @@ describe Confluence::Railties::Resolver do
|
|
25
25
|
|
26
26
|
end
|
27
27
|
|
28
|
+
describe "#_normalize_details" do
|
29
|
+
let(:get) { lambda { |path, details| resolver.send("_normalize_details",path,details ) } }
|
30
|
+
|
31
|
+
context "expected usage" do
|
32
|
+
let(:details) { {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder, :coffee, :haml]} }
|
33
|
+
let(:transform) { get.call "dog/cat/bat/bird", details }
|
34
|
+
[:virtual_path, :locale, :formats, :handlers].each do |key|
|
35
|
+
it "should have the #{key} key" do
|
36
|
+
transform.should_not be_empty
|
37
|
+
transform.should have_key key
|
38
|
+
transform[key].should_not be_nil
|
39
|
+
transform[key].should_not be_empty
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
28
45
|
describe "#_get_gem_directory" do
|
29
46
|
let(:get) { lambda { |parameter| resolver.send("_get_gem_directory", parameter) } }
|
30
47
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: confluence
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -380,7 +380,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
380
380
|
version: '0'
|
381
381
|
segments:
|
382
382
|
- 0
|
383
|
-
hash: -
|
383
|
+
hash: -2048542954068152514
|
384
384
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
385
385
|
none: false
|
386
386
|
requirements:
|