vanity 2.2.10 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/test.yml +55 -0
  3. data/Appraisals +24 -20
  4. data/CHANGELOG +19 -1
  5. data/Gemfile +2 -1
  6. data/Gemfile.lock +23 -15
  7. data/README.md +14 -16
  8. data/gemfiles/rails42.gemfile +6 -6
  9. data/gemfiles/rails42.gemfile.lock +95 -86
  10. data/gemfiles/rails42_protected_attributes.gemfile +6 -6
  11. data/gemfiles/rails42_protected_attributes.gemfile.lock +90 -81
  12. data/gemfiles/{rails5.gemfile → rails51.gemfile} +6 -6
  13. data/gemfiles/rails51.gemfile.lock +285 -0
  14. data/gemfiles/{rails41.gemfile → rails52.gemfile} +6 -6
  15. data/gemfiles/rails52.gemfile.lock +295 -0
  16. data/gemfiles/{rails32.gemfile → rails60.gemfile} +6 -9
  17. data/gemfiles/rails60.gemfile.lock +293 -0
  18. data/gemfiles/rails61.gemfile +33 -0
  19. data/gemfiles/rails61.gemfile.lock +293 -0
  20. data/lib/generators/templates/{add_participants_unique_index_migration.rb → add_participants_unique_index_migration.rb.erb} +1 -1
  21. data/lib/generators/templates/{add_unique_indexes_migration.rb → add_unique_indexes_migration.rb.erb} +1 -1
  22. data/lib/generators/templates/{vanity_migration.rb → vanity_migration.rb.erb} +1 -1
  23. data/lib/generators/vanity/migration_generator.rb +34 -0
  24. data/lib/vanity/adapters/active_record_adapter.rb +1 -1
  25. data/lib/vanity/adapters/redis_adapter.rb +20 -20
  26. data/lib/vanity/commands/report.rb +4 -3
  27. data/lib/vanity/configuration.rb +4 -0
  28. data/lib/vanity/experiment/ab_test.rb +16 -11
  29. data/lib/vanity/frameworks/rails.rb +20 -9
  30. data/lib/vanity/locales/vanity.ru.yml +50 -0
  31. data/lib/vanity/templates/_experiment.erb +3 -3
  32. data/lib/vanity/templates/_experiments.erb +1 -1
  33. data/lib/vanity/templates/_metrics.erb +1 -1
  34. data/lib/vanity/templates/_report.erb +2 -2
  35. data/lib/vanity/version.rb +1 -1
  36. data/test/adapters/redis_adapter_test.rb +8 -12
  37. data/test/adapters/shared_tests.rb +7 -6
  38. data/test/commands/report_test.rb +13 -1
  39. data/test/configuration_test.rb +15 -2
  40. data/test/dummy/app/mailers/vanity_mailer.rb +3 -1
  41. data/test/dummy/config/initializers/secret_token.rb +5 -2
  42. data/test/dummy/config/routes.rb +17 -3
  43. data/test/experiment/ab_test.rb +43 -3
  44. data/test/frameworks/rails/action_controller_test.rb +12 -6
  45. data/test/frameworks/rails/action_mailer_test.rb +0 -1
  46. data/test/metric/active_record_test.rb +8 -2
  47. data/test/playground_test.rb +0 -1
  48. data/test/test_helper.rb +57 -10
  49. data/test/web/rails/dashboard_test.rb +19 -10
  50. data/vanity.gemspec +1 -1
  51. metadata +20 -21
  52. data/.travis.yml +0 -33
  53. data/gemfiles/rails32.gemfile.lock +0 -242
  54. data/gemfiles/rails41.gemfile.lock +0 -230
  55. data/gemfiles/rails5.gemfile.lock +0 -256
  56. data/lib/generators/vanity/add_participants_unique_index_generator.rb +0 -15
  57. data/lib/generators/vanity/add_unique_indexes_generator.rb +0 -15
  58. 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