active_scaffold_batch_vho 3.1.1 → 3.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,44 @@
1
+ # rcov generated
2
+ coverage
3
+
4
+ # rdoc generated
5
+ rdoc
6
+
7
+ # yard generated
8
+ doc
9
+ .yardoc
10
+
11
+ # bundler
12
+ .bundle
13
+
14
+ # jeweler generated
15
+ pkg
16
+
17
+ Gemfile*
18
+ # Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
19
+ #
20
+ # * Create a file at ~/.gitignore
21
+ # * Include files you want ignored
22
+ # * Run: git config --global core.excludesfile ~/.gitignore
23
+ #
24
+ # After doing this, these files will be ignored in all your git projects,
25
+ # saving you from having to 'pollute' every project you touch with them
26
+ #
27
+ # Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
28
+ #
29
+ # For MacOS:
30
+ #
31
+ #.DS_Store
32
+ #
33
+ # For TextMate
34
+ #*.tmproj
35
+ #tmtags
36
+ #
37
+ # For emacs:
38
+ #*~
39
+ #\#*
40
+ #.\#*
41
+ #
42
+ # For vim:
43
+ #*.swp
44
+ nbproject
data/Rakefile CHANGED
@@ -1,4 +1,4 @@
1
- require 'rubygems'
1
+ require 'rake'
2
2
  require 'bundler'
3
3
  begin
4
4
  Bundler.setup(:default, :development)
@@ -7,49 +7,25 @@ rescue Bundler::BundlerError => e
7
7
  $stderr.puts "Run `bundle install` to install missing gems"
8
8
  exit e.status_code
9
9
  end
10
- require 'rake'
11
-
12
- require 'jeweler'
13
- require './lib/active_scaffold_batch/version.rb'
14
-
15
- Jeweler::Tasks.new do |gem|
16
- # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
- gem.name = "active_scaffold_batch_vho"
18
- gem.version = ActiveScaffoldBatch::Version::STRING
19
- gem.homepage = "http://github.com/vhochstein/active_scaffold_batch"
20
- gem.license = "MIT"
21
- gem.summary = %Q{Batch Processing for ActiveScaffold}
22
- gem.description = %Q{You want to destroy/update many records at once with activescaffold?}
23
- gem.email = "activescaffold@googlegroups.com"
24
- gem.authors = ["Volker Hochstein"]
25
- gem.add_runtime_dependency 'active_scaffold_vho', '>= 3.1.2'
26
- # Include your dependencies below. Runtime dependencies are required when using your gem,
27
- # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
28
- # gem.add_runtime_dependency 'jabber4r', '> 0.1'
29
- # gem.add_development_dependency 'rspec', '> 1.2.3'
30
- end
31
- Jeweler::RubygemsDotOrgTasks.new
32
10
 
11
+ Bundler::GemHelper.install_tasks
12
+ require 'rake'
33
13
  require 'rake/testtask'
34
- Rake::TestTask.new(:test) do |test|
35
- test.libs << 'lib' << 'test'
36
- test.pattern = 'test/**/test_*.rb'
37
- test.verbose = true
38
- end
14
+ require 'rdoc/task'
15
+ require 'find'
39
16
 
40
- require 'rcov/rcovtask'
41
- Rcov::RcovTask.new do |test|
42
- test.libs << 'test'
43
- test.pattern = 'test/**/test_*.rb'
44
- test.verbose = true
17
+ desc 'Test ActiveScaffoldBatch.'
18
+ Rake::TestTask.new(:test) do |t|
19
+ t.libs << 'lib'
20
+ t.pattern = 'test/**/*_test.rb'
21
+ t.verbose = true
45
22
  end
46
23
 
47
- task :default => :test
48
-
49
- require 'rake/rdoctask'
50
- Rake::RDocTask.new do |rdoc|
24
+ desc 'Generate documentation for ActiveScaffoldBatch.'
25
+ Rake::RDocTask.new(:rdoc) do |rdoc|
51
26
  rdoc.rdoc_dir = 'rdoc'
52
- rdoc.title = "active_scaffold_batch #{ActiveScaffoldBatch::Version::STRING}"
27
+ rdoc.title = 'ActiveScaffold #{ActiveScaffoldBatch::Version::STRING}'
28
+ rdoc.options << '--line-numbers' << '--inline-source'
53
29
  rdoc.rdoc_files.include('README*')
54
30
  rdoc.rdoc_files.include('lib/**/*.rb')
55
31
  end
@@ -1,84 +1,30 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
1
  # -*- encoding: utf-8 -*-
2
+ $LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
3
+ require 'active_scaffold_batch/version'
5
4
 
6
5
  Gem::Specification.new do |s|
7
6
  s.name = %q{active_scaffold_batch_vho}
8
- s.version = "3.1.1"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
7
+ s.version = ActiveScaffoldBatch::Version::STRING
8
+ s.platform = Gem::Platform::RUBY
11
9
  s.authors = ["Volker Hochstein"]
12
- s.date = %q{2012-02-11}
13
- s.description = %q{You want to destroy/update many records at once with activescaffold?}
14
- s.email = %q{activescaffold@googlegroups.com}
10
+ s.summary = %q{Batch Processing for ActiveScaffold}
11
+ s.description = %q{You want to batch create/destroy/update many records at once with activescaffold?}
12
+ s.email = %q{vhochstein@gmail.com}
15
13
  s.extra_rdoc_files = [
16
- "LICENSE.txt",
17
- "README"
18
- ]
19
- s.files = [
20
- ".document",
21
- "LICENSE.txt",
22
- "README",
23
- "Rakefile",
24
- "active_scaffold_batch_vho.gemspec",
25
- "frontends/default/views/_batch_create_form.html.erb",
26
- "frontends/default/views/_batch_create_form_attribute.html.erb",
27
- "frontends/default/views/_batch_create_form_body.html.erb",
28
- "frontends/default/views/_batch_update_form.html.erb",
29
- "frontends/default/views/_batch_update_form_attribute.html.erb",
30
- "frontends/default/views/_batch_update_form_attribute_scope.html.erb",
31
- "frontends/default/views/_batch_update_form_body.html.erb",
32
- "frontends/default/views/batch_create.html.erb",
33
- "frontends/default/views/batch_update.html.erb",
34
- "frontends/default/views/on_batch_base.js.erb",
35
- "frontends/default/views/on_batch_create.js.erb",
36
- "frontends/default/views/on_batch_update.js.erb",
37
- "init.rb",
38
- "lib/active_scaffold/actions/batch_base.rb",
39
- "lib/active_scaffold/actions/batch_create.rb",
40
- "lib/active_scaffold/actions/batch_destroy.rb",
41
- "lib/active_scaffold/actions/batch_update.rb",
42
- "lib/active_scaffold/config/batch_base.rb",
43
- "lib/active_scaffold/config/batch_create.rb",
44
- "lib/active_scaffold/config/batch_destroy.rb",
45
- "lib/active_scaffold/config/batch_update.rb",
46
- "lib/active_scaffold/helpers/batch_create_column_helpers.rb",
47
- "lib/active_scaffold/helpers/calendar_date_select_update_column_helpers.rb",
48
- "lib/active_scaffold/helpers/datepicker_update_column_helpers.rb",
49
- "lib/active_scaffold/helpers/update_column_helpers.rb",
50
- "lib/active_scaffold_batch.rb",
51
- "lib/active_scaffold_batch/config/core.rb",
52
- "lib/active_scaffold_batch/engine.rb",
53
- "lib/active_scaffold_batch/locale/de.yml",
54
- "lib/active_scaffold_batch/locale/en.yml",
55
- "lib/active_scaffold_batch/version.rb",
56
- "lib/active_scaffold_batch_vho.rb",
57
- "uninstall.rb"
14
+ "README"
58
15
  ]
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+
59
19
  s.homepage = %q{http://github.com/vhochstein/active_scaffold_batch}
60
20
  s.licenses = ["MIT"]
61
21
  s.require_paths = ["lib"]
62
- s.rubygems_version = %q{1.3.7}
63
- s.summary = %q{Batch Processing for ActiveScaffold}
64
22
 
65
- if s.respond_to? :specification_version then
66
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
67
- s.specification_version = 3
23
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
68
24
 
69
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
70
- s.add_development_dependency(%q<jeweler>, [">= 0"])
71
- s.add_development_dependency(%q<rcov>, [">= 0"])
72
- s.add_runtime_dependency(%q<active_scaffold_vho>, [">= 3.1.2"])
73
- else
74
- s.add_dependency(%q<jeweler>, [">= 0"])
75
- s.add_dependency(%q<rcov>, [">= 0"])
76
- s.add_dependency(%q<active_scaffold_vho>, [">= 3.1.2"])
77
- end
78
- else
79
- s.add_dependency(%q<jeweler>, [">= 0"])
80
- s.add_dependency(%q<rcov>, [">= 0"])
81
- s.add_dependency(%q<active_scaffold_vho>, [">= 3.1.2"])
82
- end
83
- end
25
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
26
+ s.add_development_dependency(%q<bundler>, [">= 1.0.0"])
27
+ s.add_development_dependency(%q<rcov>, [">= 0"])
84
28
 
29
+ s.add_runtime_dependency(%q<active_scaffold_vho>, [">= 3.1.2"])
30
+ end
@@ -8,7 +8,7 @@
8
8
  <% options = {:checked => false,
9
9
  :include_mark_all => false} %>
10
10
  <% tbody_id = "#{controller_id(called_by_controller)}-tbody" %>
11
- ActiveScaffold.mark_records('<%=tbody_id%>', <%=options.to_json%>);
11
+ ActiveScaffold.mark_records('<%=tbody_id%>', <%=options.to_json.html_safe%>);
12
12
  <% end %>
13
13
  ActiveScaffold.find_action_link('<%=form_selector%>').close();
14
14
  <% else %>
@@ -6,6 +6,7 @@ module ActiveScaffold::Actions
6
6
  base.helper_method :batch_create_values
7
7
  base.helper_method :batch_create_by_column
8
8
  base.helper_method :batch_create_by_records
9
+ base.helper_method :batch_create_columns
9
10
  end
10
11
 
11
12
  def batch_new
@@ -186,14 +187,21 @@ module ActiveScaffold::Actions
186
187
  "batch_create_value_for_#{form_ui}"
187
188
  end
188
189
 
189
- private
190
-
191
190
  def batch_create_authorized_filter
192
191
  link = active_scaffold_config.batch_create.link || active_scaffold_config.batch_create.class.link
193
192
  raise ActiveScaffold::ActionNotAllowed unless self.send(link.security_method)
194
193
  end
194
+
195
195
  def batch_new_formats
196
196
  (default_formats + active_scaffold_config.formats).uniq
197
197
  end
198
+
199
+ def batch_create_columns
200
+ active_scaffold_config.batch_create.columns
201
+ end
202
+
203
+ def batch_create_columns_names
204
+ batch_create_columns.collect(&:name)
205
+ end
198
206
  end
199
207
  end
@@ -24,6 +24,7 @@ module ActiveScaffold::Actions
24
24
  def self.included(base)
25
25
  base.before_filter :batch_update_authorized_filter, :only => [:batch_edit, :batch_update]
26
26
  base.helper_method :batch_update_values
27
+ base.helper_method :batch_update_columns
27
28
  end
28
29
 
29
30
  def batch_edit
@@ -309,14 +310,21 @@ module ActiveScaffold::Actions
309
310
  "batch_update_all_value_for_#{form_ui}"
310
311
  end
311
312
 
312
- private
313
-
314
313
  def batch_update_authorized_filter
315
314
  link = active_scaffold_config.batch_update.link || active_scaffold_config.batch_update.class.link
316
315
  raise ActiveScaffold::ActionNotAllowed unless self.send(link.security_method)
317
316
  end
317
+
318
318
  def batch_edit_formats
319
319
  (default_formats + active_scaffold_config.formats).uniq
320
320
  end
321
+
322
+ def batch_update_columns
323
+ active_scaffold_config.batch_update.columns
324
+ end
325
+
326
+ def batch_update_columns_names
327
+ batch_update_columns.collect(&:name)
328
+ end
321
329
  end
322
330
  end
@@ -2,7 +2,7 @@ module ActiveScaffoldBatch
2
2
  module Version
3
3
  MAJOR = 3
4
4
  MINOR = 1
5
- PATCH = 1
5
+ PATCH = 2
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,78 +1,69 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: active_scaffold_batch_vho
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 3
7
- - 1
8
- - 1
9
- segments_generated: true
10
- version: 3.1.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.1.2
5
+ prerelease:
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Volker Hochstein
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-02-11 00:00:00 +01:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
22
- name: jeweler
23
- requirement: &id001 !ruby/object:Gem::Requirement
12
+ date: 2014-02-22 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: shoulda
16
+ requirement: &9732940 !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- segments:
29
- - 0
30
- segments_generated: true
31
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
32
22
  type: :development
33
23
  prerelease: false
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
24
+ version_requirements: *9732940
25
+ - !ruby/object:Gem::Dependency
26
+ name: bundler
27
+ requirement: &9732460 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: 1.0.0
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: *9732460
36
+ - !ruby/object:Gem::Dependency
36
37
  name: rcov
37
- requirement: &id002 !ruby/object:Gem::Requirement
38
+ requirement: &9785380 !ruby/object:Gem::Requirement
38
39
  none: false
39
- requirements:
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- segments:
43
- - 0
44
- segments_generated: true
45
- version: "0"
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
46
44
  type: :development
47
45
  prerelease: false
48
- version_requirements: *id002
49
- - !ruby/object:Gem::Dependency
46
+ version_requirements: *9785380
47
+ - !ruby/object:Gem::Dependency
50
48
  name: active_scaffold_vho
51
- requirement: &id003 !ruby/object:Gem::Requirement
49
+ requirement: &9784900 !ruby/object:Gem::Requirement
52
50
  none: false
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- segments:
57
- - 3
58
- - 1
59
- - 2
60
- segments_generated: true
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
61
54
  version: 3.1.2
62
55
  type: :runtime
63
56
  prerelease: false
64
- version_requirements: *id003
65
- description: You want to destroy/update many records at once with activescaffold?
66
- email: activescaffold@googlegroups.com
57
+ version_requirements: *9784900
58
+ description: You want to batch create/destroy/update many records at once with activescaffold?
59
+ email: vhochstein@gmail.com
67
60
  executables: []
68
-
69
61
  extensions: []
70
-
71
- extra_rdoc_files:
72
- - LICENSE.txt
62
+ extra_rdoc_files:
73
63
  - README
74
- files:
64
+ files:
75
65
  - .document
66
+ - .gitignore
76
67
  - LICENSE.txt
77
68
  - README
78
69
  - Rakefile
@@ -110,40 +101,29 @@ files:
110
101
  - lib/active_scaffold_batch/version.rb
111
102
  - lib/active_scaffold_batch_vho.rb
112
103
  - uninstall.rb
113
- has_rdoc: true
114
104
  homepage: http://github.com/vhochstein/active_scaffold_batch
115
- licenses:
105
+ licenses:
116
106
  - MIT
117
107
  post_install_message:
118
108
  rdoc_options: []
119
-
120
- require_paths:
109
+ require_paths:
121
110
  - lib
122
- required_ruby_version: !ruby/object:Gem::Requirement
111
+ required_ruby_version: !ruby/object:Gem::Requirement
123
112
  none: false
124
- requirements:
125
- - - ">="
126
- - !ruby/object:Gem::Version
127
- hash: 560724973957209221
128
- segments:
129
- - 0
130
- segments_generated: true
131
- version: "0"
132
- required_rubygems_version: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ! '>='
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
117
+ required_rubygems_version: !ruby/object:Gem::Requirement
133
118
  none: false
134
- requirements:
135
- - - ">="
136
- - !ruby/object:Gem::Version
137
- segments:
138
- - 0
139
- segments_generated: true
140
- version: "0"
119
+ requirements:
120
+ - - ! '>='
121
+ - !ruby/object:Gem::Version
122
+ version: '0'
141
123
  requirements: []
142
-
143
124
  rubyforge_project:
144
- rubygems_version: 1.3.7
125
+ rubygems_version: 1.8.17
145
126
  signing_key:
146
127
  specification_version: 3
147
128
  summary: Batch Processing for ActiveScaffold
148
129
  test_files: []
149
-