spark_plugs 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +26 -0
- data/app/assets/javascripts/spark_plugs/application.js +13 -0
- data/app/assets/javascripts/spark_plugs/static_pages.js +2 -0
- data/app/assets/stylesheets/spark_plugs/application.css +15 -0
- data/app/assets/stylesheets/spark_plugs/static_pages.css +4 -0
- data/app/controllers/spark_plugs/application_controller.rb +2 -0
- data/app/controllers/spark_plugs/static_pages_controller.rb +23 -0
- data/app/helpers/spark_plugs/application_helper.rb +4 -0
- data/app/helpers/spark_plugs/static_pages_helper.rb +7 -0
- data/app/models/spark_plugs/static_page.rb +27 -0
- data/app/views/spark_plugs/static_pages/show.html.erb +4 -0
- data/config/initializers/spark_plugs.rb +11 -0
- data/config/routes.rb +3 -0
- data/db/migrate/20150306172808_create_spark_plugs_static_pages.rb +11 -0
- data/lib/generators/spark_plugs/install_generator.rb +18 -0
- data/lib/generators/spark_plugs/templates/initializer.erb +13 -0
- data/lib/generators/spark_plugs/views_generator.rb +22 -0
- data/lib/spark_plugs.rb +4 -0
- data/lib/spark_plugs/engine.rb +16 -0
- data/lib/spark_plugs/version.rb +3 -0
- data/lib/tasks/spark_plugs_tasks.rake +20 -0
- data/spec/controllers/spark_plugs/static_pages_controller_spec.rb +29 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -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 +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/bin/setup +29 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +33 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +25 -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 +24 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/test.log +83 -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/factories/spark_plugs_static_pages.rb +22 -0
- data/spec/helpers/spark_plugs/static_pages_helper_spec.rb +25 -0
- data/spec/models/spark_plugs/static_page_spec.rb +48 -0
- data/spec/rails_helper.rb +65 -0
- data/spec/routing/spark_plugs/static_pages_routing_spec.rb +19 -0
- data/spec/spec_helper.rb +42 -0
- metadata +187 -0
@@ -0,0 +1,19 @@
|
|
1
|
+
require "rails_helper"
|
2
|
+
|
3
|
+
module SparkPlugs
|
4
|
+
RSpec.describe StaticPagesController, type: :routing do
|
5
|
+
before :each do
|
6
|
+
@page = FactoryGirl.create(:spark_plugs_static_page)
|
7
|
+
end
|
8
|
+
|
9
|
+
describe "routing" do
|
10
|
+
|
11
|
+
routes { SparkPlugs::Engine.routes }
|
12
|
+
|
13
|
+
it "routes to #show" do
|
14
|
+
expect(:get => "/#{@page.page}").to route_to("spark_plugs/static_pages#show", :page => "#{@page.page}")
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
# spec/spec_helper.rb
|
2
|
+
#
|
3
|
+
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
4
|
+
require "codeclimate-test-reporter"
|
5
|
+
CodeClimate::TestReporter.start
|
6
|
+
ENV["RAILS_ENV"] ||= 'test'
|
7
|
+
|
8
|
+
################################################################
|
9
|
+
# Change this
|
10
|
+
# require File.expand_path("../../config/environment", __FILE__)
|
11
|
+
#
|
12
|
+
# to this
|
13
|
+
require File.expand_path("../dummy/config/environment", __FILE__)
|
14
|
+
################################################################
|
15
|
+
|
16
|
+
require 'rspec/rails'
|
17
|
+
require 'factory_girl_rails'
|
18
|
+
require 'shoulda/matchers'
|
19
|
+
|
20
|
+
# Requires supporting ruby files with custom matchers and macros, etc,
|
21
|
+
# in spec/support/ and its subdirectories.
|
22
|
+
|
23
|
+
################################################################
|
24
|
+
# Change this
|
25
|
+
# Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
|
26
|
+
# To this
|
27
|
+
ENGINE_RAILS_ROOT=File.join(File.dirname(__FILE__), '../')
|
28
|
+
Dir[File.join(ENGINE_RAILS_ROOT, "spec/support/**/*.rb")].each {|f| require f}
|
29
|
+
################################################################
|
30
|
+
|
31
|
+
# Checks for pending migrations before tests are run.
|
32
|
+
# If you are not using ActiveRecord, you can remove this line.
|
33
|
+
ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration)
|
34
|
+
|
35
|
+
RSpec.configure do |config|
|
36
|
+
config.before(:each, type: :controller) { @routes = SparkPlugs::Engine.routes }
|
37
|
+
config.before(:each, type: :routing) { @routes = SparkPlugs::Engine.routes }
|
38
|
+
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
39
|
+
config.use_transactional_fixtures = true
|
40
|
+
config.infer_base_class_for_anonymous_controllers = false
|
41
|
+
config.order = "random"
|
42
|
+
end
|
metadata
ADDED
@@ -0,0 +1,187 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: spark_plugs
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Joshua Teeter
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-03-11 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: railties
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ! '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4.0'
|
20
|
+
- - <
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '5'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '4.0'
|
30
|
+
- - <
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '5'
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: codeclimate-test-reporter
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ~>
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0.4'
|
40
|
+
type: :development
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ~>
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0.4'
|
47
|
+
description: Slug based semi-static pages
|
48
|
+
email: joshteeter@gmail.com
|
49
|
+
executables: []
|
50
|
+
extensions: []
|
51
|
+
extra_rdoc_files: []
|
52
|
+
files:
|
53
|
+
- MIT-LICENSE
|
54
|
+
- Rakefile
|
55
|
+
- app/assets/javascripts/spark_plugs/application.js
|
56
|
+
- app/assets/javascripts/spark_plugs/static_pages.js
|
57
|
+
- app/assets/stylesheets/spark_plugs/application.css
|
58
|
+
- app/assets/stylesheets/spark_plugs/static_pages.css
|
59
|
+
- app/controllers/spark_plugs/application_controller.rb
|
60
|
+
- app/controllers/spark_plugs/static_pages_controller.rb
|
61
|
+
- app/helpers/spark_plugs/application_helper.rb
|
62
|
+
- app/helpers/spark_plugs/static_pages_helper.rb
|
63
|
+
- app/models/spark_plugs/static_page.rb
|
64
|
+
- app/views/spark_plugs/static_pages/show.html.erb
|
65
|
+
- config/initializers/spark_plugs.rb
|
66
|
+
- config/routes.rb
|
67
|
+
- db/migrate/20150306172808_create_spark_plugs_static_pages.rb
|
68
|
+
- lib/generators/spark_plugs/install_generator.rb
|
69
|
+
- lib/generators/spark_plugs/templates/initializer.erb
|
70
|
+
- lib/generators/spark_plugs/views_generator.rb
|
71
|
+
- lib/spark_plugs.rb
|
72
|
+
- lib/spark_plugs/engine.rb
|
73
|
+
- lib/spark_plugs/version.rb
|
74
|
+
- lib/tasks/spark_plugs_tasks.rake
|
75
|
+
- spec/controllers/spark_plugs/static_pages_controller_spec.rb
|
76
|
+
- spec/dummy/README.rdoc
|
77
|
+
- spec/dummy/Rakefile
|
78
|
+
- spec/dummy/app/assets/javascripts/application.js
|
79
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
80
|
+
- spec/dummy/app/controllers/application_controller.rb
|
81
|
+
- spec/dummy/app/helpers/application_helper.rb
|
82
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
83
|
+
- spec/dummy/bin/bundle
|
84
|
+
- spec/dummy/bin/rails
|
85
|
+
- spec/dummy/bin/rake
|
86
|
+
- spec/dummy/bin/setup
|
87
|
+
- spec/dummy/config.ru
|
88
|
+
- spec/dummy/config/application.rb
|
89
|
+
- spec/dummy/config/boot.rb
|
90
|
+
- spec/dummy/config/database.yml
|
91
|
+
- spec/dummy/config/environment.rb
|
92
|
+
- spec/dummy/config/environments/development.rb
|
93
|
+
- spec/dummy/config/environments/production.rb
|
94
|
+
- spec/dummy/config/environments/test.rb
|
95
|
+
- spec/dummy/config/initializers/assets.rb
|
96
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
97
|
+
- spec/dummy/config/initializers/cookies_serializer.rb
|
98
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
99
|
+
- spec/dummy/config/initializers/inflections.rb
|
100
|
+
- spec/dummy/config/initializers/mime_types.rb
|
101
|
+
- spec/dummy/config/initializers/session_store.rb
|
102
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
103
|
+
- spec/dummy/config/locales/en.yml
|
104
|
+
- spec/dummy/config/routes.rb
|
105
|
+
- spec/dummy/config/secrets.yml
|
106
|
+
- spec/dummy/db/schema.rb
|
107
|
+
- spec/dummy/db/test.sqlite3
|
108
|
+
- spec/dummy/log/test.log
|
109
|
+
- spec/dummy/public/404.html
|
110
|
+
- spec/dummy/public/422.html
|
111
|
+
- spec/dummy/public/500.html
|
112
|
+
- spec/dummy/public/favicon.ico
|
113
|
+
- spec/factories/spark_plugs_static_pages.rb
|
114
|
+
- spec/helpers/spark_plugs/static_pages_helper_spec.rb
|
115
|
+
- spec/models/spark_plugs/static_page_spec.rb
|
116
|
+
- spec/rails_helper.rb
|
117
|
+
- spec/routing/spark_plugs/static_pages_routing_spec.rb
|
118
|
+
- spec/spec_helper.rb
|
119
|
+
homepage: http://github.com/whatisinternet/spark_plugs
|
120
|
+
licenses:
|
121
|
+
- MIT
|
122
|
+
metadata: {}
|
123
|
+
post_install_message:
|
124
|
+
rdoc_options: []
|
125
|
+
require_paths:
|
126
|
+
- lib
|
127
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ! '>='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 2.1.5
|
132
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - ! '>='
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '0'
|
137
|
+
requirements: []
|
138
|
+
rubyforge_project:
|
139
|
+
rubygems_version: 2.4.5
|
140
|
+
signing_key:
|
141
|
+
specification_version: 4
|
142
|
+
summary: Slug based semi-static pages
|
143
|
+
test_files:
|
144
|
+
- spec/spec_helper.rb
|
145
|
+
- spec/routing/spark_plugs/static_pages_routing_spec.rb
|
146
|
+
- spec/rails_helper.rb
|
147
|
+
- spec/models/spark_plugs/static_page_spec.rb
|
148
|
+
- spec/helpers/spark_plugs/static_pages_helper_spec.rb
|
149
|
+
- spec/factories/spark_plugs_static_pages.rb
|
150
|
+
- spec/dummy/public/favicon.ico
|
151
|
+
- spec/dummy/public/500.html
|
152
|
+
- spec/dummy/public/422.html
|
153
|
+
- spec/dummy/public/404.html
|
154
|
+
- spec/dummy/log/test.log
|
155
|
+
- spec/dummy/db/test.sqlite3
|
156
|
+
- spec/dummy/db/schema.rb
|
157
|
+
- spec/dummy/config/secrets.yml
|
158
|
+
- spec/dummy/config/routes.rb
|
159
|
+
- spec/dummy/config/locales/en.yml
|
160
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
161
|
+
- spec/dummy/config/initializers/session_store.rb
|
162
|
+
- spec/dummy/config/initializers/mime_types.rb
|
163
|
+
- spec/dummy/config/initializers/inflections.rb
|
164
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
165
|
+
- spec/dummy/config/initializers/cookies_serializer.rb
|
166
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
167
|
+
- spec/dummy/config/initializers/assets.rb
|
168
|
+
- spec/dummy/config/environments/test.rb
|
169
|
+
- spec/dummy/config/environments/production.rb
|
170
|
+
- spec/dummy/config/environments/development.rb
|
171
|
+
- spec/dummy/config/environment.rb
|
172
|
+
- spec/dummy/config/database.yml
|
173
|
+
- spec/dummy/config/boot.rb
|
174
|
+
- spec/dummy/config/application.rb
|
175
|
+
- spec/dummy/config.ru
|
176
|
+
- spec/dummy/bin/setup
|
177
|
+
- spec/dummy/bin/rake
|
178
|
+
- spec/dummy/bin/rails
|
179
|
+
- spec/dummy/bin/bundle
|
180
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
181
|
+
- spec/dummy/app/helpers/application_helper.rb
|
182
|
+
- spec/dummy/app/controllers/application_controller.rb
|
183
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
184
|
+
- spec/dummy/app/assets/javascripts/application.js
|
185
|
+
- spec/dummy/Rakefile
|
186
|
+
- spec/dummy/README.rdoc
|
187
|
+
- spec/controllers/spark_plugs/static_pages_controller_spec.rb
|