active_scaffold_camera 0.0.1 → 0.1.0

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
- SHA1:
3
- metadata.gz: 8d9e65eb25c68c2a40b390368d9c194e011bde9e
4
- data.tar.gz: c6948ba2e3ea4ba8d0e5376538a595aeebd580b5
2
+ SHA256:
3
+ metadata.gz: 56d1640c691ca62f6ab79aafee4744747a13df0a0e38fe7b438a38307a231d9b
4
+ data.tar.gz: 1541dfdac0a71ac903ddb1bffa802c4d18ee32bb457c72ba8318c02cd6f7390e
5
5
  SHA512:
6
- metadata.gz: 56376ee5af7e578c3955e4c450f594a95e66534df5672789098e0bfb0ebc46ceb6e07aa167d318e21013241ac809fff2cc5791661512069d6a195248459e94a2
7
- data.tar.gz: a65384dbbb0144c55a924ec8c83a6b1d18d6b237dd19b1bfbe1177126ac244b8dcc2e5e66d6929771e873c09294568b2f92cddb765ecb819139585da63234746
6
+ metadata.gz: 543e5399bea1be0b8f5da896077ecc5d2571fbeff60179ab949b7070bbc3fb2dca943255305b1d9528d8047a5dc00094f9a44119be48df8e22ddd0e527bd94f1
7
+ data.tar.gz: b60afb1a520108e836fcb17dba4dc9fb47f7f4a1d8509cff886444a148701e9ac58427ca8467b927acbde58de315cbd6a2ab69e76e5a44030b01b03fd4143e9a
@@ -1,4 +1,9 @@
1
1
  module ActiveScaffoldCamera
2
2
  class Engine < ::Rails::Engine
3
+ initializer 'active_scaffold_camera.action_view' do
4
+ ActiveSupport.on_load :action_view do
5
+ include ActiveScaffoldCamera::ViewHelpers
6
+ end
7
+ end
3
8
  end
4
9
  end
@@ -1,8 +1,8 @@
1
1
  module ActiveScaffoldCamera
2
2
  module Version
3
3
  MAJOR = 0
4
- MINOR = 0
5
- PATCH = 1
4
+ MINOR = 1
5
+ PATCH = 0
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
@@ -1,20 +1,20 @@
1
1
  module ActiveScaffoldCamera
2
2
  module ViewHelpers
3
3
  I18N_ATTRIBUTES = [:video_not_supported, :audio_not_supported, :media_forbidden]
4
- def snapshot_attributes(column)
5
- attributes = Hash[I18N_ATTRIBUTES.map{ |attr| [attr, column.options[attr] || attr] }]
6
- attributes[:source] = column.options[:source] if column.options[:source]
4
+ def snapshot_attributes(column, ui_options: column.options)
5
+ attributes = Hash[I18N_ATTRIBUTES.map{ |attr| [attr, ui_options[attr] || attr] }]
6
+ attributes[:source] = ui_options[:source] if ui_options[:source]
7
7
  I18N_ATTRIBUTES.each { |attr| attributes[attr] = as_(attributes[attr]) if attributes[attr].is_a? Symbol }
8
8
  attributes
9
9
  end
10
10
 
11
- def active_scaffold_input_snapshot(column, html_options)
12
- content_tag :div, :class => "snapshot-input #{html_options[:class]}", :id => html_options[:id], :data => snapshot_attributes(column) do
11
+ def active_scaffold_input_snapshot(column, html_options, ui_options: column.options)
12
+ content_tag :div, :class => "snapshot-input #{html_options[:class]}", :id => html_options[:id], :data => snapshot_attributes(column, ui_options: ui_options) do
13
13
  hidden_field :record, column.name, :name => html_options[:name]
14
14
  end
15
15
  end
16
16
 
17
- def active_scaffold_column_snapshot(record, column)
17
+ def active_scaffold_column_snapshot(record, column, ui_options: column.options)
18
18
  value = record.send(column.name)
19
19
  tag :img, :src => value if value
20
20
  end
@@ -7,6 +7,5 @@ module ActiveScaffoldCamera
7
7
  autoload 'ViewHelpers', 'active_scaffold_camera/view_helpers.rb'
8
8
  end
9
9
 
10
- ActionView::Base.send :include, ActiveScaffoldCamera::ViewHelpers
11
10
  ActiveScaffold.stylesheets << 'active_scaffold_camera'
12
11
  ActiveScaffold.javascripts << 'active_scaffold_camera'
metadata CHANGED
@@ -1,56 +1,42 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_scaffold_camera
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergio Cambra
8
8
  - Volker Hochstein
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-12-16 00:00:00.000000000 Z
12
+ date: 2024-04-05 00:00:00.000000000 Z
13
13
  dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: shoulda
16
- requirement: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - '>='
19
- - !ruby/object:Gem::Version
20
- version: '0'
21
- type: :development
22
- prerelease: false
23
- version_requirements: !ruby/object:Gem::Requirement
24
- requirements:
25
- - - '>='
26
- - !ruby/object:Gem::Version
27
- version: '0'
28
14
  - !ruby/object:Gem::Dependency
29
15
  name: bundler
30
16
  requirement: !ruby/object:Gem::Requirement
31
17
  requirements:
32
- - - ~>
18
+ - - "~>"
33
19
  - !ruby/object:Gem::Version
34
- version: '1.0'
20
+ version: '2.0'
35
21
  type: :development
36
22
  prerelease: false
37
23
  version_requirements: !ruby/object:Gem::Requirement
38
24
  requirements:
39
- - - ~>
25
+ - - "~>"
40
26
  - !ruby/object:Gem::Version
41
- version: '1.0'
27
+ version: '2.0'
42
28
  - !ruby/object:Gem::Dependency
43
29
  name: active_scaffold
44
30
  requirement: !ruby/object:Gem::Requirement
45
31
  requirements:
46
- - - '>='
32
+ - - ">="
47
33
  - !ruby/object:Gem::Version
48
34
  version: 3.4.0
49
35
  type: :runtime
50
36
  prerelease: false
51
37
  version_requirements: !ruby/object:Gem::Requirement
52
38
  requirements:
53
- - - '>='
39
+ - - ">="
54
40
  - !ruby/object:Gem::Version
55
41
  version: 3.4.0
56
42
  description: Helper to take a snapshot from camera on ActiveScaffold forms, using
@@ -77,24 +63,23 @@ homepage: http://github.com/activescaffold/active_scaffold_camera
77
63
  licenses:
78
64
  - MIT
79
65
  metadata: {}
80
- post_install_message:
66
+ post_install_message:
81
67
  rdoc_options: []
82
68
  require_paths:
83
69
  - lib
84
70
  required_ruby_version: !ruby/object:Gem::Requirement
85
71
  requirements:
86
- - - '>='
72
+ - - ">="
87
73
  - !ruby/object:Gem::Version
88
74
  version: '0'
89
75
  required_rubygems_version: !ruby/object:Gem::Requirement
90
76
  requirements:
91
- - - '>='
77
+ - - ">="
92
78
  - !ruby/object:Gem::Version
93
79
  version: '0'
94
80
  requirements: []
95
- rubyforge_project:
96
- rubygems_version: 2.4.5
97
- signing_key:
81
+ rubygems_version: 3.2.3
82
+ signing_key:
98
83
  specification_version: 4
99
84
  summary: Snapshot form_ui using saycheese.js
100
85
  test_files: []