rack-pjax 0.7.0 → 0.8.0

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: 927c2e1d3706487855121c27bb43d2c375973099
4
+ data.tar.gz: dddef9075c3027cd2954e3c641c5e89815eb1da0
5
+ SHA512:
6
+ metadata.gz: 7ff099b40e2cd8481980c1aca85798363c0e04c0890f84fc699c572143d767c5335aac185145cc60f3af328120ae603682bf74e12f229c1a441839460cfdfffc
7
+ data.tar.gz: 3eb3b07acd0f6822bc05923042cb337d80f643fcc84bbde89860a878b7d87f613c3a989b0fad8ce1b8ab2d397ce30c3ad7208691fbb33ac6c1ce251d891bd5d6
data/Gemfile CHANGED
@@ -5,6 +5,6 @@ gem 'rake'
5
5
  gemspec
6
6
 
7
7
  group :test do
8
- gem "rspec", ">2"
8
+ gem "rspec", "~> 2.99"
9
9
  gem "rack-test", :require => "rack/test"
10
10
  end
data/README.md CHANGED
@@ -8,7 +8,7 @@ It does this by stripping the generated body; only the title and inner-html of t
8
8
  While this won't save you any time rendering the page, it gives you more flexibility where and how to define the pjax-container.
9
9
  Ryan Bates featured [rack-pjax on Railscasts](http://railscasts.com/episodes/294-playing-with-pjax) and explains how this gem compares to [pjax_rails](https://github.com/rails/pjax_rails).
10
10
 
11
- [![railscast](http://railscasts.com/assets/railscasts_logo-1eeafbafc2154fc5340c0a9800f402fd.png)](http://railscasts.com/)
11
+ [![railscast](http://railscasts.com/assets/railscasts_logo-7101a7cd0a48292a0c07276981855edb.png)](http://railscasts.com/)
12
12
 
13
13
  Installation
14
14
  ------------
@@ -17,47 +17,49 @@ Check out the [Railscasts' notes](http://railscasts.com/episodes/294-playing-wit
17
17
 
18
18
  You can find the source from the screencast over [here](https://github.com/ryanb/railscasts-episodes/tree/master/episode-294).
19
19
 
20
- Another sample-app: the original [pjax-demo](http://pjax.heroku.com/) but with rack-pjax onboard can be found in the [sample-app](https://github.com/eval/rack-pjax/tree/sample-app) branch.
20
+ Another sample-app: the original [pjax-demo](http://pjax.herokuapp.com/) but with rack-pjax onboard can be found in the [sample-app](https://github.com/eval/rack-pjax/tree/sample-app) branch.
21
21
 
22
22
  The more generic installation comes down to:
23
23
 
24
24
  I. Add the gem to your Gemfile
25
25
 
26
26
  ```ruby
27
- # Gemfile
28
- gem "rack-pjax"
27
+ # Gemfile
28
+ gem "rack-pjax"
29
29
  ```
30
30
 
31
31
  II. Include **rack-pjax** as middleware to your application(-stack)
32
32
 
33
33
  ```ruby
34
- # config.ru
35
- require ::File.expand_path('../config/environment', __FILE__)
36
- use Rack::Pjax
37
- run RackApp::Application
34
+ # config.ru
35
+ require ::File.expand_path('../config/environment', __FILE__)
36
+ use Rack::Pjax
37
+ run RackApp::Application
38
38
  ```
39
39
 
40
40
  III. Install [jquery-pjax](https://github.com/defunkt/jquery-pjax). Make sure to add the 'data-pjax-container'-attribute to the container.
41
41
 
42
42
  ```html
43
- <head>
44
- ...
45
- <script src="/javascripts/jquery.js"></script>
46
- <script src="/javascripts/jquery.pjax.js"></script>
47
- <script type="text/javascript">
48
- $(function(){
49
- $('a:not([data-remote]):not([data-behavior]):not([data-skip-pjax])').pjax('[data-pjax-container]')
50
- })
51
- </script>
52
- ...
53
- </head>
54
- <body>
55
- <div data-pjax-container>
56
- ...
57
- </div>
58
- </body>
43
+ <head>
44
+ ...
45
+ <script src="/javascripts/jquery.js"></script>
46
+ <script src="/javascripts/jquery.pjax.js"></script>
47
+ <script type="text/javascript">
48
+ $(function(){
49
+ $(document).pjax('a', '[data-pjax-container]')
50
+ })
51
+ </script>
52
+ ...
53
+ </head>
54
+ <body>
55
+ <div data-pjax-container>
56
+ ...
57
+ </div>
58
+ </body>
59
59
  ```
60
60
 
61
+ (For more see [the docs of jquery-pjax](https://github.com/defunkt/jquery-pjax#usage).)
62
+
61
63
  IV. Fire up your [pushState-enabled browser](http://caniuse.com/#search=pushstate) and enjoy!
62
64
 
63
65
 
@@ -35,7 +35,7 @@ module Rack
35
35
  body.close if body.respond_to?(:close)
36
36
 
37
37
  headers['Content-Length'] &&= bytesize(new_body).to_s
38
- headers['X-PJAX-URL'] = Rack::Request.new(env).fullpath
38
+ headers['X-PJAX-URL'] ||= Rack::Request.new(env).fullpath
39
39
 
40
40
  [status, headers, [new_body]]
41
41
  end
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  class Pjax
3
- VERSION = "0.7.0"
3
+ VERSION = "0.8.0"
4
4
  end
5
5
  end
@@ -18,6 +18,10 @@ Gem::Specification.new do |s|
18
18
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
19
  s.require_paths = ["lib"]
20
20
 
21
- s.add_dependency('rack', '~>1.3')
22
- s.add_dependency('nokogiri', '~>1.5')
21
+ s.add_dependency('rack', '~> 1.1')
22
+ if RUBY_VERSION < "1.9.2"
23
+ s.add_dependency('nokogiri', '~> 1.5', '< 1.5.11')
24
+ else
25
+ s.add_dependency('nokogiri', '~> 1.5')
26
+ end
23
27
  end
metadata CHANGED
@@ -1,46 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-pjax
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
5
- prerelease:
4
+ version: 0.8.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Gert Goet
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-01-08 00:00:00.000000000 Z
11
+ date: 2014-08-15 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rack
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
- version: '1.3'
19
+ version: '1.1'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: '1.3'
26
+ version: '1.1'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: nokogiri
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ~>
31
+ - - "~>"
36
32
  - !ruby/object:Gem::Version
37
33
  version: '1.5'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ~>
38
+ - - "~>"
44
39
  - !ruby/object:Gem::Version
45
40
  version: '1.5'
46
41
  description: Serve pjax responses through rack middleware
@@ -50,8 +45,8 @@ executables: []
50
45
  extensions: []
51
46
  extra_rdoc_files: []
52
47
  files:
53
- - .gitignore
54
- - .travis.yml
48
+ - ".gitignore"
49
+ - ".travis.yml"
55
50
  - Gemfile
56
51
  - LICENSE
57
52
  - README.md
@@ -65,33 +60,26 @@ files:
65
60
  - spec/spec_helper.rb
66
61
  homepage: https://github.com/eval/rack-pjax
67
62
  licenses: []
63
+ metadata: {}
68
64
  post_install_message:
69
65
  rdoc_options: []
70
66
  require_paths:
71
67
  - lib
72
68
  required_ruby_version: !ruby/object:Gem::Requirement
73
- none: false
74
69
  requirements:
75
- - - ! '>='
70
+ - - ">="
76
71
  - !ruby/object:Gem::Version
77
72
  version: '0'
78
- segments:
79
- - 0
80
- hash: 2691976653533347282
81
73
  required_rubygems_version: !ruby/object:Gem::Requirement
82
- none: false
83
74
  requirements:
84
- - - ! '>='
75
+ - - ">="
85
76
  - !ruby/object:Gem::Version
86
77
  version: '0'
87
- segments:
88
- - 0
89
- hash: 2691976653533347282
90
78
  requirements: []
91
79
  rubyforge_project: rack-pjax
92
- rubygems_version: 1.8.23
80
+ rubygems_version: 2.4.0
93
81
  signing_key:
94
- specification_version: 3
82
+ specification_version: 4
95
83
  summary: Serve pjax responses through rack middleware
96
84
  test_files:
97
85
  - spec/rack/pjax_spec.rb