regulate 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. data/.gitignore +14 -0
  2. data/.rvmrc +1 -0
  3. data/.yardopts +1 -0
  4. data/Gemfile +4 -0
  5. data/Gemfile.lock +117 -0
  6. data/LICENSE +20 -0
  7. data/README.md +3 -0
  8. data/Rakefile +10 -0
  9. data/app/controllers/regulate/admin/pages_controller.rb +69 -0
  10. data/app/controllers/regulate/pages_controller.rb +13 -0
  11. data/app/models/regulate/page.rb +21 -0
  12. data/app/views/regulate/admin/pages/_form.html.erb +36 -0
  13. data/app/views/regulate/admin/pages/edit.html.erb +1 -0
  14. data/app/views/regulate/admin/pages/index.html.erb +10 -0
  15. data/app/views/regulate/admin/pages/new.html.erb +1 -0
  16. data/app/views/regulate/pages/show.html.erb +14 -0
  17. data/config/regulate.yml +10 -0
  18. data/config/routes.rb +22 -0
  19. data/lib/generators/regulate/install_generator.rb +39 -0
  20. data/lib/generators/regulate/views_generator.rb +73 -0
  21. data/lib/generators/templates/regulate.css +2 -0
  22. data/lib/generators/templates/regulate.js +44 -0
  23. data/lib/generators/templates/regulate.rb +13 -0
  24. data/lib/generators/templates/regulate.yml +10 -0
  25. data/lib/regulate.rb +30 -0
  26. data/lib/regulate/engine.rb +50 -0
  27. data/lib/regulate/git.rb +17 -0
  28. data/lib/regulate/git/errors.rb +22 -0
  29. data/lib/regulate/git/interface.rb +249 -0
  30. data/lib/regulate/git/model.rb +16 -0
  31. data/lib/regulate/git/model/base.rb +282 -0
  32. data/lib/regulate/version.rb +4 -0
  33. data/public/javascripts/jquery.min.js +167 -0
  34. data/public/javascripts/regulate_admin.js +166 -0
  35. data/regulate.gemspec +29 -0
  36. data/test/dummy/Rakefile +7 -0
  37. data/test/dummy/app/controllers/application_controller.rb +3 -0
  38. data/test/dummy/app/helpers/application_helper.rb +2 -0
  39. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  40. data/test/dummy/config.ru +4 -0
  41. data/test/dummy/config/application.rb +45 -0
  42. data/test/dummy/config/boot.rb +10 -0
  43. data/test/dummy/config/database.yml +22 -0
  44. data/test/dummy/config/environment.rb +5 -0
  45. data/test/dummy/config/environments/development.rb +26 -0
  46. data/test/dummy/config/environments/production.rb +49 -0
  47. data/test/dummy/config/environments/test.rb +35 -0
  48. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  49. data/test/dummy/config/initializers/inflections.rb +10 -0
  50. data/test/dummy/config/initializers/mime_types.rb +5 -0
  51. data/test/dummy/config/initializers/secret_token.rb +7 -0
  52. data/test/dummy/config/initializers/session_store.rb +8 -0
  53. data/test/dummy/config/locales/en.yml +5 -0
  54. data/test/dummy/config/regulate.yml +10 -0
  55. data/test/dummy/config/routes.rb +58 -0
  56. data/test/dummy/public/404.html +26 -0
  57. data/test/dummy/public/422.html +26 -0
  58. data/test/dummy/public/500.html +26 -0
  59. data/test/dummy/public/favicon.ico +0 -0
  60. data/test/dummy/public/javascripts/application.js +2 -0
  61. data/test/dummy/public/javascripts/controls.js +965 -0
  62. data/test/dummy/public/javascripts/dragdrop.js +974 -0
  63. data/test/dummy/public/javascripts/effects.js +1123 -0
  64. data/test/dummy/public/javascripts/prototype.js +6001 -0
  65. data/test/dummy/public/javascripts/rails.js +175 -0
  66. data/test/dummy/public/stylesheets/.gitkeep +0 -0
  67. data/test/dummy/script/rails +6 -0
  68. data/test/git_test.rb +79 -0
  69. data/test/integration/navigation_test.rb +7 -0
  70. data/test/models/regulate_git_model_base_lint_test.rb +7 -0
  71. data/test/models/regulate_git_model_base_test.rb +23 -0
  72. data/test/models/regulate_page_test.rb +19 -0
  73. data/test/regulate_test.rb +19 -0
  74. data/test/routing_test.rb +32 -0
  75. data/test/support/integration_case.rb +5 -0
  76. data/test/test_helper.rb +27 -0
  77. data/test/tmp/config/initializers/regulate.rb +12 -0
  78. data/test/tmp/config/regulate.yml +10 -0
  79. data/test/tmp/public/javascripts/regulate.js +49 -0
  80. data/test/tmp/public/stylesheets/regulate.css +3 -0
  81. metadata +312 -0
@@ -0,0 +1,49 @@
1
+ (function($){
2
+ var Regulate = Regulate || {};
3
+
4
+ Regulate = {
5
+ init: function QL_init(){
6
+ // some code that needs to be executed after doc ready
7
+ QL.bindEvents();
8
+ },
9
+ bindEvents: function QL_liveEvents(){
10
+ $('a[rel*=external]').live('click',function(){
11
+ window.open(this.href);
12
+ return false;
13
+ });
14
+
15
+ // more globally bound events
16
+ },
17
+ helpers: function QL_helpers(){
18
+ // helper for searching through arrays
19
+ QL.helpers.arraySearch = function(a){
20
+ var o = {};
21
+ for(var i=0;i<a.length;i++){
22
+ o[a[i]]='';
23
+ }
24
+ return o;
25
+ };
26
+ //j. resigs array remove overload
27
+ Array.prototype.remove = function(from, to) {
28
+ var rest = this.slice((to || from) + 1 || this.length);
29
+ this.length = from < 0 ? this.length + from : from;
30
+ return this.push.apply(this, rest);
31
+ };
32
+ // duck punch Array.indexOf into IE browsers
33
+ if(!Array.indexOf){
34
+ Array.prototype.indexOf = function(obj){
35
+ for(var i=0; i<this.length; i++){
36
+ if(this[i]==obj){
37
+ return i;
38
+ }
39
+ }
40
+ return -1;
41
+ }
42
+ }
43
+ }
44
+ };
45
+
46
+ window.Regulate = Regulate;
47
+ $(document).ready(Regulate.init);
48
+
49
+ })(jQuery);
@@ -0,0 +1,3 @@
1
+ .editable {
2
+
3
+ }
metadata ADDED
@@ -0,0 +1,312 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: regulate
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Collin Schaafsma
14
+ - Ryan Cook
15
+ autorequire:
16
+ bindir: bin
17
+ cert_chain: []
18
+
19
+ date: 2011-01-11 00:00:00 -07:00
20
+ default_executable:
21
+ dependencies:
22
+ - !ruby/object:Gem::Dependency
23
+ name: rails
24
+ prerelease: false
25
+ requirement: &id001 !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ~>
29
+ - !ruby/object:Gem::Version
30
+ hash: 7
31
+ segments:
32
+ - 3
33
+ - 0
34
+ - 0
35
+ version: 3.0.0
36
+ type: :runtime
37
+ version_requirements: *id001
38
+ - !ruby/object:Gem::Dependency
39
+ name: grit
40
+ prerelease: false
41
+ requirement: &id002 !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ~>
45
+ - !ruby/object:Gem::Version
46
+ hash: 3
47
+ segments:
48
+ - 2
49
+ - 3
50
+ - 0
51
+ version: 2.3.0
52
+ type: :runtime
53
+ version_requirements: *id002
54
+ - !ruby/object:Gem::Dependency
55
+ name: bluecloth
56
+ prerelease: false
57
+ requirement: &id003 !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ~>
61
+ - !ruby/object:Gem::Version
62
+ hash: 29
63
+ segments:
64
+ - 2
65
+ - 0
66
+ - 9
67
+ version: 2.0.9
68
+ type: :development
69
+ version_requirements: *id003
70
+ - !ruby/object:Gem::Dependency
71
+ name: bundler
72
+ prerelease: false
73
+ requirement: &id004 !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ~>
77
+ - !ruby/object:Gem::Version
78
+ hash: 23
79
+ segments:
80
+ - 1
81
+ - 0
82
+ - 0
83
+ version: 1.0.0
84
+ type: :development
85
+ version_requirements: *id004
86
+ - !ruby/object:Gem::Dependency
87
+ name: capybara
88
+ prerelease: false
89
+ requirement: &id005 !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - ~>
93
+ - !ruby/object:Gem::Version
94
+ hash: 15
95
+ segments:
96
+ - 0
97
+ - 4
98
+ - 0
99
+ version: 0.4.0
100
+ type: :development
101
+ version_requirements: *id005
102
+ - !ruby/object:Gem::Dependency
103
+ name: sqlite3-ruby
104
+ prerelease: false
105
+ requirement: &id006 !ruby/object:Gem::Requirement
106
+ none: false
107
+ requirements:
108
+ - - ~>
109
+ - !ruby/object:Gem::Version
110
+ hash: 31
111
+ segments:
112
+ - 1
113
+ - 3
114
+ - 2
115
+ version: 1.3.2
116
+ type: :development
117
+ version_requirements: *id006
118
+ - !ruby/object:Gem::Dependency
119
+ name: yard
120
+ prerelease: false
121
+ requirement: &id007 !ruby/object:Gem::Requirement
122
+ none: false
123
+ requirements:
124
+ - - ~>
125
+ - !ruby/object:Gem::Version
126
+ hash: 15
127
+ segments:
128
+ - 0
129
+ - 6
130
+ - 4
131
+ version: 0.6.4
132
+ type: :development
133
+ version_requirements: *id007
134
+ description: The CMS we always wanted.
135
+ email:
136
+ - collin@quickleft.com
137
+ - ryan@quickleft.com
138
+ executables: []
139
+
140
+ extensions: []
141
+
142
+ extra_rdoc_files: []
143
+
144
+ files:
145
+ - .gitignore
146
+ - .rvmrc
147
+ - .yardopts
148
+ - Gemfile
149
+ - Gemfile.lock
150
+ - LICENSE
151
+ - README.md
152
+ - Rakefile
153
+ - app/controllers/regulate/admin/pages_controller.rb
154
+ - app/controllers/regulate/pages_controller.rb
155
+ - app/models/regulate/page.rb
156
+ - app/views/regulate/admin/pages/_form.html.erb
157
+ - app/views/regulate/admin/pages/edit.html.erb
158
+ - app/views/regulate/admin/pages/index.html.erb
159
+ - app/views/regulate/admin/pages/new.html.erb
160
+ - app/views/regulate/pages/show.html.erb
161
+ - config/regulate.yml
162
+ - config/routes.rb
163
+ - docs/docco.css
164
+ - docs/regulate_admin.html
165
+ - lib/generators/regulate/install_generator.rb
166
+ - lib/generators/regulate/views_generator.rb
167
+ - lib/generators/templates/regulate.css
168
+ - lib/generators/templates/regulate.js
169
+ - lib/generators/templates/regulate.rb
170
+ - lib/generators/templates/regulate.yml
171
+ - lib/regulate.rb
172
+ - lib/regulate/engine.rb
173
+ - lib/regulate/git.rb
174
+ - lib/regulate/git/errors.rb
175
+ - lib/regulate/git/interface.rb
176
+ - lib/regulate/git/model.rb
177
+ - lib/regulate/git/model/base.rb
178
+ - lib/regulate/version.rb
179
+ - public/javascripts/jquery.min.js
180
+ - public/javascripts/regulate_admin.js
181
+ - regulate.gemspec
182
+ - test/dummy/Rakefile
183
+ - test/dummy/app/controllers/application_controller.rb
184
+ - test/dummy/app/helpers/application_helper.rb
185
+ - test/dummy/app/views/layouts/application.html.erb
186
+ - test/dummy/config.ru
187
+ - test/dummy/config/application.rb
188
+ - test/dummy/config/boot.rb
189
+ - test/dummy/config/database.yml
190
+ - test/dummy/config/environment.rb
191
+ - test/dummy/config/environments/development.rb
192
+ - test/dummy/config/environments/production.rb
193
+ - test/dummy/config/environments/test.rb
194
+ - test/dummy/config/initializers/backtrace_silencers.rb
195
+ - test/dummy/config/initializers/inflections.rb
196
+ - test/dummy/config/initializers/mime_types.rb
197
+ - test/dummy/config/initializers/secret_token.rb
198
+ - test/dummy/config/initializers/session_store.rb
199
+ - test/dummy/config/locales/en.yml
200
+ - test/dummy/config/regulate.yml
201
+ - test/dummy/config/routes.rb
202
+ - test/dummy/db/test.sqlite3
203
+ - test/dummy/log/production.log
204
+ - test/dummy/log/server.log
205
+ - test/dummy/public/404.html
206
+ - test/dummy/public/422.html
207
+ - test/dummy/public/500.html
208
+ - test/dummy/public/favicon.ico
209
+ - test/dummy/public/javascripts/application.js
210
+ - test/dummy/public/javascripts/controls.js
211
+ - test/dummy/public/javascripts/dragdrop.js
212
+ - test/dummy/public/javascripts/effects.js
213
+ - test/dummy/public/javascripts/prototype.js
214
+ - test/dummy/public/javascripts/rails.js
215
+ - test/dummy/public/stylesheets/.gitkeep
216
+ - test/dummy/script/rails
217
+ - test/git_test.rb
218
+ - test/integration/navigation_test.rb
219
+ - test/models/regulate_git_model_base_lint_test.rb
220
+ - test/models/regulate_git_model_base_test.rb
221
+ - test/models/regulate_page_test.rb
222
+ - test/regulate_test.rb
223
+ - test/routing_test.rb
224
+ - test/support/integration_case.rb
225
+ - test/test_helper.rb
226
+ - test/tmp/config/initializers/regulate.rb
227
+ - test/tmp/config/regulate.yml
228
+ - test/tmp/public/javascripts/regulate.js
229
+ - test/tmp/public/stylesheets/regulate.css
230
+ has_rdoc: true
231
+ homepage: ""
232
+ licenses: []
233
+
234
+ post_install_message:
235
+ rdoc_options: []
236
+
237
+ require_paths:
238
+ - lib
239
+ required_ruby_version: !ruby/object:Gem::Requirement
240
+ none: false
241
+ requirements:
242
+ - - ">="
243
+ - !ruby/object:Gem::Version
244
+ hash: 3
245
+ segments:
246
+ - 0
247
+ version: "0"
248
+ required_rubygems_version: !ruby/object:Gem::Requirement
249
+ none: false
250
+ requirements:
251
+ - - ">="
252
+ - !ruby/object:Gem::Version
253
+ hash: 3
254
+ segments:
255
+ - 0
256
+ version: "0"
257
+ requirements: []
258
+
259
+ rubyforge_project: regulate
260
+ rubygems_version: 1.3.7
261
+ signing_key:
262
+ specification_version: 3
263
+ summary: The CMS we always wanted.
264
+ test_files:
265
+ - test/dummy/Rakefile
266
+ - test/dummy/app/controllers/application_controller.rb
267
+ - test/dummy/app/helpers/application_helper.rb
268
+ - test/dummy/app/views/layouts/application.html.erb
269
+ - test/dummy/config.ru
270
+ - test/dummy/config/application.rb
271
+ - test/dummy/config/boot.rb
272
+ - test/dummy/config/database.yml
273
+ - test/dummy/config/environment.rb
274
+ - test/dummy/config/environments/development.rb
275
+ - test/dummy/config/environments/production.rb
276
+ - test/dummy/config/environments/test.rb
277
+ - test/dummy/config/initializers/backtrace_silencers.rb
278
+ - test/dummy/config/initializers/inflections.rb
279
+ - test/dummy/config/initializers/mime_types.rb
280
+ - test/dummy/config/initializers/secret_token.rb
281
+ - test/dummy/config/initializers/session_store.rb
282
+ - test/dummy/config/locales/en.yml
283
+ - test/dummy/config/regulate.yml
284
+ - test/dummy/config/routes.rb
285
+ - test/dummy/db/test.sqlite3
286
+ - test/dummy/log/production.log
287
+ - test/dummy/log/server.log
288
+ - test/dummy/public/404.html
289
+ - test/dummy/public/422.html
290
+ - test/dummy/public/500.html
291
+ - test/dummy/public/favicon.ico
292
+ - test/dummy/public/javascripts/application.js
293
+ - test/dummy/public/javascripts/controls.js
294
+ - test/dummy/public/javascripts/dragdrop.js
295
+ - test/dummy/public/javascripts/effects.js
296
+ - test/dummy/public/javascripts/prototype.js
297
+ - test/dummy/public/javascripts/rails.js
298
+ - test/dummy/public/stylesheets/.gitkeep
299
+ - test/dummy/script/rails
300
+ - test/git_test.rb
301
+ - test/integration/navigation_test.rb
302
+ - test/models/regulate_git_model_base_lint_test.rb
303
+ - test/models/regulate_git_model_base_test.rb
304
+ - test/models/regulate_page_test.rb
305
+ - test/regulate_test.rb
306
+ - test/routing_test.rb
307
+ - test/support/integration_case.rb
308
+ - test/test_helper.rb
309
+ - test/tmp/config/initializers/regulate.rb
310
+ - test/tmp/config/regulate.yml
311
+ - test/tmp/public/javascripts/regulate.js
312
+ - test/tmp/public/stylesheets/regulate.css