action_args 2.2.1 → 2.3.0

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: 7c0bf9da845c27c49c8afd92bc8a547a860a3957
4
- data.tar.gz: 716be3db07ed295cc0d29ea6ae92a9ab29ec33cd
3
+ metadata.gz: 598aaa9aed74e171f523629f5cb06ed0c490aedb
4
+ data.tar.gz: 9ae3b89639a940b6d220e743bfdcde9c04449adb
5
5
  SHA512:
6
- metadata.gz: 4bcf24728168e8731d4a9c2a00e1158a08efc0a4722e25e6852295a399a4a3c7b25c4733ee0f999d32d9a8732362fec8a3431c770df680573ba5ff51d2ec589e
7
- data.tar.gz: 494a147fab6a90baf8a19e5af9f6450254a320dfac735879626f07259cea241b018a00fe650ecf09d7ea184cfa1872891c34dd4273930619596535706e40c35b
6
+ metadata.gz: ce77ebc9c3ced1a55ea9467f50d2bec5691a56fed2fe16286e92542bac86ecb689ca082fedcc456cd1628fd3648e0b6176b5d67384cb06e127e3eaa54ef0dc87
7
+ data.tar.gz: 212c5e8b682e2ccc2964aa207f4f58395a4170db80eb6b2aed9ca65591c0169e728d1ee0b2a9aa769b71ea276bfdbadbd6f94e862659892dddc6f404d14988eb
@@ -5,11 +5,11 @@ sudo: false
5
5
  rvm:
6
6
  - 2.0.0
7
7
  - 2.1.10
8
- - 2.2.6
9
- - 2.3.3
10
- - 2.4.0
8
+ - 2.2.7
9
+ - 2.3.4
10
+ - 2.4.1
11
11
  - ruby-head
12
- - jruby-9.1.8.0
12
+ - jruby-9.1.9.0
13
13
  - rubinius-3
14
14
  matrix:
15
15
  exclude:
@@ -25,16 +25,16 @@ matrix:
25
25
  gemfile: gemfiles/rails_edge.gemfile
26
26
  - rvm: 2.1.10
27
27
  gemfile: gemfiles/rails_edge.gemfile
28
- - rvm: 2.4.0
28
+ - rvm: 2.4.1
29
29
  gemfile: gemfiles/rails_41.gemfile
30
- - rvm: 2.4.0
30
+ - rvm: 2.4.1
31
31
  gemfile: gemfiles/rails_42.gemfile
32
32
  - rvm: ruby-head
33
33
  gemfile: gemfiles/rails_41.gemfile
34
34
  - rvm: ruby-head
35
35
  gemfile: gemfiles/rails_42.gemfile
36
36
  allow_failures:
37
- - rvm: jruby-9.1.8.0
37
+ - rvm: jruby-9.1.9.0
38
38
  - rvm: rubinius-3
39
39
  gemfile:
40
40
  - gemfiles/rails_41.gemfile
@@ -1,4 +1,4 @@
1
- Copyright (c) 2004-2011 David Heinemeier Hansson
1
+ Copyright (c) 2011- Asakusa.rb
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -17,4 +17,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
17
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
18
  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
19
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,4 +1,5 @@
1
1
  # ActionArgs
2
+ [![Build Status](https://travis-ci.org/asakusarb/action_args.svg?branch=master)](https://travis-ci.org/asakusarb/action_args)
2
3
 
3
4
  Controller action arguments parameterizer for Rails 4.1+
4
5
 
@@ -293,4 +294,4 @@ This way, the `page` parameter will be defaulted to 1 as everyone might expect.
293
294
 
294
295
  ## Copyright
295
296
 
296
- Copyright (c) 2011~2013 Asakusa.rb. See MIT-LICENSE for further details.
297
+ Copyright (c) 2011- Asakusa.rb. See MIT-LICENSE for further details.
@@ -10,6 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.authors = ['Akira Matsuda']
11
11
  s.email = ['ronnie@dio.jp']
12
12
  s.homepage = 'http://asakusa.rubyist.net/'
13
+ s.license = 'MIT'
13
14
  s.summary = 'Controller action arguments parameterizer for Rails 4+ & Ruby 2.0+'
14
15
  s.description = 'Rails plugin gem that supports Merbish style controller action arguments.'
15
16
 
@@ -7,8 +7,7 @@ end
7
7
 
8
8
  gem 'rails', '~> 5.0.1'
9
9
 
10
- # FIXME: bundle from GH master until > 1.0.1 release
11
- gem 'rails-controller-testing', github: 'rails/rails-controller-testing'
10
+ gem 'rails-controller-testing'
12
11
 
13
12
  gemspec :path => '../'
14
13
 
@@ -5,10 +5,9 @@ git_source(:github) do |repo_name|
5
5
  "https://github.com/#{repo_name}.git"
6
6
  end
7
7
 
8
- gem 'rails', '~> 5.1.0.beta1'
8
+ gem 'rails', '~> 5.1.0'
9
9
 
10
- # FIXME: bundle from GH master until > 1.0.1 release
11
- gem 'rails-controller-testing', github: 'rails/rails-controller-testing'
10
+ gem 'rails-controller-testing'
12
11
 
13
12
  gemspec :path => '../'
14
13
 
@@ -10,9 +10,7 @@ gem 'rack', github: 'rack/rack'
10
10
  gem 'arel', github: 'rails/arel'
11
11
  gem 'sprockets', github: 'rails/sprockets'
12
12
  gem 'sprockets-rails', github: 'rails/sprockets-rails'
13
- gem 'sass-rails', github: 'rails/sass-rails'
14
- # FIXME: bundle from GH master until > 1.0.1 release
15
- gem 'rails-controller-testing', github: 'rails/rails-controller-testing'
13
+ gem 'rails-controller-testing'
16
14
 
17
15
  gemspec :path => '../'
18
16
 
@@ -51,7 +51,7 @@ module ActionArgs
51
51
  method_parameters.each do |type, key|
52
52
  if (key == target_model_name) && permitted_attributes
53
53
  params.require(key) if %i[req keyreq].include?(type)
54
- params[key] = params[key].try :permit, *permitted_attributes
54
+ params[key] = params[key].try :permit, *permitted_attributes if params.key? key
55
55
  end
56
56
  end
57
57
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ActionArgs
3
- VERSION = '2.2.1'
3
+ VERSION = '2.3.0'
4
4
  end
@@ -13,6 +13,7 @@ class StoresControllerTest < ActionController::TestCase
13
13
  test 'without store parameter' do
14
14
  get :new
15
15
  assert 200, response.code
16
+ assert_equal 'PragProg', assigns(:store).name
16
17
  end
17
18
  test 'with store parameter' do
18
19
  get :new, params: {store: {name: 'Tatsu-zine'}}
@@ -132,7 +132,7 @@ class StoresController < ApplicationController
132
132
  render plain: @store.name
133
133
  end
134
134
 
135
- def new(store = nil)
135
+ def new(store = {name: 'PragProg'})
136
136
  @store = Store.new store
137
137
  render plain: @store.name
138
138
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action_args
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akira Matsuda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-08 00:00:00.000000000 Z
11
+ date: 2017-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -92,7 +92,8 @@ files:
92
92
  - test/params_handler/params_handler_test.rb
93
93
  - test/test_helper.rb
94
94
  homepage: http://asakusa.rubyist.net/
95
- licenses: []
95
+ licenses:
96
+ - MIT
96
97
  metadata: {}
97
98
  post_install_message:
98
99
  rdoc_options: []
@@ -110,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
111
  version: '0'
111
112
  requirements: []
112
113
  rubyforge_project:
113
- rubygems_version: 2.6.9
114
+ rubygems_version: 2.6.13
114
115
  signing_key:
115
116
  specification_version: 4
116
117
  summary: Controller action arguments parameterizer for Rails 4+ & Ruby 2.0+