exposition 0.0.3.pre.alpha
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +25 -0
- data/app/assets/images/exposition/twitter.svg +10 -0
- data/app/assets/javascripts/exposition/admin/application.js +3 -0
- data/app/assets/stylesheets/exposition/_breakpoints.scss +5 -0
- data/app/assets/stylesheets/exposition/_code.scss +83 -0
- data/app/assets/stylesheets/exposition/_footer.scss +9 -0
- data/app/assets/stylesheets/exposition/_header.scss +62 -0
- data/app/assets/stylesheets/exposition/_layout.scss +28 -0
- data/app/assets/stylesheets/exposition/_mixins.scss +4 -0
- data/app/assets/stylesheets/exposition/_normalize.scss +427 -0
- data/app/assets/stylesheets/exposition/_pagination.scss +18 -0
- data/app/assets/stylesheets/exposition/_posts.scss +96 -0
- data/app/assets/stylesheets/exposition/_tags.scss +12 -0
- data/app/assets/stylesheets/exposition/_variables.scss +16 -0
- data/app/assets/stylesheets/exposition/admin/_layout.scss +58 -0
- data/app/assets/stylesheets/exposition/admin/_mixins.scss +3 -0
- data/app/assets/stylesheets/exposition/admin/_notifications.scss +46 -0
- data/app/assets/stylesheets/exposition/admin/_pagination.scss +12 -0
- data/app/assets/stylesheets/exposition/admin/_posts.scss +7 -0
- data/app/assets/stylesheets/exposition/admin/application.scss +9 -0
- data/app/assets/stylesheets/exposition/admin/base/_base.scss +15 -0
- data/app/assets/stylesheets/exposition/admin/base/_buttons.scss +31 -0
- data/app/assets/stylesheets/exposition/admin/base/_forms.scss +78 -0
- data/app/assets/stylesheets/exposition/admin/base/_grid-settings.scss +14 -0
- data/app/assets/stylesheets/exposition/admin/base/_lists.scss +31 -0
- data/app/assets/stylesheets/exposition/admin/base/_tables.scss +25 -0
- data/app/assets/stylesheets/exposition/admin/base/_typography.scss +55 -0
- data/app/assets/stylesheets/exposition/admin/base/_variables.scss +35 -0
- data/app/assets/stylesheets/exposition/admin/normalize.scss +427 -0
- data/app/assets/stylesheets/exposition/application.scss +17 -0
- data/app/controllers/exposition/admin/admin_controller.rb +5 -0
- data/app/controllers/exposition/admin/posts_controller.rb +5 -0
- data/app/controllers/exposition/admin/sessions_controller.rb +31 -0
- data/app/controllers/exposition/admin/tags_controller.rb +5 -0
- data/app/controllers/exposition/application_controller.rb +8 -0
- data/app/controllers/exposition/posts_controller.rb +5 -0
- data/app/controllers/exposition/tags_controller.rb +5 -0
- data/app/helpers/exposition/admin/flashes_helper.rb +7 -0
- data/app/helpers/exposition/admin/sessions_helper.rb +20 -0
- data/app/helpers/exposition/markdown_helper.rb +21 -0
- data/app/models/categorical/tag.rb +6 -0
- data/app/models/exposition/encryptor.rb +10 -0
- data/app/models/exposition/post.rb +5 -0
- data/app/models/exposition/user.rb +5 -0
- data/app/views/exposition/admin/images/index.html.haml +12 -0
- data/app/views/exposition/admin/images/new.html.haml +0 -0
- data/app/views/exposition/admin/posts/_error_handler.html.haml +8 -0
- data/app/views/exposition/admin/posts/_form_fields.html.haml +23 -0
- data/app/views/exposition/admin/posts/edit.html.haml +5 -0
- data/app/views/exposition/admin/posts/index.html.haml +23 -0
- data/app/views/exposition/admin/posts/new.html.haml +7 -0
- data/app/views/exposition/admin/posts/update.html.haml +2 -0
- data/app/views/exposition/admin/sessions/new.html.haml +10 -0
- data/app/views/exposition/admin/tags/_error_handler.html.haml +8 -0
- data/app/views/exposition/admin/tags/edit.html.haml +10 -0
- data/app/views/exposition/admin/tags/index.html.haml +18 -0
- data/app/views/exposition/admin/tags/new.html.haml +10 -0
- data/app/views/exposition/posts/_post.html.haml +8 -0
- data/app/views/exposition/posts/_tags.html.haml +6 -0
- data/app/views/exposition/posts/index.html.haml +8 -0
- data/app/views/exposition/posts/show.html.haml +5 -0
- data/app/views/exposition/tags/show.html.haml +6 -0
- data/app/views/layouts/exposition/admin.html.haml +22 -0
- data/app/views/layouts/exposition/application.html.haml +20 -0
- data/config/locales/en.yml +37 -0
- data/config/routes.rb +14 -0
- data/db/migrate/20160106220615_create_exposition_posters.rb +12 -0
- data/db/migrate/20160112194424_add_author_id_to_posts.rb +5 -0
- data/db/migrate/20160112200248_create_exposition_users.rb +14 -0
- data/db/migrate/20160112202302_add_slug_to_expositon_posts.rb +7 -0
- data/db/migrate/20160112204019_add_categorial_tags.rb +17 -0
- data/db/migrate/20160225203524_add_summary_to_posts.rb +5 -0
- data/db/migrate/20160226035733_convert_published_at_to_datetime.rb +9 -0
- data/lib/exposition.rb +19 -0
- data/lib/exposition/concerns/controllers/admin/admin_controller.rb +39 -0
- data/lib/exposition/concerns/controllers/admin/posts_controller.rb +70 -0
- data/lib/exposition/concerns/controllers/admin/tags_controller.rb +63 -0
- data/lib/exposition/concerns/controllers/posts_controller.rb +19 -0
- data/lib/exposition/concerns/controllers/tags_controller.rb +31 -0
- data/lib/exposition/concerns/models/post.rb +52 -0
- data/lib/exposition/concerns/models/user.rb +43 -0
- data/lib/exposition/engine.rb +14 -0
- data/lib/exposition/setup.rb +15 -0
- data/lib/exposition/version.rb +3 -0
- data/lib/tasks/exposition_tasks.rake +4 -0
- data/lib/tasks/setup.rb +17 -0
- data/spec/controllers/exposition/admin/admin_controller_spec.rb +88 -0
- data/spec/controllers/exposition/admin/posts_controller_spec.rb +153 -0
- data/spec/controllers/exposition/admin/sessions_controller_spec.rb +46 -0
- data/spec/controllers/exposition/admin/tags_controller_spec.rb +106 -0
- data/spec/controllers/exposition/posts_controller_spec.rb +43 -0
- data/spec/controllers/exposition/tags_controller_spec.rb +40 -0
- data/spec/dummy/Gemfile +5 -0
- data/spec/dummy/Gemfile.lock +173 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/Thorfile +1 -0
- data/spec/dummy/app/assets/javascripts/application.js +1 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +9 -0
- data/spec/dummy/bin/rake +9 -0
- data/spec/dummy/bin/setup +29 -0
- data/spec/dummy/bin/spring +15 -0
- data/spec/dummy/bin/thor +16 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +26 -0
- data/spec/dummy/config/boot.rb +3 -0
- data/spec/dummy/config/database.yml +12 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +41 -0
- data/spec/dummy/config/environments/production.rb +79 -0
- data/spec/dummy/config/environments/test.rb +42 -0
- data/spec/dummy/config/initializers/assets.rb +11 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/routes.rb +3 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/db/schema.rb +62 -0
- data/spec/dummy/db/seeds.rb +22 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/public/robots.txt +5 -0
- data/spec/factories/categorical/tags.rb +5 -0
- data/spec/factories/posts.rb +8 -0
- data/spec/factories/taggings.rb +7 -0
- data/spec/factories/users.rb +7 -0
- data/spec/features/admin/post_management_spec.rb +95 -0
- data/spec/features/admin/session_management_spec.rb +40 -0
- data/spec/features/admin/tags_management_spec.rb +59 -0
- data/spec/features/posts_index_spec.rb +28 -0
- data/spec/features/viewing_a_post_spec.rb +21 -0
- data/spec/features/viewing_posts_by_tag_spec.rb +17 -0
- data/spec/helpers/admin/flashes_helper_spec.rb +29 -0
- data/spec/helpers/admin/sessions_helper_spec.rb +56 -0
- data/spec/helpers/markdown_helper_spec.rb +10 -0
- data/spec/models/categorical/tag_spec.rb +35 -0
- data/spec/models/exposition/post_spec.rb +123 -0
- data/spec/models/exposition/user_spec.rb +15 -0
- data/spec/rails_helper.rb +47 -0
- data/spec/spec_helper.rb +11 -0
- data/spec/support/controllers.rb +6 -0
- data/spec/support/controllers/pagination.rb +17 -0
- data/spec/support/controllers/session_management.rb +20 -0
- data/spec/support/features.rb +6 -0
- data/spec/support/features/pagination.rb +22 -0
- data/spec/support/features/session_management.rb +17 -0
- data/spec/support/models.rb +5 -0
- data/spec/support/models/sluggable.rb +11 -0
- data/spec/tasks/setup_spec.rb +32 -0
- data/spec/views/admin/posts/index.html.haml_spec.rb +16 -0
- metadata +619 -0
@@ -0,0 +1,43 @@
|
|
1
|
+
require 'rails_helper'
|
2
|
+
|
3
|
+
RSpec.describe Exposition::PostsController, type: :controller do
|
4
|
+
routes { Exposition::Engine.routes }
|
5
|
+
describe "GET #index" do
|
6
|
+
it "finds all the posts that are published ordered by publish date" do
|
7
|
+
new_blog_post = create(:post, published: true)
|
8
|
+
old_blog_post = create(:post, published: true)
|
9
|
+
unpublished_blog_post = create(:post, published: false)
|
10
|
+
old_blog_post.published_at = Date.today - 1.day
|
11
|
+
old_blog_post.save!
|
12
|
+
|
13
|
+
get :index
|
14
|
+
|
15
|
+
expect(assigns(:posts)).to eq([new_blog_post, old_blog_post])
|
16
|
+
end
|
17
|
+
|
18
|
+
it "paginates the results in chunks of 10" do
|
19
|
+
posts = FactoryGirl.create_list(:post, 11, published: true)
|
20
|
+
|
21
|
+
get :index
|
22
|
+
|
23
|
+
expect(assigns(:posts).count).to eq(10)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
describe "GET #show" do
|
28
|
+
it "finds the published post based off the given id" do
|
29
|
+
blog_post = create(:post, published: true)
|
30
|
+
|
31
|
+
get :show, id: blog_post
|
32
|
+
|
33
|
+
expect(assigns(:post)).to eq(blog_post)
|
34
|
+
end
|
35
|
+
|
36
|
+
it "cannot find an unpublished post" do
|
37
|
+
blog_post = create(:post, published: false)
|
38
|
+
|
39
|
+
expect { get :show, id: blog_post }.
|
40
|
+
to raise_error(ActiveRecord::RecordNotFound)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'rails_helper'
|
2
|
+
|
3
|
+
RSpec.describe Exposition::TagsController, type: :controller do
|
4
|
+
routes { Exposition::Engine.routes }
|
5
|
+
|
6
|
+
describe "GET #show" do
|
7
|
+
it "finds the given tag" do
|
8
|
+
tag = create(:tag)
|
9
|
+
|
10
|
+
get :show, id: tag
|
11
|
+
|
12
|
+
expect(assigns(:tag)).to eq(tag)
|
13
|
+
end
|
14
|
+
|
15
|
+
it "finds all the published posts ordered by date with the tag" do
|
16
|
+
tag = create(:tag)
|
17
|
+
tagged_older_post = create(:post, published: true, tags: [tag])
|
18
|
+
tagged_newer_post = create(:post, published: true, tags: [tag])
|
19
|
+
tagged_unpublished_post = create(:post, published: false, tags: [tag])
|
20
|
+
untagged_post = create(:post, published: true)
|
21
|
+
|
22
|
+
tagged_older_post.published_at = Date.today - 2.days
|
23
|
+
tagged_newer_post.published_at = Date.today
|
24
|
+
tagged_older_post.save!
|
25
|
+
tagged_newer_post.save!
|
26
|
+
get :show, id: tag
|
27
|
+
|
28
|
+
expect(assigns(:taggables)).to eq([tagged_newer_post, tagged_older_post])
|
29
|
+
end
|
30
|
+
|
31
|
+
it "paginates the results in chunks of 10" do
|
32
|
+
tag = create(:tag)
|
33
|
+
posts = FactoryGirl.create_list(:post, 11, published: true, tags: [tag])
|
34
|
+
|
35
|
+
get :show, id: tag
|
36
|
+
|
37
|
+
expect(assigns(:taggables).count).to eq(10)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
data/spec/dummy/Gemfile
ADDED
@@ -0,0 +1,173 @@
|
|
1
|
+
PATH
|
2
|
+
remote: /Users/jklina/Development/exposition
|
3
|
+
specs:
|
4
|
+
exposition (0.0.3.pre.alpha)
|
5
|
+
bcrypt (~> 3.1)
|
6
|
+
bitters
|
7
|
+
bourbon (~> 4.2)
|
8
|
+
categorical
|
9
|
+
haml-rails (~> 0.9)
|
10
|
+
high_voltage (~> 2.3.0)
|
11
|
+
human_urls
|
12
|
+
jquery-rails (~> 4.1)
|
13
|
+
kaminari (~> 0.16)
|
14
|
+
neat (~> 1.7.2)
|
15
|
+
pg
|
16
|
+
rails (~> 4.2.5)
|
17
|
+
redcarpet (~> 3.0)
|
18
|
+
rouge (~> 1.8.0)
|
19
|
+
uglifier
|
20
|
+
|
21
|
+
GEM
|
22
|
+
remote: https://rubygems.org/
|
23
|
+
specs:
|
24
|
+
actionmailer (4.2.5)
|
25
|
+
actionpack (= 4.2.5)
|
26
|
+
actionview (= 4.2.5)
|
27
|
+
activejob (= 4.2.5)
|
28
|
+
mail (~> 2.5, >= 2.5.4)
|
29
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
30
|
+
actionpack (4.2.5)
|
31
|
+
actionview (= 4.2.5)
|
32
|
+
activesupport (= 4.2.5)
|
33
|
+
rack (~> 1.6)
|
34
|
+
rack-test (~> 0.6.2)
|
35
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
36
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
37
|
+
actionview (4.2.5)
|
38
|
+
activesupport (= 4.2.5)
|
39
|
+
builder (~> 3.1)
|
40
|
+
erubis (~> 2.7.0)
|
41
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
42
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
43
|
+
activejob (4.2.5)
|
44
|
+
activesupport (= 4.2.5)
|
45
|
+
globalid (>= 0.3.0)
|
46
|
+
activemodel (4.2.5)
|
47
|
+
activesupport (= 4.2.5)
|
48
|
+
builder (~> 3.1)
|
49
|
+
activerecord (4.2.5)
|
50
|
+
activemodel (= 4.2.5)
|
51
|
+
activesupport (= 4.2.5)
|
52
|
+
arel (~> 6.0)
|
53
|
+
activesupport (4.2.5)
|
54
|
+
i18n (~> 0.7)
|
55
|
+
json (~> 1.7, >= 1.7.7)
|
56
|
+
minitest (~> 5.1)
|
57
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
58
|
+
tzinfo (~> 1.1)
|
59
|
+
arel (6.0.3)
|
60
|
+
bcrypt (3.1.10)
|
61
|
+
bitters (1.2.0)
|
62
|
+
bourbon (>= 4.2)
|
63
|
+
sass (>= 3.4)
|
64
|
+
thor
|
65
|
+
bourbon (4.2.6)
|
66
|
+
sass (~> 3.4)
|
67
|
+
thor (~> 0.19)
|
68
|
+
builder (3.2.2)
|
69
|
+
categorical (0.0.4)
|
70
|
+
rails (>= 4.1)
|
71
|
+
concurrent-ruby (1.0.0)
|
72
|
+
erubis (2.7.0)
|
73
|
+
execjs (2.6.0)
|
74
|
+
globalid (0.3.6)
|
75
|
+
activesupport (>= 4.1.0)
|
76
|
+
haml (4.0.7)
|
77
|
+
tilt
|
78
|
+
haml-rails (0.9.0)
|
79
|
+
actionpack (>= 4.0.1)
|
80
|
+
activesupport (>= 4.0.1)
|
81
|
+
haml (>= 4.0.6, < 5.0)
|
82
|
+
html2haml (>= 1.0.1)
|
83
|
+
railties (>= 4.0.1)
|
84
|
+
high_voltage (2.3.0)
|
85
|
+
html2haml (2.0.0)
|
86
|
+
erubis (~> 2.7.0)
|
87
|
+
haml (~> 4.0.0)
|
88
|
+
nokogiri (~> 1.6.0)
|
89
|
+
ruby_parser (~> 3.5)
|
90
|
+
human_urls (0.1.2)
|
91
|
+
rails (>= 4.1)
|
92
|
+
i18n (0.7.0)
|
93
|
+
jquery-rails (4.1.0)
|
94
|
+
rails-dom-testing (~> 1.0)
|
95
|
+
railties (>= 4.2.0)
|
96
|
+
thor (>= 0.14, < 2.0)
|
97
|
+
json (1.8.3)
|
98
|
+
kaminari (0.16.3)
|
99
|
+
actionpack (>= 3.0.0)
|
100
|
+
activesupport (>= 3.0.0)
|
101
|
+
loofah (2.0.3)
|
102
|
+
nokogiri (>= 1.5.9)
|
103
|
+
mail (2.6.3)
|
104
|
+
mime-types (>= 1.16, < 3)
|
105
|
+
mime-types (2.99)
|
106
|
+
mini_portile2 (2.0.0)
|
107
|
+
minitest (5.8.4)
|
108
|
+
neat (1.7.2)
|
109
|
+
bourbon (>= 4.0)
|
110
|
+
sass (>= 3.3)
|
111
|
+
nokogiri (1.6.7.2)
|
112
|
+
mini_portile2 (~> 2.0.0.rc2)
|
113
|
+
pg (0.18.4)
|
114
|
+
rack (1.6.4)
|
115
|
+
rack-test (0.6.3)
|
116
|
+
rack (>= 1.0)
|
117
|
+
rails (4.2.5)
|
118
|
+
actionmailer (= 4.2.5)
|
119
|
+
actionpack (= 4.2.5)
|
120
|
+
actionview (= 4.2.5)
|
121
|
+
activejob (= 4.2.5)
|
122
|
+
activemodel (= 4.2.5)
|
123
|
+
activerecord (= 4.2.5)
|
124
|
+
activesupport (= 4.2.5)
|
125
|
+
bundler (>= 1.3.0, < 2.0)
|
126
|
+
railties (= 4.2.5)
|
127
|
+
sprockets-rails
|
128
|
+
rails-deprecated_sanitizer (1.0.3)
|
129
|
+
activesupport (>= 4.2.0.alpha)
|
130
|
+
rails-dom-testing (1.0.7)
|
131
|
+
activesupport (>= 4.2.0.beta, < 5.0)
|
132
|
+
nokogiri (~> 1.6.0)
|
133
|
+
rails-deprecated_sanitizer (>= 1.0.1)
|
134
|
+
rails-html-sanitizer (1.0.3)
|
135
|
+
loofah (~> 2.0)
|
136
|
+
railties (4.2.5)
|
137
|
+
actionpack (= 4.2.5)
|
138
|
+
activesupport (= 4.2.5)
|
139
|
+
rake (>= 0.8.7)
|
140
|
+
thor (>= 0.18.1, < 2.0)
|
141
|
+
rake (10.5.0)
|
142
|
+
redcarpet (3.3.4)
|
143
|
+
rouge (1.8.0)
|
144
|
+
ruby_parser (3.7.3)
|
145
|
+
sexp_processor (~> 4.1)
|
146
|
+
sass (3.4.21)
|
147
|
+
sexp_processor (4.6.1)
|
148
|
+
sprockets (3.5.2)
|
149
|
+
concurrent-ruby (~> 1.0)
|
150
|
+
rack (> 1, < 3)
|
151
|
+
sprockets-rails (3.0.1)
|
152
|
+
actionpack (>= 4.0)
|
153
|
+
activesupport (>= 4.0)
|
154
|
+
sprockets (>= 3.0.0)
|
155
|
+
thor (0.19.1)
|
156
|
+
thread_safe (0.3.5)
|
157
|
+
tilt (2.0.2)
|
158
|
+
tzinfo (1.2.2)
|
159
|
+
thread_safe (~> 0.1)
|
160
|
+
uglifier (2.7.2)
|
161
|
+
execjs (>= 0.3.0)
|
162
|
+
json (>= 1.8.0)
|
163
|
+
|
164
|
+
PLATFORMS
|
165
|
+
ruby
|
166
|
+
|
167
|
+
DEPENDENCIES
|
168
|
+
exposition!
|
169
|
+
pg
|
170
|
+
rails (= 4.2.5)
|
171
|
+
|
172
|
+
BUNDLED WITH
|
173
|
+
1.11.2
|
@@ -0,0 +1,28 @@
|
|
1
|
+
== README
|
2
|
+
|
3
|
+
This README would normally document whatever steps are necessary to get the
|
4
|
+
application up and running.
|
5
|
+
|
6
|
+
Things you may want to cover:
|
7
|
+
|
8
|
+
* Ruby version
|
9
|
+
|
10
|
+
* System dependencies
|
11
|
+
|
12
|
+
* Configuration
|
13
|
+
|
14
|
+
* Database creation
|
15
|
+
|
16
|
+
* Database initialization
|
17
|
+
|
18
|
+
* How to run the test suite
|
19
|
+
|
20
|
+
* Services (job queues, cache servers, search engines, etc.)
|
21
|
+
|
22
|
+
* Deployment instructions
|
23
|
+
|
24
|
+
* ...
|
25
|
+
|
26
|
+
|
27
|
+
Please feel free to use a different markup language if you do not plan to run
|
28
|
+
<tt>rake doc:app</tt>.
|
data/spec/dummy/Rakefile
ADDED
data/spec/dummy/Thorfile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require File.expand_path('config/environment.rb')
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require_tree .
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any styles
|
10
|
+
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
11
|
+
* file per style scope.
|
12
|
+
*
|
13
|
+
*= require_tree .
|
14
|
+
*= require_self
|
15
|
+
*/
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Blog</title>
|
5
|
+
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
|
6
|
+
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
|
11
|
+
<%= yield %>
|
12
|
+
|
13
|
+
</body>
|
14
|
+
</html>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
begin
|
3
|
+
load File.expand_path('../spring', __FILE__)
|
4
|
+
rescue LoadError => e
|
5
|
+
raise unless e.message.include?('spring')
|
6
|
+
end
|
7
|
+
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
8
|
+
require_relative '../config/boot'
|
9
|
+
require 'rails/commands'
|
data/spec/dummy/bin/rake
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'pathname'
|
3
|
+
|
4
|
+
# path to your application root.
|
5
|
+
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
6
|
+
|
7
|
+
Dir.chdir APP_ROOT do
|
8
|
+
# This script is a starting point to setup your application.
|
9
|
+
# Add necessary setup steps to this file:
|
10
|
+
|
11
|
+
puts "== Installing dependencies =="
|
12
|
+
system "gem install bundler --conservative"
|
13
|
+
system "bundle check || bundle install"
|
14
|
+
|
15
|
+
# puts "\n== Copying sample files =="
|
16
|
+
# unless File.exist?("config/database.yml")
|
17
|
+
# system "cp config/database.yml.sample config/database.yml"
|
18
|
+
# end
|
19
|
+
|
20
|
+
puts "\n== Preparing database =="
|
21
|
+
system "bin/rake db:setup"
|
22
|
+
|
23
|
+
puts "\n== Removing old logs and tempfiles =="
|
24
|
+
system "rm -f log/*"
|
25
|
+
system "rm -rf tmp/cache"
|
26
|
+
|
27
|
+
puts "\n== Restarting application server =="
|
28
|
+
system "touch tmp/restart.txt"
|
29
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# This file loads spring without using Bundler, in order to be fast.
|
4
|
+
# It gets overwritten when you run the `spring binstub` command.
|
5
|
+
|
6
|
+
unless defined?(Spring)
|
7
|
+
require 'rubygems'
|
8
|
+
require 'bundler'
|
9
|
+
|
10
|
+
if (match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m))
|
11
|
+
Gem.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq }
|
12
|
+
gem 'spring', match[1]
|
13
|
+
require 'spring/binstub'
|
14
|
+
end
|
15
|
+
end
|
data/spec/dummy/bin/thor
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'thor' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'pathname'
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
+
Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'bundler/setup'
|
15
|
+
|
16
|
+
load Gem.bin_path('thor', 'thor')
|