chartkick-remote 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d897dcbb67069a41ddad76a8828a6aa6e2fc8dda
4
- data.tar.gz: dce74b0b5ec1594c91fbe7f342c41847b58bea7e
3
+ metadata.gz: f62de3197e504384abee0a6924079146d4b734b7
4
+ data.tar.gz: 3979b523887355d1355dbc8a48ac48f8d4ae73c0
5
5
  SHA512:
6
- metadata.gz: 44d17923ceec8eaefeda18d35c763284426a9d58c67e718a002894857942727dc2108315ec24d0a63f76f32e5af9c8976867ed1bd3418ec2ff5a57b07d48d8c2
7
- data.tar.gz: bff84fea3c14c40c9a29c1de7b30dedd699eaae154cd3cf3fc2ebdc49b63e2fa778fdfb47817b54847ac7ed5f55542e687cb14bb8b2f3d8408aad58526aa5768
6
+ metadata.gz: b075258310c45e7add0d99f46cc2787334f44320731f6c8c72cbe6978094a4b8a9ef219a0e7e7c6ae2707d964d969bc96c2ba1ad6cd45a7472509d77d9bb456c
7
+ data.tar.gz: 172daff997bc036a8f9258e142080994c2798cf7e4e42671ae1c498fbca04fab2ed71a191bfe252e73b58d52a87e1e9f59f9f80f82793cd278461a94f1511277
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Chartkick Remote [![Gem Version](https://badge.fury.io/rb/chartkick-remote.svg)](http://badge.fury.io/rb/chartkick-remote) [![Travis CI Status](https://travis-ci.org/dontfidget/chartkick-remote.png?branch=master)](https://travis-ci.org/dontfidget/chartkick-remote) [![Code Climate](https://codeclimate.com/github/dontfidget/chartkick-remote.png)](https://codeclimate.com/github/dontfidget/chartkick-remote) [![Code Climate](https://codeclimate.com/github/dontfidget/chartkick-remote/coverage.png)](https://codeclimate.com/github/dontfidget/chartkick-remote) [![Dependency Status](https://gemnasium.com/dontfidget/chartkick-remote.svg)](https://gemnasium.com/dontfidget/chartkick-remote)
1
+ # Chartkick Remote [![Gem Version](https://badge.fury.io/rb/chartkick-remote.svg)](http://badge.fury.io/rb/chartkick-remote) [![Travis CI Status](https://travis-ci.org/ashanbrown/chartkick-remote.png?branch=master)](https://travis-ci.org/ashanbrown/chartkick-remote) [![Code Climate](https://codeclimate.com/github/ashanbrown/chartkick-remote.png)](https://codeclimate.com/github/ashanbrown/chartkick-remote) [![Code Climate](https://codeclimate.com/github/ashanbrown/chartkick-remote/coverage.png)](https://codeclimate.com/github/ashanbrown/chartkick-remote) [![Dependency Status](https://gemnasium.com/ashanbrown/chartkick-remote.svg)](https://gemnasium.com/ashanbrown/chartkick-remote)
2
2
 
3
3
  ## Usage
4
4
 
@@ -77,7 +77,7 @@ If you include this javascript in this gist on your page, you can then specify t
77
77
  $.ajaxSetup({queue: true, queueMaxConcurrency: 2});
78
78
  ```
79
79
 
80
- This script is based on @maccman's jquery.ajax.queue.coffee script provides a basic queueing transport layer for ajax requests which I've modified to provide an option to set the maximum number of requests that can be made in parallel. You can see the modifications with a link to the original at https://gist.github.com/dontfidget/1ad9ab33971b64fe6fef.
80
+ This script is based on @maccman's jquery.ajax.queue.coffee script provides a basic queueing transport layer for ajax requests which I've modified to provide an option to set the maximum number of requests that can be made in parallel. You can see the modifications with a link to the original at https://gist.github.com/ashanbrown/1ad9ab33971b64fe6fef.
81
81
 
82
82
  ## Standalone Mode (for debugging)
83
83
 
@@ -30,4 +30,5 @@ Gem::Specification.new do |spec|
30
30
  spec.add_development_dependency "travis-lint", '~> 1.8'
31
31
  spec.add_development_dependency "codeclimate-test-reporter", '~> 0.3'
32
32
  spec.add_development_dependency "rspec-html-matchers", '~> 0.6.1', '>= 0.6.1'
33
+ spec.add_development_dependency "responders", '~> 2.0'
33
34
  end
@@ -1,5 +1,5 @@
1
1
  module Chartkick
2
2
  module Remote
3
- VERSION = "1.2.0"
3
+ VERSION = "1.3.0"
4
4
  end
5
5
  end
@@ -1,31 +1,39 @@
1
1
  require 'spec_helper'
2
2
  require 'chartkick/remote'
3
3
 
4
- AnonymousRoutes = ActionDispatch::Routing::RouteSet.new.tap do |routes|
5
- routes.draw { resources :anonymous }
6
- end
7
-
8
4
  describe Chartkick::Remote, type: :controller do
9
5
  render_views
10
6
 
11
- AnonymousController = Class.new(ActionController::Base) do
7
+ anonymous_routes = ActionDispatch::Routing::RouteSet.new.tap do |routes|
8
+ routes.draw { resources :anonymous }
9
+ end
10
+
11
+ anonymous_controller = Class.new(ActionController::Base) do
12
12
  include Chartkick::Remote
13
13
 
14
14
  prepend_view_path 'spec/controllers/views'
15
15
 
16
- include AnonymousRoutes.url_helpers
17
- helper AnonymousRoutes.url_helpers
16
+ include anonymous_routes.url_helpers
17
+ helper anonymous_routes.url_helpers
18
18
 
19
19
  def index
20
20
  end
21
+
22
+ def self.controller_name
23
+ 'anonymous'
24
+ end
25
+
26
+ def self.controller_path
27
+ 'anonymous'
28
+ end
21
29
  end
22
30
 
23
- controller AnonymousController do
31
+ controller anonymous_controller do
24
32
  chartkick_remote
25
33
  end
26
34
 
27
35
  describe "GET" do
28
- routes { AnonymousRoutes }
36
+ routes { anonymous_routes }
29
37
 
30
38
  it "generates a remote data source" do
31
39
  get :index, format: :html
@@ -38,7 +46,7 @@ describe Chartkick::Remote, type: :controller do
38
46
  end
39
47
 
40
48
  describe "when the standalone option is set" do
41
- controller AnonymousController do
49
+ controller anonymous_controller do
42
50
  chartkick_remote standalone: true
43
51
  end
44
52
 
@@ -1,22 +1,22 @@
1
1
  require 'spec_helper'
2
2
  require 'chartkick/remote'
3
3
 
4
- AnonymousRoutes = ActionDispatch::Routing::RouteSet.new.tap do |routes|
5
- routes.draw { resources :anonymous }
6
- end
7
-
8
4
  describe Chartkick::Remote::Helper, type: :helper do
5
+ anonymous_routes = ActionDispatch::Routing::RouteSet.new.tap do |routes|
6
+ routes.draw { resources :anonymous }
7
+ end
8
+
9
9
  describe "when the standalone option is set" do
10
10
  it "includes a link to the standalone version of the chart" do
11
11
 
12
12
  @controller.singleton_class.class_eval do
13
13
  include Chartkick::Remote
14
- include AnonymousRoutes.url_helpers
14
+ include anonymous_routes.url_helpers
15
15
  chartkick_remote
16
16
  end
17
17
 
18
18
  helper.singleton_class.class_eval do
19
- include AnonymousRoutes.url_helpers
19
+ include anonymous_routes.url_helpers
20
20
  end
21
21
 
22
22
  @controller.params.merge!(
@@ -3,6 +3,7 @@ CodeClimate::TestReporter.start
3
3
 
4
4
  require 'active_support'
5
5
  require 'action_view'
6
+ require 'responders'
6
7
  require 'action_controller'
7
8
  require 'rails/engine'
8
9
  require 'rspec/rails'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chartkick-remote
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew S. Brown
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-25 00:00:00.000000000 Z
11
+ date: 2015-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chartkick
@@ -156,6 +156,20 @@ dependencies:
156
156
  - - ">="
157
157
  - !ruby/object:Gem::Version
158
158
  version: 0.6.1
159
+ - !ruby/object:Gem::Dependency
160
+ name: responders
161
+ requirement: !ruby/object:Gem::Requirement
162
+ requirements:
163
+ - - "~>"
164
+ - !ruby/object:Gem::Version
165
+ version: '2.0'
166
+ type: :development
167
+ prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - "~>"
171
+ - !ruby/object:Gem::Version
172
+ version: '2.0'
159
173
  description: Automatically generate remote json for chartkick
160
174
  email:
161
175
  - andrew@dontfidget.com
@@ -200,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
200
214
  version: '0'
201
215
  requirements: []
202
216
  rubyforge_project:
203
- rubygems_version: 2.2.2
217
+ rubygems_version: 2.4.6
204
218
  signing_key:
205
219
  specification_version: 4
206
220
  summary: Automatically generate remote json for chartkick
@@ -209,4 +223,3 @@ test_files:
209
223
  - spec/controllers/views/anonymous/index.html.erb
210
224
  - spec/helpers/helper_spec.rb
211
225
  - spec/spec_helper.rb
212
- has_rdoc: