signed_form-activeadmin 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: 53c6ca38e40c956ab72da4e81acf865b4fc8e836
4
- data.tar.gz: cfdbaadf416d8fb027c88738255844e18fcacb72
3
+ metadata.gz: 84cc3ed96244432d6cbb81b9fb01f6d0f91cec01
4
+ data.tar.gz: ae585fe607e734fc8808041c94cfd4575cae81e3
5
5
  SHA512:
6
- metadata.gz: 651a4048a3a07976c35e452827437974d1b5cf2682234647e00fe4f0fae0e3c6a04d7c0a1c9a1e600a2d37cf17252e081e25b3905c6602129375dd58dd256ed7
7
- data.tar.gz: fb0487d6090f9d4181bb3206bb6085490c7b0140b5604e4e21deb4c5b4f6796a6d51245837be9240fff5d4e69b371496f360deedb833204717d8dfefca024d38
6
+ metadata.gz: 0d92560a520d807da3bcfa42bc6763e71fb84a1377af11ae223762469ea43d3d45740a2b5ade8554069e067effc076772f81cadc77a8df9aa586037274328877
7
+ data.tar.gz: d4c793405c297a5e451163c2f83794f927d1249c66450b9beb77025a6708f7a50271a302dc9acd5d2f7c5f069ac206316065779b3c1b999f90ec6bfe9ef3817d
@@ -3,7 +3,7 @@ module SignedForm
3
3
  class Version
4
4
  MAJOR = 0
5
5
  MINOR = 1
6
- PATCH = 1
6
+ PATCH = 2
7
7
 
8
8
  def self.to_s
9
9
  "#{MAJOR}.#{MINOR}.#{PATCH}"
@@ -9,11 +9,11 @@ module SignedForm
9
9
 
10
10
  module ViewHelpers
11
11
  module FormHelper
12
- alias_method :orig_active_admin_form_for, :active_admin_form_for
12
+ orig_active_admin_form_for = instance_method :active_admin_form_for
13
13
 
14
14
  define_method :active_admin_form_for do |resource, options = {}, &block|
15
15
  options[:signed] = true
16
- orig_active_admin_form_for resource, options, &block
16
+ orig_active_admin_form_for.bind(self).call resource, options, &block
17
17
  end
18
18
  end
19
19
  end
@@ -22,13 +22,13 @@ Gem::Specification.new do |s|
22
22
  s.extra_rdoc_files = %w(README.md)
23
23
 
24
24
  s.add_development_dependency 'rake'
25
- s.add_development_dependency 'activemodel', '>= 3.1'
26
- s.add_development_dependency 'actionpack', '>= 3.1'
27
- s.add_development_dependency 'strong_parameters'
28
25
  s.add_development_dependency 'minitest'
29
26
 
30
- s.add_dependency 'signed_form'
31
- s.add_dependency 'railties'
27
+ s.add_development_dependency 'strong_parameters'
28
+ s.add_development_dependency 'sass-rails'
29
+ s.add_development_dependency 'sqlite3'
32
30
 
33
- s.add_runtime_dependency 'activeadmin', '>= 0.4.0'
31
+ s.add_dependency 'rails', '>= 3.1'
32
+ s.add_dependency 'signed_form'
33
+ s.add_dependency 'activeadmin', '>= 0.4.0'
34
34
  end
@@ -0,0 +1,5 @@
1
+ development:
2
+ adapter: sqlite3
3
+ database: ':memory:'
4
+ pool: 5
5
+ timeout: 5000
@@ -1,40 +1,38 @@
1
- require 'active_model'
2
- require 'action_controller'
3
-
4
- class User
5
- extend ActiveModel::Naming
6
-
7
- attr_accessor :name
1
+ require 'rails/all'
2
+ require 'signed_form'
3
+ require 'active_admin'
4
+ require 'signed_form-activeadmin'
8
5
 
9
- def to_key
10
- [1]
6
+ module Test
7
+ class Application < ::Rails::Application
8
+ config.root = File.join __FILE__, '..'
9
+ config.logger = Logger.new STDOUT
10
+ config.active_support.deprecation = :stderr
11
11
  end
12
12
  end
13
13
 
14
- require 'signed_form'
14
+ class ApplicationController < ActionController::Base; end
15
15
 
16
- # We currently fake AA since actually using it requires a complete Rails application to be set up
16
+ Test::Application.initialize!
17
17
 
18
- module ActiveAdmin
19
- class BaseController < ActionController::Base; end
18
+ class User
19
+ extend ActiveModel::Naming
20
20
 
21
- module ViewHelpers
22
- module FormHelper
23
- include SignedForm::ActionView::FormHelper
21
+ attr_accessor :name
24
22
 
25
- alias_method :active_admin_form_for, :form_for
26
- end
23
+ def to_key
24
+ [1]
27
25
  end
28
26
  end
29
27
 
30
- require 'signed_form-activeadmin'
31
-
32
28
  require 'minitest/autorun'
33
29
 
34
30
  describe ActiveAdmin::ViewHelpers::FormHelper do
35
31
  describe 'active_admin_form_for tag' do
36
32
  include ActionView::Helpers
37
33
  include ActionView::Context if defined? ActionView::Context
34
+ include SignedForm::ActionView::FormHelper
35
+ include Formtastic::Helpers::FormHelper
38
36
  include ActiveAdmin::ViewHelpers::FormHelper
39
37
 
40
38
  def polymorphic_path(*)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: signed_form-activeadmin
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
  - Christopher Schramm
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-13 00:00:00.000000000 Z
11
+ date: 2014-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -25,35 +25,35 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: activemodel
28
+ name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '3.1'
33
+ version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '3.1'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: actionpack
42
+ name: strong_parameters
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '3.1'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '3.1'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: strong_parameters
56
+ name: sass-rails
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
@@ -67,7 +67,7 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: minitest
70
+ name: sqlite3
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ">="
@@ -81,21 +81,21 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: signed_form
84
+ name: rails
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: '3.1'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: '3.1'
97
97
  - !ruby/object:Gem::Dependency
98
- name: railties
98
+ name: signed_form
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
@@ -138,7 +138,8 @@ files:
138
138
  - lib/signed_form-activeadmin.rb
139
139
  - lib/signed_form-activeadmin/version.rb
140
140
  - signed_form-activeadmin.gemspec
141
- - spec.rb
141
+ - spec/config/database.yml
142
+ - spec/spec.rb
142
143
  homepage: https://github.com/cschramm/signed_form-activeadmin
143
144
  licenses:
144
145
  - MIT