currency_select 8.1.0 → 10.0.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
2
  SHA256:
3
- metadata.gz: e9d3015514617715095cf44125cfab82601a08487644832637f5e514863722eb
4
- data.tar.gz: 472f763bf533b1d00d1aa641ca7b19310372e8976287f396b7514842136f1217
3
+ metadata.gz: 371da1cba425b692c77041dd55212a440c0ae64541350cafd61b79e0748d242e
4
+ data.tar.gz: b329d4b139a2ddcdfcf538af662847e7e3ae36506d70c5bc5d890c6084699107
5
5
  SHA512:
6
- metadata.gz: 8c604ebb454eb30675e9908013d0d52e635cbca89411f4f43b5de818b633bdb1467b539eefd4a5355e4a8834d5cc9fa6e026f94ebe039d10ea551d0f2d6b1b26
7
- data.tar.gz: ccad450faed5e23116f9394cd7f682313cbec3891bf464f3ea4178b37a527491367d461b455af664e8adf9128b4e2030637133bbcb0af8ef5f41729863bb102f
6
+ metadata.gz: 5736dfb8f6fa9ac64e615c08f04f2b4c8a57f5fa821edbccfbce46da8e2232d95d26e6a9f4c1b22a6f6eee725bc0edf4c2f66b42ac8178f92c37ab169fbefa9e
7
+ data.tar.gz: 785444fb0ec4b09b4d4eedd1b39490536c248ad5c84e97072f50713d6a6701eb151df7ee9a41a2b5f43469ddaf6fe5068136cfec6d4157f50b71b18d0ae933a6
data/CHANGELOG.md CHANGED
@@ -17,6 +17,38 @@ This project adheres to [Semantic Versioning](https://semver.org/).
17
17
 
18
18
  ### Security
19
19
 
20
+ ## 10.0.0: Add support for Ruby 4.0, drop support for Rails 7.2 and Ruby 3.2
21
+
22
+ ### Added
23
+
24
+ - Add support for Ruby 4.0 (#224)
25
+
26
+ ### Removed
27
+
28
+ - Drop support for Rails 7.2 (#248)
29
+ - Drop support for Ruby 3.2 (#230)
30
+
31
+ ## 9.0.0: Add support for Rails 8.1, drop support for Ruby 3.1 and Rails < 7.2
32
+
33
+ ### Added
34
+
35
+ - Add support for Rails 8.1 (#213, #216, #217)
36
+
37
+ ### Changed
38
+
39
+ - Require money >= 6.19.0 (#210)
40
+
41
+ ### Removed
42
+
43
+ - Drop support for Ruby 3.1 (#200)
44
+ - Drop support for Rails 7.0 and 7.1 (#199, #201, #208)
45
+
46
+ ### Fixed
47
+
48
+ - Avoid calling a private method (#212)
49
+
50
+ ### Security
51
+
20
52
  ## 8.1.0: Add support for Ruby 3.4
21
53
 
22
54
  - Add support for Ruby 3.4 (#187)
data/Gemfile CHANGED
@@ -3,3 +3,11 @@
3
3
  source 'https://rubygems.org'
4
4
 
5
5
  gemspec
6
+
7
+ gem 'rake', '~> 13.4.2'
8
+ gem 'rspec-rails', '~> 8.1.0'
9
+ gem 'rubocop', '~> 1.92.0'
10
+ gem 'rubocop-rails', '~> 2.38.0'
11
+ gem 'rubocop-rake', '~> 0.7.1'
12
+ gem 'rubocop-rspec', '~> 3.10.2'
13
+ gem 'rubocop-rspec_rails', '~> 2.33.0'
data/README.md CHANGED
@@ -1,18 +1,18 @@
1
1
  # CurrencySelect
2
2
 
3
- [![GitHub CI Status](https://github.com/braingourmets/currency_select/workflows/CI/badge.svg?branch=main)](https://github.com/braingourmets/currency_select/actions)
3
+ [![Build Status](https://github.com/braingourmets/currency_select/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/braingourmets/currency_select/actions/)
4
4
  [![Gem Version](https://badge.fury.io/rb/currency_select.svg)](http://badge.fury.io/rb/currency_select)
5
5
 
6
6
  Adds a currency_select helper to Ruby on Rails projects, allowing you to get
7
- a HTML select list of available currencies.
7
+ an HTML select list of available currencies.
8
8
 
9
- The list of currencies are provided by the
9
+ The list of currencies is provided by the
10
10
  [Money gem](https://rubygems.org/gems/money).
11
11
 
12
12
  ## New maintainer wanted
13
13
 
14
- We're not using this gem anymore, so we'm looking for a new maintainer. If
15
- you're interested in becoming the new maintainer, please contact us at
14
+ We're not using this gem anymore, so we are looking for a new maintainer. If
15
+ you are interested in becoming the new maintainer, please contact us at
16
16
  `info AT braingourmets DOT com`.
17
17
 
18
18
  ## Installation
data/Rakefile CHANGED
@@ -1,19 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'rdoc/task'
3
+ require 'bundler/setup'
4
4
 
5
- # RDoc setup
6
- # ----------------------------------------------------------------------------
7
- Rake::RDocTask.new do |rdoc|
8
- version = File.read('VERSION')
9
-
10
- rdoc.rdoc_dir = 'rdoc'
11
- rdoc.title = "currency_select #{version}"
12
- rdoc.rdoc_files.include('README.md')
13
- rdoc.rdoc_files.include('lib/**/*.rb')
14
- end
5
+ Bundler::GemHelper.install_tasks
15
6
 
16
7
  desc 'Runs RuboCop for checking the Ruby files.'
17
8
  task :rubocop do
18
- sh 'rubocop lib/ rails/ spec/ currency_select.gemspec Gemfile Rakefile'
9
+ sh 'rubocop gemfiles/ lib/ rails/ spec/ currency_select.gemspec Gemfile Rakefile'
19
10
  end
@@ -1,35 +1,41 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- version = File.read(File.expand_path('VERSION', __dir__)).strip
3
+ Gem::Specification.new do |spec|
4
+ spec.name = 'currency_select'
5
+ spec.summary = 'Currency select plugin for Rails'
6
+ spec.version = '10.0.0'
7
+ spec.license = 'MIT'
4
8
 
5
- Gem::Specification.new do |s|
6
- s.name = 'currency_select'
7
- s.summary = 'Currency select plugin for Rails'
8
- s.version = version
9
- s.license = 'MIT'
9
+ spec.required_ruby_version = '>= 3.3.0'
10
10
 
11
- s.required_ruby_version = '>= 3.1.0'
11
+ spec.homepage = 'https://github.com/braingourmets/currency_select'
12
+ spec.authors = ['Trond Arve Nordheim', 'Oliver Klee']
13
+ spec.email = 'o.klee@braingourmetspec.com'
12
14
 
13
- s.homepage = 'https://github.com/braingourmets/currency_select'
14
- s.authors = ['Trond Arve Nordheim', 'Oliver Klee']
15
- s.email = 'o.klee@braingourmets.com'
15
+ spec.metadata = {
16
+ 'bug_tracker_uri' => 'https://github.com/braingourmets/currency_select/issues',
17
+ 'changelog_uri' => 'https://github.com/braingourmets/currency_select/blob/master/CHANGELOG.md',
18
+ 'documentation_uri' => 'https://www.rubydoc.info/gems/currency_select',
19
+ 'homepage_uri' => spec.homepage,
20
+ 'source_code_uri' => 'https://github.com/braingourmets/currency_select'
21
+ }
16
22
 
17
- s.files = %w[
18
- CHANGELOG.md CODE_OF_CONDUCT.md Gemfile LICENSE README.md Rakefile VERSION
23
+ spec.files = %w[
24
+ CHANGELOG.md
25
+ Gemfile
26
+ LICENSE
27
+ README.md
28
+ Rakefile
19
29
  currency_select.gemspec
20
- lib/currency_select.rb lib/currency_select_tag.rb lib/form_builder.rb
21
- lib/form_options_helper.rb lib/to_currency_select_tag.rb
30
+ lib/currency_select.rb
31
+ lib/currency_select_tag.rb
32
+ lib/form_builder.rb
33
+ lib/form_options_helper.rb
34
+ lib/to_currency_select_tag.rb
22
35
  rails/init.rb
23
36
  ]
24
- s.extra_rdoc_files = %w[CHANGELOG.md LICENSE README.md]
37
+ spec.extra_rdoc_files = %w[CHANGELOG.md LICENSE README.md]
25
38
 
26
- s.add_dependency 'actionview', '>= 7.0.0', '< 8.1'
27
- s.add_dependency 'money', '~> 6.0'
28
-
29
- s.add_development_dependency 'rspec-rails', '~> 7.1.0'
30
- s.add_development_dependency 'rubocop', '~> 1.69.2'
31
- s.add_development_dependency 'rubocop-rails', '~> 2.28.0'
32
- s.add_development_dependency 'rubocop-rake', '~> 0.6.0'
33
- s.add_development_dependency 'rubocop-rspec', '~> 3.3.0'
34
- s.add_development_dependency 'rubocop-rspec_rails', '~> 2.30.0'
39
+ spec.add_dependency 'actionview', '>= 8.0.0', '< 8.2'
40
+ spec.add_dependency 'money', '~> 6.19.0'
35
41
  end
@@ -9,7 +9,7 @@ module ActionView
9
9
  module ToCurrencySelectTag
10
10
  def to_currency_select_tag(priority_currencies, options, html_options)
11
11
  html_options = html_options.stringify_keys
12
- add_default_name_and_id(html_options)
12
+ add_default_html_options(html_options)
13
13
  value = if method(:value).arity.zero?
14
14
  options.fetch(:selected) { value() }
15
15
  else
@@ -25,6 +25,19 @@ module ActionView
25
25
  html_options
26
26
  )
27
27
  end
28
+
29
+ def add_default_html_options(options, field = 'id')
30
+ index = name_and_id_index(options)
31
+ options['name'] = options.fetch('name') { tag_name(options['multiple'], index) }
32
+
33
+ return unless generate_ids?
34
+
35
+ options[field] = options.fetch(field) { tag_id(index, options.delete('namespace')) }
36
+ namespace = options.delete('namespace')
37
+ return unless namespace
38
+
39
+ options[field] = options[field] ? "#{namespace}_#{options[field]}" : namespace
40
+ end
28
41
  end
29
42
  end
30
43
  end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: currency_select
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.1.0
4
+ version: 10.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trond Arve Nordheim
8
8
  - Oliver Klee
9
- autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2024-12-26 00:00:00.000000000 Z
11
+ date: 1980-01-02 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: actionview
@@ -17,120 +16,35 @@ dependencies:
17
16
  requirements:
18
17
  - - ">="
19
18
  - !ruby/object:Gem::Version
20
- version: 7.0.0
19
+ version: 8.0.0
21
20
  - - "<"
22
21
  - !ruby/object:Gem::Version
23
- version: '8.1'
22
+ version: '8.2'
24
23
  type: :runtime
25
24
  prerelease: false
26
25
  version_requirements: !ruby/object:Gem::Requirement
27
26
  requirements:
28
27
  - - ">="
29
28
  - !ruby/object:Gem::Version
30
- version: 7.0.0
29
+ version: 8.0.0
31
30
  - - "<"
32
31
  - !ruby/object:Gem::Version
33
- version: '8.1'
32
+ version: '8.2'
34
33
  - !ruby/object:Gem::Dependency
35
34
  name: money
36
35
  requirement: !ruby/object:Gem::Requirement
37
36
  requirements:
38
37
  - - "~>"
39
38
  - !ruby/object:Gem::Version
40
- version: '6.0'
39
+ version: 6.19.0
41
40
  type: :runtime
42
41
  prerelease: false
43
42
  version_requirements: !ruby/object:Gem::Requirement
44
43
  requirements:
45
44
  - - "~>"
46
45
  - !ruby/object:Gem::Version
47
- version: '6.0'
48
- - !ruby/object:Gem::Dependency
49
- name: rspec-rails
50
- requirement: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: 7.1.0
55
- type: :development
56
- prerelease: false
57
- version_requirements: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: 7.1.0
62
- - !ruby/object:Gem::Dependency
63
- name: rubocop
64
- requirement: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: 1.69.2
69
- type: :development
70
- prerelease: false
71
- version_requirements: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: 1.69.2
76
- - !ruby/object:Gem::Dependency
77
- name: rubocop-rails
78
- requirement: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: 2.28.0
83
- type: :development
84
- prerelease: false
85
- version_requirements: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: 2.28.0
90
- - !ruby/object:Gem::Dependency
91
- name: rubocop-rake
92
- requirement: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: 0.6.0
97
- type: :development
98
- prerelease: false
99
- version_requirements: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: 0.6.0
104
- - !ruby/object:Gem::Dependency
105
- name: rubocop-rspec
106
- requirement: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: 3.3.0
111
- type: :development
112
- prerelease: false
113
- version_requirements: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: 3.3.0
118
- - !ruby/object:Gem::Dependency
119
- name: rubocop-rspec_rails
120
- requirement: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: 2.30.0
125
- type: :development
126
- prerelease: false
127
- version_requirements: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: 2.30.0
132
- description:
133
- email: o.klee@braingourmets.com
46
+ version: 6.19.0
47
+ email: o.klee@braingourmetspec.com
134
48
  executables: []
135
49
  extensions: []
136
50
  extra_rdoc_files:
@@ -139,12 +53,10 @@ extra_rdoc_files:
139
53
  - README.md
140
54
  files:
141
55
  - CHANGELOG.md
142
- - CODE_OF_CONDUCT.md
143
56
  - Gemfile
144
57
  - LICENSE
145
58
  - README.md
146
59
  - Rakefile
147
- - VERSION
148
60
  - currency_select.gemspec
149
61
  - lib/currency_select.rb
150
62
  - lib/currency_select_tag.rb
@@ -155,8 +67,12 @@ files:
155
67
  homepage: https://github.com/braingourmets/currency_select
156
68
  licenses:
157
69
  - MIT
158
- metadata: {}
159
- post_install_message:
70
+ metadata:
71
+ bug_tracker_uri: https://github.com/braingourmets/currency_select/issues
72
+ changelog_uri: https://github.com/braingourmets/currency_select/blob/master/CHANGELOG.md
73
+ documentation_uri: https://www.rubydoc.info/gems/currency_select
74
+ homepage_uri: https://github.com/braingourmets/currency_select
75
+ source_code_uri: https://github.com/braingourmets/currency_select
160
76
  rdoc_options: []
161
77
  require_paths:
162
78
  - lib
@@ -164,15 +80,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
164
80
  requirements:
165
81
  - - ">="
166
82
  - !ruby/object:Gem::Version
167
- version: 3.1.0
83
+ version: 3.3.0
168
84
  required_rubygems_version: !ruby/object:Gem::Requirement
169
85
  requirements:
170
86
  - - ">="
171
87
  - !ruby/object:Gem::Version
172
88
  version: '0'
173
89
  requirements: []
174
- rubygems_version: 3.5.22
175
- signing_key:
90
+ rubygems_version: 4.0.20
176
91
  specification_version: 4
177
92
  summary: Currency select plugin for Rails
178
93
  test_files: []
data/CODE_OF_CONDUCT.md DELETED
@@ -1,77 +0,0 @@
1
- # Contributor Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age,
8
- body size, disability, ethnicity, gender identity and expression, level of
9
- experience, nationality, personal appearance, race, religion, or sexual
10
- identity and orientation.
11
-
12
- ## Our Standards
13
-
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
16
-
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
22
-
23
- Examples of unacceptable behavior by participants include:
24
-
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
28
- * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
30
- address, without explicit permission
31
- * Other conduct which could reasonably be considered inappropriate in a
32
- professional setting
33
-
34
-
35
- ## Our Responsibilities
36
-
37
- Project maintainers are responsible for clarifying the standards of acceptable
38
- behavior and are expected to take appropriate and fair corrective action in
39
- response to any instances of unacceptable behavior.
40
-
41
- Project maintainers have the right and responsibility to remove, edit, or
42
- reject comments, commits, code, wiki edits, issues, and other contributions
43
- that are not aligned to this Code of Conduct, or to ban temporarily or
44
- permanently any contributor for other behaviors that they deem inappropriate,
45
- threatening, offensive, or harmful.
46
-
47
- ## Scope
48
-
49
- This Code of Conduct applies both within project spaces and in public spaces
50
- when an individual is representing the project or its community. Examples of
51
- representing a project or community include using an official project e-mail
52
- address, posting via an official social media account, or acting as an
53
- appointed representative at an online or offline event. Representation of a
54
- project may be further defined and clarified by project maintainers.
55
-
56
- ## Enforcement
57
-
58
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
59
- reported by contacting the project team at (info at braingourmets dot com).
60
- All complaints will be reviewed and investigated and will result in a response
61
- that is deemed necessary and appropriate to the circumstances. The project team
62
- is obligated to maintain confidentiality with regard to the reporter of an
63
- incident. Further details of specific enforcement policies may be posted
64
- separately.
65
-
66
- Project maintainers who do not follow or enforce the Code of Conduct in good
67
- faith may face temporary or permanent repercussions as determined by other
68
- members of the project's leadership.
69
-
70
- ## Attribution
71
-
72
- This Code of Conduct is adapted from the [Contributor Covenant][homepage],
73
- version 1.4, available at
74
- [http://contributor-covenant.org/version/1/4/][version].
75
-
76
- [homepage]: http://contributor-covenant.org
77
- [version]: http://contributor-covenant.org/version/1/4/
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 8.1.0