vanity 2.2.10 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/test.yml +55 -0
- data/Appraisals +24 -20
- data/CHANGELOG +19 -1
- data/Gemfile +2 -1
- data/Gemfile.lock +23 -15
- data/README.md +14 -16
- data/gemfiles/rails42.gemfile +6 -6
- data/gemfiles/rails42.gemfile.lock +95 -86
- data/gemfiles/rails42_protected_attributes.gemfile +6 -6
- data/gemfiles/rails42_protected_attributes.gemfile.lock +90 -81
- data/gemfiles/{rails5.gemfile → rails51.gemfile} +6 -6
- data/gemfiles/rails51.gemfile.lock +285 -0
- data/gemfiles/{rails41.gemfile → rails52.gemfile} +6 -6
- data/gemfiles/rails52.gemfile.lock +295 -0
- data/gemfiles/{rails32.gemfile → rails60.gemfile} +6 -9
- data/gemfiles/rails60.gemfile.lock +293 -0
- data/gemfiles/rails61.gemfile +33 -0
- data/gemfiles/rails61.gemfile.lock +293 -0
- data/lib/generators/templates/{add_participants_unique_index_migration.rb → add_participants_unique_index_migration.rb.erb} +1 -1
- data/lib/generators/templates/{add_unique_indexes_migration.rb → add_unique_indexes_migration.rb.erb} +1 -1
- data/lib/generators/templates/{vanity_migration.rb → vanity_migration.rb.erb} +1 -1
- data/lib/generators/vanity/migration_generator.rb +34 -0
- data/lib/vanity/adapters/active_record_adapter.rb +1 -1
- data/lib/vanity/adapters/redis_adapter.rb +20 -20
- data/lib/vanity/commands/report.rb +4 -3
- data/lib/vanity/configuration.rb +4 -0
- data/lib/vanity/experiment/ab_test.rb +16 -11
- data/lib/vanity/frameworks/rails.rb +20 -9
- data/lib/vanity/locales/vanity.ru.yml +50 -0
- data/lib/vanity/templates/_experiment.erb +3 -3
- data/lib/vanity/templates/_experiments.erb +1 -1
- data/lib/vanity/templates/_metrics.erb +1 -1
- data/lib/vanity/templates/_report.erb +2 -2
- data/lib/vanity/version.rb +1 -1
- data/test/adapters/redis_adapter_test.rb +8 -12
- data/test/adapters/shared_tests.rb +7 -6
- data/test/commands/report_test.rb +13 -1
- data/test/configuration_test.rb +15 -2
- data/test/dummy/app/mailers/vanity_mailer.rb +3 -1
- data/test/dummy/config/initializers/secret_token.rb +5 -2
- data/test/dummy/config/routes.rb +17 -3
- data/test/experiment/ab_test.rb +43 -3
- data/test/frameworks/rails/action_controller_test.rb +12 -6
- data/test/frameworks/rails/action_mailer_test.rb +0 -1
- data/test/metric/active_record_test.rb +8 -2
- data/test/playground_test.rb +0 -1
- data/test/test_helper.rb +57 -10
- data/test/web/rails/dashboard_test.rb +19 -10
- data/vanity.gemspec +1 -1
- metadata +20 -21
- data/.travis.yml +0 -33
- data/gemfiles/rails32.gemfile.lock +0 -242
- data/gemfiles/rails41.gemfile.lock +0 -230
- data/gemfiles/rails5.gemfile.lock +0 -256
- data/lib/generators/vanity/add_participants_unique_index_generator.rb +0 -15
- data/lib/generators/vanity/add_unique_indexes_generator.rb +0 -15
- data/lib/generators/vanity_generator.rb +0 -15
@@ -1,15 +0,0 @@
|
|
1
|
-
require 'rails/generators'
|
2
|
-
require 'rails/generators/migration'
|
3
|
-
|
4
|
-
class Vanity::AddParticipantsUniqueIndexGenerator < Rails::Generators::Base
|
5
|
-
include Rails::Generators::Migration
|
6
|
-
source_root File.expand_path('../../templates', __FILE__)
|
7
|
-
|
8
|
-
def self.next_migration_number(path)
|
9
|
-
Time.now.utc.strftime("%Y%m%d%H%M%S")
|
10
|
-
end
|
11
|
-
|
12
|
-
def create_model_file
|
13
|
-
migration_template "add_participants_unique_index_migration.rb", "db/migrate/add_participants_unique_index_migration.rb"
|
14
|
-
end
|
15
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
require 'rails/generators'
|
2
|
-
require 'rails/generators/migration'
|
3
|
-
|
4
|
-
class Vanity::AddUniqueIndexesGenerator < Rails::Generators::Base
|
5
|
-
include Rails::Generators::Migration
|
6
|
-
source_root File.expand_path('../../templates', __FILE__)
|
7
|
-
|
8
|
-
def self.next_migration_number(path)
|
9
|
-
Time.now.utc.strftime("%Y%m%d%H%M%S")
|
10
|
-
end
|
11
|
-
|
12
|
-
def create_model_file
|
13
|
-
migration_template "add_unique_indexes_migration.rb", "db/migrate/add_vanity_unique_indexes.rb"
|
14
|
-
end
|
15
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
require 'rails/generators'
|
2
|
-
require 'rails/generators/migration'
|
3
|
-
|
4
|
-
class VanityGenerator < Rails::Generators::Base
|
5
|
-
include Rails::Generators::Migration
|
6
|
-
source_root File.expand_path('../templates', __FILE__)
|
7
|
-
|
8
|
-
def self.next_migration_number(path)
|
9
|
-
Time.now.utc.strftime("%Y%m%d%H%M%S")
|
10
|
-
end
|
11
|
-
|
12
|
-
def create_model_file
|
13
|
-
migration_template "vanity_migration.rb", "db/migrate/vanity_migration.rb"
|
14
|
-
end
|
15
|
-
end
|