activeadmin-reform 0.1.1 → 0.1.2

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: 468418a4cf585ab1bb41b9d60ca56c9cc45e14c9
4
- data.tar.gz: 8bbaa13bb9623f2d2c2d92fbf0a34400ea9e7b01
3
+ metadata.gz: 1af2fe3a0c96778393068c86ec9839d8025747dd
4
+ data.tar.gz: 34c1f4b3425c891c226505eaabccb10158593d0c
5
5
  SHA512:
6
- metadata.gz: 6163667b8130527b769689563994ed204bba99fccf8d098a06cbd47eef1fc2077005f322bd42f11f36cbaf2c9184058ec26f7459fd95309ee7b384c5c0043693
7
- data.tar.gz: 3b25737954720af266c09e0d20bbf8b467fd29de55d33905d6d81a87bbc06ec4461ae14eb3b4670676fc9b98ce39b48e65fa83261e558c98cf4b40687e0348ef
6
+ metadata.gz: 0c315eee702f8059fc7efb21229e35bd09842febe3ac917f4d6110e5d7c5112856ac9248c108b66fd33bab3ea10fba203f4fea8a7f45323220a399295fb14859
7
+ data.tar.gz: 14614dfd77a4ca7d4ca5bbb80ece706421433dda36082a5cfd65b54dcbb572cc33d437c8e0be0257086fb509ba1df5ccd6a10d6f40ff3b8e9af39b60c37af7c6
data/Gemfile CHANGED
@@ -5,14 +5,14 @@ require File.expand_path 'spec/support/detect_rails_version', File.dirname(__FIL
5
5
  gemspec
6
6
  group :test do
7
7
  gem 'rails', detect_rails_version
8
- gem 'activeadmin', github: 'activeadmin'
9
- gem 'sqlite3'
10
- gem 'rspec-rails'
8
+ gem 'activeadmin', github: 'activeadmin', ref: 'ba285ea2fc23ade108ed582134cae8c641f910a4'
9
+ gem 'sqlite3', '~> 1.3.11'
10
+ gem 'rspec-rails', '~> 3.4.0'
11
11
  gem 'test-unit', '~> 3.0' # Rails 3.2 support
12
12
 
13
- gem 'launchy'
14
- gem 'database_cleaner'
15
- gem 'capybara'
13
+ gem 'launchy', '~> 2.4.3'
14
+ gem 'database_cleaner', '~> 1.5.1'
15
+ gem 'capybara', '~> 2.5.0'
16
16
 
17
- gem 'codeclimate-test-reporter', require: nil
17
+ gem 'codeclimate-test-reporter', '~> 0.4.8', require: nil
18
18
  end
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'activeadmin-reform'
7
- spec.version = '0.1.1'
7
+ spec.version = '0.1.2'
8
8
  spec.authors = ['Artyom Bolshakov']
9
9
  spec.email = ['abolshakov@spbtv.com']
10
10
 
@@ -19,9 +19,10 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ['lib']
20
20
 
21
21
  spec.add_dependency 'rails', '>= 3.2'
22
+ spec.add_dependency 'disposable', '0.1.11' # disposable 0.1.14 has a dependency bug
22
23
  spec.add_dependency 'reform', '>= 2.0'
23
24
  spec.add_development_dependency 'bundler', '~> 1.10'
24
25
  spec.add_development_dependency 'rake', '~> 10.0'
25
- spec.add_development_dependency 'rspec', '~> 3.3'
26
+ spec.add_development_dependency 'rspec', '~> 3.4'
26
27
  spec.add_development_dependency 'rubocop', '~> 0.34.2'
27
28
  end
@@ -29,6 +29,19 @@ module ActiveAdmin
29
29
  super(resource, attributes)
30
30
  end
31
31
  end
32
+
33
+ # Calls all the appropriate callbacks and then saves the new resource.
34
+ #
35
+ # @param [ActiveRecord::Base] object The new resource to save
36
+ #
37
+ # @return [void]
38
+ def save_resource(object)
39
+ if resource.is_a?(::Reform::Form)
40
+ super unless object.errors.any?
41
+ else
42
+ super
43
+ end
44
+ end
32
45
  end
33
46
 
34
47
  ::ActiveAdmin::ResourceController.send(:include, DataAccess)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin-reform
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artyom Bolshakov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-10-28 00:00:00.000000000 Z
11
+ date: 2015-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: disposable
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '='
32
+ - !ruby/object:Gem::Version
33
+ version: 0.1.11
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 0.1.11
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: reform
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -72,14 +86,14 @@ dependencies:
72
86
  requirements:
73
87
  - - "~>"
74
88
  - !ruby/object:Gem::Version
75
- version: '3.3'
89
+ version: '3.4'
76
90
  type: :development
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
94
  - - "~>"
81
95
  - !ruby/object:Gem::Version
82
- version: '3.3'
96
+ version: '3.4'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: rubocop
85
99
  requirement: !ruby/object:Gem::Requirement