enum_ish 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 86b4cbe506b5b3a8cb444859dccda2f26dace53d2b3efbfa26d5aac1ab8313b8
4
- data.tar.gz: 496e004c5d0992cde158973eaf48bbf22a361d0fe130c30632913aaada92ec9d
3
+ metadata.gz: 3d5f4dc1bae786f87d0835e8a9148b0203ea05795366279a0fc5dfa44fffdb81
4
+ data.tar.gz: 735635b6dd325ad6a36d702c33c7dfc4b567a252a4d47b1b7a6848e2a1d2688b
5
5
  SHA512:
6
- metadata.gz: 7bca545b6e8fb12143d801a16a9dbed2e0b3fc23deb07501ac74698681293b3c110a60c964be835e86fb1e26aacfcbddf72377e2df31e7dcf530385742d499cc
7
- data.tar.gz: ba39d1e0fd59d0c4180f779c568d3bf00a9b2099072def2602397abbeb154a8f6ab1f395c23793e199b511f8bdf98e771741f9e44b7a740aac5eb83c0224fcaf
6
+ metadata.gz: d0519566e727bc12540003a7a0f5f9c916e297a1732220ba3adddf635996ef812c882858c187107be9a14ee8eb157ca1e686e7623c326f2c3da54933475bb6f5
7
+ data.tar.gz: 692d5363b0cfeb5b52f7e5d46998835cf24b8e317743ac750d0c16cf6ee347f7bdd5d900f4d437bcb50e20f555ded080bab22d6aef75c00cdacab3710d403a35
data/.gitignore CHANGED
@@ -1,12 +1,9 @@
1
1
  .bundle/
2
- .yardoc
3
2
  .project
4
3
  Gemfile.lock
5
- _yardoc/
6
4
  coverage/
7
- doc/
5
+ gemfiles/*.lock
8
6
  pkg/
9
- spec/reports/
10
7
  spec/dummy/db/*.sqlite3
11
8
  spec/dummy/log/*.log
12
9
  spec/dummy/tmp/*
data/.travis.yml CHANGED
@@ -3,12 +3,21 @@ rvm:
3
3
  - 2.3
4
4
  - 2.4
5
5
  - 2.5
6
+ - 2.6
6
7
  gemfile:
7
8
  - gemfiles/rails50.gemfile
8
9
  - gemfiles/rails51.gemfile
9
10
  - gemfiles/rails52.gemfile
11
+ - gemfiles/rails60.gemfile
12
+ matrix:
13
+ exclude:
14
+ - rvm: 2.3
15
+ gemfile: gemfiles/rails60.gemfile
16
+ - rvm: 2.4
17
+ gemfile: gemfiles/rails60.gemfile
10
18
  before_script:
11
19
  - cd spec/dummy
12
20
  - bundle exec rake db:migrate RAILS_ENV=test
13
21
  - cd ../..
14
- script: bundle exec rspec
22
+ script:
23
+ - bundle exec rspec
data/CHANGELOG.md ADDED
@@ -0,0 +1,15 @@
1
+ # CHANGELOG
2
+
3
+ ## 1.1.1
4
+
5
+ * Fix lack of options when some enums have same translation.
6
+
7
+ ## 1.1.0
8
+
9
+ * Support translation for scoped query.
10
+ * Support block for default value.
11
+ * Add :only and :except for options method.
12
+
13
+ ## 1.0.0
14
+
15
+ * First release.
data/enum_ish.gemspec CHANGED
@@ -24,6 +24,4 @@ Gem::Specification.new do |spec|
24
24
  spec.add_development_dependency "sqlite3"
25
25
  spec.add_development_dependency "rspec-rails"
26
26
  spec.add_development_dependency "simplecov"
27
- spec.add_development_dependency "pry-rails"
28
- spec.add_development_dependency "pry-byebug"
29
27
  end
@@ -1,5 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem "rails", "~> 5.0.0"
4
+ gem "sqlite3", "~> 1.3.6"
4
5
 
5
6
  gemspec path: "../"
@@ -1,5 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem "rails", "~> 5.1.0"
4
+ gem "sqlite3", "~> 1.3.6"
4
5
 
5
6
  gemspec path: "../"
@@ -1,5 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem "rails", "~> 5.2.0"
4
+ gem "sqlite3", "~> 1.3.6"
4
5
 
5
6
  gemspec path: "../"
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem "rails", "~> 6.0.0"
4
+
5
+ gemspec path: "../"
@@ -44,7 +44,7 @@ module EnumIsh
44
44
  @klass.class_eval do
45
45
  define_singleton_method method do |options = {}|
46
46
  dic = EnumIsh::Dictionary.new(self).load(attr, enum, config, options)
47
- dic.invert.to_a
47
+ dic.to_a.map { |value, label| [label, value] }
48
48
  end
49
49
  end
50
50
  end
@@ -1,3 +1,3 @@
1
1
  module EnumIsh
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enum_ish
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoshikazu Kaneta
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-05 00:00:00.000000000 Z
11
+ date: 2019-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -94,34 +94,6 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: pry-rails
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: pry-byebug
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: '0'
125
97
  description: A ruby and rails extension to generate enum-like methods
126
98
  email:
127
99
  - kaneta@sitebridge.co.jp
@@ -132,6 +104,7 @@ files:
132
104
  - ".gitignore"
133
105
  - ".rspec"
134
106
  - ".travis.yml"
107
+ - CHANGELOG.md
135
108
  - Gemfile
136
109
  - LICENSE
137
110
  - README.md
@@ -140,6 +113,7 @@ files:
140
113
  - gemfiles/rails50.gemfile
141
114
  - gemfiles/rails51.gemfile
142
115
  - gemfiles/rails52.gemfile
116
+ - gemfiles/rails60.gemfile
143
117
  - lib/enum_ish.rb
144
118
  - lib/enum_ish/builder.rb
145
119
  - lib/enum_ish/builder/active_record.rb
@@ -162,8 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
162
136
  - !ruby/object:Gem::Version
163
137
  version: '0'
164
138
  requirements: []
165
- rubyforge_project:
166
- rubygems_version: 2.7.4
139
+ rubygems_version: 3.0.3
167
140
  signing_key:
168
141
  specification_version: 4
169
142
  summary: A ruby and rails extension to generate enum-like methods