reins 0.1.0 → 0.1.3

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
- SHA256:
3
- metadata.gz: 137f4565dcf589231dfb8739385d468e729daa12025bed971669bd970f444af7
4
- data.tar.gz: 5625e356655c0d77f38a6b2f955540020a21b72c480218c06979f641b789c302
2
+ SHA1:
3
+ metadata.gz: 7895f1346cadd77a6b614b7d4593b87b9e1f3e66
4
+ data.tar.gz: 7efc7875017e6931134768dfcf179062f18cbc77
5
5
  SHA512:
6
- metadata.gz: 2d63c9481a40df5ab560f10936109e58401c77298502c0daba171687f6ac32f4f4859db4bbc3831583f909cd5a2d7534ce95767a5b69d434baf7c2ec0cadd28b
7
- data.tar.gz: 543f427e6a4a765ab4574aaea210ed1f018751bc04bfe28627a12f5b97da25eab0c2d87c9e4da885060e4469493d6d08241622b1eb5a9ffb09c14fbf5ac67e24
6
+ metadata.gz: 4d4b036b3fc924b7efaf5b5047299abde97a9838be67086419d982b49ad16733b904e0046dc88dbb43d2bafca9e3b071ba34c18b4dbe97f69a49659084aafcc4
7
+ data.tar.gz: 894f0b0c009de984d86b3954ea03af058b4a000d6ca71cf0a5abee2f2f2bec940972408bc56c6343533ae43b6066e9e38b6ca74426d1505e3fb8b36e6c9cd0bc
data/lib/reins/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Reins
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.3'
3
3
  end
@@ -5,8 +5,10 @@ module Reins
5
5
  # reins controller and action to the current rails controller and action name.
6
6
  #
7
7
  # Returns:: The javascript code that will perform the necessary actions.
8
- def reins_script_tag
9
- "<script>#{ update_reins_controller }</script>".html_safe
8
+ def reins_script_tag(**html_attributes)
9
+ attrs = html_attributes.map { |k, v| %(#{k}="#{v}") }.join(' ')
10
+
11
+ "<script #{attrs}>#{ update_reins_controller }</script>".html_safe
10
12
  end
11
13
 
12
14
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reins
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Goncalves
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-19 00:00:00.000000000 Z
11
+ date: 2025-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -56,7 +56,7 @@ description: Reins is a ruby gem that automates the creation of javascript contr
56
56
  that match the structure of your rails controllers. This includes passing custom
57
57
  data to the JS controllers from the server.
58
58
  email:
59
- - tony@weareredlight.com
59
+ - tony@redlight.dev
60
60
  executables: []
61
61
  extensions: []
62
62
  extra_rdoc_files: []
@@ -76,7 +76,7 @@ homepage: http://github.com/weareredlight/reins
76
76
  licenses:
77
77
  - MIT
78
78
  metadata: {}
79
- post_install_message:
79
+ post_install_message:
80
80
  rdoc_options: []
81
81
  require_paths:
82
82
  - lib
@@ -91,9 +91,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  - !ruby/object:Gem::Version
92
92
  version: '0'
93
93
  requirements: []
94
- rubyforge_project:
95
- rubygems_version: 2.7.3
96
- signing_key:
94
+ rubyforge_project:
95
+ rubygems_version: 2.6.14.4
96
+ signing_key:
97
97
  specification_version: 4
98
98
  summary: Reins! Rein in your javascript
99
99
  test_files: []