quartermaster 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
@@ -1,11 +1,16 @@
1
+ === 1.0.3 / 2008-05-09
2
+
3
+ * 1 major bug fix
4
+ * ARGH. Stylesheet and javascript helpers weren't including "browsers/" directory in the call to *_tag so it was broked. Incorrect tests let it slip by (helps to sanity check things sometimes, doesn't it?)
5
+
1
6
  === 1.0.2 / 2008-05-08
2
7
 
3
- * 1 major enhancement
8
+ * 1 major bug fix
4
9
  * Muffed handling of request's that have *no* user agent (request.user_agent is nil). Fixed!
5
10
 
6
11
  === 1.0.1 / 2008-05-08
7
12
 
8
- * 1 major enhancement
13
+ * 1 major bug fix
9
14
  * Muffed handling of unknown browsers. Fixed!
10
15
 
11
16
  === 1.0.0 / 2008-05-06
@@ -1,5 +1,5 @@
1
1
  module Quartermaster
2
- VERSION = '1.0.2'
2
+ VERSION = '1.0.3'
3
3
 
4
4
  module Helper
5
5
  # Uses the output of +browser_from_user_agent+ to figure out what stylesheets to look for and then uses +stylesheet_link_tag+
@@ -8,13 +8,13 @@ module Quartermaster
8
8
  # +stylesheet_link_tag+
9
9
  def stylesheet_link_tag_for_browser( options = {} )
10
10
  agent_attributes = [os_from_user_agent] + browser_from_user_agent
11
- agent_attributes.select{ |attribute| File.exists?( File.join(self.class::STYLESHEETS_DIR, 'browsers', "#{attribute}.css" )) }.collect{ |attribute| stylesheet_link_tag( attribute, options )}.to_s
11
+ agent_attributes.select{ |attribute| File.exists?( File.join(self.class::STYLESHEETS_DIR, 'browsers', "#{attribute}.css" )) }.collect{ |attribute| stylesheet_link_tag( "browsers/#{attribute}", options )}.to_s
12
12
  end
13
13
 
14
14
  # Very similar to +stylesheet_link_tag_for_browser+ except for javascripts
15
15
  def javascript_include_tag_for_browser( options = {} )
16
16
  agent_attributes = [os_from_user_agent] + browser_from_user_agent
17
- agent_attributes.select{ |attribute| File.exists?( File.join(self.class::JAVASCRIPTS_DIR, 'browsers', "#{attribute}.js" )) }.collect{ |attribute| javascript_include_tag( attribute, options )}.to_s
17
+ agent_attributes.select{ |attribute| File.exists?( File.join(self.class::JAVASCRIPTS_DIR, 'browsers', "#{attribute}.js" )) }.collect{ |attribute| javascript_include_tag( "browsers/#{attribute}", options )}.to_s
18
18
  end
19
19
 
20
20
  # Returns a space-separated string of the OS and the short user agents for the requesting browser
@@ -10,12 +10,12 @@ class QMTest
10
10
  # Mock a couple ActionView helpers
11
11
  def stylesheet_link_tag(*sources)
12
12
  sources.pop if sources.last.is_a?(Hash)
13
- "<link for #{sources.join(',')}>"
13
+ "<link for '#{sources.join(',')}'>"
14
14
  end
15
15
 
16
16
  def javascript_include_tag(*sources)
17
17
  sources.pop if sources.last.is_a?(Hash)
18
- "<script for #{sources.join(',')}>"
18
+ "<script for '#{sources.join(',')}'>"
19
19
  end
20
20
  end
21
21
 
@@ -91,7 +91,7 @@ describe 'Quartermaster' do
91
91
  end
92
92
 
93
93
  def expected_output_for( *sources )
94
- sources.collect{ |attribute| @qm.stylesheet_link_tag(attribute)}.to_s
94
+ sources.collect{ |attribute| @qm.stylesheet_link_tag("browsers/#{attribute}")}.to_s
95
95
  end
96
96
 
97
97
  it "should create links to the os file, the browser-base file, and the browser-specific file" do
@@ -129,7 +129,7 @@ describe 'Quartermaster' do
129
129
  end
130
130
 
131
131
  def expected_output_for( *sources )
132
- sources.collect{ |attribute| @qm.javascript_include_tag(attribute)}.to_s
132
+ sources.collect{ |attribute| @qm.javascript_include_tag("browsers/#{attribute}")}.to_s
133
133
  end
134
134
 
135
135
  it "should create script tags for the os file, the browser-base file, and the browser-specific file" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quartermaster
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Myron
@@ -30,7 +30,7 @@ cert_chain:
30
30
  arkBVHd8TABNoJ+MQvwL/7sCwSTiTg==
31
31
  -----END CERTIFICATE-----
32
32
 
33
- date: 2008-05-08 00:00:00 -07:00
33
+ date: 2008-05-09 00:00:00 -07:00
34
34
  default_executable:
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
metadata.gz.sig CHANGED
Binary file