breezy 0.5.4 → 0.5.5
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: dbe2abbdcd65c8ff1a723ff25f966a3911b62d20
|
4
|
+
data.tar.gz: 99fcaf756ab0ed0b8e99f2eaf2b5ed3ff98862d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 499d93c621ca6e1cbbad91f1fa44ccd0f82b512c2f09e6ff62bfe60995288c96af8c0847c37999c05569635ec5b25b719fe329eed9a469a225c7adbc291f5f9b
|
7
|
+
data.tar.gz: 5651fca636aacfc7c1f68dc6f3440c0d39069516dd970317f3c58ab63b6081287cd75184029e2eaa64cac7b0373e9027603c8db57793ffd3d5aaed9505ebc0e0
|
data/lib/breezy/helpers.rb
CHANGED
@@ -22,7 +22,11 @@ module Breezy
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def breezy_filter
|
25
|
-
request.params[:_bz] || (session && session[:breezy_filter])
|
25
|
+
filter = request.params[:_bz] || (session && session[:breezy_filter])
|
26
|
+
|
27
|
+
if filter
|
28
|
+
filter.gsub(/[^\da-zA-Z\=\.]+/, '')
|
29
|
+
end
|
26
30
|
end
|
27
31
|
end
|
28
32
|
end
|
@@ -1,8 +1,15 @@
|
|
1
1
|
import React from 'react'
|
2
|
-
import {mapStateToProps, mapDispatchToProps} from '@jho406/breezy'
|
2
|
+
import {mapStateToProps, mapDispatchToProps, withBrowserBehavior} from '@jho406/breezy'
|
3
3
|
import { connect } from 'react-redux'
|
4
4
|
|
5
5
|
class <%= @js_filename %> extends React.Component {
|
6
|
+
constructor (props) {
|
7
|
+
super(props)
|
8
|
+
const {visit, remote} = withBrowserBehavior(props.visit, props.remote)
|
9
|
+
this.visit = visit.bind(this)
|
10
|
+
this.remote = remote.bind(this)
|
11
|
+
}
|
12
|
+
|
6
13
|
render () {
|
7
14
|
return (
|
8
15
|
<div> {this.props.greetings}
|
@@ -1,4 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
require 'breezy_template/core_ext'
|
2
|
+
|
3
|
+
Breezy.configure do |config|
|
4
|
+
config.track_sprockets_assets = ['application.js', 'application.css']
|
5
|
+
config.track_pack_assets = ['application.js']
|
6
|
+
end
|
data/lib/install/web.rb
CHANGED
@@ -20,6 +20,21 @@ def append_js_tags
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
|
+
def add_member_methods
|
24
|
+
inject_into_file "app/models/application_record.rb", after: "class ApplicationRecord < ActiveRecord::Base\n" do
|
25
|
+
<<-RUBY
|
26
|
+
def self.member_at(index)
|
27
|
+
offset(index).limit(1)
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.member_by(attr, value)
|
31
|
+
find_by(Hash[attr, val])
|
32
|
+
end
|
33
|
+
|
34
|
+
RUBY
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
23
38
|
|
24
39
|
if File.exist?(babelrc)
|
25
40
|
react_babelrc = JSON.parse(File.read(babelrc))
|
@@ -66,8 +81,11 @@ copy_file "#{__dir__}/templates/web/initializer.rb", "config/initializers/breezy
|
|
66
81
|
say "Appending js tags to your application.html.erb"
|
67
82
|
append_js_tags
|
68
83
|
|
84
|
+
say "Adding required member methods to ApplicationRecord"
|
85
|
+
add_member_methods
|
86
|
+
|
69
87
|
say "Installing React, Redux, and Breezy"
|
70
|
-
run "yarn add react-redux redux react react-dom babel-preset-react prop-types redux-form @jho406/breezy
|
88
|
+
run "yarn add react-redux redux react react-dom babel-preset-react prop-types redux-form @jho406/breezy --save"
|
71
89
|
run "yarn add babel-plugin-module-resolver --save-dev"
|
72
90
|
|
73
91
|
say "Updating webpack paths to include .jsx file extension"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: breezy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Johny Ho
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.5.
|
33
|
+
version: 0.5.5
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.5.
|
40
|
+
version: 0.5.5
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: webpacker
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|