nifty-generators 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +6 -0
- data/Manifest +1 -1
- data/Rakefile +1 -1
- data/nifty-generators.gemspec +5 -5
- data/rails_generators/nifty_authentication/nifty_authentication_generator.rb +6 -2
- data/rails_generators/nifty_authentication/templates/views/haml/signup.html.haml +1 -1
- data/test/test_nifty_authentication_generator.rb +3 -1
- metadata +4 -4
data/CHANGELOG
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
0.2.3 (February 20th, 2009)
|
2
|
+
|
3
|
+
* fixing nifty_authentication to work with Rails 2.3 application_controller.rb
|
4
|
+
|
5
|
+
* fixing password field in HAML signup page in nifty_authentication
|
6
|
+
|
1
7
|
0.2.2 (November 11th, 2008)
|
2
8
|
|
3
9
|
* fixing sessions_path reference in nifty_authentication
|
data/Manifest
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
CHANGELOG
|
2
2
|
lib/nifty_generators.rb
|
3
3
|
LICENSE
|
4
|
-
Manifest
|
5
4
|
rails_generators/nifty_authentication/lib/insert_commands.rb
|
6
5
|
rails_generators/nifty_authentication/nifty_authentication_generator.rb
|
7
6
|
rails_generators/nifty_authentication/templates/authentication.rb
|
@@ -97,3 +96,4 @@ test/test_nifty_config_generator.rb
|
|
97
96
|
test/test_nifty_layout_generator.rb
|
98
97
|
test/test_nifty_scaffold_generator.rb
|
99
98
|
TODO
|
99
|
+
Manifest
|
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
require 'echoe'
|
4
4
|
|
5
|
-
Echoe.new('nifty-generators', '0.2.
|
5
|
+
Echoe.new('nifty-generators', '0.2.3') do |p|
|
6
6
|
p.project = "niftygenerators"
|
7
7
|
p.description = "A collection of useful generator scripts for Rails."
|
8
8
|
p.url = "http://github.com/ryanb/nifty-generators"
|
data/nifty-generators.gemspec
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
|
2
|
-
# Gem::Specification for Nifty-generators-0.2.
|
2
|
+
# Gem::Specification for Nifty-generators-0.2.3
|
3
3
|
# Originally generated by Echoe
|
4
4
|
|
5
5
|
--- !ruby/object:Gem::Specification
|
6
6
|
name: nifty-generators
|
7
7
|
version: !ruby/object:Gem::Version
|
8
|
-
version: 0.2.
|
8
|
+
version: 0.2.3
|
9
9
|
platform: ruby
|
10
10
|
authors:
|
11
11
|
- Ryan Bates
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
|
15
|
-
date:
|
15
|
+
date: 2009-02-20 00:00:00 -08:00
|
16
16
|
default_executable:
|
17
17
|
dependencies: []
|
18
18
|
|
@@ -33,7 +33,6 @@ files:
|
|
33
33
|
- CHANGELOG
|
34
34
|
- lib/nifty_generators.rb
|
35
35
|
- LICENSE
|
36
|
-
- Manifest
|
37
36
|
- rails_generators/nifty_authentication/lib/insert_commands.rb
|
38
37
|
- rails_generators/nifty_authentication/nifty_authentication_generator.rb
|
39
38
|
- rails_generators/nifty_authentication/templates/authentication.rb
|
@@ -129,6 +128,7 @@ files:
|
|
129
128
|
- test/test_nifty_layout_generator.rb
|
130
129
|
- test/test_nifty_scaffold_generator.rb
|
131
130
|
- TODO
|
131
|
+
- Manifest
|
132
132
|
- nifty-generators.gemspec
|
133
133
|
has_rdoc: true
|
134
134
|
homepage: http://github.com/ryanb/nifty-generators
|
@@ -157,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
157
|
requirements: []
|
158
158
|
|
159
159
|
rubyforge_project: niftygenerators
|
160
|
-
rubygems_version: 1.
|
160
|
+
rubygems_version: 1.3.1
|
161
161
|
specification_version: 2
|
162
162
|
summary: A collection of useful generator scripts for Rails.
|
163
163
|
test_files:
|
@@ -37,7 +37,7 @@ class NiftyAuthenticationGenerator < Rails::Generator::Base
|
|
37
37
|
m.route_name :logout, 'logout', :controller => sessions_underscore_name, :action => 'destroy'
|
38
38
|
m.route_name :signup, 'signup', :controller => user_plural_name, :action => 'new'
|
39
39
|
|
40
|
-
m.insert_into
|
40
|
+
m.insert_into "app/controllers/#{application_controller_name}.rb", 'include Authentication'
|
41
41
|
|
42
42
|
if test_framework == :rspec
|
43
43
|
m.directory "spec"
|
@@ -84,6 +84,10 @@ class NiftyAuthenticationGenerator < Rails::Generator::Base
|
|
84
84
|
def sessions_class_name
|
85
85
|
sessions_name.camelize
|
86
86
|
end
|
87
|
+
|
88
|
+
def application_controller_name
|
89
|
+
Rails.version >= '2.3.0' ? 'application_controller' : 'application'
|
90
|
+
end
|
87
91
|
|
88
92
|
protected
|
89
93
|
|
@@ -100,7 +104,7 @@ protected
|
|
100
104
|
opt.separator 'Options:'
|
101
105
|
opt.on("--testunit", "Use test/unit for test files.") { options[:test_framework] = :testunit }
|
102
106
|
opt.on("--rspec", "Use RSpec for test files.") { options[:test_framework] = :rspec }
|
103
|
-
opt.on("--shoulda", "Use
|
107
|
+
opt.on("--shoulda", "Use Shoulda for test files.") { options[:test_framework] = :shoulda }
|
104
108
|
opt.on("--haml", "Generate HAML views instead of ERB.") { |v| options[:haml] = true }
|
105
109
|
end
|
106
110
|
|
@@ -18,6 +18,7 @@ class TestNiftyAuthenticationGenerator < Test::Unit::TestCase
|
|
18
18
|
# bare_teardown - place this in teardown method to destroy the TMP_ROOT or APP_ROOT folder after each test
|
19
19
|
context "" do # empty context so we can use setup block
|
20
20
|
setup do
|
21
|
+
Rails.stubs(:version).returns("2.0.2")
|
21
22
|
Dir.mkdir("#{RAILS_ROOT}/config") unless File.exists?("#{RAILS_ROOT}/config")
|
22
23
|
File.open("#{RAILS_ROOT}/config/routes.rb", 'w') do |f|
|
23
24
|
f.puts "ActionController::Routing::Routes.draw do |map|\n\nend"
|
@@ -64,7 +65,8 @@ class TestNiftyAuthenticationGenerator < Test::Unit::TestCase
|
|
64
65
|
end
|
65
66
|
|
66
67
|
should "include Authentication" do
|
67
|
-
|
68
|
+
application_controller_name = Rails.version >= '2.3.0' ? 'application_controller' : 'application'
|
69
|
+
assert_generated_file "app/controllers/#{application_controller_name}.rb" do |body|
|
68
70
|
assert_match "include Authentication", body
|
69
71
|
end
|
70
72
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nifty-generators
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Bates
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2009-02-20 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -30,7 +30,6 @@ files:
|
|
30
30
|
- CHANGELOG
|
31
31
|
- lib/nifty_generators.rb
|
32
32
|
- LICENSE
|
33
|
-
- Manifest
|
34
33
|
- rails_generators/nifty_authentication/lib/insert_commands.rb
|
35
34
|
- rails_generators/nifty_authentication/nifty_authentication_generator.rb
|
36
35
|
- rails_generators/nifty_authentication/templates/authentication.rb
|
@@ -126,6 +125,7 @@ files:
|
|
126
125
|
- test/test_nifty_layout_generator.rb
|
127
126
|
- test/test_nifty_scaffold_generator.rb
|
128
127
|
- TODO
|
128
|
+
- Manifest
|
129
129
|
- nifty-generators.gemspec
|
130
130
|
has_rdoc: true
|
131
131
|
homepage: http://github.com/ryanb/nifty-generators
|
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
154
154
|
requirements: []
|
155
155
|
|
156
156
|
rubyforge_project: niftygenerators
|
157
|
-
rubygems_version: 1.
|
157
|
+
rubygems_version: 1.3.1
|
158
158
|
signing_key:
|
159
159
|
specification_version: 2
|
160
160
|
summary: A collection of useful generator scripts for Rails.
|