fakecrm 0.9.9.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +19 -0
  3. data/.gitmodules +3 -0
  4. data/Gemfile +4 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.md +76 -0
  7. data/Rakefile +113 -0
  8. data/bin/fakecrm +37 -0
  9. data/fakecrm.gemspec +34 -0
  10. data/lib/fakecrm/application.rb +85 -0
  11. data/lib/fakecrm/configuration.rb +8 -0
  12. data/lib/fakecrm/drop.rb +59 -0
  13. data/lib/fakecrm/embedded.rb +32 -0
  14. data/lib/fakecrm/fetch.rb +139 -0
  15. data/lib/fakecrm/initialize.rb +16 -0
  16. data/lib/fakecrm/localized_dm.rb +12 -0
  17. data/lib/fakecrm/resource/account.rb +33 -0
  18. data/lib/fakecrm/resource/activity.rb +57 -0
  19. data/lib/fakecrm/resource/contact.rb +51 -0
  20. data/lib/fakecrm/resource/custom_attribute.rb +20 -0
  21. data/lib/fakecrm/resource/custom_type.rb +96 -0
  22. data/lib/fakecrm/resource/event.rb +52 -0
  23. data/lib/fakecrm/resource/event_contact.rb +21 -0
  24. data/lib/fakecrm/resource/extensions/kinds.rb +26 -0
  25. data/lib/fakecrm/resource/extensions/type_extender.rb +42 -0
  26. data/lib/fakecrm/resource/extensions/type_extension.rb +55 -0
  27. data/lib/fakecrm/resource/mailing.rb +30 -0
  28. data/lib/fakecrm/resource/password.rb +17 -0
  29. data/lib/fakecrm/resource/role.rb +18 -0
  30. data/lib/fakecrm/resource/template.rb +41 -0
  31. data/lib/fakecrm/resource/views/resource_view.rb +90 -0
  32. data/lib/fakecrm/resources.rb +11 -0
  33. data/lib/fakecrm/server/accounts.rb +39 -0
  34. data/lib/fakecrm/server/activities.rb +39 -0
  35. data/lib/fakecrm/server/contacts.rb +118 -0
  36. data/lib/fakecrm/server/custom_types.rb +34 -0
  37. data/lib/fakecrm/server/event_contacts.rb +38 -0
  38. data/lib/fakecrm/server/events.rb +47 -0
  39. data/lib/fakecrm/server/mailings.rb +44 -0
  40. data/lib/fakecrm/server/roles.rb +44 -0
  41. data/lib/fakecrm/server/templates.rb +24 -0
  42. data/lib/fakecrm/server.rb +37 -0
  43. data/lib/fakecrm/version.rb +5 -0
  44. data/lib/fakecrm.rb +36 -0
  45. data/locales/de.yml +25 -0
  46. data/locales/en.yml +25 -0
  47. data/test/embedded/.gitignore +15 -0
  48. data/test/embedded/Gemfile +6 -0
  49. data/test/embedded/Rakefile +7 -0
  50. data/test/embedded/app/models/.gitkeep +0 -0
  51. data/test/embedded/config/application.rb +44 -0
  52. data/test/embedded/config/boot.rb +6 -0
  53. data/test/embedded/config/environment.rb +5 -0
  54. data/test/embedded/config/environments/development.rb +20 -0
  55. data/test/embedded/config/environments/test.rb +21 -0
  56. data/test/embedded/config/initializers/fakecrm.rb +8 -0
  57. data/test/embedded/config/initializers/secret_token.rb +7 -0
  58. data/test/embedded/config/initializers/session_store.rb +8 -0
  59. data/test/embedded/config/initializers/wrap_parameters.rb +14 -0
  60. data/test/embedded/config/locales/en.yml +5 -0
  61. data/test/embedded/config/routes.rb +2 -0
  62. data/test/embedded/config.ru +4 -0
  63. data/test/embedded/lib/assets/.gitkeep +0 -0
  64. data/test/embedded/lib/tasks/.gitkeep +0 -0
  65. data/test/embedded/log/.gitkeep +0 -0
  66. data/test/embedded/script/rails +6 -0
  67. metadata +301 -0
@@ -0,0 +1,21 @@
1
+ FakecrmTest::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # The test environment is used exclusively to run your application's
5
+ # test suite. You never need to work with it otherwise. Remember that
6
+ # your test database is "scratch space" for the test suite and is wiped
7
+ # and recreated between test runs. Don't rely on the data there!
8
+ config.cache_classes = true
9
+
10
+ # Log error messages when you accidentally call methods on nil
11
+ config.whiny_nils = true
12
+
13
+ # Show full error reports and disable caching
14
+ config.consider_all_requests_local = true
15
+
16
+ # Raise exceptions instead of rendering exception templates
17
+ config.action_dispatch.show_exceptions = false
18
+
19
+ # Print deprecation notices to the stderr
20
+ config.active_support.deprecation = :stderr
21
+ end
@@ -0,0 +1,8 @@
1
+ Infopark::Crm.configure do |configuration|
2
+ configuration.url = "http://localhost:#{Fakecrm::Configuration.port}/crm"
3
+ configuration.login = "root"
4
+ configuration.api_key = "deadbeef"
5
+ end
6
+
7
+ require 'fakecrm/embedded'
8
+ Fakecrm.embedded! if Rails.env.development? || Rails.env.test?
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+ # Make sure the secret is at least 30 characters and all random,
6
+ # no regular words or you'll be exposed to dictionary attacks.
7
+ FakecrmTest::Application.config.secret_token = 'e04642fa71133a383ec752e189702fe7c1cd8e6de5210caba9a36fd3f44b956110d16473766ad66f276337ef79037f2410e4c3aaac82a21a945c9811f2ca04ec'
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ FakecrmTest::Application.config.session_store :cookie_store, key: '_FakecrmTest_session'
4
+
5
+ # Use the database for sessions instead of the cookie-based default,
6
+ # which shouldn't be used to store highly confidential information
7
+ # (create the session table with "rails generate session_migration")
8
+ # FakecrmTest::Application.config.session_store :active_record_store
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+ #
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json]
9
+ end
10
+
11
+ # Disable root element in JSON by default.
12
+ ActiveSupport.on_load(:active_record) do
13
+ self.include_root_in_json = false
14
+ end
@@ -0,0 +1,5 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ hello: "Hello world"
@@ -0,0 +1,2 @@
1
+ FakecrmTest::Application.routes.draw do
2
+ end
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run FakecrmTest::Application
File without changes
File without changes
File without changes
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
metadata ADDED
@@ -0,0 +1,301 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fakecrm
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.9.9.beta1
5
+ platform: ruby
6
+ authors:
7
+ - Mateusz Sojka
8
+ - Tomasz Przedmojski
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2014-11-25 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: bundler
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ~>
19
+ - !ruby/object:Gem::Version
20
+ version: '1.3'
21
+ type: :development
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ~>
26
+ - !ruby/object:Gem::Version
27
+ version: '1.3'
28
+ - !ruby/object:Gem::Dependency
29
+ name: rake
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - '>='
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - '>='
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: pry
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - '>='
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: byebug
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - '>='
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: simplecov
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - '>='
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: dm-sqlite-adapter
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - '>='
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ type: :runtime
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - '>='
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ - !ruby/object:Gem::Dependency
99
+ name: json
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - '>='
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ type: :runtime
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - '>='
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
112
+ - !ruby/object:Gem::Dependency
113
+ name: sinatra
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - '>='
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
+ type: :runtime
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ - !ruby/object:Gem::Dependency
127
+ name: rack-contrib
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - '>='
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ type: :runtime
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - '>='
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
140
+ - !ruby/object:Gem::Dependency
141
+ name: thin
142
+ requirement: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - '>='
145
+ - !ruby/object:Gem::Version
146
+ version: '0'
147
+ type: :runtime
148
+ prerelease: false
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - '>='
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
154
+ - !ruby/object:Gem::Dependency
155
+ name: i18n
156
+ requirement: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - '>='
159
+ - !ruby/object:Gem::Version
160
+ version: '0'
161
+ type: :runtime
162
+ prerelease: false
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - '>='
166
+ - !ruby/object:Gem::Version
167
+ version: '0'
168
+ - !ruby/object:Gem::Dependency
169
+ name: data_mapper
170
+ requirement: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - '>='
173
+ - !ruby/object:Gem::Version
174
+ version: '0'
175
+ type: :runtime
176
+ prerelease: false
177
+ version_requirements: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - '>='
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ description: FakeCRM is a mock implementation for the Infopark WebCRM. It can be used
183
+ for offline local development and automated testing.
184
+ email:
185
+ - mateusz.sojka@infopark.de
186
+ - tomasz.przedmojski@infopark.de
187
+ executables:
188
+ - fakecrm
189
+ extensions: []
190
+ extra_rdoc_files: []
191
+ files:
192
+ - .gitignore
193
+ - .gitmodules
194
+ - Gemfile
195
+ - LICENSE.txt
196
+ - README.md
197
+ - Rakefile
198
+ - bin/fakecrm
199
+ - fakecrm.gemspec
200
+ - lib/fakecrm.rb
201
+ - lib/fakecrm/application.rb
202
+ - lib/fakecrm/configuration.rb
203
+ - lib/fakecrm/drop.rb
204
+ - lib/fakecrm/embedded.rb
205
+ - lib/fakecrm/fetch.rb
206
+ - lib/fakecrm/initialize.rb
207
+ - lib/fakecrm/localized_dm.rb
208
+ - lib/fakecrm/resource/account.rb
209
+ - lib/fakecrm/resource/activity.rb
210
+ - lib/fakecrm/resource/contact.rb
211
+ - lib/fakecrm/resource/custom_attribute.rb
212
+ - lib/fakecrm/resource/custom_type.rb
213
+ - lib/fakecrm/resource/event.rb
214
+ - lib/fakecrm/resource/event_contact.rb
215
+ - lib/fakecrm/resource/extensions/kinds.rb
216
+ - lib/fakecrm/resource/extensions/type_extender.rb
217
+ - lib/fakecrm/resource/extensions/type_extension.rb
218
+ - lib/fakecrm/resource/mailing.rb
219
+ - lib/fakecrm/resource/password.rb
220
+ - lib/fakecrm/resource/role.rb
221
+ - lib/fakecrm/resource/template.rb
222
+ - lib/fakecrm/resource/views/resource_view.rb
223
+ - lib/fakecrm/resources.rb
224
+ - lib/fakecrm/server.rb
225
+ - lib/fakecrm/server/accounts.rb
226
+ - lib/fakecrm/server/activities.rb
227
+ - lib/fakecrm/server/contacts.rb
228
+ - lib/fakecrm/server/custom_types.rb
229
+ - lib/fakecrm/server/event_contacts.rb
230
+ - lib/fakecrm/server/events.rb
231
+ - lib/fakecrm/server/mailings.rb
232
+ - lib/fakecrm/server/roles.rb
233
+ - lib/fakecrm/server/templates.rb
234
+ - lib/fakecrm/version.rb
235
+ - locales/de.yml
236
+ - locales/en.yml
237
+ - test/embedded/.gitignore
238
+ - test/embedded/Gemfile
239
+ - test/embedded/Rakefile
240
+ - test/embedded/app/models/.gitkeep
241
+ - test/embedded/config.ru
242
+ - test/embedded/config/application.rb
243
+ - test/embedded/config/boot.rb
244
+ - test/embedded/config/environment.rb
245
+ - test/embedded/config/environments/development.rb
246
+ - test/embedded/config/environments/test.rb
247
+ - test/embedded/config/initializers/fakecrm.rb
248
+ - test/embedded/config/initializers/secret_token.rb
249
+ - test/embedded/config/initializers/session_store.rb
250
+ - test/embedded/config/initializers/wrap_parameters.rb
251
+ - test/embedded/config/locales/en.yml
252
+ - test/embedded/config/routes.rb
253
+ - test/embedded/lib/assets/.gitkeep
254
+ - test/embedded/lib/tasks/.gitkeep
255
+ - test/embedded/log/.gitkeep
256
+ - test/embedded/script/rails
257
+ homepage: https://github.com/infopark/fakecrm
258
+ licenses:
259
+ - LGPLv3
260
+ metadata: {}
261
+ post_install_message:
262
+ rdoc_options: []
263
+ require_paths:
264
+ - lib
265
+ required_ruby_version: !ruby/object:Gem::Requirement
266
+ requirements:
267
+ - - '>='
268
+ - !ruby/object:Gem::Version
269
+ version: '0'
270
+ required_rubygems_version: !ruby/object:Gem::Requirement
271
+ requirements:
272
+ - - '>'
273
+ - !ruby/object:Gem::Version
274
+ version: 1.3.1
275
+ requirements: []
276
+ rubyforge_project:
277
+ rubygems_version: 2.0.14
278
+ signing_key:
279
+ specification_version: 4
280
+ summary: FakeCRM is a mock implementation for the Infopark WebCRM.
281
+ test_files:
282
+ - test/embedded/.gitignore
283
+ - test/embedded/Gemfile
284
+ - test/embedded/Rakefile
285
+ - test/embedded/app/models/.gitkeep
286
+ - test/embedded/config.ru
287
+ - test/embedded/config/application.rb
288
+ - test/embedded/config/boot.rb
289
+ - test/embedded/config/environment.rb
290
+ - test/embedded/config/environments/development.rb
291
+ - test/embedded/config/environments/test.rb
292
+ - test/embedded/config/initializers/fakecrm.rb
293
+ - test/embedded/config/initializers/secret_token.rb
294
+ - test/embedded/config/initializers/session_store.rb
295
+ - test/embedded/config/initializers/wrap_parameters.rb
296
+ - test/embedded/config/locales/en.yml
297
+ - test/embedded/config/routes.rb
298
+ - test/embedded/lib/assets/.gitkeep
299
+ - test/embedded/lib/tasks/.gitkeep
300
+ - test/embedded/log/.gitkeep
301
+ - test/embedded/script/rails