rjs_helpers 1.0 → 1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/app/helpers/rjs_helper.rb +13 -0
- data/lib/rjs_helpers/version.rb +1 -1
- data/rjs_helpers.gemspec +2 -2
- metadata +82 -105
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 6cfb57a62aadb5b18411a415e63997948dd16c1681f883722b26e65ed56dcbe0
|
4
|
+
data.tar.gz: '038566447e9db1b7ded01bcca62717694c76fa8714fa641e2460181fb7b4c647'
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b028862c307011e4ceb2d616b8510d33d32f3eb1c2c9b4d1f573c7d70b2c349d8915f654970901954274a89d90599fa7752d9fc48dce0c459fc3a688ac0a6c75
|
7
|
+
data.tar.gz: 404060f63e0b348c9c5a08d6601f0fce1c52188f1c0b9ebb4377b0e636cedf98fac9f08fa9babdb90d7a7318dac7ed20f6bea07c9ae9f10fd78f9472d09f7b55
|
data/app/helpers/rjs_helper.rb
CHANGED
@@ -103,6 +103,19 @@ module RjsHelper
|
|
103
103
|
|
104
104
|
private
|
105
105
|
|
106
|
+
#
|
107
|
+
# @param [Symbol, String] func
|
108
|
+
# The function to be executed. The +_by_id* part does not have
|
109
|
+
# to be given, it is automatically added if element given in +element_or_options+
|
110
|
+
# is an instance of +{ActiveRecord::Base}+
|
111
|
+
#
|
112
|
+
# @param [ActiveRecord::Base, Hash] element_or_options
|
113
|
+
# Either the element on which the javascript function should be executed
|
114
|
+
# or a hash (usually used for rendering options)
|
115
|
+
#
|
116
|
+
# @return [String] a javascript string to execute the corresponding
|
117
|
+
# method in rjs_helpers.coffee
|
118
|
+
#
|
106
119
|
def rjs_method(func, element_or_options = {})
|
107
120
|
if element_or_options.is_a?(Hash)
|
108
121
|
element = element_or_options.delete(:element)
|
data/lib/rjs_helpers/version.rb
CHANGED
data/rjs_helpers.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.name = 'rjs_helpers'
|
8
8
|
spec.version = RjsHelpers::VERSION
|
9
9
|
spec.authors = ['Stefan Exner']
|
10
|
-
spec.email = ['
|
10
|
+
spec.email = ['stex@stex.codes']
|
11
11
|
spec.description = %q{Some helper methods to perform standard JS library tasks from js.erb without having to write actual javascript}
|
12
12
|
spec.summary = %q{Some helper methods to perform standard JS library tasks from js.erb without having to write actual javascript}
|
13
13
|
spec.homepage = 'https://github.com/Stex/rjs_helpers'
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.add_dependency 'railties', '>= 3.2', '<
|
21
|
+
spec.add_dependency 'railties', '>= 3.2', '< 6'
|
22
22
|
|
23
23
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
24
24
|
spec.add_development_dependency 'rake', '0.9.2.2'
|
metadata
CHANGED
@@ -1,100 +1,86 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rjs_helpers
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 0
|
9
|
-
version: "1.0"
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '1.2'
|
10
5
|
platform: ruby
|
11
|
-
authors:
|
6
|
+
authors:
|
12
7
|
- Stefan Exner
|
13
|
-
autorequire:
|
8
|
+
autorequire:
|
14
9
|
bindir: bin
|
15
10
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2024-12-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
20
14
|
name: railties
|
21
|
-
|
22
|
-
|
23
|
-
none: false
|
24
|
-
requirements:
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
25
17
|
- - ">="
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
version: "3.2"
|
32
|
-
- - <
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
hash: 31
|
35
|
-
segments:
|
36
|
-
- 5
|
37
|
-
- 0
|
38
|
-
version: "5.0"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.2'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '6'
|
39
23
|
type: :runtime
|
40
|
-
version_requirements: *id001
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: bundler
|
43
24
|
prerelease: false
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '3.2'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '6'
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: bundler
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '1.3'
|
54
40
|
type: :development
|
55
|
-
version_requirements: *id002
|
56
|
-
- !ruby/object:Gem::Dependency
|
57
|
-
name: rake
|
58
41
|
prerelease: false
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '1.3'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rake
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - '='
|
52
|
+
- !ruby/object:Gem::Version
|
70
53
|
version: 0.9.2.2
|
71
54
|
type: :development
|
72
|
-
version_requirements: *id003
|
73
|
-
- !ruby/object:Gem::Dependency
|
74
|
-
name: barista
|
75
55
|
prerelease: false
|
76
|
-
|
77
|
-
|
78
|
-
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - '='
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 0.9.2.2
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: barista
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
79
65
|
- - ">="
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
|
82
|
-
segments:
|
83
|
-
- 0
|
84
|
-
version: "0"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
85
68
|
type: :development
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
-
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
description: Some helper methods to perform standard JS library tasks from js.erb
|
76
|
+
without having to write actual javascript
|
77
|
+
email:
|
78
|
+
- stex@stex.codes
|
90
79
|
executables: []
|
91
|
-
|
92
80
|
extensions: []
|
93
|
-
|
94
81
|
extra_rdoc_files: []
|
95
|
-
|
96
|
-
|
97
|
-
- .gitignore
|
82
|
+
files:
|
83
|
+
- ".gitignore"
|
98
84
|
- Gemfile
|
99
85
|
- LICENSE.txt
|
100
86
|
- MIT-LICENSE
|
@@ -111,38 +97,29 @@ files:
|
|
111
97
|
- test/test_helper.rb
|
112
98
|
- uninstall.rb
|
113
99
|
homepage: https://github.com/Stex/rjs_helpers
|
114
|
-
licenses:
|
100
|
+
licenses:
|
115
101
|
- MIT
|
116
|
-
|
102
|
+
metadata: {}
|
103
|
+
post_install_message:
|
117
104
|
rdoc_options: []
|
118
|
-
|
119
|
-
require_paths:
|
105
|
+
require_paths:
|
120
106
|
- lib
|
121
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
122
|
-
|
123
|
-
requirements:
|
107
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
124
109
|
- - ">="
|
125
|
-
- !ruby/object:Gem::Version
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
version: "0"
|
130
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
131
|
-
none: false
|
132
|
-
requirements:
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
112
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
133
114
|
- - ">="
|
134
|
-
- !ruby/object:Gem::Version
|
135
|
-
|
136
|
-
segments:
|
137
|
-
- 0
|
138
|
-
version: "0"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
139
117
|
requirements: []
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
test_files:
|
118
|
+
rubygems_version: 3.4.6
|
119
|
+
signing_key:
|
120
|
+
specification_version: 4
|
121
|
+
summary: Some helper methods to perform standard JS library tasks from js.erb without
|
122
|
+
having to write actual javascript
|
123
|
+
test_files:
|
147
124
|
- test/rjs_helpers_test.rb
|
148
125
|
- test/test_helper.rb
|