ammeter 1.1.1 → 1.1.2

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: 5ca6302a39acf11feaf4ba8a22bcba28402d841c
4
- data.tar.gz: 03c39f82a6bf5cdf102dfe20adec75e092bf5bc9
3
+ metadata.gz: 7a15e1595dc23477cee95c4f7e815238c59be77b
4
+ data.tar.gz: bd903e9447a95611b53a7d15f29b58c810309ec8
5
5
  SHA512:
6
- metadata.gz: 1f76eddb2fda86bc36f0ab60cf5eea848f9b2cfb5ab5673d699e3f398127599f4783ec35f8aefb773004161bc01abbe1c686f3f181da815ab88889e03e0be5c1
7
- data.tar.gz: ce477ea8f9e05a7c111c85d9cf3f5a22b2743782edf333f90474e85cb52883beb076e2db13d8154cbe3879362331d626de7ada71774e27b4ad6a90fca9585e37
6
+ metadata.gz: 8bfb2ce3d1e364af1be88d2d8d63656fac3222ccc81cbb5ec1da0e9485b4da31ccad75b8047f3a439839b9f18285f897365c188ebd5fb4854d8b695b319318c0
7
+ data.tar.gz: 69d2fbe00c5ab63057c64a6020108d67d70f2215e61e7b361fc653d0198aeeee900ed81f8f4404faac4599fbbf11af5127ec243d5ef536d7ed9e6b385c1732e1
@@ -1,21 +1,27 @@
1
- script: "bundle exec rake ci"
1
+ language: ruby
2
+
2
3
  rvm:
3
- - ruby-head
4
- - 2.1.1
4
+ - 1.8.7
5
+ - 2.1.2
5
6
  - 2.0.0
6
7
  - 1.9.3
7
- - 1.8.7
8
+ - ruby-head
8
9
  - jruby-head
9
10
  - jruby-19mode
10
11
  - rbx-19mode
12
+
11
13
  env:
12
14
  - RSPEC_VERSION=master
13
- - RSPEC_VERSION=2.99.0.beta2
14
- - RSPEC_VERSION=2.14
15
+ - RSPEC_VERSION='~> 3.0.0'
16
+ - RSPEC_VERSION='~> 2.99.0'
17
+ - RSPEC_VERSION='~> 2.14.0'
18
+
19
+ bundler_args: "--retry=3 --jobs=3"
20
+
21
+ script: "bundle exec rake ci --trace"
22
+
15
23
  matrix:
16
24
  allow_failures:
17
- - rvm: 1.8.7
18
- - rvm: 1.9.3
19
25
  - rvm: ruby-head
20
26
  - rvm: jruby-head
21
27
  - rvm: jruby-19mode
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  source "http://rubygems.org"
2
2
 
3
3
  rspec_version = ENV['RSPEC_VERSION']
4
- rspec_major_version = (rspec_version && rspec_version != 'master') ? rspec_version.split('.')[0] : '3'
4
+ rspec_major_version = (rspec_version && rspec_version != 'master') ? rspec_version.scan(/\d+/).first : '3'
5
5
 
6
6
  if rspec_version == 'master'
7
7
  gem "rspec-rails", :git => 'git://github.com/rspec/rspec-rails.git'
@@ -16,9 +16,8 @@ else
16
16
  gem 'rspec', rspec_version
17
17
  end
18
18
 
19
- case rspec_major_version
20
- when '2'
21
- # rspec 2.x does not support Rails 4.1+
19
+ if rspec_major_version == '2' || RUBY_VERSION.to_f < 1.9
20
+ # rspec 2.x does not support Rails 4.1+ nor does Ruby 1.8.7
22
21
  gem 'rails', '~> 3.2'
23
22
  gem 'uglifier', '~> 1.2.4'
24
23
  gem 'rake', '~> 0.9.2.2'
@@ -26,7 +25,8 @@ when '2'
26
25
  gem 'sass-rails', '~> 3.2'
27
26
  gem 'jquery-rails', '~> 2.0'
28
27
  gem 'haml-rails', '~> 0.4'
29
- when '3'
28
+ gem 'execjs', '~> 2.0.0'
29
+ elsif rspec_major_version == '3'
30
30
  gem 'rails', '>= 4.0'
31
31
  gem 'uglifier', '>= 1.3'
32
32
  gem 'rake', '>= 0.10'
data/Rakefile CHANGED
@@ -45,9 +45,9 @@ namespace :generate do
45
45
  sh "bundle exec rails new ./tmp/example_app -m 'features/templates/generate_example_app.rb' --skip-test-unit"
46
46
  sh "cp 'features/templates/rspec.rake' ./tmp/example_app/lib/tasks"
47
47
  Dir.chdir("./tmp/example_app/") do
48
+ Bundler.clean_system 'bundle install'
48
49
  Bundler.clean_system 'rake db:migrate'
49
50
  Bundler.clean_system 'rails g rspec:install'
50
- Bundler.clean_system 'bundle install'
51
51
  end
52
52
  end
53
53
 
@@ -56,9 +56,12 @@ Feature: generator spec
56
56
  subject { file('public/my_dir/awesome.html') }
57
57
  it 'can run a reverse migration' do
58
58
  FileUtils.mkdir_p(File.dirname(subject))
59
- File.write(subject, "test file")
59
+ # File.write is not in 1.8.7 use File.open
60
+ File.open(subject, 'w') do |f|
61
+ f.write "test file"
62
+ end
60
63
  expect(subject).to exist
61
- run_generator %w(my_dir --someone Alex), behavior: :revoke
64
+ run_generator %w(my_dir --someone Alex), :behavior => :revoke
62
65
  expect(subject).not_to exist
63
66
  end
64
67
  end
@@ -25,7 +25,7 @@ def copy_to_aruba_from(gem_or_app_name)
25
25
  }
26
26
 
27
27
  rspec_version = ENV['RSPEC_VERSION']
28
- rspec_major_version = (rspec_version && rspec_version != 'master') ? rspec_version.split('.')[0] : '3'
28
+ rspec_major_version = (rspec_version && rspec_version != 'master') ? rspec_version.scan(/\d+/).first : '3'
29
29
 
30
30
  Dir["tmp/#{gem_or_app_name}/*"].each do |file_or_dir|
31
31
  if !(file_or_dir =~ /\/spec$/)
@@ -1,2 +1,21 @@
1
- gem 'rspec-rails'#, '>=3.0.0.beta2'
1
+ rspec_version = ENV['RSPEC_VERSION']
2
+ rspec_major_version = (rspec_version && rspec_version != 'master') ? rspec_version.scan(/\d+/).first : '3'
3
+
4
+ if rspec_version == 'master'
5
+ gem "rspec-rails", :git => 'git://github.com/rspec/rspec-rails.git'
6
+ gem "rspec", :git => 'git://github.com/rspec/rspec.git'
7
+ gem "rspec-core", :git => 'git://github.com/rspec/rspec-core.git'
8
+ gem "rspec-expectations", :git => 'git://github.com/rspec/rspec-expectations.git'
9
+ gem "rspec-mocks", :git => 'git://github.com/rspec/rspec-mocks.git'
10
+ gem "rspec-collection_matchers", :git => 'git://github.com/rspec/rspec-collection_matchers.git'
11
+ gem "rspec-support", :git => 'git://github.com/rspec/rspec-support.git'
12
+ else
13
+ gem 'rspec-rails', rspec_version
14
+ gem 'rspec', rspec_version
15
+ end
16
+
2
17
  gem 'ammeter', :path=>'../..'
18
+ if defined?(Rails) && Rails::VERSION::STRING.to_f < 4
19
+ # Execjs is causing problems on 1.8.7
20
+ gem 'execjs', '~> 2.0.0'
21
+ end
@@ -1,7 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  rspec_version = ENV['RSPEC_VERSION']
4
- rspec_major_version = (rspec_version && rspec_version != 'master') ? rspec_version.split('.')[0] : '3'
4
+ rspec_major_version = (rspec_version && rspec_version != 'master') ? rspec_version.scan(/\d+/).first : '3'
5
5
 
6
6
  if rspec_version == 'master'
7
7
  gem "rspec-rails", :git => 'git://github.com/rspec/rspec-rails.git'
@@ -16,10 +16,11 @@ else
16
16
  gem 'rspec', rspec_version
17
17
  end
18
18
 
19
- case rspec_major_version
20
- when '2'
21
- gem 'rails', '~> 3.2'
22
- when '3'
19
+ if rspec_major_version == '2' || RUBY_VERSION.to_f < 1.9
20
+ gem 'rails', '~> 3.2.0'
21
+ # Execjs is causing problems on 1.8.7
22
+ gem 'execjs', '~> 2.0.0'
23
+ elsif rspec_major_version == '3'
23
24
  gem 'rails', '>= 4.1'
24
25
  else
25
26
  raise "rspec version #{rspec_version} is not supported"
@@ -30,4 +31,4 @@ end
30
31
  gemspec
31
32
 
32
33
  # we cannot add a development dependency with a path to my_gem.gemspec
33
- gem 'ammeter', :path => '../..'
34
+ gem 'ammeter', :path => '../..'
@@ -1,7 +1,10 @@
1
1
  require 'bundler/setup'
2
2
  require 'rails/all'
3
- # This prevents 'uninitialized constant Jquery::Rails::Railtie::PROTOTYPE_JS (NameError)'
4
- require 'jquery/rails'
3
+ begin
4
+ # This prevents 'uninitialized constant Jquery::Rails::Railtie::PROTOTYPE_JS (NameError)'
5
+ require 'jquery/rails'
6
+ rescue LoadError
7
+ end
5
8
 
6
9
  module MyRailsGem
7
10
  module TestApp
@@ -1,7 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  rspec_version = ENV['RSPEC_VERSION']
4
- rspec_major_version = (rspec_version && rspec_version != 'master') ? rspec_version.split('.')[0] : '3'
4
+ rspec_major_version = (rspec_version && rspec_version != 'master') ? rspec_version.scan(/\d+/).first : '3'
5
5
 
6
6
  if rspec_version == 'master'
7
7
  gem "rspec-rails", :git => 'git://github.com/rspec/rspec-rails.git'
@@ -16,10 +16,11 @@ else
16
16
  gem 'rspec', rspec_version
17
17
  end
18
18
 
19
- case rspec_major_version
20
- when '2'
21
- gem 'railties', '~> 3.2'
22
- when '3'
19
+ if rspec_major_version == '2' || RUBY_VERSION.to_f < 1.9
20
+ gem 'railties', '~> 3.2.0'
21
+ # Execjs is causing problems on 1.8.7
22
+ #gem 'execjs', '~> 2.0.0'
23
+ elsif rspec_major_version == '3'
23
24
  gem 'railties', '>= 4.1'
24
25
  else
25
26
  raise "rspec version #{rspec_version} is not supported"
@@ -30,4 +31,4 @@ end
30
31
  gemspec
31
32
 
32
33
  # we cannot add a development dependency with a path to my_gem.gemspec
33
- gem 'ammeter', :path => '../..'
34
+ gem 'ammeter', :path => '../..'
@@ -30,7 +30,7 @@ RSpec::Matchers.define :have_correct_syntax do
30
30
  require 'ostruct'
31
31
 
32
32
  begin
33
- view = ActionView::Template::Handlers::ERB.call(OpenStruct.new(source: code))
33
+ view = ActionView::Template::Handlers::ERB.call(OpenStruct.new(:source => code))
34
34
  eval('__crash_me__; ' + view)
35
35
  rescue SyntaxError
36
36
  false
@@ -1,3 +1,3 @@
1
1
  module Ammeter
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.2"
3
3
  end
@@ -1,7 +1,7 @@
1
1
  require 'rails/all'
2
2
  require 'rspec/rails'
3
3
 
4
- ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:"
4
+ ActiveRecord::Base.establish_connection :adapter => "sqlite3", :database => ":memory:"
5
5
 
6
6
  module TestApp
7
7
  class Application < Rails::Application
@@ -22,4 +22,4 @@ end
22
22
 
23
23
  def stub_file(filename, content)
24
24
  allow(File).to receive(:read).with(filename).and_return(content)
25
- end
25
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ammeter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Rothenberg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-21 00:00:00.000000000 Z
11
+ date: 2014-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties