gauges-rails 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 01cd7a6daacd86ae4371ff97c57d93aa995b190c
4
+ data.tar.gz: 0f906a0d1e21280acca6077f34f3f62ba1d972e1
5
+ SHA512:
6
+ metadata.gz: f3d1aa424fb30bad46ed9923e3925c5063dfa66aa91f5c847b7ef731839bdd52201980257387346cfc9a79b6f7ba2d4aad152578deb9f979a9ad85aca7ce277c
7
+ data.tar.gz: a088c23a1328ecf1af8b8f5f2e70880711cbba4fe31d5a0d41d33cdd42b9c18029ff46359cbb02f0900da2c71ca5be20367fcce20e143b423618543710b629c4
@@ -0,0 +1,5 @@
1
+ language: ruby
2
+ script: bundle exec rspec
3
+ rvm:
4
+ - 1.9.2
5
+ - 1.9.3
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## Gauges::Rails 0.2.2
4
+
5
+ * Add support for Rails 4.
6
+
7
+
3
8
  ## Gauges::Rails 0.2.1
4
9
 
5
10
  * Ensure `gauges.js` is added to the list of assets to be precompiled.
@@ -14,7 +19,7 @@
14
19
 
15
20
  ## Gauges::Rails 0.0.1
16
21
 
17
- * Initial release by [Jason Coene][tyler].
22
+ * Initial release by [Jason Coene][jason].
18
23
 
19
24
 
20
25
  [jason]: http://github.com/jcoene
data/README.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Gauges::Rails
2
2
 
3
+ [![Build Status][travis-image]][travis]
4
+
5
+ [travis]: http://travis-ci.org/tylerhunt/gauges-rails
6
+ [travis-image]: https://secure.travis-ci.org/tylerhunt/gauges-rails.png
7
+
3
8
  A Rails engine to add [Gauges][] tracking code to Rails apps.
4
9
 
5
10
  [gauges]: http://gaug.es/
@@ -45,6 +50,12 @@ can add it to the bottom of your `app/assets/javascripts/application.js` file:
45
50
 
46
51
  //= require gauges
47
52
 
53
+ If you'd only like the tracking code to be included in the production
54
+ environment, create a file like `app/assets/javascripts/tracking.js.erb` with
55
+ the following:
56
+
57
+ <% require_asset 'gauges' if Rails.env.production? %>
58
+
48
59
 
49
60
  ## Contributing
50
61
 
@@ -1,20 +1,19 @@
1
- # -*- encoding: utf-8 -*-
2
- require File.expand_path('../lib/gauges/rails/version', __FILE__)
1
+ require './lib/gauges/rails/version'
3
2
 
4
3
  Gem::Specification.new do |gem|
5
- gem.authors = ['Tyler Hunt']
6
- gem.email = ['tyler@tylerhunt.com']
7
- gem.description = %q{An engine to add Gauges tracking code to Rails apps.}
8
- gem.summary = %q{An engine to add Gauges tracking code to Rails apps.}
9
- gem.homepage = 'http://github.com/tylerhunt/gauges-rails'
4
+ gem.name = 'gauges-rails'
5
+ gem.version = Gauges::Rails::VERSION
6
+ gem.author = 'Tyler Hunt'
7
+ gem.summary = 'An engine to add Gauges tracking code to Rails apps.'
8
+ gem.homepage = 'http://github.com/tylerhunt/gauges-rails'
10
9
 
11
- gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
12
- gem.files = `git ls-files`.split("\n")
13
- gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
14
- gem.name = 'gauges-rails'
15
- gem.require_paths = ['lib']
16
- gem.version = Gauges::Rails::VERSION
10
+ gem.required_ruby_version = '>= 1.9'
17
11
 
18
- gem.add_dependency 'rails', '~> 3.1'
12
+ gem.add_dependency 'rails', '> 3.1'
19
13
  gem.add_development_dependency 'rspec', '~> 2.0'
14
+
15
+ gem.files = `git ls-files`.split($\)
16
+ gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
17
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
+ gem.require_paths = ['lib']
20
19
  end
@@ -1,5 +1,5 @@
1
1
  module Gauges
2
2
  module Rails
3
- VERSION = '0.2.1'
3
+ VERSION = '0.2.2'
4
4
  end
5
5
  end
@@ -6,7 +6,7 @@ describe Gauges::Rails::Engine do
6
6
  subject { described_class }
7
7
 
8
8
  context 'configuration' do
9
- subject { GaugesRailsTestApp.config.gauges }
9
+ subject { Rails.application.config.gauges }
10
10
 
11
11
  it { should be_a(ActiveSupport::OrderedOptions) }
12
12
 
@@ -20,12 +20,12 @@ describe Gauges::Rails::Engine do
20
20
  end
21
21
  end
22
22
 
23
- describe 'assets' do
23
+ context 'assets' do
24
24
  include Rack::Test::Methods
25
25
 
26
- let(:app) { GaugesRailsTestApp }
26
+ let(:app) { Rails.application }
27
27
 
28
- before { GaugesRailsTestApp.config.gauges.site_id = site_id }
28
+ before { app.config.gauges.site_id = site_id }
29
29
 
30
30
  it 'interpolates the site_id' do
31
31
  get '/assets/gauges.js'
@@ -5,16 +5,14 @@ require 'sprockets/railtie'
5
5
 
6
6
  require 'gauges/rails'
7
7
 
8
- GaugesRailsTestApp = Class.new(Rails::Application) do
8
+ Rails.application = Class.new(Rails::Application) do
9
9
  config.active_support.deprecation = :stderr
10
10
  config.secret_token = SecureRandom.uuid
11
11
  config.logger = Logger.new('/dev/null')
12
12
 
13
13
  config.assets.enabled = true
14
- config.assets.cache_store = [:memory_store, :size => 1.megabyte]
15
- end
16
-
17
- GaugesRailsTestApp.initialize!
18
- GaugesRailsTestApp.routes.clear!
14
+ config.assets.cache_store = :memory_store, { size: 1.megabyte }
19
15
 
20
- Rails.application = GaugesRailsTestApp
16
+ initialize!
17
+ routes.clear!
18
+ end
metadata CHANGED
@@ -1,47 +1,52 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gauges-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
5
- prerelease:
4
+ version: 0.2.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Tyler Hunt
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-03-29 00:00:00.000000000 Z
11
+ date: 2014-10-03 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rails
16
- requirement: &70130931786800 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
- - - ~>
17
+ - - ">"
20
18
  - !ruby/object:Gem::Version
21
19
  version: '3.1'
22
20
  type: :runtime
23
21
  prerelease: false
24
- version_requirements: *70130931786800
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.1'
25
27
  - !ruby/object:Gem::Dependency
26
28
  name: rspec
27
- requirement: &70130931786300 !ruby/object:Gem::Requirement
28
- none: false
29
+ requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
- - - ~>
31
+ - - "~>"
31
32
  - !ruby/object:Gem::Version
32
33
  version: '2.0'
33
34
  type: :development
34
35
  prerelease: false
35
- version_requirements: *70130931786300
36
- description: An engine to add Gauges tracking code to Rails apps.
37
- email:
38
- - tyler@tylerhunt.com
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.0'
41
+ description:
42
+ email:
39
43
  executables: []
40
44
  extensions: []
41
45
  extra_rdoc_files: []
42
46
  files:
43
- - .gitignore
44
- - .rspec
47
+ - ".gitignore"
48
+ - ".rspec"
49
+ - ".travis.yml"
45
50
  - CHANGELOG.md
46
51
  - Gemfile
47
52
  - LICENSE
@@ -52,33 +57,32 @@ files:
52
57
  - lib/gauges/rails.rb
53
58
  - lib/gauges/rails/engine.rb
54
59
  - lib/gauges/rails/version.rb
55
- - spec/gauges-rails_spec.rb
60
+ - spec/gauges/rails/engine_spec.rb
56
61
  - spec/spec_helper.rb
57
62
  - vendor/assets/javascripts/gauges.js.erb
58
63
  homepage: http://github.com/tylerhunt/gauges-rails
59
64
  licenses: []
65
+ metadata: {}
60
66
  post_install_message:
61
67
  rdoc_options: []
62
68
  require_paths:
63
69
  - lib
64
70
  required_ruby_version: !ruby/object:Gem::Requirement
65
- none: false
66
71
  requirements:
67
- - - ! '>='
72
+ - - ">="
68
73
  - !ruby/object:Gem::Version
69
- version: '0'
74
+ version: '1.9'
70
75
  required_rubygems_version: !ruby/object:Gem::Requirement
71
- none: false
72
76
  requirements:
73
- - - ! '>='
77
+ - - ">="
74
78
  - !ruby/object:Gem::Version
75
79
  version: '0'
76
80
  requirements: []
77
81
  rubyforge_project:
78
- rubygems_version: 1.8.6
82
+ rubygems_version: 2.2.2
79
83
  signing_key:
80
- specification_version: 3
84
+ specification_version: 4
81
85
  summary: An engine to add Gauges tracking code to Rails apps.
82
86
  test_files:
83
- - spec/gauges-rails_spec.rb
87
+ - spec/gauges/rails/engine_spec.rb
84
88
  - spec/spec_helper.rb