kelredd-useful 0.2.5 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -76,10 +76,10 @@ module Useful::ErbHelpers::Links
76
76
  # => <link rel="stylesheet" type="text/css" media="screen" href="/stylesheets/default.css?12345678">
77
77
  # EX : stylesheet_link_tag 'default', :media => 'screen'
78
78
  # => <link rel="stylesheet" type="text/css" media="screen" href="/stylesheets/default.css">
79
- # EX : stylesheet_link_tag 'default', 'test, :media => 'screen'
79
+ # EX : stylesheet_link_tag 'default', 'test', :media => 'screen'
80
80
  # => <link rel="stylesheet" type="text/css" media="screen" href="/stylesheets/default.css">
81
81
  # => <link rel="stylesheet" type="text/css" media="screen" href="/stylesheets/test.css">
82
- # EX : stylesheet_link_tag ['default', 'test], :media => 'screen'
82
+ # EX : stylesheet_link_tag ['default', 'test'], :media => 'screen'
83
83
  # => <link rel="stylesheet" type="text/css" media="screen" href="/stylesheets/default.css">
84
84
  # => <link rel="stylesheet" type="text/css" media="screen" href="/stylesheets/test.css">
85
85
  # EX : stylesheet_link_tag 'default', '/other_sheets/other', '/other_sheets/another.css'
@@ -91,9 +91,10 @@ module Useful::ErbHelpers::Links
91
91
  options[:rel] ||= "stylesheet"
92
92
  options[:type] ||= "text/css"
93
93
  options[:media] ||= "all"
94
+ environment = options.delete(:environment)
94
95
  Array(srcs).collect do |src|
95
96
  #TODO: write sinatra helper to auto set env with Sinatra::Application.environment.to_s
96
- options[:href] = build_src_href(src, :default_path => "stylesheets", :extension => ".css", :environment => options.delete(:environment))
97
+ options[:href] = build_src_href(src, :default_path => "stylesheets", :extension => ".css", :environment => environment)
97
98
  tag(:link, options)
98
99
  end.join("\n")
99
100
  end
@@ -113,9 +114,10 @@ module Useful::ErbHelpers::Links
113
114
  def javascript_include_tag(*args)
114
115
  srcs, options = handle_srcs_options(args)
115
116
  options[:type] ||= "text/javascript"
117
+ environment = options.delete(:environment)
116
118
  Array(srcs).collect do |src|
117
119
  #TODO: write sinatra helper to auto set env with Sinatra::Application.environment.to_s
118
- options[:src] = build_src_href(src, :default_path => "javascripts", :extension => ".js", :environment => options.delete(:environment))
120
+ options[:src] = build_src_href(src, :default_path => "javascripts", :extension => ".js", :environment => environment)
119
121
  tag(:script, options) { '' }
120
122
  end.join("\n")
121
123
  end
@@ -0,0 +1,20 @@
1
+ module Useful; end
2
+ module Useful::ShouldaMacros; end
3
+ module Useful::ShouldaMacros::TestUnit; end
4
+
5
+ module Useful::ShouldaMacros::TestUnit::Context
6
+ end
7
+
8
+
9
+ if defined? Shoulda::Context
10
+ module Shoulda
11
+ class Context
12
+
13
+ alias_method :before, :setup
14
+ alias_method :after, :teardown
15
+
16
+ end
17
+ end
18
+
19
+ Shoulda::Context.extend(Useful::ShouldaMacros::TestUnit::Context)
20
+ end
@@ -3,7 +3,7 @@ module Useful
3
3
 
4
4
  MAJOR = 0
5
5
  MINOR = 2
6
- TINY = 5
6
+ TINY = 6
7
7
 
8
8
  def self.to_s # :nodoc:
9
9
  [MAJOR, MINOR, TINY].join('.')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kelredd-useful
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kelly Redding
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-06 00:00:00 -06:00
12
+ date: 2009-12-28 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -64,6 +64,7 @@ files:
64
64
  - lib/useful/ruby_extensions.rb
65
65
  - lib/useful/ruby_extensions_with_activesupport.rb
66
66
  - lib/useful/shoulda_macros/test_unit/classes.rb
67
+ - lib/useful/shoulda_macros/test_unit/context.rb
67
68
  - lib/useful/shoulda_macros/test_unit/files.rb
68
69
  - lib/useful/shoulda_macros/test_unit.rb
69
70
  - lib/useful/version.rb