versionist 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -66,6 +66,17 @@ module Versionist
66
66
  else
67
67
  say "No controller tests found in test/functional for #{old_version}"
68
68
  end
69
+
70
+ if File.exists? "test/integration/#{module_name_for_path(old_module_name)}"
71
+ log "Copying all files from test/integration/#{module_name_for_path(old_module_name)} to test/integration/#{module_name_for_path(new_module_name)}"
72
+ FileUtils.cp_r "test/integration/#{module_name_for_path(old_module_name)}", "test/integration/#{module_name_for_path(new_module_name)}"
73
+ Dir.glob("test/integration/#{module_name_for_path(new_module_name)}/*.rb").each do |f|
74
+ text = File.read(f)
75
+ File.open(f, 'w') {|f| f << text.gsub(/#{old_module_name}/, new_module_name)}
76
+ end
77
+ else
78
+ say "No integration tests found in test/integration for #{old_version}"
79
+ end
69
80
  when :rspec
70
81
  if File.exists? "spec/controllers/#{module_name_for_path(old_module_name)}"
71
82
  log "Copying all files from spec/controllers/#{module_name_for_path(old_module_name)} to spec/controllers/#{module_name_for_path(new_module_name)}"
@@ -77,6 +88,17 @@ module Versionist
77
88
  else
78
89
  say "No controller specs found in spec/controllers for #{old_version}"
79
90
  end
91
+
92
+ if File.exists? "spec/requests/#{module_name_for_path(old_module_name)}"
93
+ log "Copying all files from spec/requests/#{module_name_for_path(old_module_name)} to spec/requests/#{module_name_for_path(new_module_name)}"
94
+ FileUtils.cp_r "spec/requests/#{module_name_for_path(old_module_name)}", "spec/requests/#{module_name_for_path(new_module_name)}"
95
+ Dir.glob("spec/requests/#{module_name_for_path(new_module_name)}/*.rb").each do |f|
96
+ text = File.read(f)
97
+ File.open(f, 'w') {|f| f << text.gsub(/#{old_module_name}/, new_module_name)}
98
+ end
99
+ else
100
+ say "No request specs found in spec/requests for #{old_version}"
101
+ end
80
102
  else
81
103
  say "Unsupported test_framework: #{Versionist.configuration.configured_test_framework}"
82
104
  end
@@ -1,3 +1,3 @@
1
1
  module Versionist
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: versionist
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.0
5
+ version: 0.3.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Brian Ploetz
@@ -105,7 +105,7 @@ rubyforge_project:
105
105
  rubygems_version: 1.8.17
106
106
  signing_key:
107
107
  specification_version: 3
108
- summary: versionist-0.3.0
108
+ summary: versionist-0.3.1
109
109
  test_files: []
110
110
 
111
111
  has_rdoc: