ress 0.0.10 → 0.0.11

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6c318fe59869403d3f4de60b3e4bff51ab749474
4
+ data.tar.gz: cbdb2c88c2c6a278030c7903c8f62924216d230b
5
+ SHA512:
6
+ metadata.gz: 162eb07b10ed86e3d0197aef9bff189547b02c9fa396cd3f5c2f84207679dbfb5ef734be93d26b02f7da6d57e9c34cc209af9a8ed556c108e63a5f1a01cca1e2
7
+ data.tar.gz: 1fadb3291adaf6317cd70cf585e50c33b0c8288fb2221ca2d801dc3ada7c953bbe348388e82c1d118b78f2eddbad4cab178637f8d4434625b693e03ee7e29b64
@@ -1,3 +1,3 @@
1
1
  module Ress
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
3
3
  end
@@ -2,8 +2,10 @@ module Ress
2
2
 
3
3
  module ViewHelpers
4
4
 
5
- def ress_annotation_tags
6
- path = "#{request.host_with_port}#{request.fullpath}"
5
+ def ress_annotation_tags(options={})
6
+ fullpath = options[:fullpath] || request.fullpath
7
+
8
+ path = "#{request.host_with_port}#{fullpath}"
7
9
  html = if canonical_request?
8
10
  path.gsub!("#{request.subdomain}.", '') if Ress.replace_canonical_subdomain?
9
11
  Ress.alternate_versions.map do |category|
@@ -62,6 +62,16 @@ describe ActionView::Base do
62
62
 
63
63
  end
64
64
 
65
+ context 'with fullpath argument' do
66
+ let(:request) { stub('request', :protocol => 'http://', :host_with_port => 'foo.com', :fullpath => '/bar', :subdomain => '') }
67
+ before { view.stub(:canonical_request? => true) }
68
+
69
+ it 'gerenates the link tags using the fullpath argument instead' do
70
+ view.ress_annotation_tags(:fullpath => '/notbar').should ==
71
+ "<link href=\"http://m.foo.com/notbar\" id=\"m\" media=\"stuff\" rel=\"alternate\" />"
72
+ end
73
+ end
74
+
65
75
  end
66
76
 
67
77
  end
metadata CHANGED
@@ -1,48 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ress
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
5
- prerelease:
4
+ version: 0.0.11
6
5
  platform: ruby
7
6
  authors:
8
7
  - Matthew Robertson
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-02-26 00:00:00.000000000 Z
11
+ date: 2013-04-19 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: actionpack
16
- prerelease: false
17
15
  requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
21
19
  version: '3.0'
22
- none: false
23
20
  type: :runtime
21
+ prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
23
  requirements:
26
24
  - - ~>
27
25
  - !ruby/object:Gem::Version
28
26
  version: '3.0'
29
- none: false
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rspec
32
- prerelease: false
33
29
  requirement: !ruby/object:Gem::Requirement
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
- none: false
39
34
  type: :development
35
+ prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
37
  requirements:
42
- - - ! '>='
38
+ - - '>='
43
39
  - !ruby/object:Gem::Version
44
40
  version: '0'
45
- none: false
46
41
  description: Progressively enhance the mobile user experience of your Rails application.
47
42
  email:
48
43
  - matthewrobertson03@gmail.com
@@ -80,27 +75,26 @@ files:
80
75
  - vendor/assets/javascripts/ress_modernizr_build.js
81
76
  homepage: https://github.com/matthewrobertson/ress
82
77
  licenses: []
78
+ metadata: {}
83
79
  post_install_message:
84
80
  rdoc_options: []
85
81
  require_paths:
86
82
  - lib
87
83
  required_ruby_version: !ruby/object:Gem::Requirement
88
84
  requirements:
89
- - - ! '>='
85
+ - - '>='
90
86
  - !ruby/object:Gem::Version
91
87
  version: '0'
92
- none: false
93
88
  required_rubygems_version: !ruby/object:Gem::Requirement
94
89
  requirements:
95
- - - ! '>='
90
+ - - '>='
96
91
  - !ruby/object:Gem::Version
97
92
  version: '0'
98
- none: false
99
93
  requirements: []
100
94
  rubyforge_project:
101
- rubygems_version: 1.8.24
95
+ rubygems_version: 2.0.3
102
96
  signing_key:
103
- specification_version: 3
97
+ specification_version: 4
104
98
  summary: Progressively enhance the mobile user experience of your Rails application.
105
99
  test_files:
106
100
  - spec/ress/alternate_version_spec.rb