noodall-devise 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile CHANGED
@@ -13,6 +13,7 @@ gem 'rmagick', :require => 'RMagick'
13
13
  gem 'dragonfly', '~> 0.7.6'
14
14
  gem 'factory_girl', '~> 1.3.2'
15
15
  gem "faker", "~> 0.3.1"
16
+ gem "bson_ext", "~> 1.2.0"
16
17
 
17
18
 
18
19
  if RUBY_VERSION < '1.9'
@@ -62,7 +62,7 @@ protected
62
62
  end
63
63
 
64
64
  def self.groups
65
- (self.tag_cloud + ['admin']).uniq
65
+ (self.tag_cloud.map(&:name) + ['admin']).uniq.sort
66
66
  end
67
67
 
68
68
  before_validation :set_permalink
@@ -43,3 +43,15 @@ Feature: Manage users
43
43
  And I am on the users admin page
44
44
  When I follow "Delete" within "tr:contains('Mr Spoon')"
45
45
  Then the user should not be able to sign in as "spoon@buttonmoon.com/s3cur3"
46
+
47
+ Scenario: Groups List for autocomplete
48
+ Given the following users exists:
49
+ | name | group list |
50
+ | Mr Spoon | admin, editor |
51
+ | Dave | editor |
52
+ | Eric | editor, manager |
53
+ When I go to the groups json
54
+ Then I should see JSON:
55
+ """
56
+ ["admin","editor","manager"]
57
+ """
@@ -1,6 +1,6 @@
1
1
  # IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
2
- # It is recommended to regenerate this file in the future when you upgrade to a
3
- # newer version of cucumber-rails. Consider adding your own code to a new file
2
+ # It is recommended to regenerate this file in the future when you upgrade to a
3
+ # newer version of cucumber-rails. Consider adding your own code to a new file
4
4
  # instead of editing this one. Cucumber will automatically load all features/**/*.rb
5
5
  # files.
6
6
 
@@ -100,7 +100,7 @@ end
100
100
  Then /^(?:|I )should see JSON:$/ do |expected_json|
101
101
  require 'json'
102
102
  expected = JSON.pretty_generate(JSON.parse(expected_json))
103
- actual = JSON.pretty_generate(JSON.parse(response.body))
103
+ actual = JSON.pretty_generate(JSON.parse(page.body))
104
104
  expected.should == actual
105
105
  end
106
106
 
@@ -191,7 +191,7 @@ Then /^the "([^"]*)" checkbox(?: within "([^"]*)")? should not be checked$/ do |
191
191
  end
192
192
  end
193
193
  end
194
-
194
+
195
195
  Then /^(?:|I )should be on (.+)$/ do |page_name|
196
196
  current_path = URI.parse(current_url).path
197
197
  if current_path.respond_to? :should
@@ -205,8 +205,8 @@ Then /^(?:|I )should have the following query string:$/ do |expected_pairs|
205
205
  query = URI.parse(current_url).query
206
206
  actual_params = query ? CGI.parse(query) : {}
207
207
  expected_params = {}
208
- expected_pairs.rows_hash.each_pair{|k,v| expected_params[k] = v.split(',')}
209
-
208
+ expected_pairs.rows_hash.each_pair{|k,v| expected_params[k] = v.split(',')}
209
+
210
210
  if actual_params.respond_to? :should
211
211
  actual_params.should == expected_params
212
212
  else
@@ -8,6 +8,8 @@ module NavigationHelpers
8
8
  def path_to(page_name)
9
9
  case page_name
10
10
 
11
+ when /the groups json/
12
+ noodall_admin_groups_path(:json)
11
13
  when /the sign in page/
12
14
  new_user_session_path
13
15
  when /the users admin page/
@@ -1,5 +1,5 @@
1
1
  module Noodall
2
2
  module Devise
3
- VERSION = "0.1.5"
3
+ VERSION = "0.1.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: noodall-devise
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
5
- prerelease: false
4
+ hash: 23
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 5
10
- version: 0.1.5
9
+ - 6
10
+ version: 0.1.6
11
11
  platform: ruby
12
12
  authors: []
13
13
 
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-02 00:00:00 +00:00
18
+ date: 2011-02-04 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -30,10 +30,10 @@ dependencies:
30
30
  - 1
31
31
  - 3
32
32
  version: 1.1.3
33
- type: :runtime
34
33
  name: devise
35
34
  prerelease: false
36
35
  version_requirements: *id001
36
+ type: :runtime
37
37
  - !ruby/object:Gem::Dependency
38
38
  requirement: &id002 !ruby/object:Gem::Requirement
39
39
  none: false
@@ -46,10 +46,10 @@ dependencies:
46
46
  - 1
47
47
  - 6
48
48
  version: 1.1.6
49
- type: :runtime
50
49
  name: mm-devise
51
50
  prerelease: false
52
51
  version_requirements: *id002
52
+ type: :runtime
53
53
  - !ruby/object:Gem::Dependency
54
54
  requirement: &id003 !ruby/object:Gem::Requirement
55
55
  none: false
@@ -62,10 +62,10 @@ dependencies:
62
62
  - 0
63
63
  - 0
64
64
  version: 1.0.0
65
- type: :development
66
65
  name: bundler
67
66
  prerelease: false
68
67
  version_requirements: *id003
68
+ type: :development
69
69
  description: User sign in and managent with devise. Provides administration of users in the admin area
70
70
  email: []
71
71
 
@@ -164,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  requirements: []
165
165
 
166
166
  rubyforge_project:
167
- rubygems_version: 1.3.7
167
+ rubygems_version: 1.4.1
168
168
  signing_key:
169
169
  specification_version: 3
170
170
  summary: "Noodall Devise: User sign in and managent with devise"