rails3_assist 0.3.5 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.5
1
+ 0.3.6
@@ -39,7 +39,7 @@ module Rails3::Assist::File
39
39
 
40
40
  def insert_into_routes route_stmt=nil, &block
41
41
  statement = block ? yield : route_stmt
42
- File.insert_into routes_file, route_stmt, :after => 'Application.routes.draw do'
42
+ File.insert_into routes_file, statement, :after => 'Application.routes.draw do'
43
43
  end
44
44
 
45
45
  # read_application_file
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rails3_assist}
8
- s.version = "0.3.5"
8
+ s.version = "0.3.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Kristian Mandrup"]
12
- s.date = %q{2010-12-24}
12
+ s.date = %q{2011-01-01}
13
13
  s.description = %q{Basic file operation helpers for working with Rails 3 artifacts}
14
14
  s.email = %q{kmandrup@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -86,13 +86,23 @@ describe Rails3::Assist::File::Special do
86
86
  # create test_routes macro
87
87
 
88
88
  describe '#insert_into_routes' do
89
- it 'should insert into block of Routes file' do
89
+ it 'should insert into block of Routes file, string statement' do
90
90
  test_routes_file do
91
91
  routes_stmt = 'devise_for :users'
92
92
  CLASS.insert_into_routes routes_stmt
93
93
  AppDir.new.read_routes_file.should match /do\s*#{Regexp.escape(routes_stmt)}\s*/
94
94
  end
95
95
  end
96
+
97
+ it 'should insert into block of Routes file, block statement' do
98
+ test_routes_file do
99
+ routes_stmt = 'devise_for :brugere'
100
+ CLASS.insert_into_routes do
101
+ routes_stmt
102
+ end
103
+ AppDir.new.read_routes_file.should match /do\s*#{Regexp.escape(routes_stmt)}\s*/
104
+ end
105
+ end
96
106
  end
97
107
 
98
108
  describe '#read_gem_file' do
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 5
9
- version: 0.3.5
8
+ - 6
9
+ version: 0.3.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Kristian Mandrup
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-12-24 00:00:00 +01:00
17
+ date: 2011-01-01 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency