super_tools 0.0.6 → 0.0.7

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
  SHA1:
3
- metadata.gz: 9e21771994fe2ec1175d5bcdc7c5b62b43d40efd
4
- data.tar.gz: 536caa01f8d3315ff7479269cb286a92d279782c
3
+ metadata.gz: 23ab3145121a1328b037bf853039e4115ac92629
4
+ data.tar.gz: 04b5e71f0f34df059751464ef110134690ec40d6
5
5
  SHA512:
6
- metadata.gz: 9542660e093624d703c1e6b43c5d02870a0f3d3e6e3c75def353c9603511d3c6604db9061708475d96d867cd762847839f9c18e819a519b954c033229ad7e9cd
7
- data.tar.gz: 163cc2df600e87ba9d26724bee3e7d3c4d00e9a20640275c6c36146ae42b10fc52e33fd392abb7840e7cda48294d266eb4856a51d91e076ee9578213636d5c52
6
+ metadata.gz: 1b896b48cc2c64a98c60ff8b38017e5d813d129b55ec8049b78e25db585ad59cea1a19d018d593ef6d98fc80b8977a4feab252a05c39ee6a48cb445d8d9d63dd
7
+ data.tar.gz: 33c5d969561f0657062c5993942e4a0b611608af017e1fe70087adcb1c5a03598b62446766a101737deb3bf59679657dd85f44a9de2fee1f2ecd0ed17c965cff
@@ -1,24 +1,14 @@
1
1
  require 'super_form/concerns/atomic_save'
2
- require 'disposable'
3
2
  require 'reform'
4
3
  require 'reform/form'
5
- require 'reform/form/active_record'
6
- require 'reform/form/active_model'
7
- require 'reform/form/active_model/form_builder_methods'
8
- require "reform/form/active_model/validations"
4
+ require 'reform/active_record'
9
5
  require "reform/form/coercion"
6
+ require 'disposable'
10
7
  require 'disposable/twin/parent'
11
8
 
12
- Reform::Form.class_eval do
13
- extend ActiveModel::Naming
14
- extend ActiveModel::Translation
15
- end
16
-
17
9
  class SuperForm::Reform < Reform::Form
18
10
  include SuperForm::AtomicSave
19
- include ::Reform::Form::ActiveRecord
20
- include ::Reform::Form::ActiveModel
21
- include ::Reform::Form::ActiveModel::FormBuilderMethods
11
+ extend ::ActiveModel::Translation
22
12
  feature Coercion
23
13
 
24
14
  # 定義 i18n scope
@@ -33,14 +23,8 @@ class SuperForm::Reform < Reform::Form
33
23
  def self.form_name(name)
34
24
  # 定義 form name (給 form 用的)
35
25
  define_singleton_method :model_name do
36
- active_model_name_for(name.to_s.camelize)
26
+ active_model_name_for(name.to_s.camelize) # Reform::Form::ActiveModel
37
27
  end
38
28
  model(name)
39
29
  end
40
-
41
- private
42
-
43
- def self.active_model_name_for(string)
44
- ::ActiveModel::Name.new(self, nil, string)
45
- end
46
30
  end
@@ -1,3 +1,3 @@
1
1
  module SuperTools
2
- VERSION = '0.0.6'
2
+ VERSION = '0.0.7'
3
3
  end
data/super_tools.gemspec CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.add_development_dependency "shoulda-context"
30
30
 
31
31
 
32
- spec.add_dependency "rails", ">= 4", "<= 5"
32
+ spec.add_dependency "rails", ">= 4"
33
33
  # spec.add_dependency "i18n", "< 1"
34
34
  # spec.add_dependency "actionview", '>= 4', '<= 6'
35
35
  # spec.add_dependency 'activerecord', '>= 4', '<= 6'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: super_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - eddie
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-04-17 00:00:00.000000000 Z
11
+ date: 2019-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -73,9 +73,6 @@ dependencies:
73
73
  - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '4'
76
- - - "<="
77
- - !ruby/object:Gem::Version
78
- version: '5'
79
76
  type: :runtime
80
77
  prerelease: false
81
78
  version_requirements: !ruby/object:Gem::Requirement
@@ -83,9 +80,6 @@ dependencies:
83
80
  - - ">="
84
81
  - !ruby/object:Gem::Version
85
82
  version: '4'
86
- - - "<="
87
- - !ruby/object:Gem::Version
88
- version: '5'
89
83
  - !ruby/object:Gem::Dependency
90
84
  name: nokogiri
91
85
  requirement: !ruby/object:Gem::Requirement