bard-static 2.2.1 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7cbb27db858a030dccee0606798c599a7c5b20d3
|
4
|
+
data.tar.gz: fa784259da89bb88db5aa07776037068dfab2f21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89360694ffa4461738f5611ad77e75bb979650493bc111fce76cddd2ff171a538a8eab9089cf1b1ed4d2bf8211fc0da08a710e2848cb2980d30255c089c2e614
|
7
|
+
data.tar.gz: 8211d811879c12593a83d33db35279a2d3fcd1cbeb53782d2dcbe32b1c04595e89f2589314b25d5ff29b7710a74f4ee9b08b904a884d7aadfac8b5a67d7a16f7
|
@@ -1,13 +1,13 @@
|
|
1
1
|
module Bard
|
2
2
|
module Static
|
3
3
|
class StaticController < ApplicationController
|
4
|
-
|
4
|
+
skip_before_action :verify_authenticity_token
|
5
5
|
|
6
|
-
|
6
|
+
before_action :before_bard_static,
|
7
7
|
:if => proc { respond_to?(:before_bard_static, true) }
|
8
8
|
|
9
9
|
def mockups
|
10
|
-
env["bard_static.prototype"] = true
|
10
|
+
request.env["bard_static.prototype"] = true
|
11
11
|
with_404_handler { render_with_index "mockups/#{params[:file_path]}", :layout => false }
|
12
12
|
end
|
13
13
|
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require "ostruct"
|
2
|
+
|
3
|
+
module Bard
|
4
|
+
module Static
|
5
|
+
module MockupHelper
|
6
|
+
def layout layout, &block
|
7
|
+
render :text => capture(&block), :layout => "layouts/#{layout}"
|
8
|
+
end
|
9
|
+
|
10
|
+
def mockup_form_for &block
|
11
|
+
form_for MockupModel.new, url: ".", &block
|
12
|
+
end
|
13
|
+
|
14
|
+
class MockupModel < OpenStruct
|
15
|
+
include ActiveModel::Model
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/bard/static/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bard-static
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Micah Geisel
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2017-02-17 00:00:00.000000000 Z
|
16
16
|
dependencies: []
|
17
17
|
description: Handcrafted prototypes for Rails.
|
18
18
|
email:
|
@@ -25,8 +25,8 @@ files:
|
|
25
25
|
- README.md
|
26
26
|
- Rakefile
|
27
27
|
- app/controllers/bard/static/static_controller.rb
|
28
|
-
- app/helpers/bard/static/layout_helper.rb
|
29
28
|
- app/helpers/bard/static/link_to_helper.rb
|
29
|
+
- app/helpers/bard/static/mockup_helper.rb
|
30
30
|
- app/views/bard/static/delayed_error.erb
|
31
31
|
- app/views/bard/static/error.html.erb
|
32
32
|
- config/routes.rb
|
@@ -53,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
53
53
|
version: '0'
|
54
54
|
requirements: []
|
55
55
|
rubyforge_project:
|
56
|
-
rubygems_version: 2.
|
56
|
+
rubygems_version: 2.4.7
|
57
57
|
signing_key:
|
58
58
|
specification_version: 4
|
59
59
|
summary: Protoyping engine for Rails.
|