remove_data_attributes 0.2.0 → 0.2.1

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: 69172fe3cb093195772529974892d07ac0b1d025
4
- data.tar.gz: fbb4df2602315e76d4dea5bda7b5e57eacea462f
3
+ metadata.gz: '083c79ace1dff63aeaddd92ebbabb47f2abb0bc7'
4
+ data.tar.gz: 4afce9dffa0549268e95fb9d5d597f974e73eb7e
5
5
  SHA512:
6
- metadata.gz: c24bd87c412edf0fec11d8eef4d1211b94ee4b4c73877ca4a66c8eddf91001a1604ebd145749dcb255918228ea5b9d3b9ad285b38fe47ace7df0ce9fb827b290
7
- data.tar.gz: 62dc161345a0f579baad575c02537dad0bf4a9c05c01db61b9a5c1dc3fb0a4acf68b48807755e03d6e8b56752fbcd894558f49bb7d8a0c22e45c0f36ae589181
6
+ metadata.gz: 142f9e8fcc6e08e6204d97456e1c9fb24bf33d5b933a5057c2f00e218d93857c3d6d905393fdb806be6f30c333e390a5751960b77838126fd93ee65ed0b65ef6
7
+ data.tar.gz: 9b76abb107660c01669130722c3599a063862ae441d3ed65ccb3f53e798362f7b37c2435f64c998ab12cd42316725dbd4855c82f51e51a1520bdedb2a509a5fa
@@ -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-test
38
+ - data-testid
39
39
  ```
40
40
 
41
- This will remove `data-test` attributes.
41
+ This will remove `data-testid` attributes.
42
42
 
43
43
  ## Example
44
- Here is an example of removing `data-test` attributes.
44
+ Here is an example of removing `data-testid` attributes.
45
45
 
46
46
  ### Template
47
47
  ```ERB
48
- <%= form_for :user, url: session_path(:user) do |f| %>
48
+ <%= form_with scope: :user, url: session_path(:user) do |f| %>
49
49
  <%= field_set_tag "Email" do %>
50
- <%= f.email_field :email, "data-test": "email" %>
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-test" => "password" %>
54
+ <%= f.password_field :password, "data-testid" => "password" %>
55
55
  <% end %>
56
56
 
57
- <%= f.submit "Sign in", data: { test: "submit" } %>
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="&#x2713;" />
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]" id="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]" id="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" />
@@ -1,3 +1,3 @@
1
1
  # Configure which data attributes should be removed.
2
2
  data_attributes:
3
- # - data-test
3
+ # - data-testid
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RemoveDataAttributes
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
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.0
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: 2017-12-25 00:00:00.000000000 Z
11
+ date: 2018-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties