Skip to content

Commit ffcc2d3

Browse files
committed
initial commit
0 parents  commit ffcc2d3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+1388
-0
lines changed

.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.bundle/
2+
log/*.log
3+
pkg/
4+
spec/dummy/db/*.sqlite3
5+
spec/dummy/db/*.sqlite3-journal
6+
spec/dummy/log/*.log
7+
spec/dummy/tmp/

.rspec

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--require spec_helper

Gemfile

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
source 'https://rubygems.org'
2+
3+
# Declare your gem's dependencies in wpcc.gemspec.
4+
# Bundler will treat runtime dependencies like base dependencies, and
5+
# development dependencies will be added by default to the :development group.
6+
gemspec
7+
8+
gem 'rails', '~> 4.2.7'
9+
10+
group :development, :test do
11+
gem 'pry-rails'
12+
gem 'rspec-rails', '~> 3.5'
13+
14+
end
15+
16+
group :build, :test do
17+
end

Gemfile.lock

+139
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
PATH
2+
remote: .
3+
specs:
4+
wpcc (1.0.0)
5+
rails (>= 4, < 5)
6+
7+
GEM
8+
remote: https://rubygems.org/
9+
specs:
10+
actionmailer (4.2.8)
11+
actionpack (= 4.2.8)
12+
actionview (= 4.2.8)
13+
activejob (= 4.2.8)
14+
mail (~> 2.5, >= 2.5.4)
15+
rails-dom-testing (~> 1.0, >= 1.0.5)
16+
actionpack (4.2.8)
17+
actionview (= 4.2.8)
18+
activesupport (= 4.2.8)
19+
rack (~> 1.6)
20+
rack-test (~> 0.6.2)
21+
rails-dom-testing (~> 1.0, >= 1.0.5)
22+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
23+
actionview (4.2.8)
24+
activesupport (= 4.2.8)
25+
builder (~> 3.1)
26+
erubis (~> 2.7.0)
27+
rails-dom-testing (~> 1.0, >= 1.0.5)
28+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
29+
activejob (4.2.8)
30+
activesupport (= 4.2.8)
31+
globalid (>= 0.3.0)
32+
activemodel (4.2.8)
33+
activesupport (= 4.2.8)
34+
builder (~> 3.1)
35+
activerecord (4.2.8)
36+
activemodel (= 4.2.8)
37+
activesupport (= 4.2.8)
38+
arel (~> 6.0)
39+
activesupport (4.2.8)
40+
i18n (~> 0.7)
41+
minitest (~> 5.1)
42+
thread_safe (~> 0.3, >= 0.3.4)
43+
tzinfo (~> 1.1)
44+
arel (6.0.4)
45+
builder (3.2.3)
46+
coderay (1.1.1)
47+
concurrent-ruby (1.0.5)
48+
diff-lcs (1.3)
49+
erubis (2.7.0)
50+
globalid (0.4.0)
51+
activesupport (>= 4.2.0)
52+
i18n (0.8.4)
53+
loofah (2.0.3)
54+
nokogiri (>= 1.5.9)
55+
mail (2.6.6)
56+
mime-types (>= 1.16, < 4)
57+
method_source (0.8.2)
58+
mime-types (3.1)
59+
mime-types-data (~> 3.2015)
60+
mime-types-data (3.2016.0521)
61+
mini_portile2 (2.2.0)
62+
minitest (5.10.2)
63+
nokogiri (1.8.0)
64+
mini_portile2 (~> 2.2.0)
65+
pry (0.10.4)
66+
coderay (~> 1.1.0)
67+
method_source (~> 0.8.1)
68+
slop (~> 3.4)
69+
pry-rails (0.3.6)
70+
pry (>= 0.10.4)
71+
rack (1.6.8)
72+
rack-test (0.6.3)
73+
rack (>= 1.0)
74+
rails (4.2.8)
75+
actionmailer (= 4.2.8)
76+
actionpack (= 4.2.8)
77+
actionview (= 4.2.8)
78+
activejob (= 4.2.8)
79+
activemodel (= 4.2.8)
80+
activerecord (= 4.2.8)
81+
activesupport (= 4.2.8)
82+
bundler (>= 1.3.0, < 2.0)
83+
railties (= 4.2.8)
84+
sprockets-rails
85+
rails-deprecated_sanitizer (1.0.3)
86+
activesupport (>= 4.2.0.alpha)
87+
rails-dom-testing (1.0.8)
88+
activesupport (>= 4.2.0.beta, < 5.0)
89+
nokogiri (~> 1.6)
90+
rails-deprecated_sanitizer (>= 1.0.1)
91+
rails-html-sanitizer (1.0.3)
92+
loofah (~> 2.0)
93+
railties (4.2.8)
94+
actionpack (= 4.2.8)
95+
activesupport (= 4.2.8)
96+
rake (>= 0.8.7)
97+
thor (>= 0.18.1, < 2.0)
98+
rake (12.0.0)
99+
rspec-core (3.6.0)
100+
rspec-support (~> 3.6.0)
101+
rspec-expectations (3.6.0)
102+
diff-lcs (>= 1.2.0, < 2.0)
103+
rspec-support (~> 3.6.0)
104+
rspec-mocks (3.6.0)
105+
diff-lcs (>= 1.2.0, < 2.0)
106+
rspec-support (~> 3.6.0)
107+
rspec-rails (3.6.0)
108+
actionpack (>= 3.0)
109+
activesupport (>= 3.0)
110+
railties (>= 3.0)
111+
rspec-core (~> 3.6.0)
112+
rspec-expectations (~> 3.6.0)
113+
rspec-mocks (~> 3.6.0)
114+
rspec-support (~> 3.6.0)
115+
rspec-support (3.6.0)
116+
slop (3.6.0)
117+
sprockets (3.7.1)
118+
concurrent-ruby (~> 1.0)
119+
rack (> 1, < 3)
120+
sprockets-rails (3.2.0)
121+
actionpack (>= 4.0)
122+
activesupport (>= 4.0)
123+
sprockets (>= 3.0.0)
124+
thor (0.19.4)
125+
thread_safe (0.3.6)
126+
tzinfo (1.2.3)
127+
thread_safe (~> 0.1)
128+
129+
PLATFORMS
130+
ruby
131+
132+
DEPENDENCIES
133+
pry-rails
134+
rails (~> 4.2.7)
135+
rspec-rails (~> 3.5)
136+
wpcc!
137+
138+
BUNDLED WITH
139+
1.14.6

MIT-LICENSE

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Copyright 2017 Margo Urey
2+
3+
Permission is hereby granted, free of charge, to any person obtaining
4+
a copy of this software and associated documentation files (the
5+
"Software"), to deal in the Software without restriction, including
6+
without limitation the rights to use, copy, modify, merge, publish,
7+
distribute, sublicense, and/or sell copies of the Software, and to
8+
permit persons to whom the Software is furnished to do so, subject to
9+
the following conditions:
10+
11+
The above copyright notice and this permission notice shall be
12+
included in all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Wpcc
2+
All the things for Money Advice Service's Workplace Pension Cost Calculator
3+
4+
## Prerequisites
5+
6+
* [Git](http://git-scm.com)
7+
* [Rbenv](https://github.com/rbenv/rbenv)
8+
9+
## Usage
10+
Add this line to your application's Gemfile:
11+
12+
TODO
13+
14+
## Installation
15+
16+
Clone the repository:
17+
18+
```sh
19+
$ git clone [email protected]:moneyadviceservice/mas-global_nav.git
20+
```
21+
22+
Install ruby dependencies
23+
```sh
24+
$ gem install bundler
25+
$ bundle
26+
```
27+
28+
## Contributing
29+
TODO
30+
31+
## License
32+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).

Rakefile

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
begin
2+
require 'bundler/setup'
3+
rescue LoadError
4+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5+
end
6+
7+
require 'rdoc/task'
8+
9+
RDoc::Task.new(:rdoc) do |rdoc|
10+
rdoc.rdoc_dir = 'rdoc'
11+
rdoc.title = 'Wpcc'
12+
rdoc.options << '--line-numbers'
13+
rdoc.rdoc_files.include('README.md')
14+
rdoc.rdoc_files.include('lib/**/*.rb')
15+
end
16+
17+
APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
18+
load 'rails/tasks/engine.rake'
19+
20+
21+
load 'rails/tasks/statistics.rake'
22+
23+
24+
25+
require 'bundler/gem_tasks'
26+

app/assets/config/wpcc_manifest.js

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
//= link_directory ../javascripts/wpcc .js
2+
//= link_directory ../stylesheets/wpcc .css

app/assets/images/wpcc/.keep

Whitespace-only changes.
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// This is a manifest file that'll be compiled into application.js, which will include all the files
2+
// listed below.
3+
//
4+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5+
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6+
//
7+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8+
// compiled file. JavaScript code in this file should be added after the last require_* statement.
9+
//
10+
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11+
// about supported directives.
12+
//
13+
//= require_tree .

app/assets/javascripts/wpcc/home.js

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// Place all the behaviors and hooks related to the matching controller here.
2+
// All this logic will automatically be available in application.js.
Original file line numberDiff line numberDiff line change
@@ -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 other CSS/SCSS
10+
* files in this directory. Styles in this file should be added after the last require_* statement.
11+
* It is generally better to create a new file per style scope.
12+
*
13+
*= require_tree .
14+
*= require_self
15+
*/

app/assets/stylesheets/wpcc/home.css

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/*
2+
Place all the styles related to the matching controller here.
3+
They will automatically be included in application.css.
4+
*/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module Wpcc
2+
class EngineController < ActionController::Base
3+
protect_from_forgery with: :exception
4+
5+
layout 'wpcc/engine'
6+
end
7+
end
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
require_dependency "wpcc/engine_controller"
2+
3+
module Wpcc
4+
class HomeController < EngineController
5+
def start
6+
7+
end
8+
end
9+
end
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module Wpcc
2+
module ApplicationHelper
3+
end
4+
end

app/helpers/wpcc/home_helper.rb

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module Wpcc
2+
module HomeHelper
3+
end
4+
end

app/jobs/wpcc/application_job.rb

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module Wpcc
2+
class ApplicationJob < ActiveJob::Base
3+
end
4+
end
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module Wpcc
2+
class ApplicationMailer < ActionMailer::Base
3+
default from: '[email protected]'
4+
layout 'mailer'
5+
end
6+
end

app/models/wpcc/application_record.rb

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module Wpcc
2+
class ApplicationRecord < ActiveRecord::Base
3+
self.abstract_class = true
4+
end
5+
end
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Wpcc</title>
5+
<%= stylesheet_link_tag "wpcc/application", media: "all" %>
6+
<%= javascript_include_tag "wpcc/application" %>
7+
<%= csrf_meta_tags %>
8+
</head>
9+
<body>
10+
11+
<%= yield %>
12+
13+
</body>
14+
</html>

app/views/wpcc/home/start.html.erb

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Start

bin/rails

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env ruby
2+
# This command will automatically be run when you run "rails" with Rails gems
3+
# installed from the root of your application.
4+
5+
ENGINE_ROOT = File.expand_path('../..', __FILE__)
6+
ENGINE_PATH = File.expand_path('../../lib/wpcc/engine', __FILE__)
7+
APP_PATH = File.expand_path('../../spec/dummy/config/application', __FILE__)
8+
9+
# Set up gems listed in the Gemfile.
10+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
11+
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
12+
13+
require 'rails/all'
14+
require 'rails/engine/commands'

config/routes.rb

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Wpcc::Engine.routes.draw do
2+
root to: 'home#start', as: 'wpcc_root'
3+
end

lib/tasks/wpcc_tasks.rake

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# desc "Explaining what the task does"
2+
# task :wpcc do
3+
# # Task goes here
4+
# end

lib/wpcc.rb

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require "wpcc/engine"

lib/wpcc/engine.rb

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module Wpcc
2+
class Engine < ::Rails::Engine
3+
isolate_namespace Wpcc
4+
5+
initializer 'wpcc precompile hooks', :group => :all do |app|
6+
app.config.assets.precompile += [
7+
8+
]
9+
end
10+
end
11+
end

0 commit comments

Comments
 (0)