rjs_helpers 1.0 → 1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 6a84dbca706e6200b622958145824ecba3006d7f000b60a247ebd5948a7525a7
4
+ data.tar.gz: 844bd70bf724838fd2beaf3951afc5c5df98837c8c53a82bfb1e5eab2f006e73
5
+ SHA512:
6
+ metadata.gz: a477b69b3ac6746cf30ee922f523504a8b440848f6ecaf6d448388a2d584de41681c6cd191a8e31bb2276a9835da3ddcf37df3925ba4a4297233df43a64e91a4
7
+ data.tar.gz: 287363b7ccd8d29c40d219dc999cb8e7238d57b41f1fd8bac62a15124cffd771f6e03de06f1762d4a29cb0e5b31e162710f2379aa09b624bbddc1994bd420339
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module RjsHelpers
2
- VERSION = '1.0'
2
+ VERSION = '1.1'
3
3
  end
data/rjs_helpers.gemspec CHANGED
@@ -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', '< 5.0'
21
+ spec.add_dependency 'railties', '>= 3.2', '< 5.2'
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
- hash: 15
5
- prerelease:
6
- segments:
7
- - 1
8
- - 0
9
- version: "1.0"
3
+ version: !ruby/object:Gem::Version
4
+ version: '1.1'
10
5
  platform: ruby
11
- authors:
6
+ authors:
12
7
  - Stefan Exner
13
8
  autorequire:
14
9
  bindir: bin
15
10
  cert_chain: []
16
-
17
- date: 2014-03-18 00:00:00 Z
18
- dependencies:
19
- - !ruby/object:Gem::Dependency
11
+ date: 2019-01-17 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
20
14
  name: railties
21
- prerelease: false
22
- requirement: &id001 !ruby/object:Gem::Requirement
23
- none: false
24
- requirements:
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
25
17
  - - ">="
26
- - !ruby/object:Gem::Version
27
- hash: 3
28
- segments:
29
- - 3
30
- - 2
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: '5.2'
39
23
  type: :runtime
40
- version_requirements: *id001
41
- - !ruby/object:Gem::Dependency
42
- name: bundler
43
24
  prerelease: false
44
- requirement: &id002 !ruby/object:Gem::Requirement
45
- none: false
46
- requirements:
47
- - - ~>
48
- - !ruby/object:Gem::Version
49
- hash: 9
50
- segments:
51
- - 1
52
- - 3
53
- version: "1.3"
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: '5.2'
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
- requirement: &id003 !ruby/object:Gem::Requirement
60
- none: false
61
- requirements:
62
- - - "="
63
- - !ruby/object:Gem::Version
64
- hash: 11
65
- segments:
66
- - 0
67
- - 9
68
- - 2
69
- - 2
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
- requirement: &id004 !ruby/object:Gem::Requirement
77
- none: false
78
- requirements:
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
- hash: 3
82
- segments:
83
- - 0
84
- version: "0"
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
85
68
  type: :development
86
- version_requirements: *id004
87
- description: Some helper methods to perform standard JS library tasks from js.erb without having to write actual javascript
88
- email:
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:
89
78
  - stexmedia@googlemail.com
90
79
  executables: []
91
-
92
80
  extensions: []
93
-
94
81
  extra_rdoc_files: []
95
-
96
- files:
97
- - .gitignore
82
+ files:
83
+ - ".gitignore"
98
84
  - Gemfile
99
85
  - LICENSE.txt
100
86
  - MIT-LICENSE
@@ -111,38 +97,30 @@ 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
102
+ metadata: {}
116
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
- none: false
123
- requirements:
107
+ required_ruby_version: !ruby/object:Gem::Requirement
108
+ requirements:
124
109
  - - ">="
125
- - !ruby/object:Gem::Version
126
- hash: 3
127
- segments:
128
- - 0
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
- hash: 3
136
- segments:
137
- - 0
138
- version: "0"
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
139
117
  requirements: []
140
-
141
118
  rubyforge_project:
142
- rubygems_version: 1.8.22
119
+ rubygems_version: 2.7.3
143
120
  signing_key:
144
- specification_version: 3
145
- summary: Some helper methods to perform standard JS library tasks from js.erb without having to write actual javascript
146
- test_files:
121
+ specification_version: 4
122
+ summary: Some helper methods to perform standard JS library tasks from js.erb without
123
+ having to write actual javascript
124
+ test_files:
147
125
  - test/rjs_helpers_test.rb
148
126
  - test/test_helper.rb