puffer_pages 0.1.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +5 -0
- data/.rspec +3 -1
- data/.rvmrc +1 -1
- data/.travis.yml +13 -5
- data/CHANGELOG.md +130 -7
- data/Gemfile +10 -1
- data/README.md +18 -20
- data/Rakefile +1 -1
- data/app/assets/javascripts/puffer/codemirror.js +4237 -2223
- data/app/assets/javascripts/puffer/codemirror/css.js +359 -18
- data/app/assets/javascripts/puffer/codemirror/htmlmixed.js +15 -14
- data/app/assets/javascripts/puffer/codemirror/javascript.js +91 -29
- data/app/assets/javascripts/puffer/codemirror/liquid.js +185 -0
- data/app/assets/javascripts/puffer/codemirror/xml.js +99 -27
- data/app/assets/javascripts/puffer/codemirror/yaml.js +95 -0
- data/app/assets/javascripts/puffer/liquid.js +28 -12
- data/app/assets/javascripts/puffer/matchbrackets.js +63 -0
- data/app/assets/javascripts/puffer/multiplex.js +95 -0
- data/app/assets/javascripts/puffer/puffer_pages.js +140 -44
- data/app/assets/stylesheets/puffer/codemirror.css +203 -67
- data/app/assets/stylesheets/puffer/codemirror/ambiance-mobile.css +6 -0
- data/app/assets/stylesheets/puffer/codemirror/ambiance.css +76 -0
- data/app/assets/stylesheets/puffer/codemirror/blackboard.css +25 -0
- data/app/assets/stylesheets/puffer/codemirror/cobalt.css +4 -4
- data/app/assets/stylesheets/puffer/codemirror/eclipse.css +1 -1
- data/app/assets/stylesheets/puffer/codemirror/elegant.css +2 -2
- data/app/assets/stylesheets/puffer/codemirror/erlang-dark.css +21 -0
- data/app/assets/stylesheets/puffer/codemirror/lesser-dark.css +44 -0
- data/app/assets/stylesheets/puffer/codemirror/monokai.css +4 -4
- data/app/assets/stylesheets/puffer/codemirror/neat.css +3 -3
- data/app/assets/stylesheets/puffer/codemirror/night.css +4 -4
- data/app/assets/stylesheets/puffer/codemirror/rubyblue.css +5 -5
- data/app/assets/stylesheets/puffer/codemirror/solarized.css +207 -0
- data/app/assets/stylesheets/puffer/codemirror/twilight.css +26 -0
- data/app/assets/stylesheets/puffer/codemirror/vibrant-ink.css +27 -0
- data/app/assets/stylesheets/puffer/codemirror/xq-dark.css +46 -0
- data/app/assets/stylesheets/puffer/puffer_pages.css +64 -35
- data/app/components/codemirror/form.html.erb +22 -6
- data/app/components/codemirror_component.rb +1 -8
- data/app/components/handlers/form.html.erb +8 -0
- data/app/components/handlers_component.rb +8 -0
- data/app/components/page_parts/_page_part.html.erb +6 -0
- data/app/components/page_parts/form.html.erb +8 -27
- data/app/components/page_parts_component.rb +1 -3
- data/app/components/render/_tree_page.html.erb +3 -2
- data/app/controllers/admin/layouts_controller.rb +1 -1
- data/app/controllers/admin/origins_controller.rb +3 -0
- data/app/controllers/admin/pages_controller.rb +1 -1
- data/app/controllers/admin/snippets_controller.rb +1 -1
- data/app/controllers/pages_controller.rb +3 -3
- data/app/helpers/puffer_pages_helper.rb +3 -3
- data/app/models/puffer_pages/layout.rb +2 -7
- data/app/models/puffer_pages/origin.rb +2 -0
- data/app/models/puffer_pages/page.rb +1 -117
- data/app/models/puffer_pages/page_part.rb +2 -22
- data/app/models/puffer_pages/snippet.rb +2 -5
- data/config/routes.rb +3 -0
- data/db/migrate/20120812100913_create_origins.rb +16 -0
- data/db/migrate/20120924120226_migrate_to_uuid.rb +126 -0
- data/db/migrate/20130110144030_add_handler_to_page_parts.rb +9 -0
- data/db/migrate/20130118064524_add_locales_to_pages.rb +9 -0
- data/gemfiles/Gemfile.rails-3-1 +7 -0
- data/gemfiles/Gemfile.rails-3-2 +7 -0
- data/gemfiles/Gemfile.rails-head +7 -0
- data/lib/puffer_pages.rb +43 -7
- data/lib/puffer_pages/backends.rb +16 -0
- data/{app/controllers/puffer_pages → lib/puffer_pages/backends/controllers}/layouts_base.rb +2 -5
- data/lib/puffer_pages/backends/controllers/origins_base.rb +43 -0
- data/lib/puffer_pages/backends/controllers/pages_base.rb +52 -0
- data/{app/controllers/puffer_pages → lib/puffer_pages/backends/controllers}/snippets_base.rb +2 -5
- data/lib/puffer_pages/backends/models/layout.rb +34 -0
- data/lib/puffer_pages/backends/models/mixins/importable.rb +42 -0
- data/lib/puffer_pages/backends/models/mixins/localable.rb +65 -0
- data/lib/puffer_pages/backends/models/mixins/renderable.rb +153 -0
- data/lib/puffer_pages/backends/models/mixins/translatable.rb +52 -0
- data/lib/puffer_pages/backends/models/origin.rb +59 -0
- data/lib/puffer_pages/backends/models/page.rb +221 -0
- data/lib/puffer_pages/backends/models/page_part.rb +71 -0
- data/lib/puffer_pages/backends/models/snippet.rb +34 -0
- data/lib/puffer_pages/engine.rb +13 -2
- data/lib/puffer_pages/extensions/context.rb +31 -0
- data/lib/puffer_pages/extensions/core.rb +1 -8
- data/lib/puffer_pages/extensions/pagenator.rb +69 -0
- data/lib/puffer_pages/extensions/renderer.rb +31 -0
- data/lib/puffer_pages/globalize/migrator.rb +23 -0
- data/lib/puffer_pages/handlers.rb +29 -0
- data/lib/puffer_pages/handlers/base.rb +21 -0
- data/lib/puffer_pages/handlers/yaml.rb +20 -0
- data/lib/puffer_pages/helpers.rb +14 -0
- data/lib/puffer_pages/liquid/backend.rb +16 -0
- data/lib/puffer_pages/liquid/file_system.rb +36 -12
- data/lib/puffer_pages/liquid/page_drop.rb +26 -23
- data/lib/puffer_pages/liquid/tags/array.rb +39 -0
- data/lib/puffer_pages/liquid/tags/{javascripts.rb → assets.rb} +13 -4
- data/lib/puffer_pages/liquid/tags/helper.rb +15 -0
- data/lib/puffer_pages/liquid/tags/include.rb +32 -0
- data/lib/puffer_pages/liquid/tags/javascript.rb +15 -0
- data/lib/puffer_pages/liquid/tags/partials.rb +22 -0
- data/lib/puffer_pages/liquid/tags/render.rb +28 -0
- data/lib/puffer_pages/liquid/tags/scope.rb +31 -0
- data/lib/puffer_pages/liquid/tags/super.rb +36 -0
- data/lib/puffer_pages/liquid/tags/translate.rb +56 -0
- data/lib/puffer_pages/liquid/tags/url.rb +53 -0
- data/lib/puffer_pages/liquid/tags/yield.rb +3 -1
- data/lib/puffer_pages/log_subscriber.rb +29 -0
- data/lib/puffer_pages/migrations.rb +31 -0
- data/lib/puffer_pages/renderer.rb +25 -0
- data/lib/puffer_pages/rspec/matchers.rb +27 -0
- data/lib/puffer_pages/rspec/matchers/render_page.rb +90 -0
- data/lib/puffer_pages/version.rb +1 -1
- data/puffer_pages.gemspec +18 -18
- data/spec/controllers/pages_controller_spec.rb +44 -0
- data/spec/controllers/puffer_pages_controller_spec.rb +194 -0
- data/spec/data/broken.json +8 -0
- data/spec/data/import.json +55 -0
- data/spec/data/localized.json +106 -0
- data/spec/data/unlocalized.json +82 -0
- data/spec/dummy/.rvmrc +1 -0
- data/spec/dummy/app/controllers/application_controller.rb +6 -0
- data/spec/dummy/app/views/layouts/sample.en.erb +1 -0
- data/spec/dummy/app/views/layouts/sample.ru.erb +1 -0
- data/spec/dummy/app/views/shared/_first.html.erb +1 -0
- data/spec/dummy/config/application.rb +21 -2
- data/spec/dummy/config/boot.rb +0 -2
- data/spec/dummy/config/database.yml +7 -1
- data/spec/dummy/config/environments/development.rb +11 -2
- data/spec/dummy/config/environments/pg_test.rb +6 -6
- data/spec/dummy/config/environments/production.rb +19 -3
- data/spec/dummy/config/environments/test.rb +6 -6
- data/spec/dummy/config/initializers/inflections.rb +5 -0
- data/spec/dummy/config/initializers/puffer_pages.rb +4 -0
- data/spec/dummy/config/initializers/secret_token.rb +1 -1
- data/spec/dummy/config/initializers/wrap_parameters.rb +5 -3
- data/spec/dummy/config/routes.rb +2 -1
- data/spec/dummy/db/migrate/{20090422092419_create_pages.rb → 20130118071511_create_pages.rb} +1 -0
- data/spec/dummy/db/migrate/{20090504132337_create_page_parts.rb → 20130118071512_create_page_parts.rb} +1 -0
- data/spec/dummy/db/migrate/{20090506102004_create_layouts.rb → 20130118071513_create_layouts.rb} +1 -0
- data/spec/dummy/db/migrate/{20090510121824_create_snippets.rb → 20130118071514_create_snippets.rb} +1 -0
- data/spec/dummy/db/migrate/20130118071515_create_origins.rb +17 -0
- data/spec/dummy/db/migrate/20130118071516_migrate_to_uuid.rb +127 -0
- data/spec/dummy/db/migrate/20130118071517_add_handler_to_page_parts.rb +10 -0
- data/spec/dummy/db/migrate/20130118071518_add_locales_to_pages.rb +10 -0
- data/spec/dummy/db/migrate/20130118071519_add_translations.rb +9 -0
- data/spec/dummy/db/schema.rb +65 -17
- data/spec/fabricators/articles_fabricator.rb +2 -2
- data/spec/fabricators/layouts_fabricator.rb +24 -3
- data/spec/fabricators/origin_fabricator.rb +5 -0
- data/spec/fabricators/page_parts_fabricator.rb +17 -2
- data/spec/fabricators/pages_fabricator.rb +20 -5
- data/spec/fabricators/snippets_fabricator.rb +14 -3
- data/spec/lib/handlers/base_spec.rb +10 -0
- data/spec/lib/handlers/yaml_spec.rb +34 -0
- data/spec/lib/handlers_spec.rb +36 -0
- data/spec/lib/liquid/backend_spec.rb +20 -0
- data/spec/lib/liquid/interpolation_spec.rb +25 -0
- data/spec/lib/liquid/tags/include_spec.rb +38 -0
- data/spec/lib/liquid/tags/partials_spec.rb +39 -0
- data/spec/lib/liquid/tags/scope_spec.rb +18 -0
- data/spec/lib/liquid/tags/translate_spec.rb +107 -0
- data/spec/lib/liquid/tags_spec.rb +81 -0
- data/spec/lib/page_drop_spec.rb +65 -0
- data/spec/lib/pagenator_spec.rb +176 -0
- data/spec/lib/rspec/matchers/render_page_spec.rb +107 -0
- data/spec/models/puffer_pages/layout_spec.rb +15 -0
- data/spec/models/puffer_pages/localable_spec.rb +62 -0
- data/spec/models/puffer_pages/origin_spec.rb +112 -0
- data/spec/models/puffer_pages/page_part_spec.rb +14 -0
- data/spec/models/puffer_pages/page_spec.rb +307 -0
- data/spec/models/puffer_pages/renderable_spec.rb +84 -0
- data/spec/models/puffer_pages/snippet_spec.rb +15 -0
- data/spec/requests/origins_requests_spec.rb +37 -0
- data/spec/spec_helper.rb +7 -6
- metadata +349 -87
- data/Gemfile.lock +0 -176
- data/app/assets/javascripts/puffer/overlay.js +0 -51
- data/app/controllers/puffer_pages/pages_base.rb +0 -38
- data/app/models/layout.rb +0 -2
- data/app/models/page.rb +0 -2
- data/app/models/page_part.rb +0 -2
- data/app/models/snippet.rb +0 -2
- data/app/views/layouts/puffer_pages_layout.html.erb +0 -2
- data/config/puffer_routes.rb +0 -3
- data/gemfiles/Gemfile-rails-3.1 +0 -5
- data/gemfiles/Gemfile-rails-3.1.lock +0 -173
- data/gemfiles/Gemfile-rails-3.2 +0 -5
- data/gemfiles/Gemfile-rails-3.2.lock +0 -171
- data/lib/puffer_pages/extensions/controller.rb +0 -30
- data/lib/puffer_pages/extensions/mapper.rb +0 -23
- data/lib/puffer_pages/liquid/tags/page_attribute.rb +0 -39
- data/lib/puffer_pages/liquid/tags/stylesheets.rb +0 -38
- data/spec/controllers/articles_controller_spec.rb +0 -65
- data/spec/dummy/app/controllers/articles_controller.rb +0 -9
- data/spec/integration/navigation_spec.rb +0 -9
- data/spec/lib/drops_spec.rb +0 -55
- data/spec/lib/tags_spec.rb +0 -98
- data/spec/models/page_spec.rb +0 -235
- data/spec/puffer_pages_spec.rb +0 -7
data/Gemfile.lock
DELETED
@@ -1,176 +0,0 @@
|
|
1
|
-
GIT
|
2
|
-
remote: git://github.com/puffer/puffer.git
|
3
|
-
revision: 719b80730fd723c7f665c95315a19edbb8148593
|
4
|
-
specs:
|
5
|
-
puffer (0.1.1)
|
6
|
-
kaminari
|
7
|
-
orm_adapter
|
8
|
-
rails (~> 3.1)
|
9
|
-
|
10
|
-
PATH
|
11
|
-
remote: .
|
12
|
-
specs:
|
13
|
-
puffer_pages (0.1.1)
|
14
|
-
liquid
|
15
|
-
nested_set
|
16
|
-
puffer
|
17
|
-
rails (~> 3.1)
|
18
|
-
|
19
|
-
GEM
|
20
|
-
remote: http://rubygems.org/
|
21
|
-
specs:
|
22
|
-
actionmailer (3.2.1)
|
23
|
-
actionpack (= 3.2.1)
|
24
|
-
mail (~> 2.4.0)
|
25
|
-
actionpack (3.2.1)
|
26
|
-
activemodel (= 3.2.1)
|
27
|
-
activesupport (= 3.2.1)
|
28
|
-
builder (~> 3.0.0)
|
29
|
-
erubis (~> 2.7.0)
|
30
|
-
journey (~> 1.0.1)
|
31
|
-
rack (~> 1.4.0)
|
32
|
-
rack-cache (~> 1.1)
|
33
|
-
rack-test (~> 0.6.1)
|
34
|
-
sprockets (~> 2.1.2)
|
35
|
-
activemodel (3.2.1)
|
36
|
-
activesupport (= 3.2.1)
|
37
|
-
builder (~> 3.0.0)
|
38
|
-
activerecord (3.2.1)
|
39
|
-
activemodel (= 3.2.1)
|
40
|
-
activesupport (= 3.2.1)
|
41
|
-
arel (~> 3.0.0)
|
42
|
-
tzinfo (~> 0.3.29)
|
43
|
-
activeresource (3.2.1)
|
44
|
-
activemodel (= 3.2.1)
|
45
|
-
activesupport (= 3.2.1)
|
46
|
-
activesupport (3.2.1)
|
47
|
-
i18n (~> 0.6)
|
48
|
-
multi_json (~> 1.0)
|
49
|
-
arel (3.0.0)
|
50
|
-
bcrypt-ruby (3.0.1)
|
51
|
-
builder (3.0.0)
|
52
|
-
capybara (1.1.2)
|
53
|
-
mime-types (>= 1.16)
|
54
|
-
nokogiri (>= 1.3.3)
|
55
|
-
rack (>= 1.0.0)
|
56
|
-
rack-test (>= 0.5.4)
|
57
|
-
selenium-webdriver (~> 2.0)
|
58
|
-
xpath (~> 0.1.4)
|
59
|
-
childprocess (0.3.1)
|
60
|
-
ffi (~> 1.0.6)
|
61
|
-
database_cleaner (0.7.1)
|
62
|
-
diff-lcs (1.1.3)
|
63
|
-
erubis (2.7.0)
|
64
|
-
fabrication (1.2.0)
|
65
|
-
ffi (1.0.11)
|
66
|
-
forgery (0.5.0)
|
67
|
-
guard (1.0.0)
|
68
|
-
ffi (>= 0.5.0)
|
69
|
-
thor (~> 0.14.6)
|
70
|
-
guard-rspec (0.6.0)
|
71
|
-
guard (>= 0.10.0)
|
72
|
-
hike (1.2.1)
|
73
|
-
i18n (0.6.0)
|
74
|
-
journey (1.0.1)
|
75
|
-
json (1.6.5)
|
76
|
-
kaminari (0.13.0)
|
77
|
-
actionpack (>= 3.0.0)
|
78
|
-
activesupport (>= 3.0.0)
|
79
|
-
railties (>= 3.0.0)
|
80
|
-
libnotify (0.7.2)
|
81
|
-
liquid (2.3.0)
|
82
|
-
mail (2.4.1)
|
83
|
-
i18n (>= 0.4.0)
|
84
|
-
mime-types (~> 1.16)
|
85
|
-
treetop (~> 1.4.8)
|
86
|
-
mime-types (1.17.2)
|
87
|
-
multi_json (1.0.4)
|
88
|
-
mysql (2.8.1)
|
89
|
-
nested_set (1.6.8)
|
90
|
-
activerecord (>= 3.0.0)
|
91
|
-
railties (>= 3.0.0)
|
92
|
-
nokogiri (1.5.0)
|
93
|
-
orm_adapter (0.0.6)
|
94
|
-
pg (0.12.2)
|
95
|
-
polyglot (0.3.3)
|
96
|
-
rack (1.4.1)
|
97
|
-
rack-cache (1.1)
|
98
|
-
rack (>= 0.4)
|
99
|
-
rack-ssl (1.3.2)
|
100
|
-
rack
|
101
|
-
rack-test (0.6.1)
|
102
|
-
rack (>= 1.0)
|
103
|
-
rails (3.2.1)
|
104
|
-
actionmailer (= 3.2.1)
|
105
|
-
actionpack (= 3.2.1)
|
106
|
-
activerecord (= 3.2.1)
|
107
|
-
activeresource (= 3.2.1)
|
108
|
-
activesupport (= 3.2.1)
|
109
|
-
bundler (~> 1.0)
|
110
|
-
railties (= 3.2.1)
|
111
|
-
railties (3.2.1)
|
112
|
-
actionpack (= 3.2.1)
|
113
|
-
activesupport (= 3.2.1)
|
114
|
-
rack-ssl (~> 1.3.2)
|
115
|
-
rake (>= 0.8.7)
|
116
|
-
rdoc (~> 3.4)
|
117
|
-
thor (~> 0.14.6)
|
118
|
-
rake (0.9.2.2)
|
119
|
-
rb-inotify (0.8.8)
|
120
|
-
ffi (>= 0.5.0)
|
121
|
-
rdoc (3.12)
|
122
|
-
json (~> 1.4)
|
123
|
-
rspec (2.8.0)
|
124
|
-
rspec-core (~> 2.8.0)
|
125
|
-
rspec-expectations (~> 2.8.0)
|
126
|
-
rspec-mocks (~> 2.8.0)
|
127
|
-
rspec-core (2.8.0)
|
128
|
-
rspec-expectations (2.8.0)
|
129
|
-
diff-lcs (~> 1.1.2)
|
130
|
-
rspec-mocks (2.8.0)
|
131
|
-
rspec-rails (2.8.1)
|
132
|
-
actionpack (>= 3.0)
|
133
|
-
activesupport (>= 3.0)
|
134
|
-
railties (>= 3.0)
|
135
|
-
rspec (~> 2.8.0)
|
136
|
-
rubyzip (0.9.5)
|
137
|
-
selenium-webdriver (2.18.0)
|
138
|
-
childprocess (>= 0.2.5)
|
139
|
-
ffi (~> 1.0.9)
|
140
|
-
multi_json (~> 1.0.4)
|
141
|
-
rubyzip
|
142
|
-
sprockets (2.1.2)
|
143
|
-
hike (~> 1.2)
|
144
|
-
rack (~> 1.0)
|
145
|
-
tilt (~> 1.1, != 1.3.0)
|
146
|
-
sqlite3 (1.3.5)
|
147
|
-
sqlite3-ruby (1.3.3)
|
148
|
-
sqlite3 (>= 1.3.3)
|
149
|
-
thor (0.14.6)
|
150
|
-
tilt (1.3.3)
|
151
|
-
treetop (1.4.10)
|
152
|
-
polyglot
|
153
|
-
polyglot (>= 0.3.1)
|
154
|
-
tzinfo (0.3.31)
|
155
|
-
xpath (0.1.4)
|
156
|
-
nokogiri (~> 1.3)
|
157
|
-
|
158
|
-
PLATFORMS
|
159
|
-
ruby
|
160
|
-
|
161
|
-
DEPENDENCIES
|
162
|
-
bcrypt-ruby
|
163
|
-
capybara (>= 0.4.0)
|
164
|
-
database_cleaner
|
165
|
-
fabrication
|
166
|
-
forgery
|
167
|
-
guard
|
168
|
-
guard-rspec
|
169
|
-
libnotify
|
170
|
-
mysql
|
171
|
-
pg
|
172
|
-
puffer!
|
173
|
-
puffer_pages!
|
174
|
-
rb-inotify
|
175
|
-
rspec-rails
|
176
|
-
sqlite3-ruby
|
@@ -1,51 +0,0 @@
|
|
1
|
-
// Utility function that allows modes to be combined. The mode given
|
2
|
-
// as the base argument takes care of most of the normal mode
|
3
|
-
// functionality, but a second (typically simple) mode is used, which
|
4
|
-
// can override the style of text. Both modes get to parse all of the
|
5
|
-
// text, but when both assign a non-null style to a piece of code, the
|
6
|
-
// overlay wins, unless the combine argument was true, in which case
|
7
|
-
// the styles are combined.
|
8
|
-
|
9
|
-
CodeMirror.overlayParser = function(base, overlay, combine) {
|
10
|
-
return {
|
11
|
-
startState: function() {
|
12
|
-
return {
|
13
|
-
base: CodeMirror.startState(base),
|
14
|
-
overlay: CodeMirror.startState(overlay),
|
15
|
-
basePos: 0, baseCur: null,
|
16
|
-
overlayPos: 0, overlayCur: null
|
17
|
-
};
|
18
|
-
},
|
19
|
-
copyState: function(state) {
|
20
|
-
return {
|
21
|
-
base: CodeMirror.copyState(base, state.base),
|
22
|
-
overlay: CodeMirror.copyState(overlay, state.overlay),
|
23
|
-
basePos: state.basePos, baseCur: null,
|
24
|
-
overlayPos: state.overlayPos, overlayCur: null
|
25
|
-
};
|
26
|
-
},
|
27
|
-
|
28
|
-
token: function(stream, state) {
|
29
|
-
if (stream.start == state.basePos) {
|
30
|
-
state.baseCur = base.token(stream, state.base);
|
31
|
-
state.basePos = stream.pos;
|
32
|
-
}
|
33
|
-
if (stream.start == state.overlayPos) {
|
34
|
-
stream.pos = stream.start;
|
35
|
-
state.overlayCur = overlay.token(stream, state.overlay);
|
36
|
-
state.overlayPos = stream.pos;
|
37
|
-
}
|
38
|
-
stream.pos = Math.min(state.basePos, state.overlayPos);
|
39
|
-
if (stream.eol()) state.basePos = state.overlayPos = 0;
|
40
|
-
|
41
|
-
if (state.overlayCur == null) return state.baseCur;
|
42
|
-
if (state.baseCur != null && combine) return state.baseCur + " " + state.overlayCur;
|
43
|
-
else return state.overlayCur;
|
44
|
-
},
|
45
|
-
|
46
|
-
indent: function(state, textAfter) {
|
47
|
-
return base.indent(state.base, textAfter);
|
48
|
-
},
|
49
|
-
electricChars: base.electricChars
|
50
|
-
};
|
51
|
-
};
|
@@ -1,38 +0,0 @@
|
|
1
|
-
class PufferPages::PagesBase < Puffer::TreeBase
|
2
|
-
unloadable
|
3
|
-
|
4
|
-
helper :puffer_pages
|
5
|
-
|
6
|
-
setup do
|
7
|
-
group :pages
|
8
|
-
model_name :page
|
9
|
-
end
|
10
|
-
|
11
|
-
tree do
|
12
|
-
field :name, :render => :tree_page
|
13
|
-
end
|
14
|
-
|
15
|
-
index do
|
16
|
-
field :name
|
17
|
-
field :slug
|
18
|
-
field :layout_name
|
19
|
-
field :status
|
20
|
-
end
|
21
|
-
|
22
|
-
form do
|
23
|
-
field :name
|
24
|
-
field :slug
|
25
|
-
field :page_parts, :type => :page_parts do
|
26
|
-
field :body, :type => :codemirror, :input_only => true
|
27
|
-
field :name, :type => :hidden
|
28
|
-
field :_destroy, :type => :hidden, :html => { :class => 'destroy_mark' }
|
29
|
-
end
|
30
|
-
field :layout_name, :select => :possible_layouts, :include_blank => false
|
31
|
-
field :status, :select => :possible_statuses, :include_blank => false
|
32
|
-
field :title
|
33
|
-
field :description
|
34
|
-
field :keywords
|
35
|
-
field :parent_id, :type => :hidden
|
36
|
-
end
|
37
|
-
|
38
|
-
end
|
data/app/models/layout.rb
DELETED
data/app/models/page.rb
DELETED
data/app/models/page_part.rb
DELETED
data/app/models/snippet.rb
DELETED
data/config/puffer_routes.rb
DELETED
data/gemfiles/Gemfile-rails-3.1
DELETED
@@ -1,173 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: /home/pyromaniac/work/opensource/puffer_pages
|
3
|
-
specs:
|
4
|
-
puffer_pages (0.1.1)
|
5
|
-
liquid
|
6
|
-
nested_set
|
7
|
-
puffer
|
8
|
-
rails (~> 3.1)
|
9
|
-
|
10
|
-
GEM
|
11
|
-
remote: http://rubygems.org/
|
12
|
-
specs:
|
13
|
-
actionmailer (3.1.3)
|
14
|
-
actionpack (= 3.1.3)
|
15
|
-
mail (~> 2.3.0)
|
16
|
-
actionpack (3.1.3)
|
17
|
-
activemodel (= 3.1.3)
|
18
|
-
activesupport (= 3.1.3)
|
19
|
-
builder (~> 3.0.0)
|
20
|
-
erubis (~> 2.7.0)
|
21
|
-
i18n (~> 0.6)
|
22
|
-
rack (~> 1.3.5)
|
23
|
-
rack-cache (~> 1.1)
|
24
|
-
rack-mount (~> 0.8.2)
|
25
|
-
rack-test (~> 0.6.1)
|
26
|
-
sprockets (~> 2.0.3)
|
27
|
-
activemodel (3.1.3)
|
28
|
-
activesupport (= 3.1.3)
|
29
|
-
builder (~> 3.0.0)
|
30
|
-
i18n (~> 0.6)
|
31
|
-
activerecord (3.1.3)
|
32
|
-
activemodel (= 3.1.3)
|
33
|
-
activesupport (= 3.1.3)
|
34
|
-
arel (~> 2.2.1)
|
35
|
-
tzinfo (~> 0.3.29)
|
36
|
-
activeresource (3.1.3)
|
37
|
-
activemodel (= 3.1.3)
|
38
|
-
activesupport (= 3.1.3)
|
39
|
-
activesupport (3.1.3)
|
40
|
-
multi_json (~> 1.0)
|
41
|
-
arel (2.2.1)
|
42
|
-
bcrypt-ruby (3.0.1)
|
43
|
-
builder (3.0.0)
|
44
|
-
capybara (1.1.2)
|
45
|
-
mime-types (>= 1.16)
|
46
|
-
nokogiri (>= 1.3.3)
|
47
|
-
rack (>= 1.0.0)
|
48
|
-
rack-test (>= 0.5.4)
|
49
|
-
selenium-webdriver (~> 2.0)
|
50
|
-
xpath (~> 0.1.4)
|
51
|
-
childprocess (0.3.1)
|
52
|
-
ffi (~> 1.0.6)
|
53
|
-
database_cleaner (0.7.1)
|
54
|
-
diff-lcs (1.1.3)
|
55
|
-
erubis (2.7.0)
|
56
|
-
fabrication (1.2.0)
|
57
|
-
ffi (1.0.11)
|
58
|
-
forgery (0.5.0)
|
59
|
-
guard (1.0.0)
|
60
|
-
ffi (>= 0.5.0)
|
61
|
-
thor (~> 0.14.6)
|
62
|
-
guard-rspec (0.6.0)
|
63
|
-
guard (>= 0.10.0)
|
64
|
-
hike (1.2.1)
|
65
|
-
i18n (0.6.0)
|
66
|
-
json (1.6.5)
|
67
|
-
kaminari (0.13.0)
|
68
|
-
actionpack (>= 3.0.0)
|
69
|
-
activesupport (>= 3.0.0)
|
70
|
-
railties (>= 3.0.0)
|
71
|
-
libnotify (0.7.2)
|
72
|
-
liquid (2.3.0)
|
73
|
-
mail (2.3.0)
|
74
|
-
i18n (>= 0.4.0)
|
75
|
-
mime-types (~> 1.16)
|
76
|
-
treetop (~> 1.4.8)
|
77
|
-
mime-types (1.17.2)
|
78
|
-
multi_json (1.0.4)
|
79
|
-
mysql (2.8.1)
|
80
|
-
nested_set (1.6.8)
|
81
|
-
activerecord (>= 3.0.0)
|
82
|
-
railties (>= 3.0.0)
|
83
|
-
nokogiri (1.5.0)
|
84
|
-
orm_adapter (0.0.6)
|
85
|
-
pg (0.12.2)
|
86
|
-
polyglot (0.3.3)
|
87
|
-
puffer (0.1.1)
|
88
|
-
kaminari
|
89
|
-
orm_adapter
|
90
|
-
rails (~> 3.1)
|
91
|
-
rack (1.3.6)
|
92
|
-
rack-cache (1.1)
|
93
|
-
rack (>= 0.4)
|
94
|
-
rack-mount (0.8.3)
|
95
|
-
rack (>= 1.0.0)
|
96
|
-
rack-ssl (1.3.2)
|
97
|
-
rack
|
98
|
-
rack-test (0.6.1)
|
99
|
-
rack (>= 1.0)
|
100
|
-
rails (3.1.3)
|
101
|
-
actionmailer (= 3.1.3)
|
102
|
-
actionpack (= 3.1.3)
|
103
|
-
activerecord (= 3.1.3)
|
104
|
-
activeresource (= 3.1.3)
|
105
|
-
activesupport (= 3.1.3)
|
106
|
-
bundler (~> 1.0)
|
107
|
-
railties (= 3.1.3)
|
108
|
-
railties (3.1.3)
|
109
|
-
actionpack (= 3.1.3)
|
110
|
-
activesupport (= 3.1.3)
|
111
|
-
rack-ssl (~> 1.3.2)
|
112
|
-
rake (>= 0.8.7)
|
113
|
-
rdoc (~> 3.4)
|
114
|
-
thor (~> 0.14.6)
|
115
|
-
rake (0.9.2.2)
|
116
|
-
rb-inotify (0.8.8)
|
117
|
-
ffi (>= 0.5.0)
|
118
|
-
rdoc (3.12)
|
119
|
-
json (~> 1.4)
|
120
|
-
rspec (2.8.0)
|
121
|
-
rspec-core (~> 2.8.0)
|
122
|
-
rspec-expectations (~> 2.8.0)
|
123
|
-
rspec-mocks (~> 2.8.0)
|
124
|
-
rspec-core (2.8.0)
|
125
|
-
rspec-expectations (2.8.0)
|
126
|
-
diff-lcs (~> 1.1.2)
|
127
|
-
rspec-mocks (2.8.0)
|
128
|
-
rspec-rails (2.8.1)
|
129
|
-
actionpack (>= 3.0)
|
130
|
-
activesupport (>= 3.0)
|
131
|
-
railties (>= 3.0)
|
132
|
-
rspec (~> 2.8.0)
|
133
|
-
rubyzip (0.9.5)
|
134
|
-
selenium-webdriver (2.18.0)
|
135
|
-
childprocess (>= 0.2.5)
|
136
|
-
ffi (~> 1.0.9)
|
137
|
-
multi_json (~> 1.0.4)
|
138
|
-
rubyzip
|
139
|
-
sprockets (2.0.3)
|
140
|
-
hike (~> 1.2)
|
141
|
-
rack (~> 1.0)
|
142
|
-
tilt (~> 1.1, != 1.3.0)
|
143
|
-
sqlite3 (1.3.5)
|
144
|
-
sqlite3-ruby (1.3.3)
|
145
|
-
sqlite3 (>= 1.3.3)
|
146
|
-
thor (0.14.6)
|
147
|
-
tilt (1.3.3)
|
148
|
-
treetop (1.4.10)
|
149
|
-
polyglot
|
150
|
-
polyglot (>= 0.3.1)
|
151
|
-
tzinfo (0.3.31)
|
152
|
-
xpath (0.1.4)
|
153
|
-
nokogiri (~> 1.3)
|
154
|
-
|
155
|
-
PLATFORMS
|
156
|
-
ruby
|
157
|
-
|
158
|
-
DEPENDENCIES
|
159
|
-
bcrypt-ruby
|
160
|
-
capybara (>= 0.4.0)
|
161
|
-
database_cleaner
|
162
|
-
fabrication
|
163
|
-
forgery
|
164
|
-
guard
|
165
|
-
guard-rspec
|
166
|
-
libnotify
|
167
|
-
mysql
|
168
|
-
pg
|
169
|
-
puffer_pages!
|
170
|
-
rails (~> 3.1.0)
|
171
|
-
rb-inotify
|
172
|
-
rspec-rails
|
173
|
-
sqlite3-ruby
|