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: e2a3468ddff5734f66ebcdd1cc7e49631a0ebf78
4
- data.tar.gz: e00c22380feb3caa6f9b96aef945706d83b946aa
3
+ metadata.gz: 7cbb27db858a030dccee0606798c599a7c5b20d3
4
+ data.tar.gz: fa784259da89bb88db5aa07776037068dfab2f21
5
5
  SHA512:
6
- metadata.gz: 69c1de1514ed9fb92584c717a49a80f94d8c60db8bde1b0c16281f0cfbea92e68537f4ff2b26f13d9f646d9f1494ee0404823bfdcffb985c826505c008bff768
7
- data.tar.gz: 93cf25454801a6fbf960f4f9d094fca8ca8885b0b0dc0a27d55325b3d108bbab619680f1b376456f203f5fe4d70e5d2e253e5ab0d0fbcb75fdc3b29245924adf
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
- skip_before_filter :verify_authenticity_token
4
+ skip_before_action :verify_authenticity_token
5
5
 
6
- before_filter :before_bard_static,
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
@@ -1,5 +1,5 @@
1
1
  module Bard
2
2
  module Static
3
- VERSION = "2.2.1"
3
+ VERSION = "2.3.0"
4
4
  end
5
5
  end
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.2.1
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: 2014-10-25 00:00:00.000000000 Z
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.2.2
56
+ rubygems_version: 2.4.7
57
57
  signing_key:
58
58
  specification_version: 4
59
59
  summary: Protoyping engine for Rails.
@@ -1,9 +0,0 @@
1
- module Bard
2
- module Static
3
- module LayoutHelper
4
- def layout layout, &block
5
- render :text => capture(&block), :layout => "layouts/#{layout}"
6
- end
7
- end
8
- end
9
- end