activeadmin 0.6.3 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of activeadmin might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ee588c2ccd71afa65ece9453d9cda98630bb23d5
4
- data.tar.gz: 1b37441291f755166156baee1f9617f589a24d04
3
+ metadata.gz: 329a21beba665a20492d87c4154a6a762c557822
4
+ data.tar.gz: addbedade80ec32dda5cfa1b142dce11c44d7187
5
5
  SHA512:
6
- metadata.gz: 4ec65879c01b007fe2b554bbaf18b24292a2830f3a6e7d382371fa9ddf950531f8364c9f8d3631488550134d55db7aa67745c77a31d8d5a6eac4cb9711897737
7
- data.tar.gz: 8945d9f334cc26bf9e1459a144336cf2f3a9312fd7eb00efc8adbf52bdd874455260e3fa6e0fc4b541db97ec155a89bf1ae2a9061e256eee1ccd8649d6e92c36
6
+ metadata.gz: c146ca594b7a6e616639dbd44843e201c819a5f8e44c2fc8c6a27afc49b03f5a239fd665abbc531c1d0d617c8fd70ab7c71898526620ae9b92d508b6dc25c96b
7
+ data.tar.gz: f3edbd454acd02b042cbd8b87950f13bcd813f3df3cf0d03fd1cce18f1a806f48a8129d1a6e9450fed08771187ae20bd735cd70a5c9604d1f31390189d109fde
@@ -1,4 +1,25 @@
1
- ## Master (unreleased) - [compare](https://github.com/gregbell/active_admin/compare/v0.6.0...master)
1
+ ## 0-6-stable (unreleased) - [compare](https://github.com/gregbell/active_admin/compare/v0.6.4...0-6-stable)
2
+
3
+ ## 0.6.4 - [compare](https://github.com/gregbell/active_admin/compare/v0.6.3...v0.6.4)
4
+
5
+ * Restore compatibility with Formtastic 2.0 by [@seanlinsley][]
6
+ * Backport of [#3489][] by [@timoschilling][]
7
+ * Backport of [#3659][] by [@timoschilling][]
8
+
9
+ ## 0.6.3 - [compare](https://github.com/gregbell/active_admin/compare/v0.6.2...v0.6.3)
10
+
11
+ * __Reinstitutes the 10k limit for CSV exports__ [#2847][] by [@seanlinsley][]
12
+ * Blacklists Devise versions vulnerable to CVE-2013-0233 [#2744][] by [@jjarmoc][]
13
+ * Autoloads the Comments model so it respects user's Kaminari config 77c97d27 by [@seanlinsley][]
14
+ * Hides the blank slate link if user doesn't have permissions [#2588][] by [@seanlinsley][]
15
+ * Fixes incorrect breadcrumb on edit pages [#2601][] by [@shekibobo][]
16
+ * Resurrects `ResourceMismatchError` b1c28cdb by [@seanlinsley][]
17
+ * Keeps filter conditions from being deleted fa0edec4 by [@seanlinsley][]
18
+ * Translations by [@teoulas][], [@tricknotes][], [@givanse][], and [@pcreux][] :heart:
19
+
20
+ ## 0.6.2 - [compare](https://github.com/gregbell/active_admin/compare/v0.6.1...v0.6.2)
21
+
22
+ * Patches MetaSearch bug for attributes ending in "ne" d5db9ff4 by [@seanlinsley][]
2
23
 
3
24
  ## 0.6.1 - [compare](https://github.com/gregbell/active_admin/compare/v0.6.0...v0.6.1)
4
25
 
@@ -904,6 +925,8 @@ of the highlights. 250 commits. Enough said.
904
925
  [#2419]: https://github.com/gregbell/active_admin/issues/2419
905
926
  [#2420]: https://github.com/gregbell/active_admin/issues/2420
906
927
  [#2454]: https://github.com/gregbell/active_admin/issues/2454
928
+ [#3489]: https://github.com/gregbell/active_admin/issues/3489
929
+ [#3659]: https://github.com/gregbell/active_admin/issues/3659
907
930
  [@Bishop]: https://github.com/Bishop
908
931
  [@BoboFraggins]: https://github.com/BoboFraggins
909
932
  [@DMajrekar]: https://github.com/DMajrekar
@@ -992,6 +1015,7 @@ of the highlights. 250 commits. Enough said.
992
1015
  [@stereoscott]: https://github.com/stereoscott
993
1016
  [@sunny]: https://github.com/sunny
994
1017
  [@tank-bohr]: https://github.com/tank-bohr
1018
+ [@timoschilling]: https://github.com/timoschilling
995
1019
  [@tinynumbers]: https://github.com/tinynumbers
996
1020
  [@tracedwax]: https://github.com/tracedwax
997
1021
  [@tricknotes]: https://github.com/tricknotes
data/Gemfile CHANGED
@@ -27,7 +27,7 @@ group :development do
27
27
  end
28
28
 
29
29
  group :development, :test do
30
- gem 'haml', '~> 3.1.7', :require => false
30
+ # gem 'haml', '~> 3.1.7', :require => false
31
31
  gem 'rake', '~> 10.0.2', :require => false
32
32
  gem 'rails-i18n' # Provides default i18n for many languages
33
33
  gem 'rdiscount' # Markdown implementation (for yard)
@@ -2,10 +2,10 @@
2
2
 
3
3
  Active Admin is a Ruby on Rails framework for creating elegant backends for website administration.
4
4
 
5
- {<img src="https://secure.travis-ci.org/gregbell/active_admin.png?branch=master" />}[http://travis-ci.org/gregbell/active_admin]
6
- {<img src="https://codeclimate.com/github/gregbell/active_admin.png" />}[https://codeclimate.com/github/gregbell/active_admin]
7
- {<img src="https://gemnasium.com/gregbell/active_admin.png" />}[https://gemnasium.com/gregbell/active_admin]
8
- {<img src="https://coveralls.io/repos/gregbell/active_admin/badge.png?branch=master" />}[https://coveralls.io/r/gregbell/active_admin?branch=master]
5
+ {<img src="https://secure.travis-ci.org/activeadmin/activeadmin.png?branch=0-6-stable" />}[http://travis-ci.org/activeadmin/activeadmin]
6
+ {<img src="https://codeclimate.com/github/activeadmin/activeadmin.png" />}[https://codeclimate.com/github/activeadmin/activeadmin]
7
+ {<img src="https://gemnasium.com/activeadmin/activeadmin.png" />}[https://gemnasium.com/activeadmin/activeadmin]
8
+ {<img src="https://coveralls.io/repos/activeadmin/activeadmin/badge.png?branch=master" />}[https://coveralls.io/r/activeadmin/activeadmin?branch=0-6-stable]
9
9
  {<img src="http://badgr.co/gittip/activeadmin.png" />}[https://www.gittip.com/activeadmin/]
10
10
 
11
11
  == Documentation & Support
@@ -15,7 +15,8 @@ Feature: User Resetting Password
15
15
  And I follow "Forgot your password?"
16
16
  When I fill in "Email" with "admin@example.com"
17
17
  And I press "Reset My Password"
18
- Then I should see "You will receive an email with instructions about how to reset your password in a few minutes."
18
+ Then I should see "You will receive an email with instructions"
19
+ And I should see "how to reset your password in a few minutes."
19
20
 
20
21
  Scenario: Changing password after resetting
21
22
  When "admin@example.com" requests a pasword reset with token "foobarbaz"
@@ -2,7 +2,12 @@ module ActiveAdmin
2
2
  class Engine < ::Rails::Engine
3
3
  if Rails.version > "3.1"
4
4
  initializer "ActiveAdmin precompile hook", :group => :all do |app|
5
- app.config.assets.precompile += %w(active_admin.js active_admin.css active_admin/print.css)
5
+ ActiveAdmin.application.stylesheets.each do |path, _|
6
+ app.config.assets.precompile << path
7
+ end
8
+ ActiveAdmin.application.javascripts.each do |path|
9
+ app.config.assets.precompile << path
10
+ end
6
11
  end
7
12
  end
8
13
  end
@@ -27,6 +27,10 @@ module ActiveAdmin
27
27
  /(is_true|is_false|is_present|is_blank|is_null|is_not_null)\z/
28
28
  end
29
29
 
30
+ def boolean_checked?(value, checked_value)
31
+ defined?(super) ? super : ActionView::Helpers::InstanceTag.check_box_checked?(value, checked_value)
32
+ end
33
+
30
34
  end
31
35
  end
32
36
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveAdmin
2
- VERSION = '0.6.3'
2
+ VERSION = '0.6.4'
3
3
  end
@@ -18,7 +18,12 @@ module ActiveAdmin
18
18
  end
19
19
  name ||= I18n.t "activerecord.models.#{part.singularize}", :count => 1.1, :default => part.titlecase
20
20
 
21
- link_to name, '/' + parts[0..index].join('/')
21
+ # Don't create a link if the resource's show action is disabled
22
+ if !config || config.defined_actions.include?(:show)
23
+ link_to name, '/' + parts[0..index].join('/')
24
+ else
25
+ name
26
+ end
22
27
  end
23
28
  end
24
29
 
@@ -171,5 +171,8 @@ unless ENV['DEFER_GC'] == '0' || ENV['DEFER_GC'] == 'false'
171
171
  RSpec.configure do |config|
172
172
  config.before(:all) { DeferredGarbageCollection.start }
173
173
  config.after(:all) { DeferredGarbageCollection.reconsider }
174
+ config.filter_run focus: true
175
+ config.filter_run_excluding skip: true
176
+ config.run_all_when_everything_filtered = true
174
177
  end
175
178
  end
@@ -11,13 +11,14 @@ describe "Breadcrumbs" do
11
11
  # Mock link to and return a hash
12
12
  def link_to(name, url); {:name => name, :path => url}; end
13
13
 
14
- let(:user) { double display_name: 'Jane Doe' }
15
- let(:user_config) { double find_resource: user,
16
- resource_name: double(route_key: 'users') }
17
- let(:post) { double display_name: 'Hello World' }
18
- let(:post_config) { double find_resource: post,
19
- belongs_to_config: double(target: user_config),
20
- resource_name: double(route_key: 'posts') }
14
+ actions = ActiveAdmin::BaseController::ACTIVE_ADMIN_ACTIONS
15
+
16
+ let(:user) { double display_name: 'Jane Doe' }
17
+ let(:user_config) { double find_resource: user, resource_name: double(route_key: 'users'),
18
+ defined_actions: actions }
19
+ let(:post) { double display_name: 'Hello World' }
20
+ let(:post_config) { double find_resource: post, resource_name: double(route_key: 'posts'),
21
+ defined_actions: actions, belongs_to_config: double(target: user_config) }
21
22
 
22
23
  let :active_admin_config do
23
24
  post_config
@@ -178,5 +179,28 @@ describe "Breadcrumbs" do
178
179
  end
179
180
  end
180
181
 
182
+ context "when the 'show' action is disabled" do
183
+ let(:post_config) { double find_resource: post, resource_name: double(route_key: 'posts'),
184
+ defined_actions: actions - [:show], # this is the change
185
+ belongs_to_config: double(target: user_config) }
186
+
187
+ let(:path) { "/admin/posts/1/edit" }
188
+
189
+ it "should have 3 items" do
190
+ trail.size.should == 3
191
+ end
192
+ it "should have a link to /admin" do
193
+ trail[0][:name].should == "Admin"
194
+ trail[0][:path].should == "/admin"
195
+ end
196
+ it "should have a link to /admin/posts" do
197
+ trail[1][:name].should == "Posts"
198
+ trail[1][:path].should == "/admin/posts"
199
+ end
200
+ it "should not link to the show view for the post" do
201
+ trail[2].should == "Hello World"
202
+ end
203
+ end
204
+
181
205
  end
182
206
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Bell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-30 00:00:00.000000000 Z
11
+ date: 2015-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: arbre
@@ -769,7 +769,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
769
769
  version: '0'
770
770
  requirements: []
771
771
  rubyforge_project:
772
- rubygems_version: 2.2.1
772
+ rubygems_version: 2.4.5
773
773
  signing_key:
774
774
  specification_version: 4
775
775
  summary: The administration framework for Ruby on Rails.