sprig 0.1.6 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +61 -10
  3. data/lib/generators/sprig/install_generator.rb +5 -1
  4. data/lib/sprig.rb +21 -0
  5. data/lib/sprig/configuration.rb +19 -2
  6. data/lib/sprig/directive.rb +3 -3
  7. data/lib/sprig/helpers.rb +15 -3
  8. data/lib/sprig/planter.rb +1 -1
  9. data/lib/sprig/process_notifier.rb +4 -4
  10. data/lib/sprig/seed/attribute.rb +27 -3
  11. data/lib/sprig/seed/entry.rb +8 -4
  12. data/lib/sprig/seed/factory.rb +1 -1
  13. data/lib/sprig/source.rb +10 -1
  14. data/lib/sprig/version.rb +8 -1
  15. data/spec/adapters/active_record.rb +34 -0
  16. data/spec/adapters/mongoid.rb +19 -0
  17. data/spec/adapters/mongoid.yml +12 -0
  18. data/spec/feature/configurations_spec.rb +5 -5
  19. data/spec/fixtures/models/{comment.rb → active_record/comment.rb} +0 -0
  20. data/spec/fixtures/models/{post.rb → active_record/post.rb} +0 -0
  21. data/spec/fixtures/models/{tag.rb → active_record/tag.rb} +0 -0
  22. data/spec/fixtures/models/{user.rb → active_record/user.rb} +0 -0
  23. data/spec/fixtures/models/mongoid/comment.rb +9 -0
  24. data/spec/fixtures/models/mongoid/post.rb +18 -0
  25. data/spec/fixtures/models/mongoid/tag.rb +7 -0
  26. data/spec/fixtures/models/mongoid/user.rb +9 -0
  27. data/spec/fixtures/seeds/shared/comments.yml +4 -0
  28. data/spec/fixtures/seeds/shared/files/cat.png +0 -0
  29. data/spec/fixtures/seeds/shared/invalid_users.yml +4 -0
  30. data/spec/fixtures/seeds/shared/legacy_posts.yml +4 -0
  31. data/spec/fixtures/seeds/shared/posts.csv +2 -0
  32. data/spec/fixtures/seeds/shared/posts.json +1 -0
  33. data/spec/fixtures/seeds/shared/posts.md +5 -0
  34. data/spec/fixtures/seeds/shared/posts.yml +4 -0
  35. data/spec/fixtures/seeds/shared/posts_delete_existing_by.yml +7 -0
  36. data/spec/fixtures/seeds/shared/posts_find_existing_by_missing.yml +7 -0
  37. data/spec/fixtures/seeds/shared/posts_find_existing_by_multiple.yml +8 -0
  38. data/spec/fixtures/seeds/shared/posts_find_existing_by_single.yml +7 -0
  39. data/spec/fixtures/seeds/shared/posts_missing_dependency.yml +5 -0
  40. data/spec/fixtures/seeds/shared/posts_missing_record.yml +5 -0
  41. data/spec/fixtures/seeds/shared/posts_partially_dynamic_value.yml +4 -0
  42. data/spec/fixtures/seeds/shared/posts_with_cyclic_dependencies.yml +4 -0
  43. data/spec/fixtures/seeds/shared/posts_with_files.yml +5 -0
  44. data/spec/fixtures/seeds/shared/posts_with_habtm.yml +7 -0
  45. data/spec/fixtures/seeds/shared/tags.yml +5 -0
  46. data/spec/fixtures/seeds/test/posts_partially_dynamic_value.yml +4 -0
  47. data/spec/lib/generators/sprig/install_generator_spec.rb +6 -2
  48. data/spec/lib/sprig/configuration_spec.rb +6 -6
  49. data/spec/lib/sprig/directive_list_spec.rb +4 -4
  50. data/spec/lib/sprig/directive_spec.rb +21 -11
  51. data/spec/lib/sprig/null_record_spec.rb +2 -2
  52. data/spec/lib/sprig/parser/base_spec.rb +1 -1
  53. data/spec/lib/sprig/process_notifier_spec.rb +5 -3
  54. data/spec/lib/sprig/seed/entry_spec.rb +3 -3
  55. data/spec/lib/sprig/seed/record_spec.rb +3 -3
  56. data/spec/lib/sprig/source_spec.rb +2 -2
  57. data/spec/lib/sprig_spec.rb +59 -8
  58. data/spec/spec_helper.rb +35 -31
  59. data/spec/sprig_shared_spec.rb +467 -0
  60. data/spec/sprig_spec.rb +105 -34
  61. data/spec/support/helpers/logger_mock.rb +2 -1
  62. metadata +167 -87
  63. data/lib/sprig/data.rb +0 -6
  64. data/spec/db/activerecord.db +0 -0
data/lib/sprig/data.rb DELETED
@@ -1,6 +0,0 @@
1
- module Sprig
2
- module Data
3
- autoload :Source, 'sprig/data/source'
4
- autoload :Parser, 'sprig/data/parser'
5
- end
6
- end
Binary file