remove_data_attributes 0.2.0 → 0.2.1
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: '083c79ace1dff63aeaddd92ebbabb47f2abb0bc7'
|
4
|
+
data.tar.gz: 4afce9dffa0549268e95fb9d5d597f974e73eb7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 142f9e8fcc6e08e6204d97456e1c9fb24bf33d5b933a5057c2f00e218d93857c3d6d905393fdb806be6f30c333e390a5751960b77838126fd93ee65ed0b65ef6
|
7
|
+
data.tar.gz: 9b76abb107660c01669130722c3599a063862ae441d3ed65ccb3f53e798362f7b37c2435f64c998ab12cd42316725dbd4855c82f51e51a1520bdedb2a509a5fa
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
# CHANGELOG
|
2
|
+
## [0.2.1](https://github.com/yasaichi/remove_data_attributes/releases/tag/v0.2.1) (July 22, 2018)
|
3
|
+
* [Replace `data-test` with `data-testid`](https://github.com/yasaichi/remove_data_attributes/pull/9)
|
4
|
+
|
2
5
|
## [0.2.0](https://github.com/yasaichi/remove_data_attributes/releases/tag/v0.2.0) (December 26, 2017)
|
3
6
|
* [Write README](https://github.com/yasaichi/remove_data_attributes/pull/8)
|
4
7
|
* [Use YAML for the configuration](https://github.com/yasaichi/remove_data_attributes/pull/7)
|
data/README.md
CHANGED
@@ -35,43 +35,43 @@ And then specify `data-*` attributes you'd like to remove in the generated confi
|
|
35
35
|
|
36
36
|
```yaml
|
37
37
|
data_attributes:
|
38
|
-
- data-
|
38
|
+
- data-testid
|
39
39
|
```
|
40
40
|
|
41
|
-
This will remove `data-
|
41
|
+
This will remove `data-testid` attributes.
|
42
42
|
|
43
43
|
## Example
|
44
|
-
Here is an example of removing `data-
|
44
|
+
Here is an example of removing `data-testid` attributes.
|
45
45
|
|
46
46
|
### Template
|
47
47
|
```ERB
|
48
|
-
<%=
|
48
|
+
<%= form_with scope: :user, url: session_path(:user) do |f| %>
|
49
49
|
<%= field_set_tag "Email" do %>
|
50
|
-
<%= f.email_field :email, "data-
|
50
|
+
<%= f.email_field :email, "data-testid": "email" %>
|
51
51
|
<% end %>
|
52
52
|
|
53
53
|
<%= field_set_tag "Password" do %>
|
54
|
-
<%= f.password_field :password, "data-
|
54
|
+
<%= f.password_field :password, "data-testid" => "password" %>
|
55
55
|
<% end %>
|
56
56
|
|
57
|
-
<%= f.submit "Sign in", data: {
|
57
|
+
<%= f.submit "Sign in", data: { testid: "submit" } %>
|
58
58
|
<% end %>
|
59
59
|
```
|
60
60
|
|
61
61
|
### Rendered HTML (formatted for readability)
|
62
62
|
```html
|
63
|
-
<form action="/users/sign_in" accept-charset="UTF-8" method="post">
|
63
|
+
<form action="/users/sign_in" accept-charset="UTF-8" data-remote="true" method="post">
|
64
64
|
<input name="utf8" type="hidden" value="✓" />
|
65
65
|
<input type="hidden" name="authenticity_token" value="HyOvLlyjIh7Sv7fFt2fKy5+uJNeKwnYobQPs49pl/H7CKSAVrw57jxpERJihR+B77GNSh2pZHG5mEWl0ieYQnQ==" />
|
66
66
|
|
67
67
|
<fieldset>
|
68
68
|
<legend>Email</legend>
|
69
|
-
<input type="email" value="" name="user[email]"
|
69
|
+
<input type="email" value="" name="user[email]" />
|
70
70
|
</fieldset>
|
71
71
|
|
72
72
|
<fieldset>
|
73
73
|
<legend>Password</legend>
|
74
|
-
<input type="password" name="user[password]"
|
74
|
+
<input type="password" name="user[password]" />
|
75
75
|
</fieldset>
|
76
76
|
|
77
77
|
<input type="submit" name="commit" value="Sign in" data-disable-with="Sign in" />
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: remove_data_attributes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yasaichi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|