Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dependencies #402

Merged
merged 10 commits into from
Mar 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

source "https://rubygems.org"

is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)

gem "sqlite3", :platform => [:ruby, :mswin, :mingw]
gem "jruby-openssl", :platform => :jruby
gem "activerecord-jdbcsqlite3-adapter", :platform => :jruby
Expand All @@ -11,7 +13,24 @@ gem "racc", :platform => :rbx
gem "minitest", :platform => :rbx
gem "rubinius-developer_tools", :platform => :rbx
gem "rails", "4.2.3"
gem 'byebug'
gem 'rspec-rails', '~> 3.4'
gem 'rake'

gemspec
gem 'oj', '~> 2.12.14' unless is_jruby
gem 'sidekiq', '>= 2.13.0' if RUBY_VERSION != '1.8.7'

if RUBY_VERSION.start_with?('1.9')
gem 'sucker_punch', '~> 1.0'
elsif RUBY_VERSION.start_with?('2')
gem 'sucker_punch', '~> 2.0'
end

gem 'sinatra'
gem 'resque'
gem 'delayed_job', :require => false
gem 'redis'
gem 'database_cleaner', '~> 1.0.0'
gem 'girl_friday', '>= 0.11.1'
gem 'generator_spec'

gemspec
21 changes: 20 additions & 1 deletion gemfiles/rails30.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

source 'https://rubygems.org'

is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)

gem 'sqlite3', :platform => [:ruby, :mswin, :mingw]
gem 'jruby-openssl', :platform => :jruby
gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
Expand All @@ -13,8 +15,25 @@ gem 'rubysl-test-unit', :platform => :rbx
gem 'rubinius-developer_tools', :platform => :rbx
gem 'rails', '3.0.20'
gem 'hitimes', '< 1.2.2'

gem 'rake', '< 11'
gem 'rspec-rails', '>= 2.14.0'
gem 'celluloid', '< 0.17.0' if RUBY_VERSION == '1.9.2'

gem 'oj', '~> 2.12.14' unless is_jruby
gem 'sidekiq', '>= 2.13.0' if RUBY_VERSION != '1.8.7'

if RUBY_VERSION.start_with?('1.9')
gem 'sucker_punch', '~> 1.0'
elsif RUBY_VERSION.start_with?('2')
gem 'sucker_punch', '~> 2.0'
end

gem 'sinatra'
gem 'resque'
gem 'delayed_job', :require => false
gem 'redis'
gem 'database_cleaner', '~> 1.0.0'
gem 'genspec', '>= 0.2.8'
gem 'girl_friday', '>= 0.11.1'

gemspec :path => '../'
21 changes: 21 additions & 0 deletions gemfiles/rails31.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

source "https://rubygems.org"

is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)

gem "sqlite3", :platform => [:ruby, :mswin, :mingw]
gem "jruby-openssl", :platform => :jruby
gem "activerecord-jdbcsqlite3-adapter", :platform => :jruby
Expand All @@ -12,5 +14,24 @@ gem "minitest", :platform => :rbx
gem "rubysl-test-unit", :platform => :rbx
gem "rubinius-developer_tools", :platform => :rbx
gem "rails", "3.1.12"
gem 'rspec-rails', '~> 3.4'
gem 'rake'

gem 'oj', '~> 2.12.14' unless is_jruby
gem 'sidekiq', '>= 2.13.0' if RUBY_VERSION != '1.8.7'

if RUBY_VERSION.start_with?('1.9')
gem 'sucker_punch'
elsif RUBY_VERSION.start_with?('2')
gem 'sucker_punch'
end

gem 'sinatra'
gem 'resque'
gem 'delayed_job', :require => false
gem 'redis'
gem 'database_cleaner'
gem 'girl_friday'
gem 'generator_spec'

gemspec :path => "../"
22 changes: 22 additions & 0 deletions gemfiles/rails32.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

source "https://rubygems.org"

is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)

gem "test-unit" # Please see https://github.com/rspec/rspec-rails/issues/1273
gem "sqlite3", :platform => [:ruby, :mswin, :mingw]
gem "jruby-openssl", :platform => :jruby
Expand All @@ -13,5 +15,25 @@ gem "minitest", :platform => :rbx
gem "rubysl-test-unit", :platform => :rbx
gem "rubinius-developer_tools", :platform => :rbx
gem "rails", "3.2.22"
gem 'rspec-rails', '~> 3.4'
gem 'rake'

gem 'oj', '~> 2.12.14' unless is_jruby
gem 'sidekiq', '>= 2.13.0' if RUBY_VERSION != '1.8.7'

if RUBY_VERSION.start_with?('1.9')
gem 'sucker_punch', '~> 1.0'
elsif RUBY_VERSION.start_with?('2')
gem 'sucker_punch', '~> 2.0'
end

gem 'sinatra'
gem 'resque'
gem 'delayed_job', :require => false
gem 'redis'

gem 'database_cleaner', '~> 1.0.0'
gem 'girl_friday', '>= 0.11.1'
gem 'generator_spec'

gemspec :path => "../"
22 changes: 22 additions & 0 deletions gemfiles/rails40.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

source "https://rubygems.org"

is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)

gem "test-unit" # Please see https://github.com/rspec/rspec-rails/issues/1273
gem "sqlite3", :platform => [:ruby, :mswin, :mingw]
gem "jruby-openssl", :platform => :jruby
Expand All @@ -13,5 +15,25 @@ gem "minitest", :platform => :rbx
gem "rubysl-test-unit", :platform => :rbx
gem "rubinius-developer_tools", :platform => :rbx
gem "rails", "4.0.13"
gem 'rspec-rails', '~> 3.4'
gem 'rake'

gem 'oj', '~> 2.12.14' unless is_jruby
gem 'sidekiq', '>= 2.13.0' if RUBY_VERSION != '1.8.7'

if RUBY_VERSION.start_with?('1.9')
gem 'sucker_punch', '~> 1.0'
elsif RUBY_VERSION.start_with?('2')
gem 'sucker_punch', '~> 2.0'
end

gem 'sinatra'
gem 'resque'
gem 'delayed_job', :require => false
gem 'redis'

gem 'database_cleaner', '~> 1.0.0'
gem 'girl_friday', '>= 0.11.1'
gem 'generator_spec'

gemspec :path => "../"
22 changes: 22 additions & 0 deletions gemfiles/rails41.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

source "https://rubygems.org"

is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)

gem "sqlite3", :platform => [:ruby, :mswin, :mingw]
gem "jruby-openssl", :platform => :jruby
gem "activerecord-jdbcsqlite3-adapter", :platform => :jruby
Expand All @@ -11,5 +13,25 @@ gem "racc", :platform => :rbx
gem "minitest", :platform => :rbx
gem "rubinius-developer_tools", :platform => :rbx
gem "rails", "4.1.12"
gem 'rspec-rails', '~> 3.4'
gem 'rake'

gem 'oj', '~> 2.12.14' unless is_jruby
gem 'sidekiq', '>= 2.13.0' if RUBY_VERSION != '1.8.7'

if RUBY_VERSION.start_with?('1.9')
gem 'sucker_punch', '~> 1.0'
elsif RUBY_VERSION.start_with?('2')
gem 'sucker_punch', '~> 2.0'
end

gem 'sinatra'
gem 'resque'
gem 'delayed_job', :require => false
gem 'redis'

gem 'database_cleaner', '~> 1.0.0'
gem 'girl_friday', '>= 0.11.1'
gem 'generator_spec'

gemspec :path => "../"
21 changes: 21 additions & 0 deletions gemfiles/rails42.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

source "https://rubygems.org"

is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)

gem "sqlite3", :platform => [:ruby, :mswin, :mingw]
gem "jruby-openssl", :platform => :jruby
gem "activerecord-jdbcsqlite3-adapter", :platform => :jruby
Expand All @@ -11,5 +13,24 @@ gem "racc", :platform => :rbx
gem "minitest", :platform => :rbx
gem "rubinius-developer_tools", :platform => :rbx
gem "rails", "4.2.3"
gem 'rspec-rails', '~> 3.4'
gem 'rake'

gem 'oj', '~> 2.12.14' unless is_jruby
gem 'sidekiq', '>= 2.13.0' if RUBY_VERSION != '1.8.7'

if RUBY_VERSION.start_with?('1.9')
gem 'sucker_punch', '~> 1.0'
elsif RUBY_VERSION.start_with?('2')
gem 'sucker_punch', '~> 2.0'
end

gem 'sinatra'
gem 'resque'
gem 'delayed_job', :require => false
gem 'redis'
gem 'database_cleaner', '~> 1.0.0'
gem 'girl_friday', '>= 0.11.1'
gem 'generator_spec'

gemspec :path => "../"
1 change: 1 addition & 0 deletions lib/generators/rollbar/rollbar_generator.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require 'rails/generators'
require 'rails/generators/named_base'
require 'generators/rollbar/rollbar_generator'

module Rollbar
module Generators
Expand Down
21 changes: 1 addition & 20 deletions rollbar.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,5 @@ Gem::Specification.new do |gem|
gem.require_paths = ["lib"]
gem.version = Rollbar::VERSION

gem.add_development_dependency 'rails', '>= 3.0.0'
gem.add_development_dependency 'rspec-rails', '>= 2.14.0'
gem.add_development_dependency 'database_cleaner', '~> 1.0.0'
gem.add_development_dependency 'girl_friday', '>= 0.11.1'

if RUBY_VERSION.start_with?('1.9')
gem.add_development_dependency 'sucker_punch', '~> 1.0'
elsif RUBY_VERSION.start_with?('2')
gem.add_development_dependency 'sucker_punch', '~> 2.0'
end

gem.add_development_dependency 'sidekiq', '>= 2.13.0' if RUBY_VERSION != '1.8.7'
gem.add_development_dependency 'genspec', '>= 0.2.8'
gem.add_development_dependency 'sinatra'
gem.add_development_dependency 'resque'
gem.add_development_dependency 'delayed_job'
gem.add_development_dependency 'rake', '< 11'
gem.add_development_dependency 'redis'
gem.add_runtime_dependency 'multi_json'
gem.add_development_dependency 'oj', '~> 2.12.14' unless is_jruby
gem.add_runtime_dependency 'multi_json'
end
2 changes: 1 addition & 1 deletion spec/controllers/home_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@
sent_params = Rollbar.last_report[:request][:params]['upload']

expect(sent_params).to be_kind_of(Array)
expect(sent_params).to have(2).items
expect(sent_params.size).to be(2)
end
end
end
Expand Down
31 changes: 31 additions & 0 deletions spec/generators/rollbar/rollbar_generator_rails30_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
require 'spec_helper'

begin
require 'genspec'
rescue LoadError
end

require 'generators/rollbar/rollbar_generator'

describe :rollbar do
context "with no arguments" do
it "outputs a help message" do
subject.should output(/You'll need to add an environment variable ROLLBAR_ACCESS_TOKEN with your access token/)
end

it "generates a Rollbar initializer with ENV" do
subject.should generate("config/initializers/rollbar.rb") { |content|
content.should =~ /config.access_token = ENV\['ROLLBAR_ACCESS_TOKEN'\]/
}
end
end

with_args 'aaaabbbbccccddddeeeeffff00001111' do
it "generates a Rollbar initializer with access token" do
subject.should generate("config/initializers/rollbar.rb") do |content|
content.should =~ /aaaabbbbccccddddeeeeffff00001111/
content.should =~ /config.access_token = 'aaaabbbbccccddddeeeeffff00001111'/
end
end
end
end if Rails::VERSION::STRING.start_with?('3.0')
55 changes: 41 additions & 14 deletions spec/generators/rollbar/rollbar_generator_spec.rb
Original file line number Diff line number Diff line change
@@ -1,24 +1,51 @@
require 'spec_helper'

describe :rollbar do
context "with no arguments" do
it "outputs a help message" do
subject.should output(/You'll need to add an environment variable ROLLBAR_ACCESS_TOKEN with your access token/)
begin
require 'generator_spec'
rescue LoadError
end

require 'generators/rollbar/rollbar_generator'

describe Rollbar::Generators::RollbarGenerator, :type => :generator do
destination File.expand_path('../../../tmp', __FILE__)

before { prepare_destination }

context 'with no arguments' do
before do
run_generator
end

it "generates a Rollbar initializer with ENV" do
subject.should generate("config/initializers/rollbar.rb") { |content|
content.should =~ /config.access_token = ENV\['ROLLBAR_ACCESS_TOKEN'\]/
it 'outputs a help message and generates Rollbar initializer with ENV' do
expect(destination_root).to have_structure {
directory 'config' do
directory 'initializers' do
file 'rollbar.rb' do
contains "config.access_token = ENV\['ROLLBAR_ACCESS_TOKEN'\]"
end
end
end
}
end
end

with_args 'aaaabbbbccccddddeeeeffff00001111' do
it "generates a Rollbar initializer with access token" do
subject.should generate("config/initializers/rollbar.rb") do |content|
content.should =~ /aaaabbbbccccddddeeeeffff00001111/
content.should =~ /config.access_token = 'aaaabbbbccccddddeeeeffff00001111'/
end
context 'with arguments' do
before do
run_generator(%w(aaaabbbbccccddddeeeeffff00001111))
end

it 'generates a Rollbar initializer with access token' do
expect(destination_root).to have_structure {
directory 'config' do
directory 'initializers' do
file 'rollbar.rb' do
contains 'aaaabbbbccccddddeeeeffff00001111'
contains "config.access_token = 'aaaabbbbccccddddeeeeffff00001111'"
end
end
end
}
end
end
end
end unless Rails::VERSION::STRING.start_with?('3.0')
2 changes: 2 additions & 0 deletions spec/rollbar/active_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ def perform(exception, job_id)
end
end

before { reconfigure_notifier }

let(:exception) { StandardError.new('oh no') }
let(:job_id) { "123" }

Expand Down
Loading