abtest 0.1.0 → 0.1.1

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: 6331e113d728b7db1c33dd3c38553a2f5b80aa04
4
- data.tar.gz: b5ba910b88d1c944e5ba21d5e7bb7743aa5a912f
3
+ metadata.gz: b76fd3aa3e67f2c931c384ea24ae109740d09715
4
+ data.tar.gz: b587aeb01025a20f0073aa6a87508c763e88c114
5
5
  SHA512:
6
- metadata.gz: 80abb467bd94788bf7e8ad62727316848fdb5d9352631f1506b03852036e2f2ae8518a3d54e7b38f2d92384bf4b03393df70b68db50d549ac181ecd9675384fa
7
- data.tar.gz: 5e9f506462f630269220d00b96f12a5534df271806fc43173da004c743c9fba5ed10cbba2578816a541a179a3b4bb960b0a016742cc07b3329c8abe9fc6e4910
6
+ metadata.gz: a59a614787f5ab31e0211b957e8e7eadb038e65514fbf83751ee515eed58bbb3bb3c99af516a2a2da2ea087f1ab1117586ffdc4b8c8f93c320cb9002260701c0
7
+ data.tar.gz: cc662a3e230bd40e3bd19bbdc891b0fb4c1b795a53bf8628393fe60bc7345fcf0f6f2aaf327a8378301b4c1455196f59a3ef1a8023a240bd330b42da7a215937
data/Gemfile CHANGED
@@ -2,3 +2,10 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in abtest.gemspec
4
4
  gemspec
5
+
6
+ gem 'byebug'
7
+ # Use SCSS for stylesheets
8
+ gem 'sass-rails', '~> 4.0.0'
9
+
10
+ # Use Uglifier as compressor for JavaScript assets
11
+ gem 'uglifier', '>= 1.3.0'
@@ -19,6 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_dependency "rails"
22
+ spec.add_dependency 'sass-rails'
22
23
 
23
24
  spec.add_development_dependency "bundler", "~> 1.3"
24
25
  spec.add_development_dependency "rake"
@@ -34,7 +34,7 @@ module Abtest
34
34
  end
35
35
 
36
36
  # Monkey patch class in-place with sass_config accessor
37
- experiment_environment.context_class.extend(Sass::Rails::Railtie::SassContext)
37
+ experiment_environment.context_class.extend(::Sass::Rails::Railtie::SassContext)
38
38
 
39
39
  # Always calculate digests and compile files
40
40
  app.config.assets.digest = true
@@ -11,7 +11,7 @@ module Abtest
11
11
 
12
12
  def define
13
13
  namespace :abtest do
14
- desc "Compile all the assets named in config.assets.precompile"
14
+ desc "Compile application.css and application.js in our experiment directories as well as anything called out in config.abtest.precompile_assets."
15
15
  task :precompile => :environment do
16
16
  configured_experiments = app.config.abtest.registered_tests
17
17
 
@@ -22,6 +22,8 @@ module Abtest
22
22
 
23
23
  # Add our experiments asset path
24
24
  assets << lambda {|filename, path| path =~ /#{name}\/assets/ && !%w(.js .css).include?(File.extname(filename))}
25
+ assets << lambda {|filename, path| path =~ /#{name}\/assets/ && %w(application.js application.css).include?(filename)}
26
+ assets << lambda {|filename, path| path =~ /#{name}\/assets/ && app.config.abtest.precompile_assets.include?(filename)}
25
27
 
26
28
  with_logger do
27
29
  manifest.compile(assets)
@@ -1,3 +1,3 @@
1
1
  module Abtest
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: abtest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Saarinen
@@ -25,6 +25,20 @@ dependencies:
25
25
  - - '>='
26
26
  - !ruby/object:Gem::Version
27
27
  version: '0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: sass-rails
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - '>='
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - '>='
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
28
42
  - !ruby/object:Gem::Dependency
29
43
  name: bundler
30
44
  requirement: !ruby/object:Gem::Requirement