lite_enum 0.0.2 → 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
2
  SHA1:
3
- metadata.gz: 787c46f5c1aed517ea762559b58764357bc97420
4
- data.tar.gz: c563e96965efdaf815507c94f31c5268e7bac29f
3
+ metadata.gz: 5bcd529c0f7c18aad0a1f90399cc68ded2e34b81
4
+ data.tar.gz: 29d8f741a2df066869022507ce7ad6236154fd48
5
5
  SHA512:
6
- metadata.gz: a122a03ee7e6f6ea451349ec82e7a99d12f535afc348b43ba26689689f26f6a7a5dc0b39a0ced0f34fc73ed55cba8b33b60904a06ff907f55bc8d2279f30fdf9
7
- data.tar.gz: 9bb40547009039415d9a1db782b57e25a8e0ced584492b53b460529007169529948d2e3b5a6cc31a2ec7da3272773d51b5895cffd91735cbb1229ebb300423fd
6
+ metadata.gz: ea0095ff156989b1a54a3ffd96b6f5289185c2672753cd2e609174d26c3f5554433b3980aee12db6711f5dfb8c051a64d54d3fe1db7776a2cd865e6c3b480fb3
7
+ data.tar.gz: 42609c2e84b59eb056bbe679356b3a5ea282181597bf3decc8611b022504b4283db4a16673301a0f90ea81db894f29df142d41ff6527e92362221dd504f43f03
@@ -1 +1 @@
1
- 2.1.5
1
+ 2.3.1
@@ -52,12 +52,3 @@ class LiteEnum < SimpleDelegator
52
52
  end
53
53
  end
54
54
 
55
- begin
56
- require 'simple_form'
57
- require 'simple_form/version'
58
- rescue LoadError
59
- end
60
-
61
- if defined?(SimpleForm) && Gem::Version.new(SimpleForm::VERSION) >= Gem::Version.new('3.1.0')
62
- require 'simple_form_monkeypatch'
63
- end
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
  # Describe your gem and declare its dependencies:
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'lite_enum'
6
- s.version = '0.0.2'
6
+ s.version = '0.1.0'
7
7
  s.required_ruby_version = Gem::Requirement.new('>= 2.0.0')
8
8
  s.authors = ['Adam Becker']
9
9
  s.summary = 'Lightweight Enum class'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lite_enum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Becker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-30 00:00:00.000000000 Z
11
+ date: 2016-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -50,7 +50,6 @@ files:
50
50
  - Gemfile
51
51
  - README.md
52
52
  - lib/lite_enum.rb
53
- - lib/simple_form_monkeypatch.rb
54
53
  - lite_enum.gemspec
55
54
  - script/release
56
55
  - spec/lite_enum_spec.rb
@@ -74,10 +73,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
74
73
  version: '0'
75
74
  requirements: []
76
75
  rubyforge_project:
77
- rubygems_version: 2.2.2
76
+ rubygems_version: 2.5.1
78
77
  signing_key:
79
78
  specification_version: 4
80
79
  summary: Lightweight Enum class
81
80
  test_files:
82
81
  - spec/lite_enum_spec.rb
83
- has_rdoc:
@@ -1,26 +0,0 @@
1
- module SimpleForm
2
- module Inputs
3
- class CollectionInput
4
- def collection_with_lite_enum
5
- @collection ||= begin
6
- if options[:collection] &&
7
- options[:collection].is_a?(LiteEnum) &&
8
- (translated = translate_from_namespace(:options))
9
-
10
- options.delete(:collection).map do |k, v|
11
- if translated[k].is_a?(Hash)
12
- [translated[k][:short], v, translated[k][:long]]
13
- else
14
- [translated[k], v]
15
- end
16
- end
17
- else
18
- collection_without_lite_enum
19
- end
20
- end
21
- end
22
-
23
- alias_method_chain :collection, :lite_enum
24
- end
25
- end
26
- end