middleman-data_source 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/changelog.md +3 -0
- data/lib/middleman/data_source/extension.rb +1 -1
- data/lib/middleman/data_source/version.rb +1 -1
- data/spec/fixtures/base/config.rb +3 -3
- data/spec/lib/middleman/data_source/extension_spec.rb +2 -1
- data/spec/spec_helper.rb +1 -0
- data/spec/support/fixture.rb +19 -8
- metadata +19 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1103c960a4e677056993c7c122238ef8cd900479
|
4
|
+
data.tar.gz: 2c0cc6a97dffda9d2583668620915bb262f9c39b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03f1c68acf968a58280fad1abd61de96bfeeb106c7896916d60c9d7ae34e160780b461e874d077d118c3f749cf013703c3c3f4ad81773153e8c758c1269d693d
|
7
|
+
data.tar.gz: 164d77b687d6d1c28b7ff60d1445ef89662cbe73fdfa32c6f4a4677a36a8ef38f893436234c9b8876e715f4923d7d5bf256c726f7ec984521d0cb8009176dd95
|
data/changelog.md
CHANGED
@@ -3,9 +3,9 @@ set :show_exceptions, false
|
|
3
3
|
|
4
4
|
activate :data_source do |c|
|
5
5
|
|
6
|
-
c.rack_app = Rack::Builder.new do
|
7
|
-
use Rack::Static, urls: ["/"],
|
8
|
-
|
6
|
+
c.rack_app = ::Rack::Builder.new do
|
7
|
+
use ::Rack::Static, urls: ["/"],
|
8
|
+
root: "remote_data"
|
9
9
|
run lambda {|env| [404, {'Content-type' => 'text/plain'}, ['Not found']] }
|
10
10
|
end
|
11
11
|
|
@@ -109,7 +109,8 @@ describe Middleman::DataSource::Extension do
|
|
109
109
|
Given.fixture 'imediate_use'
|
110
110
|
@mm = Middleman::Fixture.app
|
111
111
|
|
112
|
-
|
112
|
+
data = (@mm.respond_to?(:config) && @mm.config.respond_to?(:setting)) ? @mm.config.setting(:remote_data).value : @mm.remote_data
|
113
|
+
expect( data ).to match_array [{"item"=>"one"},{"item"=>"two"}]
|
113
114
|
end
|
114
115
|
|
115
116
|
end
|
data/spec/spec_helper.rb
CHANGED
data/spec/support/fixture.rb
CHANGED
@@ -1,19 +1,30 @@
|
|
1
|
+
|
2
|
+
begin
|
3
|
+
require 'middleman-core/rack'
|
4
|
+
rescue LoadError
|
5
|
+
end
|
6
|
+
|
7
|
+
|
1
8
|
module Middleman
|
2
9
|
module Fixture
|
3
10
|
|
4
11
|
class << self
|
5
12
|
|
6
|
-
def default env=:test
|
7
|
-
Middleman::Application.server.inst do
|
8
|
-
set :environment, env
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
13
|
def app &block
|
13
14
|
ENV['MM_ROOT'] = Given::TMP
|
14
|
-
|
15
|
-
|
15
|
+
|
16
|
+
if Middleman::Application.respond_to?(:server)
|
17
|
+
app = Middleman::Application.server.inst do
|
18
|
+
instance_eval(&block) if block
|
19
|
+
end
|
20
|
+
else
|
21
|
+
require 'middleman-core/renderers/sass'
|
22
|
+
app = Middleman::Application.new do
|
23
|
+
instance_eval(&block) if block
|
24
|
+
end
|
16
25
|
end
|
26
|
+
|
27
|
+
app
|
17
28
|
end
|
18
29
|
|
19
30
|
end
|
metadata
CHANGED
@@ -1,29 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-data_source
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Sloan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: middleman
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '3.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '3.1'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rack-test
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.6.2
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.6.2
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: borrower
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -84,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
84
98
|
version: '0'
|
85
99
|
requirements: []
|
86
100
|
rubyforge_project:
|
87
|
-
rubygems_version: 2.4.
|
101
|
+
rubygems_version: 2.4.5
|
88
102
|
signing_key:
|
89
103
|
specification_version: 4
|
90
104
|
summary: Allow for loading data in middleman from remote sources
|