currency_select 0.2.0 → 1.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: e2471dfa3ccebc2db85ee1a7a2a00056b316b5d7241f405db0b47e6f3fa83913
4
- data.tar.gz: b3808c9060bfeb3fd083abfebdd76ab0e6d9d4c5257b8310459bad7bf0785eb6
3
+ metadata.gz: 1770e2b13b68976512e5798298cdbd68d0bbdd9c6284f224506dc9f1c454347b
4
+ data.tar.gz: cd22d054a6584ddd85025ec9c7ce1051aa967e646bb17da2cc310156636f4efb
5
5
  SHA512:
6
- metadata.gz: b30f41b0297a3f473827b3c6e0ba80a7cfc9b990225cf2dfe011f2ab5d2a4d377ddfb06fd9f12cc5a5d6cec661dd9160a120192dbeee168f430da1fb3402d3ed
7
- data.tar.gz: f10c333fc00853130c1ac70545f2213898a478eb843c174a0d2edee51568ec31ea79bf27099e462394df94fab7fc73da5869d2a426650c58107b3f00756d03b9
6
+ metadata.gz: 84c95c75bc2fedd7627dbd65f385f9734d595413d987493457b914f68153e34fc8914a1dcb364ed7266a443634d1ae6b68b71d384e304ff9942c3939c2642773
7
+ data.tar.gz: 0ac0196556f7f03c50362f10d93205e390759cfd135db976ac36bed5755d8d82d8f817749aca9b8d1891eeb11442ef73f3377aa019936b85b5abe2facfc2827f
data/CHANGELOG.md CHANGED
@@ -1,29 +1,53 @@
1
1
  # currency_select change log
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
- This project adheres to [Semantic Versioning](http://semver.org/).
5
-
4
+ This project adheres to [Semantic Versioning](https://semver.org/).
6
5
 
7
6
  ## x.y.z (unreleased)
8
7
 
9
8
  ### Added
10
-
9
+ - Officially support Rails 5.2
10
+ ([#51](https://github.com/braingourmets/currency_select/pull/51))
11
+ - Add Ruby 2.5.1 to the Travis build matrix
12
+ ([#49](https://github.com/braingourmets/currency_select/pull/49))
11
13
 
12
14
  ### Changed
13
15
 
14
-
15
16
  ### Deprecated
16
17
 
17
-
18
18
  ### Removed
19
-
19
+ - Drop support for Ruby < 2.3
20
+ ([#48](https://github.com/braingourmets/currency_select/pull/48))
20
21
 
21
22
  ### Fixed
22
-
23
+ - Add version to the requirements in the gemspec file
24
+ ([#53](https://github.com/braingourmets/currency_select/pull/53))
25
+ - Fix file names references from the gemspec file
26
+ ([#52](https://github.com/braingourmets/currency_select/pull/52))
27
+ - Fix value call on Rails 5.2
28
+ ([#47](https://github.com/braingourmets/currency_select/pull/47))
23
29
 
24
30
  ### Security
25
31
 
32
+ ## 1.0.0
26
33
 
34
+ ### Added
35
+ - Officially support Rails 5.2
36
+ ([#51](https://github.com/braingourmets/currency_select/pull/51))
37
+ - Add Ruby 2.5.1 to the Travis build matrix
38
+ ([#49](https://github.com/braingourmets/currency_select/pull/49))
39
+
40
+ ### Removed
41
+ - Drop support for Ruby < 2.3
42
+ ([#48](https://github.com/braingourmets/currency_select/pull/48))
43
+
44
+ ### Fixed
45
+ - Add version to the requirements in the gemspec file
46
+ ([#53](https://github.com/braingourmets/currency_select/pull/53))
47
+ - Fix file names references from the gemspec file
48
+ ([#52](https://github.com/braingourmets/currency_select/pull/52))
49
+ - Fix value call on Rails 5.2
50
+ ([#47](https://github.com/braingourmets/currency_select/pull/47))
27
51
 
28
52
  ## 0.2.0
29
53
 
@@ -33,18 +57,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).
33
57
  - Add a code of conduct
34
58
  ([#25](https://github.com/braingourmets/currency_select/pull/25))
35
59
 
36
-
37
60
  ### Changed
38
61
  - Mark all Ruby files as frozen_string_literal: true
39
62
  ([#31](https://github.com/braingourmets/currency_select/pull/31))
40
63
 
41
-
42
64
  ### Deprecated
43
65
  - Support for Rails < 5.0.0 will be removed in version 2.0.0.
44
66
  - Support for Rails < 4.2.0 will be removed in version 1.0.0.
45
- - Support for Ruby < 2.2.2 will be removed in version 2.0.0.
46
- - Support for Ruby < 2.0.0 will be removed in version 1.0.0.
47
-
67
+ - Support for Ruby < 2.3.0 will be removed in version 1.0.0.
48
68
 
49
69
  ### Removed
50
70
  - Remove pre-Rails-4.0-specific code
@@ -52,7 +72,6 @@ This project adheres to [Semantic Versioning](http://semver.org/).
52
72
  - Drop Jeweler
53
73
  ([#28](https://github.com/braingourmets/currency_select/pull/28))
54
74
 
55
-
56
75
  ### Fixed
57
76
  - Add ActionView as explicit dependency
58
77
  ([#34](https://github.com/braingourmets/currency_select/pull/34))
@@ -60,7 +79,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
60
79
  ([#27](https://github.com/braingourmets/currency_select/pull/27))
61
80
  - Use ISO codes as select values, not the IDs
62
81
  ([#24](https://github.com/braingourmets/currency_select/pull/24))
63
- - Fix the the Gemfile
82
+ - Fix the Gemfile
64
83
  ([#19](https://github.com/braingourmets/currency_select/pull/19))
65
84
  - Fix the order of name attribute and ID in the specs
66
85
  ([#18](https://github.com/braingourmets/currency_select/pull/18))
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 1.0.0
@@ -8,6 +8,8 @@ Gem::Specification.new do |s|
8
8
  s.version = version
9
9
  s.license = 'MIT'
10
10
 
11
+ s.required_ruby_version = '>= 2.3.0'
12
+
11
13
  s.homepage = 'https://github.com/braingourmets/currency_select'
12
14
  s.authors = ['Trond Arve Nordheim', 'Oliver Klee']
13
15
  s.email = 'o.klee@braingourmets.com'
@@ -15,7 +17,8 @@ Gem::Specification.new do |s|
15
17
  s.files = %w(lib/currency_select.rb rails/init.rb CHANGELOG.md CODE_OF_CONDUCT.md currency_select.gemspec Gemfile LICENSE Rakefile README.md VERSION)
16
18
  s.extra_rdoc_files = %w(CHANGELOG.md LICENSE README.md)
17
19
 
18
- s.add_runtime_dependency 'actionview'
19
- s.add_runtime_dependency 'money'
20
- s.add_development_dependency 'rspec-rails'
20
+ s.add_runtime_dependency 'actionview', '>= 4.2.0', '< 6.0'
21
+ s.add_runtime_dependency 'money', '~> 6.0'
22
+
23
+ s.add_development_dependency 'rspec-rails', '~> 3.8'
21
24
  end
@@ -98,7 +98,11 @@ module ActionView
98
98
  def to_currency_select_tag(priority_currencies, options, html_options)
99
99
  html_options = html_options.stringify_keys
100
100
  add_default_name_and_id(html_options)
101
- value = value(object)
101
+ value = if self.method(:value).arity == 0
102
+ value()
103
+ else
104
+ value(object)
105
+ end
102
106
  content_tag('select', add_options(currency_options_for_select(value, priority_currencies), options, value), html_options)
103
107
  end
104
108
  end
@@ -113,4 +117,4 @@ module ActionView
113
117
  end
114
118
  end
115
119
  end
116
- end
120
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: currency_select
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trond Arve Nordheim
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-09-15 00:00:00.000000000 Z
12
+ date: 2018-09-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionview
@@ -17,42 +17,48 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '0'
20
+ version: 4.2.0
21
+ - - "<"
22
+ - !ruby/object:Gem::Version
23
+ version: '6.0'
21
24
  type: :runtime
22
25
  prerelease: false
23
26
  version_requirements: !ruby/object:Gem::Requirement
24
27
  requirements:
25
28
  - - ">="
26
29
  - !ruby/object:Gem::Version
27
- version: '0'
30
+ version: 4.2.0
31
+ - - "<"
32
+ - !ruby/object:Gem::Version
33
+ version: '6.0'
28
34
  - !ruby/object:Gem::Dependency
29
35
  name: money
30
36
  requirement: !ruby/object:Gem::Requirement
31
37
  requirements:
32
- - - ">="
38
+ - - "~>"
33
39
  - !ruby/object:Gem::Version
34
- version: '0'
40
+ version: '6.0'
35
41
  type: :runtime
36
42
  prerelease: false
37
43
  version_requirements: !ruby/object:Gem::Requirement
38
44
  requirements:
39
- - - ">="
45
+ - - "~>"
40
46
  - !ruby/object:Gem::Version
41
- version: '0'
47
+ version: '6.0'
42
48
  - !ruby/object:Gem::Dependency
43
49
  name: rspec-rails
44
50
  requirement: !ruby/object:Gem::Requirement
45
51
  requirements:
46
- - - ">="
52
+ - - "~>"
47
53
  - !ruby/object:Gem::Version
48
- version: '0'
54
+ version: '3.8'
49
55
  type: :development
50
56
  prerelease: false
51
57
  version_requirements: !ruby/object:Gem::Requirement
52
58
  requirements:
53
- - - ">="
59
+ - - "~>"
54
60
  - !ruby/object:Gem::Version
55
- version: '0'
61
+ version: '3.8'
56
62
  description:
57
63
  email: o.klee@braingourmets.com
58
64
  executables: []
@@ -84,7 +90,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
84
90
  requirements:
85
91
  - - ">="
86
92
  - !ruby/object:Gem::Version
87
- version: '0'
93
+ version: 2.3.0
88
94
  required_rubygems_version: !ruby/object:Gem::Requirement
89
95
  requirements:
90
96
  - - ">="