k3cms_blog 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/.rspec +1 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +136 -0
- data/License.txt +165 -0
- data/Rakefile +20 -0
- data/Readme.rdoc +13 -0
- data/app/cells/k3cms/blog/blog_posts/index.html.haml +46 -0
- data/app/cells/k3cms/blog/blog_posts/index.html.haml.haml +0 -0
- data/app/cells/k3cms/blog/blog_posts/metadata_drawer.html.haml +38 -0
- data/app/cells/k3cms/blog/blog_posts/published_status.html.haml +4 -0
- data/app/cells/k3cms/blog/blog_posts_cell.rb +36 -0
- data/app/controllers/k3cms/blog/base_controller.rb +29 -0
- data/app/controllers/k3cms/blog/blog_posts_controller.rb +82 -0
- data/app/models/k3cms/blog/ability.rb +37 -0
- data/app/models/k3cms/blog/blog_post.rb +75 -0
- data/app/models/user_decorator.rb +3 -0
- data/app/views/k3cms/blog/blog_posts/_form.html.erb +28 -0
- data/app/views/k3cms/blog/blog_posts/edit.html.erb +3 -0
- data/app/views/k3cms/blog/blog_posts/index.html.haml +3 -0
- data/app/views/k3cms/blog/blog_posts/new.html.erb +5 -0
- data/app/views/k3cms/blog/blog_posts/show.html.haml +41 -0
- data/app/views/k3cms/blog/init.html.haml +34 -0
- data/config/authorization.rb +37 -0
- data/config/locales/validates_timeliness.en.yml +16 -0
- data/config/routes.rb +3 -0
- data/db/migrate/20110113015852_create_k3_blog_posts.rb +17 -0
- data/db/migrate/20110118015034_create_slugs.rb +18 -0
- data/db/migrate/20110118023300_add_cached_slug_to_blog_posts.rb +10 -0
- data/db/migrate/20110120172202_add_meta_description_to_blog_posts.rb +15 -0
- data/db/migrate/20110415180204_rename_to_k3cms_blog_posts.rb +9 -0
- data/image_source/famfamfam_silk_icons/information.png +0 -0
- data/image_source/famfamfam_silk_icons/page_add.png +0 -0
- data/image_source/famfamfam_silk_icons/page_delete.png +0 -0
- data/image_source/famfamfam_silk_icons/page_white_add.png +0 -0
- data/image_source/famfamfam_silk_icons/text_list_bullets.png +0 -0
- data/image_source/icons.xcf +0 -0
- data/k3cms_blog.gemspec +37 -0
- data/lib/form_tag_helper.rb +3 -0
- data/lib/k3cms/blog/railtie.rb +67 -0
- data/lib/k3cms/blog/version.rb +5 -0
- data/lib/k3cms_blog.rb +8 -0
- data/lib/tasks/tasks.rake +17 -0
- data/public/images/k3cms/blog/icons.png +0 -0
- data/public/images/k3cms/blog/new.png +0 -0
- data/public/javascripts/k3cms/blog.js +13 -0
- data/public/stylesheets/k3cms/blog.css +53 -0
- data/spec/connection_and_schema.rb +12 -0
- data/spec/models/blog_post_spec.rb +254 -0
- data/spec/spec_helper.rb +49 -0
- metadata +340 -0
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'facets'
|
2
|
+
require 'rails'
|
3
|
+
require 'action_pack'
|
4
|
+
require 'action_view/railtie' # So that config.action_view is available in railtie.rb
|
5
|
+
require 'active_record' # Make sure this gets required before attribute_normalizer
|
6
|
+
require 'cells'
|
7
|
+
Bundler.require(:default, :development)
|
8
|
+
|
9
|
+
require File.expand_path('../../lib/k3cms_blog', __FILE__)
|
10
|
+
|
11
|
+
require 'connection_and_schema'
|
12
|
+
|
13
|
+
|
14
|
+
class User < ActiveRecord::Base
|
15
|
+
end
|
16
|
+
|
17
|
+
module TestApp
|
18
|
+
class Application < Rails::Application
|
19
|
+
config.active_support.deprecation = :stderr
|
20
|
+
end
|
21
|
+
end
|
22
|
+
TestApp::Application.initialize!
|
23
|
+
|
24
|
+
require 'rspec/rails'
|
25
|
+
|
26
|
+
# Requires supporting ruby files with custom matchers and macros, etc,
|
27
|
+
# in spec/support/ and its subdirectories.
|
28
|
+
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
|
29
|
+
|
30
|
+
RSpec.configure do |config|
|
31
|
+
# == Mock Framework
|
32
|
+
#
|
33
|
+
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
|
34
|
+
#
|
35
|
+
# config.mock_with :mocha
|
36
|
+
# config.mock_with :flexmock
|
37
|
+
# config.mock_with :rr
|
38
|
+
config.mock_with :rspec
|
39
|
+
|
40
|
+
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
|
41
|
+
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
42
|
+
|
43
|
+
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
44
|
+
# examples within a transaction, remove the following line or assign false
|
45
|
+
# instead of true.
|
46
|
+
config.use_transactional_fixtures = true
|
47
|
+
|
48
|
+
config.include AttributeNormalizer::RSpecMatcher
|
49
|
+
end
|
metadata
ADDED
@@ -0,0 +1,340 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: k3cms_blog
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Tyler Rick
|
9
|
+
- David Burry
|
10
|
+
autorequire:
|
11
|
+
bindir: bin
|
12
|
+
cert_chain: []
|
13
|
+
date: 2012-07-12 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: facets
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ! '>='
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '0'
|
31
|
+
- !ruby/object:Gem::Dependency
|
32
|
+
name: rails
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
34
|
+
none: false
|
35
|
+
requirements:
|
36
|
+
- - ~>
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: 3.0.0
|
39
|
+
type: :runtime
|
40
|
+
prerelease: false
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ~>
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 3.0.0
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: activerecord
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 3.0.0
|
55
|
+
type: :runtime
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ~>
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 3.0.0
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
name: actionpack
|
65
|
+
requirement: !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
67
|
+
requirements:
|
68
|
+
- - ~>
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: 3.0.0
|
71
|
+
type: :runtime
|
72
|
+
prerelease: false
|
73
|
+
version_requirements: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ~>
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: 3.0.0
|
79
|
+
- !ruby/object:Gem::Dependency
|
80
|
+
name: cancan
|
81
|
+
requirement: !ruby/object:Gem::Requirement
|
82
|
+
none: false
|
83
|
+
requirements:
|
84
|
+
- - ! '>='
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '0'
|
87
|
+
type: :runtime
|
88
|
+
prerelease: false
|
89
|
+
version_requirements: !ruby/object:Gem::Requirement
|
90
|
+
none: false
|
91
|
+
requirements:
|
92
|
+
- - ! '>='
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '0'
|
95
|
+
- !ruby/object:Gem::Dependency
|
96
|
+
name: cells
|
97
|
+
requirement: !ruby/object:Gem::Requirement
|
98
|
+
none: false
|
99
|
+
requirements:
|
100
|
+
- - ! '>='
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0'
|
103
|
+
type: :runtime
|
104
|
+
prerelease: false
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
106
|
+
none: false
|
107
|
+
requirements:
|
108
|
+
- - ! '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: attribute_normalizer
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
none: false
|
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
|
+
none: false
|
123
|
+
requirements:
|
124
|
+
- - ! '>='
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: '0'
|
127
|
+
- !ruby/object:Gem::Dependency
|
128
|
+
name: friendly_id
|
129
|
+
requirement: !ruby/object:Gem::Requirement
|
130
|
+
none: false
|
131
|
+
requirements:
|
132
|
+
- - ! '>='
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: '0'
|
135
|
+
type: :runtime
|
136
|
+
prerelease: false
|
137
|
+
version_requirements: !ruby/object:Gem::Requirement
|
138
|
+
none: false
|
139
|
+
requirements:
|
140
|
+
- - ! '>='
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '0'
|
143
|
+
- !ruby/object:Gem::Dependency
|
144
|
+
name: stringex
|
145
|
+
requirement: !ruby/object:Gem::Requirement
|
146
|
+
none: false
|
147
|
+
requirements:
|
148
|
+
- - ! '>='
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '0'
|
151
|
+
type: :runtime
|
152
|
+
prerelease: false
|
153
|
+
version_requirements: !ruby/object:Gem::Requirement
|
154
|
+
none: false
|
155
|
+
requirements:
|
156
|
+
- - ! '>='
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '0'
|
159
|
+
- !ruby/object:Gem::Dependency
|
160
|
+
name: k3cms_core
|
161
|
+
requirement: !ruby/object:Gem::Requirement
|
162
|
+
none: false
|
163
|
+
requirements:
|
164
|
+
- - ! '>='
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
type: :runtime
|
168
|
+
prerelease: false
|
169
|
+
version_requirements: !ruby/object:Gem::Requirement
|
170
|
+
none: false
|
171
|
+
requirements:
|
172
|
+
- - ! '>='
|
173
|
+
- !ruby/object:Gem::Version
|
174
|
+
version: '0'
|
175
|
+
- !ruby/object:Gem::Dependency
|
176
|
+
name: validates_timeliness
|
177
|
+
requirement: !ruby/object:Gem::Requirement
|
178
|
+
none: false
|
179
|
+
requirements:
|
180
|
+
- - ! '>='
|
181
|
+
- !ruby/object:Gem::Version
|
182
|
+
version: '0'
|
183
|
+
type: :runtime
|
184
|
+
prerelease: false
|
185
|
+
version_requirements: !ruby/object:Gem::Requirement
|
186
|
+
none: false
|
187
|
+
requirements:
|
188
|
+
- - ! '>='
|
189
|
+
- !ruby/object:Gem::Version
|
190
|
+
version: '0'
|
191
|
+
- !ruby/object:Gem::Dependency
|
192
|
+
name: rspec
|
193
|
+
requirement: !ruby/object:Gem::Requirement
|
194
|
+
none: false
|
195
|
+
requirements:
|
196
|
+
- - ! '>='
|
197
|
+
- !ruby/object:Gem::Version
|
198
|
+
version: '0'
|
199
|
+
type: :development
|
200
|
+
prerelease: false
|
201
|
+
version_requirements: !ruby/object:Gem::Requirement
|
202
|
+
none: false
|
203
|
+
requirements:
|
204
|
+
- - ! '>='
|
205
|
+
- !ruby/object:Gem::Version
|
206
|
+
version: '0'
|
207
|
+
- !ruby/object:Gem::Dependency
|
208
|
+
name: rspec-rails
|
209
|
+
requirement: !ruby/object:Gem::Requirement
|
210
|
+
none: false
|
211
|
+
requirements:
|
212
|
+
- - ! '>='
|
213
|
+
- !ruby/object:Gem::Version
|
214
|
+
version: '0'
|
215
|
+
type: :development
|
216
|
+
prerelease: false
|
217
|
+
version_requirements: !ruby/object:Gem::Requirement
|
218
|
+
none: false
|
219
|
+
requirements:
|
220
|
+
- - ! '>='
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '0'
|
223
|
+
- !ruby/object:Gem::Dependency
|
224
|
+
name: sqlite3-ruby
|
225
|
+
requirement: !ruby/object:Gem::Requirement
|
226
|
+
none: false
|
227
|
+
requirements:
|
228
|
+
- - ! '>='
|
229
|
+
- !ruby/object:Gem::Version
|
230
|
+
version: '0'
|
231
|
+
type: :development
|
232
|
+
prerelease: false
|
233
|
+
version_requirements: !ruby/object:Gem::Requirement
|
234
|
+
none: false
|
235
|
+
requirements:
|
236
|
+
- - ! '>='
|
237
|
+
- !ruby/object:Gem::Version
|
238
|
+
version: '0'
|
239
|
+
- !ruby/object:Gem::Dependency
|
240
|
+
name: ruby-debug19
|
241
|
+
requirement: !ruby/object:Gem::Requirement
|
242
|
+
none: false
|
243
|
+
requirements:
|
244
|
+
- - ! '>='
|
245
|
+
- !ruby/object:Gem::Version
|
246
|
+
version: '0'
|
247
|
+
type: :development
|
248
|
+
prerelease: false
|
249
|
+
version_requirements: !ruby/object:Gem::Requirement
|
250
|
+
none: false
|
251
|
+
requirements:
|
252
|
+
- - ! '>='
|
253
|
+
- !ruby/object:Gem::Version
|
254
|
+
version: '0'
|
255
|
+
description: Provides a simple blog
|
256
|
+
email:
|
257
|
+
- Tyler Rick <tyler@k3integrations.com>
|
258
|
+
- David Burry <david@k3integrations.com>
|
259
|
+
executables: []
|
260
|
+
extensions: []
|
261
|
+
extra_rdoc_files: []
|
262
|
+
files:
|
263
|
+
- .gitignore
|
264
|
+
- .rspec
|
265
|
+
- Gemfile
|
266
|
+
- Gemfile.lock
|
267
|
+
- License.txt
|
268
|
+
- Rakefile
|
269
|
+
- Readme.rdoc
|
270
|
+
- app/cells/k3cms/blog/blog_posts/index.html.haml
|
271
|
+
- app/cells/k3cms/blog/blog_posts/index.html.haml.haml
|
272
|
+
- app/cells/k3cms/blog/blog_posts/metadata_drawer.html.haml
|
273
|
+
- app/cells/k3cms/blog/blog_posts/published_status.html.haml
|
274
|
+
- app/cells/k3cms/blog/blog_posts_cell.rb
|
275
|
+
- app/controllers/k3cms/blog/base_controller.rb
|
276
|
+
- app/controllers/k3cms/blog/blog_posts_controller.rb
|
277
|
+
- app/models/k3cms/blog/ability.rb
|
278
|
+
- app/models/k3cms/blog/blog_post.rb
|
279
|
+
- app/models/user_decorator.rb
|
280
|
+
- app/views/k3cms/blog/blog_posts/_form.html.erb
|
281
|
+
- app/views/k3cms/blog/blog_posts/edit.html.erb
|
282
|
+
- app/views/k3cms/blog/blog_posts/index.html.haml
|
283
|
+
- app/views/k3cms/blog/blog_posts/new.html.erb
|
284
|
+
- app/views/k3cms/blog/blog_posts/show.html.haml
|
285
|
+
- app/views/k3cms/blog/init.html.haml
|
286
|
+
- config/authorization.rb
|
287
|
+
- config/locales/validates_timeliness.en.yml
|
288
|
+
- config/routes.rb
|
289
|
+
- db/migrate/20110113015852_create_k3_blog_posts.rb
|
290
|
+
- db/migrate/20110118015034_create_slugs.rb
|
291
|
+
- db/migrate/20110118023300_add_cached_slug_to_blog_posts.rb
|
292
|
+
- db/migrate/20110120172202_add_meta_description_to_blog_posts.rb
|
293
|
+
- db/migrate/20110415180204_rename_to_k3cms_blog_posts.rb
|
294
|
+
- image_source/famfamfam_silk_icons/information.png
|
295
|
+
- image_source/famfamfam_silk_icons/page_add.png
|
296
|
+
- image_source/famfamfam_silk_icons/page_delete.png
|
297
|
+
- image_source/famfamfam_silk_icons/page_white_add.png
|
298
|
+
- image_source/famfamfam_silk_icons/text_list_bullets.png
|
299
|
+
- image_source/icons.xcf
|
300
|
+
- k3cms_blog.gemspec
|
301
|
+
- lib/form_tag_helper.rb
|
302
|
+
- lib/k3cms/blog/railtie.rb
|
303
|
+
- lib/k3cms/blog/version.rb
|
304
|
+
- lib/k3cms_blog.rb
|
305
|
+
- lib/tasks/tasks.rake
|
306
|
+
- public/images/k3cms/blog/icons.png
|
307
|
+
- public/images/k3cms/blog/new.png
|
308
|
+
- public/javascripts/k3cms/blog.js
|
309
|
+
- public/stylesheets/k3cms/blog.css
|
310
|
+
- spec/connection_and_schema.rb
|
311
|
+
- spec/models/blog_post_spec.rb
|
312
|
+
- spec/spec_helper.rb
|
313
|
+
homepage: http://k3cms.org/k3cms_blog
|
314
|
+
licenses: []
|
315
|
+
post_install_message:
|
316
|
+
rdoc_options: []
|
317
|
+
require_paths:
|
318
|
+
- lib
|
319
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
320
|
+
none: false
|
321
|
+
requirements:
|
322
|
+
- - ! '>='
|
323
|
+
- !ruby/object:Gem::Version
|
324
|
+
version: '0'
|
325
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
326
|
+
none: false
|
327
|
+
requirements:
|
328
|
+
- - ! '>='
|
329
|
+
- !ruby/object:Gem::Version
|
330
|
+
version: '0'
|
331
|
+
requirements: []
|
332
|
+
rubyforge_project:
|
333
|
+
rubygems_version: 1.8.24
|
334
|
+
signing_key:
|
335
|
+
specification_version: 3
|
336
|
+
summary: K3cms Blog
|
337
|
+
test_files:
|
338
|
+
- spec/connection_and_schema.rb
|
339
|
+
- spec/models/blog_post_spec.rb
|
340
|
+
- spec/spec_helper.rb
|