noodall-articles 1.0.0

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 (67) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.markdown +33 -0
  3. data/Rakefile +39 -0
  4. data/app/assets/javascripts/noodall-articles/categories.js +7 -0
  5. data/app/controllers/admin/categories_controller.rb +7 -0
  6. data/app/helpers/articles_helper.rb +126 -0
  7. data/app/models/article.rb +58 -0
  8. data/app/models/article_list.rb +49 -0
  9. data/app/models/latest_articles.rb +28 -0
  10. data/app/views/admin/components/_latest_articles.html.erb +21 -0
  11. data/app/views/admin/nodes/_article.html.erb +55 -0
  12. data/app/views/admin/nodes/_article_list.html.erb +45 -0
  13. data/app/views/application/_article_sidebar.html.erb +74 -0
  14. data/app/views/components/_latest_articles.html.erb +18 -0
  15. data/app/views/nodes/article.html.erb +31 -0
  16. data/app/views/nodes/article_list.html.erb +41 -0
  17. data/app/views/nodes/article_list.rss.builder +19 -0
  18. data/config/cucumber.yml +8 -0
  19. data/config/routes.rb +5 -0
  20. data/lib/generators/noodall/articles/views/USAGE +5 -0
  21. data/lib/generators/noodall/articles/views/views_generator.rb +7 -0
  22. data/lib/noodall/articles/archive.rb +56 -0
  23. data/lib/noodall/articles/categories.rb +39 -0
  24. data/lib/noodall/articles/custom_link_renderer.rb +25 -0
  25. data/lib/noodall/articles/engine.rb +9 -0
  26. data/lib/noodall/articles/version.rb +5 -0
  27. data/lib/noodall-articles.rb +1 -0
  28. data/lib/tasks/cucumber.rake +65 -0
  29. data/lib/tasks/noodall-articles_tasks.rake +4 -0
  30. data/test/dummy/Rakefile +7 -0
  31. data/test/dummy/app/assets/javascripts/application.js +9 -0
  32. data/test/dummy/app/assets/stylesheets/application.css +7 -0
  33. data/test/dummy/app/controllers/application_controller.rb +26 -0
  34. data/test/dummy/app/helpers/application_helper.rb +2 -0
  35. data/test/dummy/app/models/content_page.rb +5 -0
  36. data/test/dummy/app/models/user.rb +31 -0
  37. data/test/dummy/app/views/admin/nodes/_content_page.html.erb +45 -0
  38. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  39. data/test/dummy/app/views/nodes/content_page.html.erb +6 -0
  40. data/test/dummy/config/application.rb +51 -0
  41. data/test/dummy/config/boot.rb +10 -0
  42. data/test/dummy/config/environment.rb +5 -0
  43. data/test/dummy/config/environments/development.rb +30 -0
  44. data/test/dummy/config/environments/production.rb +60 -0
  45. data/test/dummy/config/environments/test.rb +39 -0
  46. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  47. data/test/dummy/config/initializers/inflections.rb +10 -0
  48. data/test/dummy/config/initializers/mime_types.rb +5 -0
  49. data/test/dummy/config/initializers/noodall.rb +1 -0
  50. data/test/dummy/config/initializers/noodall_dragonfly.rb +8 -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/initializers/wrap_parameters.rb +10 -0
  54. data/test/dummy/config/locales/en.yml +5 -0
  55. data/test/dummy/config/mongo.yml +6 -0
  56. data/test/dummy/config/routes.rb +9 -0
  57. data/test/dummy/config/sitemap.yml +6 -0
  58. data/test/dummy/config.ru +4 -0
  59. data/test/dummy/public/404.html +26 -0
  60. data/test/dummy/public/422.html +26 -0
  61. data/test/dummy/public/500.html +26 -0
  62. data/test/dummy/public/favicon.ico +0 -0
  63. data/test/dummy/script/rails +6 -0
  64. data/test/integration/navigation_test.rb +9 -0
  65. data/test/noodall-articles_test.rb +7 -0
  66. data/test/test_helper.rb +10 -0
  67. metadata +165 -0
@@ -0,0 +1 @@
1
+ Noodall::Node.slot :small, LatestArticles
@@ -0,0 +1,8 @@
1
+ # Configuration for processing and encoding
2
+ app = Dragonfly::App[:noodall_assets]
3
+ app.configure_with(:imagemagick)
4
+ app.configure_with(:rails)
5
+ app.datastore = Dragonfly::DataStorage::MongoDataStore.new :db => MongoMapper.database
6
+
7
+ # For more info about Dragonfly configuration please visit
8
+ # http://markevans.github.com/dragonfly/
@@ -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
+ Dummy::Application.config.secret_token = 'dde69b6a4a594a66c3d49eedb525bc7371a90dbed0efac5ff8a1d5cff57cb82ce973026845af5c27902ae3f4a78352fd7584b8316c1a5bf4a7e4778c90ef4538'
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Dummy::Application.config.session_store :cookie_store, key: '_dummy_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
+ # Dummy::Application.config.session_store :active_record_store
@@ -0,0 +1,10 @@
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
+
@@ -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,6 @@
1
+ development:
2
+ database: noodall-articles_development
3
+ test:
4
+ database: noodall-articles_test
5
+ production:
6
+ database: noodall-articles_production
@@ -0,0 +1,9 @@
1
+ require 'noodall/routes'
2
+ Dummy::Application.routes.draw do
3
+ # Do something
4
+ namespace :admin do
5
+ resources :categories, :only => [:index]
6
+ end
7
+ end
8
+
9
+ Noodall::Routes.draw(Dummy::Application)
@@ -0,0 +1,6 @@
1
+ home:
2
+ title: Home
3
+ type: Home
4
+ news:
5
+ title: News
6
+ type: ArticleList
@@ -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 Dummy::Application
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ <p>We've been notified about this issue and we'll take a look at it shortly.</p>
24
+ </div>
25
+ </body>
26
+ </html>
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'
@@ -0,0 +1,9 @@
1
+ require 'test_helper'
2
+
3
+ class NavigationTest < ActionDispatch::IntegrationTest
4
+
5
+ # test "the truth" do
6
+ # assert true
7
+ # end
8
+ end
9
+
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class NoodallArticlesTest < ActiveSupport::TestCase
4
+ test "truth" do
5
+ assert_kind_of Module, NoodallArticles
6
+ end
7
+ end
@@ -0,0 +1,10 @@
1
+ # Configure Rails Environment
2
+ ENV["RAILS_ENV"] = "test"
3
+
4
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
+ require "rails/test_help"
6
+
7
+ Rails.backtrace_cleaner.remove_silencers!
8
+
9
+ # Load support files
10
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
metadata ADDED
@@ -0,0 +1,165 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: noodall-articles
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Steve England
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-07-04 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: &2153205240 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 3.1.3
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *2153205240
25
+ description: Simple blog like functionality for Noodall
26
+ email:
27
+ - steve@wearebeef.co.uk
28
+ executables: []
29
+ extensions: []
30
+ extra_rdoc_files: []
31
+ files:
32
+ - app/assets/javascripts/noodall-articles/categories.js
33
+ - app/controllers/admin/categories_controller.rb
34
+ - app/helpers/articles_helper.rb
35
+ - app/models/article.rb
36
+ - app/models/article_list.rb
37
+ - app/models/latest_articles.rb
38
+ - app/views/admin/components/_latest_articles.html.erb
39
+ - app/views/admin/nodes/_article.html.erb
40
+ - app/views/admin/nodes/_article_list.html.erb
41
+ - app/views/application/_article_sidebar.html.erb
42
+ - app/views/components/_latest_articles.html.erb
43
+ - app/views/nodes/article.html.erb
44
+ - app/views/nodes/article_list.html.erb
45
+ - app/views/nodes/article_list.rss.builder
46
+ - config/cucumber.yml
47
+ - config/routes.rb
48
+ - lib/generators/noodall/articles/views/USAGE
49
+ - lib/generators/noodall/articles/views/views_generator.rb
50
+ - lib/noodall/articles/archive.rb
51
+ - lib/noodall/articles/categories.rb
52
+ - lib/noodall/articles/custom_link_renderer.rb
53
+ - lib/noodall/articles/engine.rb
54
+ - lib/noodall/articles/version.rb
55
+ - lib/noodall-articles.rb
56
+ - lib/tasks/cucumber.rake
57
+ - lib/tasks/noodall-articles_tasks.rake
58
+ - MIT-LICENSE
59
+ - Rakefile
60
+ - README.markdown
61
+ - test/dummy/app/assets/javascripts/application.js
62
+ - test/dummy/app/assets/stylesheets/application.css
63
+ - test/dummy/app/controllers/application_controller.rb
64
+ - test/dummy/app/helpers/application_helper.rb
65
+ - test/dummy/app/models/content_page.rb
66
+ - test/dummy/app/models/user.rb
67
+ - test/dummy/app/views/admin/nodes/_content_page.html.erb
68
+ - test/dummy/app/views/layouts/application.html.erb
69
+ - test/dummy/app/views/nodes/content_page.html.erb
70
+ - test/dummy/config/application.rb
71
+ - test/dummy/config/boot.rb
72
+ - test/dummy/config/environment.rb
73
+ - test/dummy/config/environments/development.rb
74
+ - test/dummy/config/environments/production.rb
75
+ - test/dummy/config/environments/test.rb
76
+ - test/dummy/config/initializers/backtrace_silencers.rb
77
+ - test/dummy/config/initializers/inflections.rb
78
+ - test/dummy/config/initializers/mime_types.rb
79
+ - test/dummy/config/initializers/noodall.rb
80
+ - test/dummy/config/initializers/noodall_dragonfly.rb
81
+ - test/dummy/config/initializers/secret_token.rb
82
+ - test/dummy/config/initializers/session_store.rb
83
+ - test/dummy/config/initializers/wrap_parameters.rb
84
+ - test/dummy/config/locales/en.yml
85
+ - test/dummy/config/mongo.yml
86
+ - test/dummy/config/routes.rb
87
+ - test/dummy/config/sitemap.yml
88
+ - test/dummy/config.ru
89
+ - test/dummy/public/404.html
90
+ - test/dummy/public/422.html
91
+ - test/dummy/public/500.html
92
+ - test/dummy/public/favicon.ico
93
+ - test/dummy/Rakefile
94
+ - test/dummy/script/rails
95
+ - test/integration/navigation_test.rb
96
+ - test/noodall-articles_test.rb
97
+ - test/test_helper.rb
98
+ homepage: https://github.com/noodall/noodall-articles
99
+ licenses: []
100
+ post_install_message:
101
+ rdoc_options: []
102
+ require_paths:
103
+ - lib
104
+ required_ruby_version: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ segments:
111
+ - 0
112
+ hash: 3413178109618828124
113
+ required_rubygems_version: !ruby/object:Gem::Requirement
114
+ none: false
115
+ requirements:
116
+ - - ! '>='
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
+ segments:
120
+ - 0
121
+ hash: 3413178109618828124
122
+ requirements: []
123
+ rubyforge_project:
124
+ rubygems_version: 1.8.10
125
+ signing_key:
126
+ specification_version: 3
127
+ summary: Simple blog like functionality for Noodall
128
+ test_files:
129
+ - test/dummy/app/assets/javascripts/application.js
130
+ - test/dummy/app/assets/stylesheets/application.css
131
+ - test/dummy/app/controllers/application_controller.rb
132
+ - test/dummy/app/helpers/application_helper.rb
133
+ - test/dummy/app/models/content_page.rb
134
+ - test/dummy/app/models/user.rb
135
+ - test/dummy/app/views/admin/nodes/_content_page.html.erb
136
+ - test/dummy/app/views/layouts/application.html.erb
137
+ - test/dummy/app/views/nodes/content_page.html.erb
138
+ - test/dummy/config/application.rb
139
+ - test/dummy/config/boot.rb
140
+ - test/dummy/config/environment.rb
141
+ - test/dummy/config/environments/development.rb
142
+ - test/dummy/config/environments/production.rb
143
+ - test/dummy/config/environments/test.rb
144
+ - test/dummy/config/initializers/backtrace_silencers.rb
145
+ - test/dummy/config/initializers/inflections.rb
146
+ - test/dummy/config/initializers/mime_types.rb
147
+ - test/dummy/config/initializers/noodall.rb
148
+ - test/dummy/config/initializers/noodall_dragonfly.rb
149
+ - test/dummy/config/initializers/secret_token.rb
150
+ - test/dummy/config/initializers/session_store.rb
151
+ - test/dummy/config/initializers/wrap_parameters.rb
152
+ - test/dummy/config/locales/en.yml
153
+ - test/dummy/config/mongo.yml
154
+ - test/dummy/config/routes.rb
155
+ - test/dummy/config/sitemap.yml
156
+ - test/dummy/config.ru
157
+ - test/dummy/public/404.html
158
+ - test/dummy/public/422.html
159
+ - test/dummy/public/500.html
160
+ - test/dummy/public/favicon.ico
161
+ - test/dummy/Rakefile
162
+ - test/dummy/script/rails
163
+ - test/integration/navigation_test.rb
164
+ - test/noodall-articles_test.rb
165
+ - test/test_helper.rb