rails3_assist 0.3.2 → 0.3.3

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.2
1
+ 0.3.3
@@ -33,7 +33,7 @@ module Rails3::Assist::File
33
33
  end
34
34
 
35
35
  def clean_gemfile
36
- clean_gemfile_content = read_gem_file.gsub(/('|")\s*gem/m, "\\1\ngem")
36
+ clean_gemfile_content = read_gem_file.gsub(/('|"|end)\s*gem/m, "\\1\ngem")
37
37
  File.open(gem_file, 'w') {|f| f.write(clean_gemfile_content) }
38
38
  end
39
39
 
@@ -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.2"
8
+ s.version = "0.3.3"
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-01}
12
+ s.date = %q{2010-12-09}
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 = [
@@ -97,6 +97,24 @@ describe Rails3::Assist::File::Special do
97
97
  old_gem_file_content
98
98
  end
99
99
  end
100
+
101
+ it 'should be true that it has cleaned the Gemfile ensuring newlines between each gem and after end' do
102
+ old_gem_file_content = AppDir.new.read_gem_file
103
+
104
+ CLASS.append_to_gem_file do
105
+ "group :dev endgem 'hi'gem 'blip'"
106
+ end
107
+
108
+ AppDir.new.clean_gemfile
109
+
110
+ expected = "group :dev end\ngem 'hi'"
111
+
112
+ AppDir.new.read_gem_file.should match /#{Regexp.escape(expected)}/
113
+
114
+ File.overwrite CLASS.gem_file do
115
+ old_gem_file_content
116
+ end
117
+ end
100
118
  end
101
119
 
102
120
  describe '#has_gem_version?' do
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 2
9
- version: 0.3.2
8
+ - 3
9
+ version: 0.3.3
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-01 00:00:00 +01:00
17
+ date: 2010-12-09 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency