fortitude 0.0.6-java → 0.0.7-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +5 -0
- data/lib/fortitude/rails/railtie.rb +12 -9
- data/lib/fortitude/version.rb +1 -1
- data/spec/rails/development_mode_system_spec.rb +4 -0
- data/spec/rails/templates/development_mode_system_spec/app/controllers/development_mode_system_spec_controller.rb +4 -0
- data/spec/rails/templates/development_mode_system_spec/app/views/development_mode_system_spec/namespace_reference.rb +7 -0
- data/spec/rails/templates/development_mode_system_spec/app/views/development_mode_system_spec/referenced_widget.rb +5 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d58342fff5dde4206e5085e5111c2bd10275d60
|
4
|
+
data.tar.gz: fe414b50a1d86fbb7504fa0dc5b45820e4c05780
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 019c7e138f27db207dc8ce479a393c1ed027f2ef2fb79523224ec0e88bf1a0245bc44fcdb23a7b9677cc4dbd8ca79bd2daaf7df083a5d60ef83c322383869cc1
|
7
|
+
data.tar.gz: 9137c4f333b5b477e488e6f6f8538901205f838f00b203d3c8c08f98bdf32c442895b31174de2a56204bcf23ee57529dabdf7182fc2a55d7e0935f7735272534
|
data/CHANGES.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Fortitude Releases
|
2
2
|
|
3
|
+
## 0.0.7, 11 November 2014
|
4
|
+
|
5
|
+
* Fortitude 0.0.6 introduced a regression, where referring to an autoloaded view class by partially-qualified namespace
|
6
|
+
path could cause an `Errno::ENOENT` exception indicating that a particular directory wasn't found.
|
7
|
+
|
3
8
|
## 0.0.6, 11 November 2014
|
4
9
|
|
5
10
|
* Fixed an issue where naming a widget with an `.html.rb` extension (for example) at the end would work at first,
|
@@ -147,17 +147,20 @@ module Fortitude
|
|
147
147
|
if found_subpath
|
148
148
|
full_path = File.join(@@_fortitude_views_root, "#{found_subpath}")
|
149
149
|
directory = File.dirname(full_path)
|
150
|
-
filename = File.basename(full_path)
|
151
150
|
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
151
|
+
if File.directory?(directory)
|
152
|
+
filename = File.basename(full_path)
|
153
|
+
|
154
|
+
regexp1 = /^#{Regexp.escape(filename)}\./
|
155
|
+
regexp2 = /\.rb$/i
|
156
|
+
applicable_entries = Dir.entries(directory).select do |entry|
|
157
|
+
((entry == filename) || (entry =~ regexp1 && entry =~ regexp2)) && File.file?(File.join(directory, entry))
|
158
|
+
end
|
159
|
+
return nil if applicable_entries.length == 0
|
158
160
|
|
159
|
-
|
160
|
-
|
161
|
+
entry_to_use = applicable_entries.sort_by { |e| e.length }.reverse.first
|
162
|
+
return File.join(directory, entry_to_use)
|
163
|
+
end
|
161
164
|
end
|
162
165
|
|
163
166
|
# Make sure that we remove the views autoload path before letting the rest of
|
data/lib/fortitude/version.rb
CHANGED
@@ -78,6 +78,10 @@ describe "Rails development-mode support", :type => :rails do
|
|
78
78
|
<!-- END Views::DevelopmentModeMailer::MailerFormattingTest depth 0 -->})
|
79
79
|
end
|
80
80
|
|
81
|
+
it "should allow referencing a widget by partial namespace" do
|
82
|
+
expect_match("namespace_reference", /before.*referenced.*after/mi)
|
83
|
+
end
|
84
|
+
|
81
85
|
private
|
82
86
|
def splat_new_widget!
|
83
87
|
reload_file = File.join(rails_server.rails_root, 'app/views/development_mode_system_spec/reload_widget.rb')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fortitude
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Andrew Geweke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -337,6 +337,8 @@ files:
|
|
337
337
|
- spec/rails/templates/development_mode_system_spec/app/views/development_mode_system_spec/mailer_formatting_test.rb
|
338
338
|
- spec/rails/templates/development_mode_system_spec/app/views/development_mode_system_spec/mailer_layout_test.rb
|
339
339
|
- spec/rails/templates/development_mode_system_spec/app/views/development_mode_system_spec/mailer_view_test.rb
|
340
|
+
- spec/rails/templates/development_mode_system_spec/app/views/development_mode_system_spec/namespace_reference.rb
|
341
|
+
- spec/rails/templates/development_mode_system_spec/app/views/development_mode_system_spec/referenced_widget.rb
|
340
342
|
- spec/rails/templates/development_mode_system_spec/app/views/development_mode_system_spec/reload_widget.rb
|
341
343
|
- spec/rails/templates/development_mode_system_spec/app/views/development_mode_system_spec/reload_widget_with_html_extension.html.rb
|
342
344
|
- spec/rails/templates/development_mode_system_spec/app/views/development_mode_system_spec/sample_output.rb
|
@@ -662,6 +664,8 @@ test_files:
|
|
662
664
|
- spec/rails/templates/development_mode_system_spec/app/views/development_mode_system_spec/mailer_formatting_test.rb
|
663
665
|
- spec/rails/templates/development_mode_system_spec/app/views/development_mode_system_spec/mailer_layout_test.rb
|
664
666
|
- spec/rails/templates/development_mode_system_spec/app/views/development_mode_system_spec/mailer_view_test.rb
|
667
|
+
- spec/rails/templates/development_mode_system_spec/app/views/development_mode_system_spec/namespace_reference.rb
|
668
|
+
- spec/rails/templates/development_mode_system_spec/app/views/development_mode_system_spec/referenced_widget.rb
|
665
669
|
- spec/rails/templates/development_mode_system_spec/app/views/development_mode_system_spec/reload_widget.rb
|
666
670
|
- spec/rails/templates/development_mode_system_spec/app/views/development_mode_system_spec/reload_widget_with_html_extension.html.rb
|
667
671
|
- spec/rails/templates/development_mode_system_spec/app/views/development_mode_system_spec/sample_output.rb
|