middleman-api 0.2.0 → 1.0.0

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: b8adf32c44de93b020c1e960b594795deef6826d
4
- data.tar.gz: 5ed241fc62eb24859ea4eca5d9fff5e9d3154226
3
+ metadata.gz: 1472f0e8a6517f220b078f6e0d67272b2d7bb5ad
4
+ data.tar.gz: 070a9b0e7b5dc23e2f7708a9d564f6de9e4f95ef
5
5
  SHA512:
6
- metadata.gz: 3621601f77d78a370292f93f2ab6751daa04e034830163bdea501c3ccc6315081935dffe0bf0cd5386e10cc6f8a038dada155174d4e13ec8dc679b4b2cfb559b
7
- data.tar.gz: 5b1017aa5d384c8fc74ff04eac51d27712bf48d538440f99a96e59be54364515f4ddfd17d8e96f21ce4080336f5c9131393955d68ffff16a0f415a6cb601babb
6
+ metadata.gz: 597970dbfe8dbd0e37ec464db56aadc2366724f9dafec1aab8c85d6016cfd280c486c3edebcc561235e97eff20dd3905afa28bd15242ad1cbf1a18d1ca18aece
7
+ data.tar.gz: 15910f19909c88aa600585d6282a0c1c1bee71df652cc8e9d916b90d41da574dcd7e60b37f12bdf1f3607ac7048973b805e8df7e3fe2610d916d3426d4e46b5e
data/.gitignore CHANGED
@@ -15,4 +15,5 @@ doc
15
15
  tmp
16
16
  Makefile
17
17
  .mm-pid-*
18
- .ruby-version
18
+ .ruby-version
19
+ *.gem
@@ -0,0 +1,57 @@
1
+ AllCops:
2
+ DisplayCopNames: true
3
+
4
+
5
+ # Style ------------------------------------
6
+
7
+ Style/FileName:
8
+ Exclude:
9
+ - lib/middleman-sprockets.rb
10
+
11
+ Style/MultilineOperationIndentation:
12
+ EnforcedStyle: aligned
13
+
14
+ Style/MultilineMethodCallIndentation:
15
+ EnforcedStyle: aligned
16
+
17
+ Style/MethodDefParentheses:
18
+ EnforcedStyle: require_no_parentheses_except_multiline
19
+
20
+ Style/SpaceAroundEqualsInParameterDefault:
21
+ EnforcedStyle: no_space
22
+
23
+ Style/IndentationConsistency:
24
+ EnforcedStyle: rails
25
+
26
+ Style/MultilineOperationIndentation:
27
+ Enabled: false
28
+
29
+ Style/Documentation:
30
+ Enabled: false
31
+
32
+ Style/EmptyLinesAroundClassBody:
33
+ Enabled: false
34
+
35
+ Style/RegexpLiteral:
36
+ Enabled: false
37
+
38
+ Style/SignalException:
39
+ Enabled: false
40
+
41
+
42
+ # Metrics ----------------------------------
43
+
44
+ Metrics/LineLength:
45
+ Max: 128
46
+
47
+ Metrics/AbcSize:
48
+ Enabled: false
49
+
50
+ Metrics/MethodLength:
51
+ Enabled: false
52
+
53
+
54
+ # Lint -------------------------------------
55
+
56
+ Lint/EndAlignment:
57
+ AlignWith: variable
@@ -0,0 +1 @@
1
+ middleman-api
@@ -0,0 +1,16 @@
1
+ language: ruby
2
+ sudo: false
3
+ cache: bundler
4
+ bundler_args: "--without development"
5
+ rvm:
6
+ - ruby-head
7
+ - 2.3.0
8
+ - 2.2
9
+ - 2.1
10
+ - 2.0.0
11
+ env: TEST=true
12
+ script: bundle exec rake test
13
+
14
+ matrix:
15
+ allow_failures:
16
+ - rvm: ruby-head
data/Gemfile CHANGED
@@ -2,34 +2,17 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- group :development do
6
- gem "rake", "~> 0.9.2"
7
- gem "rdoc", "~> 3.9"
8
- gem "yard", "~> 0.8.0"
9
- end
10
-
11
- if RUBY_VERSION <= "1.9.3"
12
- gem "pry-debugger"
13
- else
14
- gem "pry-byebug"
15
- end
5
+ gem 'rake'
6
+ gem 'rdoc'
7
+ gem 'yard'
8
+ gem 'pry-byebug'
9
+ gem 'rubocop'
16
10
 
17
11
  group :test do
18
- gem "middleman", github: "middleman/middleman", branch: "v3-stable" do
19
- gem "middleman"
20
- gem "middleman-core"
21
- gem "middleman-more"
22
- end
23
-
24
- gem "cucumber", "~> 1.3.0"
25
- gem "fivemat"
26
- gem "aruba", "~> 0.4.11"
27
- gem "rspec", "~> 2.7"
12
+ gem 'middleman', github: 'middleman/middleman', branch: 'master'
28
13
 
29
- # Template Engines
30
- gem "redcarpet"
31
- gem "slim"
32
- gem "RedCloth"
33
- gem "liquid"
34
- gem "haml"
14
+ gem 'aruba', '~> 0.7.4', require: false
15
+ gem 'rspec', '~> 3.0', require: false
16
+ gem 'cucumber', '~> 2.0', require: false
17
+ gem 'capybara', '~> 2.5.0', require: false
35
18
  end
data/Rakefile CHANGED
@@ -1,14 +1,15 @@
1
1
  require 'bundler'
2
2
  Bundler::GemHelper.install_tasks
3
3
 
4
+ require 'pry-byebug'
4
5
  require 'cucumber/rake/task'
5
6
 
6
7
  Cucumber::Rake::Task.new(:cucumber, 'Run features that should pass') do |t|
7
- t.cucumber_opts = "--color --tags ~@wip --strict --format #{ENV['CUCUMBER_FORMAT'] || 'Fivemat'}"
8
+ t.cucumber_opts = '--color --tags ~@wip --strict'
8
9
  end
9
10
 
10
11
  require 'rake/clean'
11
12
 
12
- task :test => ["cucumber"]
13
+ task test: ['cucumber']
13
14
 
14
- task :default => :test
15
+ task default: :test
@@ -0,0 +1,32 @@
1
+ Feature: Ignore Assets
2
+ Scenario: it should ignore when running server
3
+ Given the Server is running at "middleman-app"
4
+ When I go to "/javascripts/module.json"
5
+ Then I should see:
6
+ """
7
+ <h1>File Not Found</h1>
8
+ """
9
+ And I go to "/javascripts/module.xml"
10
+ Then I should see:
11
+ """
12
+ <h1>File Not Found</h1>
13
+ """
14
+ And I go to "/stylesheet/module.json"
15
+ Then I should see:
16
+ """
17
+ <h1>File Not Found</h1>
18
+ """
19
+ And I go to "/stylesheet/module.xml"
20
+ Then I should see:
21
+ """
22
+ <h1>File Not Found</h1>
23
+ """
24
+
25
+ Scenario: it should ignore on build
26
+ Given a built app at "middleman-app" with flags "--verbose --clean"
27
+ When I cd to "build"
28
+ Then the following files should not exist:
29
+ | javascripts/module.json |
30
+ | javascripts/module.xml |
31
+ | stylesheets/module.json |
32
+ | stylesheets/module.xml |
@@ -4,7 +4,7 @@ Feature: JSON API
4
4
  When I go to "/test.json"
5
5
  Then I should see:
6
6
  """
7
- "meta":{"foo":"bar"}
7
+ "metadata":{"foo":"bar"}
8
8
  """
9
9
  And I should see:
10
10
  """
@@ -27,6 +27,14 @@ Feature: JSON API
27
27
  <div>No Frontmatter</div>
28
28
  """
29
29
 
30
+ Scenario: page with frontmatter references
31
+ Given the Server is running at "middleman-app"
32
+ When I go to "/frontmatter-reference.json"
33
+ Then I should see:
34
+ """
35
+ <h2>foo</h2>\n
36
+ """
37
+
30
38
  Scenario: built files
31
39
  Given a built app at "middleman-app" with flags "--verbose --clean"
32
40
  When I cd to "build"
@@ -35,14 +43,3 @@ Feature: JSON API
35
43
  | index.json |
36
44
  | test.html |
37
45
  | test.json |
38
- | tilt/liquid.json |
39
- | tilt/markdown.html |
40
- | tilt/markdown.json |
41
- | tilt/rdoc.html |
42
- | tilt/rdoc.json |
43
- | tilt/slim.html |
44
- | tilt/slim.json |
45
- | tilt/textile.html |
46
- | tilt/textile.json |
47
- | tilt/haml.html |
48
- | tilt/haml.json |
@@ -0,0 +1,24 @@
1
+ Feature: Request Paths
2
+ Scenario: when requesting is a path
3
+ Given the Server is running at "middleman-app"
4
+ When I go to "/directory/subdirectory.json"
5
+ Then I should see:
6
+ """
7
+ <div>Foo</div>
8
+ """
9
+ And I should see:
10
+ """
11
+ "path":"/directory/subdirectory/"
12
+ """
13
+
14
+ Scenario: when request is root
15
+ Given the Server is running at "middleman-app"
16
+ When I go to "/index.json"
17
+ Then I should see:
18
+ """
19
+ <h1>Middleman is Watching</h1>
20
+ """
21
+ And I should see:
22
+ """
23
+ "path":"/"
24
+ """
@@ -1,6 +1,6 @@
1
1
  PROJECT_ROOT_PATH = File.dirname(File.dirname(File.dirname(__FILE__)))
2
- require "middleman-core"
3
- require "middleman-core/step_definitions"
2
+ require 'middleman-core'
3
+ require 'middleman-core/step_definitions'
4
4
 
5
5
  # Don't encode html entities for tests
6
6
  require 'active_support/json'
@@ -4,9 +4,9 @@ Feature: XML API
4
4
  When I go to "/test.xml"
5
5
  Then I should see:
6
6
  """
7
- <meta>
7
+ <metadata>
8
8
  <foo>bar</foo>
9
- </meta>
9
+ </metadata>
10
10
  """
11
11
  And I should see:
12
12
  """
@@ -37,9 +37,3 @@ Feature: XML API
37
37
  Then the following files should exist:
38
38
  | index.xml |
39
39
  | test.xml |
40
- | tilt/liquid.xml |
41
- | tilt/markdown.xml |
42
- | tilt/rdoc.xml |
43
- | tilt/slim.xml |
44
- | tilt/textile.xml |
45
- | tilt/haml.xml |
@@ -1 +1 @@
1
- activate :api
1
+ activate :api
@@ -0,0 +1,9 @@
1
+ ---
2
+ list:
3
+ - name: foo
4
+ - name: bar
5
+ ---
6
+
7
+ <% current_resource.data.list.each do |node| %>
8
+ <h2><%= node.name %></h2>
9
+ <% end %>
@@ -0,0 +1,3 @@
1
+ #foo {
2
+ color: red;
3
+ }
@@ -1 +1,6 @@
1
- require "middleman-api/extension"
1
+ require 'middleman-core'
2
+
3
+ Middleman::Extensions.register(:api) do
4
+ require 'middleman-api/extension'
5
+ Middleman::Api::Extension
6
+ end
@@ -1,80 +1,113 @@
1
- require "active_support/core_ext"
1
+ require 'active_support'
2
+ require 'active_support/core_ext'
2
3
 
3
4
  # Extension namespace
4
- module Middleman::Api
5
- class Extension < ::Middleman::Extension
5
+ module Middleman
6
+ module Api
7
+ class Extension < ::Middleman::Extension
6
8
 
7
- # Support for .json and .xml
8
- option :formats, [:json, :xml]
9
+ # Support for .json and .xml
10
+ option :formats, [:json, :xml]
9
11
 
10
- def after_configuration
11
- # Hack to reload our templates dir into the FileWatcher API
12
- # https://github.com/middleman/middleman/issues/1217#issuecomment-38014250
13
- fix_templates_for_filewatcher!
14
- app.ignore "__api/*"
15
- end
12
+ # Specific paths to render as :formats
13
+ option :paths, []
14
+
15
+ # ignore metadata keys
16
+ option :ignore_metadata_keys, []
17
+
18
+ # Path to custom template (should probably be ERB)
19
+ option :template, nil
20
+
21
+ def after_configuration
22
+ app.ignore '__api/*'
23
+ app.ignore options.template if options.template
24
+ end
16
25
 
17
- def manipulate_resource_list(resources)
18
- new_resources = []
26
+ def manipulate_resource_list resources
27
+ new_resources = []
19
28
 
20
- options.formats.each do |format|
21
- proxy_parent = ::Middleman::Sitemap::Resource.new(
22
- app.sitemap, "__api/proxy.#{format}", fetch_template)
23
- proxy_parent.add_metadata locals: { resource_data: nil }
29
+ options.formats.each do |format|
30
+ proxy_parent = ::Middleman::Sitemap::Resource.new(
31
+ app.sitemap, "__api/proxy.#{format}", fetch_template)
32
+ proxy_parent.add_metadata locals: { resource_data: nil }
24
33
 
25
- new_resources << proxy_parent
34
+ new_resources << proxy_parent
26
35
 
27
- resources.each do |resource|
28
- ext = resource.ext.gsub('.','').to_sym
36
+ resources.each do |resource|
37
+ ext = resource.ext.delete('.').to_sym
29
38
 
30
- next if resource.ignored? || ext == format
31
- next unless resource.template?
39
+ next if options.paths.any? && !matches_include_paths?(resource)
40
+ next if resource.ignored? || ext == format
41
+ next if should_ignore_resource?(resource)
32
42
 
33
- new_resources << add_proxy_for_format(resource, format)
43
+ new_resources << add_proxy_for_format(resource, format)
44
+ end
34
45
  end
46
+
47
+ resources + new_resources
35
48
  end
36
49
 
37
- return resources + new_resources
38
- end
50
+ private
39
51
 
40
- private
52
+ def should_ignore_resource? resource
53
+ return true if Middleman::Util.path_match("#{app.config.images_dir}*", resource.path)
54
+ return true if Middleman::Util.path_match("#{app.config.js_dir}*", resource.path)
55
+ return true if Middleman::Util.path_match("#{app.config.css_dir}*", resource.path)
56
+ return true if Middleman::Util.path_match("#{app.config.fonts_dir}*", resource.path)
57
+ return true unless resource.template?
58
+ false
59
+ end
41
60
 
42
- def fix_templates_for_filewatcher!
43
- extension_templates_dir = File.expand_path('../', __FILE__)
44
- templates_dir_relative_from_root = Pathname(extension_templates_dir)
45
- .relative_path_from(Pathname(app.root))
46
- app.files.reload_path(templates_dir_relative_from_root)
47
- end
61
+ def matches_include_paths? resource
62
+ options.paths.each do |path|
63
+ next unless resource.path =~ %r{^#{path}} || resource.destination_path =~ %r{^#{path}}
64
+ return true
65
+ end
66
+ false
67
+ end
48
68
 
49
- def add_proxy_for_format(resource, format)
50
- path = "#{resource.destination_path.split('.').first}.#{format}"
69
+ def add_proxy_for_format resource, format
70
+ path_base = if resource.url == '/' || !(resource.path =~ /index\.html$/)
71
+ resource.destination_path.split('.').first.to_s
72
+ else
73
+ resource.destination_path.split('/')[0..-2].join('/').to_s
74
+ end
51
75
 
52
- proxy = ::Middleman::Sitemap::Resource.new(
53
- app.sitemap, path, fetch_template)
54
- proxy.add_metadata locals: template_data(resource, format)
55
- proxy.add_metadata options: { layout: false }
56
- proxy.proxy_to "__api/proxy.#{format}"
76
+ path_base.gsub!('/index', '') if app.extensions[:directory_indexes]
57
77
 
58
- return proxy
59
- end
78
+ path = "#{path_base}.#{format}"
60
79
 
61
- # Resource data hash
62
- # @return [Hash] resource data to be parsed into json
63
- def template_data(resource, format)
64
- data = {}
65
- data[:resource_data] = {
66
- meta: resource.data,
67
- path: resource.url,
68
- content: resource.render
69
- }.send("to_#{format}")
70
-
71
- return data
72
- end
80
+ proxy = ::Middleman::Sitemap::ProxyResource.new(
81
+ app.sitemap, path, "__api/proxy.#{format}")
73
82
 
74
- def fetch_template
75
- File.expand_path("../template.erb", __FILE__)
76
- end
83
+ proxy.add_metadata locals: template_data(resource, format)
84
+ proxy.add_metadata options: { layout: false }
85
+
86
+ proxy
87
+ end
77
88
 
78
- ::Middleman::Extensions.register(:api, Middleman::Api::Extension)
89
+ # Resource data hash
90
+ # @return [Hash] resource data to be parsed into json
91
+ def template_data resource, format
92
+ metadata = resource.data.select { |k, _v| !options.ignore_metadata_keys.include?(k) }
93
+
94
+ {
95
+ format: format,
96
+ resource_data: {
97
+ metadata: Middleman::Util.recursively_enhance(metadata),
98
+ path: resource.url,
99
+ content: -> { resource.render }
100
+ }
101
+ }
102
+ end
103
+
104
+ def fetch_template
105
+ if options.template
106
+ File.join(app.source_dir, options.template)
107
+ else
108
+ File.expand_path('../template.erb', __FILE__)
109
+ end
110
+ end
111
+ end
79
112
  end
80
113
  end
@@ -1 +1,7 @@
1
- <%= resource_data %>
1
+ <%=
2
+ {
3
+ metadata: resource_data[:metadata],
4
+ path: resource_data[:path],
5
+ content: resource_data[:content].call
6
+ }.send("to_#{format}")
7
+ %>
@@ -1,22 +1,21 @@
1
1
  # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
2
+ $LOAD_PATH.push File.expand_path('../lib', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
- s.name = "middleman-api"
6
- s.version = "0.2.0"
5
+ s.name = 'middleman-api'
6
+ s.version = '1.0.0'
7
7
  s.platform = Gem::Platform::RUBY
8
- s.authors = ["jordanandree"]
9
- s.email = ["jordanandree@gmail.com"]
10
- s.homepage = "http://github.com/jordanandree/middleman-api"
11
- s.summary = %q{Middleman Extension that generates JSON and XML endpoints}
12
- s.description = %q{Middleman Extension that generates JSON and XML endpoints}
8
+ s.authors = ['jordanandree']
9
+ s.email = ['jordanandree@gmail.com']
10
+ s.homepage = 'http://github.com/jordanandree/middleman-api'
11
+ s.summary = 'Middleman Extension that generates JSON and XML endpoints'
12
+ s.description = 'Middleman Extension that generates JSON and XML endpoints'
13
13
 
14
14
  s.files = `git ls-files`.split("\n")
15
15
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
- s.require_paths = ["lib"]
18
-
19
- s.add_runtime_dependency("middleman-core", ["~> 3.0"])
20
- s.add_runtime_dependency("middleman-more", ["~> 3.0"])
21
- s.add_runtime_dependency("builder", ["~> 3.2.0"])
16
+ s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
17
+ s.require_paths = ['lib']
18
+
19
+ s.add_runtime_dependency('middleman-core', ['~> 4.0'])
20
+ s.add_runtime_dependency('builder', ['~> 3.2.0'])
22
21
  end
data/readme.md CHANGED
@@ -30,7 +30,7 @@ The extension will then look over each template in the sitemap and proxy frontma
30
30
 
31
31
  ```json
32
32
  {
33
- "meta" {
33
+ "meta": {
34
34
  "title" : "Middleman",
35
35
  "foo" : "bar"
36
36
  },
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - jordanandree
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-27 00:00:00.000000000 Z
11
+ date: 2016-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: middleman-core
@@ -16,28 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.0'
19
+ version: '4.0'
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
- version: '3.0'
27
- - !ruby/object:Gem::Dependency
28
- name: middleman-more
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '3.0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '3.0'
26
+ version: '4.0'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: builder
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -60,33 +46,34 @@ extensions: []
60
46
  extra_rdoc_files: []
61
47
  files:
62
48
  - ".gitignore"
49
+ - ".rubocop.yml"
50
+ - ".ruby-gemset"
51
+ - ".travis.yml"
63
52
  - Gemfile
64
53
  - LICENSE
65
54
  - Rakefile
55
+ - features/ignore-assets.feature
66
56
  - features/json-api.feature
57
+ - features/request-paths.feature
67
58
  - features/support/env.rb
68
- - features/tilt-formats.feature
69
59
  - features/xml-api.feature
70
60
  - fixtures/middleman-app/config.rb
61
+ - fixtures/middleman-app/source/directory/subdirectory/index.html.erb
62
+ - fixtures/middleman-app/source/frontmatter-reference.html.erb
71
63
  - fixtures/middleman-app/source/images/background.png
72
64
  - fixtures/middleman-app/source/images/middleman.png
73
65
  - fixtures/middleman-app/source/index.html.erb
74
66
  - fixtures/middleman-app/source/javascripts/all.js
67
+ - fixtures/middleman-app/source/javascripts/module.js.coffee
75
68
  - fixtures/middleman-app/source/layouts/layout.erb
76
69
  - fixtures/middleman-app/source/no-frontmatter.html.erb
77
70
  - fixtures/middleman-app/source/stylesheets/all.css
71
+ - fixtures/middleman-app/source/stylesheets/module.scss
78
72
  - fixtures/middleman-app/source/stylesheets/normalize.css
79
73
  - fixtures/middleman-app/source/test.html.erb
80
- - fixtures/middleman-app/source/tilt/haml.html.haml
81
- - fixtures/middleman-app/source/tilt/liquid.html.liquid
82
- - fixtures/middleman-app/source/tilt/markdown.html.md
83
- - fixtures/middleman-app/source/tilt/rdoc.html.rdoc
84
- - fixtures/middleman-app/source/tilt/slim.html.slim
85
- - fixtures/middleman-app/source/tilt/textile.html.textile
86
74
  - lib/middleman-api.rb
87
75
  - lib/middleman-api/extension.rb
88
76
  - lib/middleman-api/template.erb
89
- - lib/middleman_extension.rb
90
77
  - middleman-api.gemspec
91
78
  - readme.md
92
79
  homepage: http://github.com/jordanandree/middleman-api
@@ -108,13 +95,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
95
  version: '0'
109
96
  requirements: []
110
97
  rubyforge_project:
111
- rubygems_version: 2.4.6
98
+ rubygems_version: 2.5.1
112
99
  signing_key:
113
100
  specification_version: 4
114
101
  summary: Middleman Extension that generates JSON and XML endpoints
115
102
  test_files:
103
+ - features/ignore-assets.feature
116
104
  - features/json-api.feature
105
+ - features/request-paths.feature
117
106
  - features/support/env.rb
118
- - features/tilt-formats.feature
119
107
  - features/xml-api.feature
120
108
  has_rdoc:
@@ -1,54 +0,0 @@
1
- Feature: Tilt Formats
2
- Scenario: markdown
3
- Given the Server is running at "middleman-app"
4
- When I go to "/tilt/markdown.json"
5
- Then I should see:
6
- """
7
- {"meta":{"foo":"bar","baz":"boo"}
8
- """
9
- And I should see "<p><strong>Lorem Ipsum</strong></p>"
10
-
11
- Scenario: textile
12
- Given the Server is running at "middleman-app"
13
- When I go to "/tilt/textile.json"
14
- Then I should see:
15
- """
16
- {"meta":{"foo":"bar","baz":"boo"}
17
- """
18
- And I should see "<p><strong>Lorem Ipsum</strong></p>"
19
-
20
- Scenario: slim
21
- Given the Server is running at "middleman-app"
22
- When I go to "/tilt/slim.json"
23
- Then I should see:
24
- """
25
- {"meta":{"foo":"bar","baz":"boo"}
26
- """
27
- And I should see "<p><strong>Lorem Ipsum</strong></p>"
28
-
29
- Scenario: liquid
30
- Given the Server is running at "middleman-app"
31
- When I go to "/tilt/liquid.json"
32
- Then I should see:
33
- """
34
- {"meta":{"foo":"bar","baz":"boo"}
35
- """
36
- And I should see "<p><strong>Lorem Ipsum</strong></p>"
37
-
38
- Scenario: rdoc
39
- Given the Server is running at "middleman-app"
40
- When I go to "/tilt/rdoc.json"
41
- Then I should see:
42
- """
43
- {"meta":{"foo":"bar","baz":"boo"}
44
- """
45
- And I should see "<p><strong>Lorem Ipsum</strong></p>"
46
-
47
- Scenario: haml
48
- Given the Server is running at "middleman-app"
49
- When I go to "/tilt/haml.json"
50
- Then I should see:
51
- """
52
- {"meta":{"foo":"bar","baz":"boo"}
53
- """
54
- And I should see "<em>Haml</em>"
@@ -1,6 +0,0 @@
1
- ---
2
- foo: bar
3
- baz: boo
4
- ---
5
-
6
- %em Haml
@@ -1,6 +0,0 @@
1
- ---
2
- foo: bar
3
- baz: boo
4
- ---
5
-
6
- <p><strong>Lorem Ipsum</strong></p>
@@ -1,6 +0,0 @@
1
- ---
2
- foo: bar
3
- baz: boo
4
- ---
5
-
6
- **Lorem Ipsum**
@@ -1,6 +0,0 @@
1
- ---
2
- foo: bar
3
- baz: boo
4
- ---
5
-
6
- <b>Lorem Ipsum</b>
@@ -1,7 +0,0 @@
1
- ---
2
- foo: bar
3
- baz: boo
4
- ---
5
-
6
- p
7
- strong Lorem Ipsum
@@ -1,6 +0,0 @@
1
- ---
2
- foo: bar
3
- baz: boo
4
- ---
5
-
6
- *Lorem Ipsum*
@@ -1 +0,0 @@
1
- require "middleman-api"