blogg 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +15 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +3 -0
  4. data/Rakefile +40 -0
  5. data/app/assets/javascripts/blogg/application.js +15 -0
  6. data/app/assets/javascripts/blogg/posts.js +2 -0
  7. data/app/assets/stylesheets/blogg/application.css +13 -0
  8. data/app/assets/stylesheets/blogg/posts.css +4 -0
  9. data/app/assets/stylesheets/scaffold.css +56 -0
  10. data/app/controllers/blogg/application_controller.rb +4 -0
  11. data/app/controllers/blogg/posts_controller.rb +87 -0
  12. data/app/helpers/blogg/application_helper.rb +4 -0
  13. data/app/helpers/blogg/posts_helper.rb +4 -0
  14. data/app/models/blogg/post.rb +5 -0
  15. data/app/views/blogg/posts/_form.html.erb +25 -0
  16. data/app/views/blogg/posts/edit.html.erb +6 -0
  17. data/app/views/blogg/posts/index.html.erb +25 -0
  18. data/app/views/blogg/posts/new.html.erb +5 -0
  19. data/app/views/blogg/posts/show.html.erb +15 -0
  20. data/app/views/layouts/blogg/application.html.erb +14 -0
  21. data/config/routes.rb +4 -0
  22. data/db/migrate/20151127152905_create_blogg_posts.rb +10 -0
  23. data/lib/blogg/engine.rb +5 -0
  24. data/lib/blogg/version.rb +3 -0
  25. data/lib/blogg.rb +4 -0
  26. data/lib/tasks/blogg_tasks.rake +4 -0
  27. data/test/blogg_test.rb +7 -0
  28. data/test/dummy/README.rdoc +261 -0
  29. data/test/dummy/Rakefile +7 -0
  30. data/test/dummy/app/assets/javascripts/application.js +15 -0
  31. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  32. data/test/dummy/app/controllers/application_controller.rb +3 -0
  33. data/test/dummy/app/helpers/application_helper.rb +2 -0
  34. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  35. data/test/dummy/config/application.rb +59 -0
  36. data/test/dummy/config/boot.rb +10 -0
  37. data/test/dummy/config/database.yml +25 -0
  38. data/test/dummy/config/environment.rb +5 -0
  39. data/test/dummy/config/environments/development.rb +37 -0
  40. data/test/dummy/config/environments/production.rb +67 -0
  41. data/test/dummy/config/environments/test.rb +37 -0
  42. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  43. data/test/dummy/config/initializers/inflections.rb +15 -0
  44. data/test/dummy/config/initializers/mime_types.rb +5 -0
  45. data/test/dummy/config/initializers/secret_token.rb +7 -0
  46. data/test/dummy/config/initializers/session_store.rb +8 -0
  47. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  48. data/test/dummy/config/locales/en.yml +5 -0
  49. data/test/dummy/config/routes.rb +4 -0
  50. data/test/dummy/config.ru +4 -0
  51. data/test/dummy/db/development.sqlite3 +0 -0
  52. data/test/dummy/db/schema.rb +16 -0
  53. data/test/dummy/log/development.log +5 -0
  54. data/test/dummy/public/404.html +26 -0
  55. data/test/dummy/public/422.html +26 -0
  56. data/test/dummy/public/500.html +25 -0
  57. data/test/dummy/public/favicon.ico +0 -0
  58. data/test/dummy/script/rails +6 -0
  59. data/test/fixtures/blogg/posts.yml +9 -0
  60. data/test/functional/blogg/posts_controller_test.rb +51 -0
  61. data/test/integration/navigation_test.rb +10 -0
  62. data/test/test_helper.rb +15 -0
  63. data/test/unit/blogg/post_test.rb +9 -0
  64. data/test/unit/helpers/blogg/posts_helper_test.rb +6 -0
  65. metadata +179 -0
@@ -0,0 +1,16 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended to check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(:version => 0) do
15
+
16
+ end
@@ -0,0 +1,5 @@
1
+ Connecting to database specified by database.yml
2
+  (0.2ms) select sqlite_version(*)
3
+  (59.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
4
+  (58.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5
+  (2.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
@@ -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,25 @@
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
+ </div>
24
+ </body>
25
+ </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
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2
+
3
+ one:
4
+ title: MyString
5
+ text: MyText
6
+
7
+ two:
8
+ title: MyString
9
+ text: MyText
@@ -0,0 +1,51 @@
1
+ require 'test_helper'
2
+
3
+ module Blogg
4
+ class PostsControllerTest < ActionController::TestCase
5
+ setup do
6
+ @post = posts(:one)
7
+ end
8
+
9
+ test "should get index" do
10
+ get :index
11
+ assert_response :success
12
+ assert_not_nil assigns(:posts)
13
+ end
14
+
15
+ test "should get new" do
16
+ get :new
17
+ assert_response :success
18
+ end
19
+
20
+ test "should create post" do
21
+ assert_difference('Post.count') do
22
+ post :create, post: { text: @post.text, title: @post.title }
23
+ end
24
+
25
+ assert_redirected_to post_path(assigns(:post))
26
+ end
27
+
28
+ test "should show post" do
29
+ get :show, id: @post
30
+ assert_response :success
31
+ end
32
+
33
+ test "should get edit" do
34
+ get :edit, id: @post
35
+ assert_response :success
36
+ end
37
+
38
+ test "should update post" do
39
+ put :update, id: @post, post: { text: @post.text, title: @post.title }
40
+ assert_redirected_to post_path(assigns(:post))
41
+ end
42
+
43
+ test "should destroy post" do
44
+ assert_difference('Post.count', -1) do
45
+ delete :destroy, id: @post
46
+ end
47
+
48
+ assert_redirected_to posts_path
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,10 @@
1
+ require 'test_helper'
2
+
3
+ class NavigationTest < ActionDispatch::IntegrationTest
4
+ fixtures :all
5
+
6
+ # test "the truth" do
7
+ # assert true
8
+ # end
9
+ end
10
+
@@ -0,0 +1,15 @@
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 }
11
+
12
+ # Load fixtures from the engine
13
+ if ActiveSupport::TestCase.method_defined?(:fixture_path=)
14
+ ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
15
+ end
@@ -0,0 +1,9 @@
1
+ require 'test_helper'
2
+
3
+ module Blogg
4
+ class PostTest < ActiveSupport::TestCase
5
+ # test "the truth" do
6
+ # assert true
7
+ # end
8
+ end
9
+ end
@@ -0,0 +1,6 @@
1
+ require 'test_helper'
2
+
3
+ module Blogg
4
+ class PostsHelperTest < ActionView::TestCase
5
+ end
6
+ end
metadata ADDED
@@ -0,0 +1,179 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: blogg
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Alexander Ponomarenko
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-11-27 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '3.2'
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: 3.2.13
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '3.2'
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: 3.2.13
33
+ - !ruby/object:Gem::Dependency
34
+ name: sqlite3
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ~>
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ type: :development
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ~>
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ description: Blogg is very simple blogging system for your rails application
48
+ email:
49
+ - mcmegavolt@gmail.com
50
+ executables: []
51
+ extensions: []
52
+ extra_rdoc_files: []
53
+ files:
54
+ - MIT-LICENSE
55
+ - README.rdoc
56
+ - Rakefile
57
+ - app/assets/javascripts/blogg/application.js
58
+ - app/assets/javascripts/blogg/posts.js
59
+ - app/assets/stylesheets/blogg/application.css
60
+ - app/assets/stylesheets/blogg/posts.css
61
+ - app/assets/stylesheets/scaffold.css
62
+ - app/controllers/blogg/application_controller.rb
63
+ - app/controllers/blogg/posts_controller.rb
64
+ - app/helpers/blogg/application_helper.rb
65
+ - app/helpers/blogg/posts_helper.rb
66
+ - app/models/blogg/post.rb
67
+ - app/views/blogg/posts/_form.html.erb
68
+ - app/views/blogg/posts/edit.html.erb
69
+ - app/views/blogg/posts/index.html.erb
70
+ - app/views/blogg/posts/new.html.erb
71
+ - app/views/blogg/posts/show.html.erb
72
+ - app/views/layouts/blogg/application.html.erb
73
+ - config/routes.rb
74
+ - db/migrate/20151127152905_create_blogg_posts.rb
75
+ - lib/blogg.rb
76
+ - lib/blogg/engine.rb
77
+ - lib/blogg/version.rb
78
+ - lib/tasks/blogg_tasks.rake
79
+ - test/blogg_test.rb
80
+ - test/dummy/README.rdoc
81
+ - test/dummy/Rakefile
82
+ - test/dummy/app/assets/javascripts/application.js
83
+ - test/dummy/app/assets/stylesheets/application.css
84
+ - test/dummy/app/controllers/application_controller.rb
85
+ - test/dummy/app/helpers/application_helper.rb
86
+ - test/dummy/app/views/layouts/application.html.erb
87
+ - test/dummy/config.ru
88
+ - test/dummy/config/application.rb
89
+ - test/dummy/config/boot.rb
90
+ - test/dummy/config/database.yml
91
+ - test/dummy/config/environment.rb
92
+ - test/dummy/config/environments/development.rb
93
+ - test/dummy/config/environments/production.rb
94
+ - test/dummy/config/environments/test.rb
95
+ - test/dummy/config/initializers/backtrace_silencers.rb
96
+ - test/dummy/config/initializers/inflections.rb
97
+ - test/dummy/config/initializers/mime_types.rb
98
+ - test/dummy/config/initializers/secret_token.rb
99
+ - test/dummy/config/initializers/session_store.rb
100
+ - test/dummy/config/initializers/wrap_parameters.rb
101
+ - test/dummy/config/locales/en.yml
102
+ - test/dummy/config/routes.rb
103
+ - test/dummy/db/development.sqlite3
104
+ - test/dummy/db/schema.rb
105
+ - test/dummy/log/development.log
106
+ - test/dummy/public/404.html
107
+ - test/dummy/public/422.html
108
+ - test/dummy/public/500.html
109
+ - test/dummy/public/favicon.ico
110
+ - test/dummy/script/rails
111
+ - test/fixtures/blogg/posts.yml
112
+ - test/functional/blogg/posts_controller_test.rb
113
+ - test/integration/navigation_test.rb
114
+ - test/test_helper.rb
115
+ - test/unit/blogg/post_test.rb
116
+ - test/unit/helpers/blogg/posts_helper_test.rb
117
+ homepage: https://github.com/mcmegavolt/blogg
118
+ licenses:
119
+ - MIT
120
+ metadata: {}
121
+ post_install_message:
122
+ rdoc_options: []
123
+ require_paths:
124
+ - lib
125
+ required_ruby_version: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - ! '>='
128
+ - !ruby/object:Gem::Version
129
+ version: '0'
130
+ required_rubygems_version: !ruby/object:Gem::Requirement
131
+ requirements:
132
+ - - ! '>='
133
+ - !ruby/object:Gem::Version
134
+ version: '0'
135
+ requirements: []
136
+ rubyforge_project:
137
+ rubygems_version: 2.4.8
138
+ signing_key:
139
+ specification_version: 4
140
+ summary: Very simple blog for rails app
141
+ test_files:
142
+ - test/fixtures/blogg/posts.yml
143
+ - test/blogg_test.rb
144
+ - test/test_helper.rb
145
+ - test/dummy/log/development.log
146
+ - test/dummy/README.rdoc
147
+ - test/dummy/Rakefile
148
+ - test/dummy/script/rails
149
+ - test/dummy/db/development.sqlite3
150
+ - test/dummy/db/schema.rb
151
+ - test/dummy/public/422.html
152
+ - test/dummy/public/500.html
153
+ - test/dummy/public/favicon.ico
154
+ - test/dummy/public/404.html
155
+ - test/dummy/config.ru
156
+ - test/dummy/config/environment.rb
157
+ - test/dummy/config/initializers/session_store.rb
158
+ - test/dummy/config/initializers/secret_token.rb
159
+ - test/dummy/config/initializers/inflections.rb
160
+ - test/dummy/config/initializers/mime_types.rb
161
+ - test/dummy/config/initializers/backtrace_silencers.rb
162
+ - test/dummy/config/initializers/wrap_parameters.rb
163
+ - test/dummy/config/application.rb
164
+ - test/dummy/config/boot.rb
165
+ - test/dummy/config/database.yml
166
+ - test/dummy/config/routes.rb
167
+ - test/dummy/config/locales/en.yml
168
+ - test/dummy/config/environments/development.rb
169
+ - test/dummy/config/environments/test.rb
170
+ - test/dummy/config/environments/production.rb
171
+ - test/dummy/app/views/layouts/application.html.erb
172
+ - test/dummy/app/assets/stylesheets/application.css
173
+ - test/dummy/app/assets/javascripts/application.js
174
+ - test/dummy/app/controllers/application_controller.rb
175
+ - test/dummy/app/helpers/application_helper.rb
176
+ - test/unit/blogg/post_test.rb
177
+ - test/unit/helpers/blogg/posts_helper_test.rb
178
+ - test/functional/blogg/posts_controller_test.rb
179
+ - test/integration/navigation_test.rb