cockroach 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. data/.rvmrc +1 -0
  2. data/Gemfile +28 -0
  3. data/LICENSE.txt +22 -0
  4. data/README.md +124 -0
  5. data/Rakefile +37 -0
  6. data/VERSION +1 -0
  7. data/cockroach.gemspec +96 -0
  8. data/lib/cockroach.rb +43 -0
  9. data/lib/cockroach/base/load_nodes.rb +38 -0
  10. data/lib/cockroach/base/node.rb +192 -0
  11. data/lib/cockroach/base/node_structure.rb +11 -0
  12. data/lib/cockroach/config.rb +54 -0
  13. data/lib/cockroach/config/loader.rb +35 -0
  14. data/lib/cockroach/fixtures/factory_girl.rb +4 -0
  15. data/lib/cockroach/fixtures/factory_girl/loader.rb +43 -0
  16. data/lib/cockroach/fixtures/factory_girl/node.rb +51 -0
  17. data/lib/cockroach/fixtures/factory_girl/profiler.rb +34 -0
  18. data/lib/cockroach/railtie.rb +7 -0
  19. data/lib/cockroach/source.rb +40 -0
  20. data/lib/cockroach/source/model.rb +33 -0
  21. data/lib/cockroach/source/node.rb +27 -0
  22. data/lib/cockroach/version.rb +3 -0
  23. data/lib/generators/cockroach/install_generator.rb +20 -0
  24. data/lib/generators/cockroach/templates/cockroach.rb +8 -0
  25. data/lib/generators/cockroach/templates/faker.yml +16 -0
  26. data/lib/tasks/faker.rake +35 -0
  27. data/test/config/config_test.rb +129 -0
  28. data/test/config/loader_test.rb +42 -0
  29. data/test/fixturers/factory_girl/aliasing_test.rb +151 -0
  30. data/test/fixturers/factory_girl/loading_test.rb +45 -0
  31. data/test/fixturers/factory_girl/node_test.rb +386 -0
  32. data/test/fixturers/factory_girl/profiler_test.rb +124 -0
  33. data/test/fixturers/source_test.rb +153 -0
  34. data/test/generators/install_generator_test.rb +14 -0
  35. data/test/support/active_record.rb +11 -0
  36. data/test/support/data/correct_with_option.yml +13 -0
  37. data/test/support/data/correct_without_option.yml +10 -0
  38. data/test/support/data/dummy_structure/config/faker.yml +13 -0
  39. data/test/support/data/dummy_structure/config/user_only.yml +1 -0
  40. data/test/support/data/dummy_structure/config/witness.yml +6 -0
  41. data/test/support/data/dummy_structure/test/factories/user_factory.rb +16 -0
  42. data/test/support/database_cleaner.rb +13 -0
  43. data/test/support/factory_girl_mocked.rb +32 -0
  44. data/test/support/models/user.rb +23 -0
  45. data/test/test_helper.rb +26 -0
  46. metadata +151 -0
@@ -0,0 +1,26 @@
1
+ require 'bundler'
2
+ require 'test/unit'
3
+ require "shoulda-context"
4
+ require 'ruby-debug'
5
+ require 'rails'
6
+
7
+ Bundler.setup(:default, :test)
8
+
9
+ ENV["RAILS_ENV"] = "test"
10
+
11
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
12
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
13
+ $LOAD_PATH << File.join(File.dirname(__FILE__), 'support', 'models')
14
+ require 'cockroach'
15
+
16
+ require "rails/test_help"
17
+ require "rails/generators/test_case"
18
+
19
+ require File.expand_path("support/active_record", File.dirname(__FILE__))
20
+ require File.expand_path("support/database_cleaner", File.dirname(__FILE__))
21
+ require File.expand_path("support/factory_girl_mocked", File.dirname(__FILE__))
22
+
23
+ class Test::Unit::TestCase
24
+ include OrmSetup
25
+ include ::FactoryGirl::Mock
26
+ end
metadata ADDED
@@ -0,0 +1,151 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cockroach
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - E-Max
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-10-12 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: activerecord
16
+ requirement: &80791620 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *80791620
25
+ - !ruby/object:Gem::Dependency
26
+ name: activesupport
27
+ requirement: &80790920 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *80790920
36
+ - !ruby/object:Gem::Dependency
37
+ name: faker
38
+ requirement: &80790070 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *80790070
47
+ - !ruby/object:Gem::Dependency
48
+ name: yard
49
+ requirement: &80789580 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 0.6.0
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: *80789580
58
+ - !ruby/object:Gem::Dependency
59
+ name: jeweler
60
+ requirement: &80789240 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ~>
64
+ - !ruby/object:Gem::Version
65
+ version: 1.6.4
66
+ type: :development
67
+ prerelease: false
68
+ version_requirements: *80789240
69
+ description: ! "In order to simplify the life of the Artirix developers, this gem
70
+ was build.\n It allows to generate the data, and fill teh database with fake records."
71
+ email: max.zab@artirix.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files:
75
+ - LICENSE.txt
76
+ - README.md
77
+ files:
78
+ - .rvmrc
79
+ - Gemfile
80
+ - LICENSE.txt
81
+ - README.md
82
+ - Rakefile
83
+ - VERSION
84
+ - cockroach.gemspec
85
+ - lib/cockroach.rb
86
+ - lib/cockroach/base/load_nodes.rb
87
+ - lib/cockroach/base/node.rb
88
+ - lib/cockroach/base/node_structure.rb
89
+ - lib/cockroach/config.rb
90
+ - lib/cockroach/config/loader.rb
91
+ - lib/cockroach/fixtures/factory_girl.rb
92
+ - lib/cockroach/fixtures/factory_girl/loader.rb
93
+ - lib/cockroach/fixtures/factory_girl/node.rb
94
+ - lib/cockroach/fixtures/factory_girl/profiler.rb
95
+ - lib/cockroach/railtie.rb
96
+ - lib/cockroach/source.rb
97
+ - lib/cockroach/source/model.rb
98
+ - lib/cockroach/source/node.rb
99
+ - lib/cockroach/version.rb
100
+ - lib/generators/cockroach/install_generator.rb
101
+ - lib/generators/cockroach/templates/cockroach.rb
102
+ - lib/generators/cockroach/templates/faker.yml
103
+ - lib/tasks/faker.rake
104
+ - test/config/config_test.rb
105
+ - test/config/loader_test.rb
106
+ - test/fixturers/factory_girl/aliasing_test.rb
107
+ - test/fixturers/factory_girl/loading_test.rb
108
+ - test/fixturers/factory_girl/node_test.rb
109
+ - test/fixturers/factory_girl/profiler_test.rb
110
+ - test/fixturers/source_test.rb
111
+ - test/generators/install_generator_test.rb
112
+ - test/support/active_record.rb
113
+ - test/support/data/correct_with_option.yml
114
+ - test/support/data/correct_without_option.yml
115
+ - test/support/data/dummy_structure/config/faker.yml
116
+ - test/support/data/dummy_structure/config/user_only.yml
117
+ - test/support/data/dummy_structure/config/witness.yml
118
+ - test/support/data/dummy_structure/test/factories/user_factory.rb
119
+ - test/support/database_cleaner.rb
120
+ - test/support/factory_girl_mocked.rb
121
+ - test/support/models/user.rb
122
+ - test/test_helper.rb
123
+ homepage: https://github.com/artirix/cockroach
124
+ licenses:
125
+ - MIT
126
+ post_install_message:
127
+ rdoc_options: []
128
+ require_paths:
129
+ - lib
130
+ required_ruby_version: !ruby/object:Gem::Requirement
131
+ none: false
132
+ requirements:
133
+ - - ! '>='
134
+ - !ruby/object:Gem::Version
135
+ version: '0'
136
+ segments:
137
+ - 0
138
+ hash: -945035249
139
+ required_rubygems_version: !ruby/object:Gem::Requirement
140
+ none: false
141
+ requirements:
142
+ - - ! '>='
143
+ - !ruby/object:Gem::Version
144
+ version: '0'
145
+ requirements: []
146
+ rubyforge_project:
147
+ rubygems_version: 1.8.10
148
+ signing_key:
149
+ specification_version: 3
150
+ summary: This gem allows one to fake all the date for the Artirix project
151
+ test_files: []