record_collection 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +86 -2
- data/app/assets/javascripts/record_collection/{application.js.coffee → all.js.coffee} +0 -0
- data/app/assets/stylesheets/record_collection/all.css +4 -0
- data/lib/record_collection/base.rb +9 -0
- data/lib/record_collection/name.rb +4 -0
- data/lib/record_collection/version.rb +1 -1
- data/record_collection.gemspec +6 -6
- data/spec/dummy/app/assets/javascripts/application.js.coffee +3 -2
- data/spec/dummy/app/assets/javascripts/foundation.min.js +6081 -0
- data/spec/dummy/app/assets/javascripts/modernizr.js +8 -0
- data/spec/dummy/app/assets/stylesheets/application.css.sass +2 -3
- data/spec/dummy/app/assets/stylesheets/components/_forms.css.sass +4 -0
- data/spec/dummy/app/assets/stylesheets/components/_structure.css.sass +9 -0
- data/spec/dummy/app/assets/stylesheets/foundation.css +6201 -0
- data/spec/dummy/app/assets/stylesheets/normalize.css +427 -0
- data/spec/dummy/app/models/employee/collection.rb +1 -1
- data/spec/dummy/app/views/application/_form_errors.html.slim +3 -3
- data/spec/dummy/app/views/employees/index.html.slim +4 -3
- data/spec/dummy/app/views/layouts/application.html.slim +9 -1
- data/spec/dummy/config/locales/record_collection.en.yml +11 -0
- data/spec/features/translations_spec.rb +9 -0
- metadata +31 -39
- data/app/assets/stylesheets/record_collection/application.css +0 -15
- data/spec/dummy/app/assets/stylesheets/scaffolds.scss +0 -69
- data/spec/dummy/config/locales/en.yml +0 -23
- data/spec/dummy/config/locales/models.en.yml +0 -5
@@ -7,4 +7,12 @@ html
|
|
7
7
|
= javascript_include_tag 'application', 'data-turbolinks-track' => true
|
8
8
|
= csrf_meta_tags
|
9
9
|
body
|
10
|
-
|
10
|
+
.row
|
11
|
+
.small-12.columns
|
12
|
+
- flash.each do |name, msg|
|
13
|
+
- if msg.is_a?(String)
|
14
|
+
.alert-box.round class=(name.to_s == 'notice' ? 'success' : 'alert') data-alert=true
|
15
|
+
= msg
|
16
|
+
a.close href="#" ×
|
17
|
+
.row
|
18
|
+
.small-12.columns= yield
|
@@ -0,0 +1,9 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.feature "Multi select", type: :feature do
|
4
|
+
scenario "Selecting all", js: true do
|
5
|
+
employee = Employee.create name: 'E1', section: 'ABC', admin: true, vegan: false
|
6
|
+
visit collection_edit_employees_path(ids: [employee.id])
|
7
|
+
find('[name="commit"]').value.should eq "Update Group"
|
8
|
+
end
|
9
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: record_collection
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benjamin ter Kuile
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,34 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rspec
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: 3.1.0
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 3.1.0
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: rspec-rails
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
58
44
|
requirements:
|
59
|
-
- - "
|
45
|
+
- - "~>"
|
60
46
|
- !ruby/object:Gem::Version
|
61
|
-
version: 3.1
|
47
|
+
version: '3.1'
|
62
48
|
type: :development
|
63
49
|
prerelease: false
|
64
50
|
version_requirements: !ruby/object:Gem::Requirement
|
65
51
|
requirements:
|
66
|
-
- - "
|
52
|
+
- - "~>"
|
67
53
|
- !ruby/object:Gem::Version
|
68
|
-
version: 3.1
|
54
|
+
version: '3.1'
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: pry
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -84,16 +70,16 @@ dependencies:
|
|
84
70
|
name: rails
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
86
72
|
requirements:
|
87
|
-
- - "
|
73
|
+
- - "~>"
|
88
74
|
- !ruby/object:Gem::Version
|
89
|
-
version: 4.
|
75
|
+
version: '4.1'
|
90
76
|
type: :development
|
91
77
|
prerelease: false
|
92
78
|
version_requirements: !ruby/object:Gem::Requirement
|
93
79
|
requirements:
|
94
|
-
- - "
|
80
|
+
- - "~>"
|
95
81
|
- !ruby/object:Gem::Version
|
96
|
-
version: 4.
|
82
|
+
version: '4.1'
|
97
83
|
- !ruby/object:Gem::Dependency
|
98
84
|
name: sqlite3
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -252,28 +238,28 @@ dependencies:
|
|
252
238
|
name: active_attr
|
253
239
|
requirement: !ruby/object:Gem::Requirement
|
254
240
|
requirements:
|
255
|
-
- - "
|
241
|
+
- - "~>"
|
256
242
|
- !ruby/object:Gem::Version
|
257
|
-
version: 0.8
|
243
|
+
version: '0.8'
|
258
244
|
type: :runtime
|
259
245
|
prerelease: false
|
260
246
|
version_requirements: !ruby/object:Gem::Requirement
|
261
247
|
requirements:
|
262
|
-
- - "
|
248
|
+
- - "~>"
|
263
249
|
- !ruby/object:Gem::Version
|
264
|
-
version: 0.8
|
250
|
+
version: '0.8'
|
265
251
|
- !ruby/object:Gem::Dependency
|
266
252
|
name: activemodel
|
267
253
|
requirement: !ruby/object:Gem::Requirement
|
268
254
|
requirements:
|
269
|
-
- - "
|
255
|
+
- - "~>"
|
270
256
|
- !ruby/object:Gem::Version
|
271
257
|
version: '4.1'
|
272
258
|
type: :runtime
|
273
259
|
prerelease: false
|
274
260
|
version_requirements: !ruby/object:Gem::Requirement
|
275
261
|
requirements:
|
276
|
-
- - "
|
262
|
+
- - "~>"
|
277
263
|
- !ruby/object:Gem::Version
|
278
264
|
version: '4.1'
|
279
265
|
- !ruby/object:Gem::Dependency
|
@@ -304,10 +290,10 @@ files:
|
|
304
290
|
- README.md
|
305
291
|
- Rakefile
|
306
292
|
- app/assets/images/record_collection/.keep
|
307
|
-
- app/assets/javascripts/record_collection/
|
293
|
+
- app/assets/javascripts/record_collection/all.js.coffee
|
308
294
|
- app/assets/javascripts/record_collection/multi_select.js.coffee
|
309
295
|
- app/assets/javascripts/record_collection/optionals.js.coffee
|
310
|
-
- app/assets/stylesheets/record_collection/
|
296
|
+
- app/assets/stylesheets/record_collection/all.css
|
311
297
|
- app/assets/stylesheets/record_collection/multi_select.css.sass
|
312
298
|
- app/assets/stylesheets/record_collection/optionals.css.sass
|
313
299
|
- app/controllers/record_collection/application_controller.rb
|
@@ -327,10 +313,13 @@ files:
|
|
327
313
|
- spec/dummy/Rakefile
|
328
314
|
- spec/dummy/app/assets/images/.keep
|
329
315
|
- spec/dummy/app/assets/javascripts/application.js.coffee
|
316
|
+
- spec/dummy/app/assets/javascripts/foundation.min.js
|
317
|
+
- spec/dummy/app/assets/javascripts/modernizr.js
|
330
318
|
- spec/dummy/app/assets/stylesheets/application.css.sass
|
331
319
|
- spec/dummy/app/assets/stylesheets/components/_forms.css.sass
|
332
320
|
- spec/dummy/app/assets/stylesheets/components/_structure.css.sass
|
333
|
-
- spec/dummy/app/assets/stylesheets/
|
321
|
+
- spec/dummy/app/assets/stylesheets/foundation.css
|
322
|
+
- spec/dummy/app/assets/stylesheets/normalize.css
|
334
323
|
- spec/dummy/app/controllers/application_controller.rb
|
335
324
|
- spec/dummy/app/controllers/concerns/.keep
|
336
325
|
- spec/dummy/app/controllers/employees_controller.rb
|
@@ -369,8 +358,7 @@ files:
|
|
369
358
|
- spec/dummy/config/initializers/mime_types.rb
|
370
359
|
- spec/dummy/config/initializers/session_store.rb
|
371
360
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
372
|
-
- spec/dummy/config/locales/en.yml
|
373
|
-
- spec/dummy/config/locales/models.en.yml
|
361
|
+
- spec/dummy/config/locales/record_collection.en.yml
|
374
362
|
- spec/dummy/config/routes.rb
|
375
363
|
- spec/dummy/config/secrets.yml
|
376
364
|
- spec/dummy/db/migrate/20150203124634_create_employees.rb
|
@@ -385,6 +373,7 @@ files:
|
|
385
373
|
- spec/dummy/public/500.html
|
386
374
|
- spec/dummy/public/favicon.ico
|
387
375
|
- spec/features/multi_select_spec.rb
|
376
|
+
- spec/features/translations_spec.rb
|
388
377
|
- spec/fixtures/collections.rb
|
389
378
|
- spec/record_selection/base_spec.rb
|
390
379
|
- spec/spec_helper.rb
|
@@ -408,7 +397,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
408
397
|
version: '0'
|
409
398
|
requirements: []
|
410
399
|
rubyforge_project:
|
411
|
-
rubygems_version: 2.4.
|
400
|
+
rubygems_version: 2.4.2
|
412
401
|
signing_key:
|
413
402
|
specification_version: 4
|
414
403
|
summary: Manage collections of records in Ruby on Rails
|
@@ -419,10 +408,13 @@ test_files:
|
|
419
408
|
- spec/dummy/Rakefile
|
420
409
|
- spec/dummy/app/assets/images/.keep
|
421
410
|
- spec/dummy/app/assets/javascripts/application.js.coffee
|
411
|
+
- spec/dummy/app/assets/javascripts/foundation.min.js
|
412
|
+
- spec/dummy/app/assets/javascripts/modernizr.js
|
422
413
|
- spec/dummy/app/assets/stylesheets/application.css.sass
|
423
414
|
- spec/dummy/app/assets/stylesheets/components/_forms.css.sass
|
424
415
|
- spec/dummy/app/assets/stylesheets/components/_structure.css.sass
|
425
|
-
- spec/dummy/app/assets/stylesheets/
|
416
|
+
- spec/dummy/app/assets/stylesheets/foundation.css
|
417
|
+
- spec/dummy/app/assets/stylesheets/normalize.css
|
426
418
|
- spec/dummy/app/controllers/application_controller.rb
|
427
419
|
- spec/dummy/app/controllers/concerns/.keep
|
428
420
|
- spec/dummy/app/controllers/employees_controller.rb
|
@@ -461,8 +453,7 @@ test_files:
|
|
461
453
|
- spec/dummy/config/initializers/mime_types.rb
|
462
454
|
- spec/dummy/config/initializers/session_store.rb
|
463
455
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
464
|
-
- spec/dummy/config/locales/en.yml
|
465
|
-
- spec/dummy/config/locales/models.en.yml
|
456
|
+
- spec/dummy/config/locales/record_collection.en.yml
|
466
457
|
- spec/dummy/config/routes.rb
|
467
458
|
- spec/dummy/config/secrets.yml
|
468
459
|
- spec/dummy/db/migrate/20150203124634_create_employees.rb
|
@@ -477,6 +468,7 @@ test_files:
|
|
477
468
|
- spec/dummy/public/500.html
|
478
469
|
- spec/dummy/public/favicon.ico
|
479
470
|
- spec/features/multi_select_spec.rb
|
471
|
+
- spec/features/translations_spec.rb
|
480
472
|
- spec/fixtures/collections.rb
|
481
473
|
- spec/record_selection/base_spec.rb
|
482
474
|
- spec/spec_helper.rb
|
@@ -1,15 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
-
* listed below.
|
4
|
-
*
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
-
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
-
*
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
-
* compiled file so the styles you add here take precedence over styles defined in any styles
|
10
|
-
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
11
|
-
* file per style scope.
|
12
|
-
*
|
13
|
-
*= require_tree .
|
14
|
-
*= require_self
|
15
|
-
*/
|
@@ -1,69 +0,0 @@
|
|
1
|
-
body {
|
2
|
-
background-color: #fff;
|
3
|
-
color: #333;
|
4
|
-
font-family: verdana, arial, helvetica, sans-serif;
|
5
|
-
font-size: 13px;
|
6
|
-
line-height: 18px;
|
7
|
-
}
|
8
|
-
|
9
|
-
p, ol, ul, td {
|
10
|
-
font-family: verdana, arial, helvetica, sans-serif;
|
11
|
-
font-size: 13px;
|
12
|
-
line-height: 18px;
|
13
|
-
}
|
14
|
-
|
15
|
-
pre {
|
16
|
-
background-color: #eee;
|
17
|
-
padding: 10px;
|
18
|
-
font-size: 11px;
|
19
|
-
}
|
20
|
-
|
21
|
-
a {
|
22
|
-
color: #000;
|
23
|
-
&:visited {
|
24
|
-
color: #666;
|
25
|
-
}
|
26
|
-
&:hover {
|
27
|
-
color: #fff;
|
28
|
-
background-color: #000;
|
29
|
-
}
|
30
|
-
}
|
31
|
-
|
32
|
-
div {
|
33
|
-
&.field, &.actions {
|
34
|
-
margin-bottom: 10px;
|
35
|
-
}
|
36
|
-
}
|
37
|
-
|
38
|
-
#notice {
|
39
|
-
color: green;
|
40
|
-
}
|
41
|
-
|
42
|
-
.field_with_errors {
|
43
|
-
padding: 2px;
|
44
|
-
background-color: red;
|
45
|
-
display: table;
|
46
|
-
}
|
47
|
-
|
48
|
-
#error_explanation {
|
49
|
-
width: 450px;
|
50
|
-
border: 2px solid red;
|
51
|
-
padding: 7px;
|
52
|
-
padding-bottom: 0;
|
53
|
-
margin-bottom: 20px;
|
54
|
-
background-color: #f0f0f0;
|
55
|
-
h2 {
|
56
|
-
text-align: left;
|
57
|
-
font-weight: bold;
|
58
|
-
padding: 5px 5px 5px 15px;
|
59
|
-
font-size: 12px;
|
60
|
-
margin: -7px;
|
61
|
-
margin-bottom: 0px;
|
62
|
-
background-color: #c00;
|
63
|
-
color: #fff;
|
64
|
-
}
|
65
|
-
ul li {
|
66
|
-
font-size: 12px;
|
67
|
-
list-style: square;
|
68
|
-
}
|
69
|
-
}
|
@@ -1,23 +0,0 @@
|
|
1
|
-
# Files in the config/locales directory are used for internationalization
|
2
|
-
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
-
# than English, add the necessary files in this directory.
|
4
|
-
#
|
5
|
-
# To use the locales, use `I18n.t`:
|
6
|
-
#
|
7
|
-
# I18n.t 'hello'
|
8
|
-
#
|
9
|
-
# In views, this is aliased to just `t`:
|
10
|
-
#
|
11
|
-
# <%= t('hello') %>
|
12
|
-
#
|
13
|
-
# To use a different locale, set it with `I18n.locale`:
|
14
|
-
#
|
15
|
-
# I18n.locale = :es
|
16
|
-
#
|
17
|
-
# This would use the information in config/locales/es.yml.
|
18
|
-
#
|
19
|
-
# To learn more, please read the Rails Internationalization guide
|
20
|
-
# available at http://guides.rubyonrails.org/i18n.html.
|
21
|
-
|
22
|
-
en:
|
23
|
-
hello: "Hello world"
|