fierce 0.1.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.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/.rspec +2 -0
- data/.rvmrc +6 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +144 -0
- data/Rakefile +15 -0
- data/fierce.gemspec +28 -0
- data/integration_spec/dummy/.gitignore +16 -0
- data/integration_spec/dummy/.rspec +1 -0
- data/integration_spec/dummy/Gemfile +8 -0
- data/integration_spec/dummy/README.rdoc +28 -0
- data/integration_spec/dummy/Rakefile +6 -0
- data/integration_spec/dummy/app/assets/images/.keep +0 -0
- data/integration_spec/dummy/app/assets/javascripts/application.js +13 -0
- data/integration_spec/dummy/app/assets/javascripts/home.js +2 -0
- data/integration_spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/integration_spec/dummy/app/assets/stylesheets/home.css +4 -0
- data/integration_spec/dummy/app/controllers/application_controller.rb +5 -0
- data/integration_spec/dummy/app/controllers/home_controller.rb +9 -0
- data/integration_spec/dummy/app/helpers/application_helper.rb +2 -0
- data/integration_spec/dummy/app/helpers/home_helper.rb +5 -0
- data/integration_spec/dummy/app/mailers/.keep +0 -0
- data/integration_spec/dummy/app/models/.keep +0 -0
- data/integration_spec/dummy/app/models/concerns/.keep +0 -0
- data/integration_spec/dummy/app/presenters/home/index.rb +15 -0
- data/integration_spec/dummy/app/presenters/home/show.rb +22 -0
- data/integration_spec/dummy/app/presenters/layouts/application.rb +19 -0
- data/integration_spec/dummy/app/views/home/_hamlton.html.haml +1 -0
- data/integration_spec/dummy/app/views/home/_local.html.mustache +1 -0
- data/integration_spec/dummy/app/views/home/_looplet.html.mustache +1 -0
- data/integration_spec/dummy/app/views/home/index.html.mustache +8 -0
- data/integration_spec/dummy/app/views/home/show.html.mustache +4 -0
- data/integration_spec/dummy/app/views/layouts/_far_away.html.mustache +1 -0
- data/integration_spec/dummy/app/views/layouts/application.html.mustache +14 -0
- data/integration_spec/dummy/bin/bundle +3 -0
- data/integration_spec/dummy/bin/rails +4 -0
- data/integration_spec/dummy/bin/rake +4 -0
- data/integration_spec/dummy/config/application.rb +28 -0
- data/integration_spec/dummy/config/boot.rb +4 -0
- data/integration_spec/dummy/config/environment.rb +5 -0
- data/integration_spec/dummy/config/environments/development.rb +27 -0
- data/integration_spec/dummy/config/environments/production.rb +80 -0
- data/integration_spec/dummy/config/environments/test.rb +36 -0
- data/integration_spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/integration_spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/integration_spec/dummy/config/initializers/inflections.rb +16 -0
- data/integration_spec/dummy/config/initializers/mime_types.rb +5 -0
- data/integration_spec/dummy/config/initializers/secret_token.rb +12 -0
- data/integration_spec/dummy/config/initializers/session_store.rb +3 -0
- data/integration_spec/dummy/config/initializers/wrap_parameters.rb +9 -0
- data/integration_spec/dummy/config/locales/en.yml +23 -0
- data/integration_spec/dummy/config/routes.rb +57 -0
- data/integration_spec/dummy/config.ru +4 -0
- data/integration_spec/dummy/db/seeds.rb +7 -0
- data/integration_spec/dummy/lib/assets/.keep +0 -0
- data/integration_spec/dummy/lib/tasks/.keep +0 -0
- data/integration_spec/dummy/log/.keep +0 -0
- data/integration_spec/dummy/public/404.html +58 -0
- data/integration_spec/dummy/public/422.html +58 -0
- data/integration_spec/dummy/public/500.html +57 -0
- data/integration_spec/dummy/public/favicon.ico +0 -0
- data/integration_spec/dummy/public/robots.txt +5 -0
- data/integration_spec/dummy/spec/controllers/home_controller_spec.rb +51 -0
- data/integration_spec/dummy/spec/spec_helper.rb +22 -0
- data/integration_spec/dummy/vendor/assets/javascripts/.keep +0 -0
- data/integration_spec/dummy/vendor/assets/stylesheets/.keep +0 -0
- data/lib/fierce/config.rb +15 -0
- data/lib/fierce/delegate_generator/controller.rb +39 -0
- data/lib/fierce/handler.rb +7 -0
- data/lib/fierce/master_of_ceremonies.rb +56 -0
- data/lib/fierce/partial_finder.rb +50 -0
- data/lib/fierce/presenter_finder.rb +39 -0
- data/lib/fierce/railtie.rb +13 -0
- data/lib/fierce/renderer.rb +13 -0
- data/lib/fierce/stage_manager.rb +23 -0
- data/lib/fierce/version.rb +3 -0
- data/lib/fierce/view_model.rb +23 -0
- data/lib/fierce.rb +14 -0
- data/spec/config_spec.rb +16 -0
- data/spec/custom_presenters/home/index.rb +9 -0
- data/spec/delegate_generator/controller_spec.rb +19 -0
- data/spec/master_of_ceremonies_spec.rb +50 -0
- data/spec/presenter_finder_spec.rb +21 -0
- data/spec/spec_helper.rb +22 -0
- data/spec/support/stubs.rb +36 -0
- data/spec/support/view_model_spec.rb +0 -0
- data/spec/view_model_spec.rb +20 -0
- metadata +225 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
module Fierce
|
|
2
|
+
class PartialFinder
|
|
3
|
+
attr_reader :path, :name, :custom_presenter, :context
|
|
4
|
+
|
|
5
|
+
def initialize(name, path, custom_presenter, context)
|
|
6
|
+
@name = name
|
|
7
|
+
@path = path
|
|
8
|
+
@custom_presenter = custom_presenter
|
|
9
|
+
@context = context
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def presenter_partials
|
|
13
|
+
return unless custom_presenter && custom_presenter.respond_to?(:partials)
|
|
14
|
+
custom_presenter.partials.symbolize_keys
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def presenter_path
|
|
18
|
+
return unless presenter_partials
|
|
19
|
+
presenter_partials[name]
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def partial_path
|
|
23
|
+
@partial_path ||= presenter_path || local_path
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def local_path
|
|
27
|
+
"#{dir(path)}/#{name}"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def dir(p)
|
|
31
|
+
parts = p.split('/')
|
|
32
|
+
dir = parts[0..parts.length-2]
|
|
33
|
+
dir.join('/')
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def mustache_partial
|
|
37
|
+
context.lookup_context.find_template(partial_path, [], true, [], { handlers: [:mustache] })
|
|
38
|
+
rescue
|
|
39
|
+
false
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def perform
|
|
43
|
+
if template = mustache_partial
|
|
44
|
+
template.source
|
|
45
|
+
else
|
|
46
|
+
context.render partial: partial_path
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
module Fierce
|
|
2
|
+
class PresenterFinder
|
|
3
|
+
attr_reader :path
|
|
4
|
+
|
|
5
|
+
def initialize(path)
|
|
6
|
+
@path = path
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
def root
|
|
10
|
+
Rails.root.to_s
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def file_path(base_path)
|
|
14
|
+
"#{base_path}/#{path}.rb"
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def found
|
|
18
|
+
@found = Fierce.paths.map do |base_path|
|
|
19
|
+
base_path if File.exist?(file_path(base_path))
|
|
20
|
+
end.compact.first
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def perform
|
|
24
|
+
presenter_class if found
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def path_to_classify
|
|
28
|
+
found
|
|
29
|
+
.gsub(root, '')
|
|
30
|
+
.gsub('/app', '')
|
|
31
|
+
.gsub(/\.rb$/, '') + "/#{path}"
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def presenter_class
|
|
35
|
+
require file_path(found)
|
|
36
|
+
path_to_classify.classify.constantize
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module Fierce
|
|
2
|
+
class Railtie < ::Rails::Railtie
|
|
3
|
+
initializer 'fierce.autoload', :before => :set_autoload_paths do |app|
|
|
4
|
+
Fierce.add_path (Rails.root.to_s + "/app/presenters") # default opinionation
|
|
5
|
+
|
|
6
|
+
Fierce.paths.each do |path|
|
|
7
|
+
app.config.autoload_paths << path
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
ActionView::Template.register_template_handler :mustache, Fierce::Handler
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module Fierce
|
|
2
|
+
class StageManager
|
|
3
|
+
attr_reader :template
|
|
4
|
+
|
|
5
|
+
def initialize(template)
|
|
6
|
+
@template = template
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
delegate :virtual_path, :source,
|
|
10
|
+
to: :template
|
|
11
|
+
|
|
12
|
+
def stage
|
|
13
|
+
<<-RUBY
|
|
14
|
+
content = #{source.inspect}
|
|
15
|
+
path = #{virtual_path.inspect}
|
|
16
|
+
|
|
17
|
+
Fierce::MasterOfCeremonies.new(
|
|
18
|
+
content, path, local_assigns, controller, self
|
|
19
|
+
).render
|
|
20
|
+
RUBY
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module Fierce
|
|
2
|
+
class ViewModel
|
|
3
|
+
def initialize(*presenters)
|
|
4
|
+
@presenters = presenters
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
def method_missing(method, *args, &block)
|
|
8
|
+
responder = @presenters.find do |delegate|
|
|
9
|
+
delegate.respond_to?(method, include_private=true)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
responder ? responder.send(method, *args, &block) : super
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def respond_to?(method, include_private=false)
|
|
16
|
+
super(method, include_private) || @presenters.any?{|p| p.respond_to?(method)}
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def yield(area = :layout)
|
|
20
|
+
content_for(area)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
data/lib/fierce.rb
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
require 'mustache'
|
|
2
|
+
require 'active_support/core_ext/string'
|
|
3
|
+
|
|
4
|
+
require "fierce/version"
|
|
5
|
+
require 'fierce/handler'
|
|
6
|
+
require 'fierce/stage_manager'
|
|
7
|
+
require 'fierce/master_of_ceremonies'
|
|
8
|
+
require 'fierce/view_model'
|
|
9
|
+
require 'fierce/delegate_generator/controller'
|
|
10
|
+
require 'fierce/config'
|
|
11
|
+
require 'fierce/presenter_finder'
|
|
12
|
+
require 'fierce/railtie'
|
|
13
|
+
require 'fierce/renderer'
|
|
14
|
+
require 'fierce/partial_finder'
|
data/spec/config_spec.rb
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe Fierce, 'configuration' do
|
|
4
|
+
describe '.add_path' do
|
|
5
|
+
before do
|
|
6
|
+
Fierce.clear_paths
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
it "adds a lookup path for view classes" do
|
|
10
|
+
Fierce.paths.should be_empty
|
|
11
|
+
Fierce.add_path "/foo"
|
|
12
|
+
Fierce.paths.size.should == 1
|
|
13
|
+
Fierce.paths.first.should == '/foo'
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe Fierce::DelegateGenerator::Controller do
|
|
4
|
+
let(:delegate) {
|
|
5
|
+
Fierce::DelegateGenerator::Controller.new(controller).generate
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
it 'has readers for instance variables in the controller' do
|
|
9
|
+
delegate.available.should == 'im for you!'
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
it 'excludes protected instance variable' do
|
|
13
|
+
delegate.should_not respond_to(:protected_ivar)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
it 'excludes @template' do
|
|
17
|
+
delegate.should_not respond_to(:template)
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe Fierce::MasterOfCeremonies do
|
|
4
|
+
let(:template) {
|
|
5
|
+
<<-HTML
|
|
6
|
+
<h1>Hello World</h1>
|
|
7
|
+
<p>{{from_custom_presenter}}</p>
|
|
8
|
+
<p>{{from_locals}}</p>
|
|
9
|
+
<p>{{from_controller}}</p>
|
|
10
|
+
<p>{{from_helpers}}</p>
|
|
11
|
+
HTML
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
let(:path) { 'home/index' }
|
|
15
|
+
let(:locals) { {from_locals: 'hello from the locals'} }
|
|
16
|
+
let(:context) { Struct.new(:from_helpers).new('hello from the helpers') }
|
|
17
|
+
|
|
18
|
+
let(:mc) {
|
|
19
|
+
Fierce::MasterOfCeremonies.new(
|
|
20
|
+
template, path, locals, controller, context
|
|
21
|
+
)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
before do
|
|
25
|
+
Rails.stub(:root).and_return(File.dirname(__FILE__))
|
|
26
|
+
Fierce.add_path(File.dirname(__FILE__) + "/custom_presenters")
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe '#render' do
|
|
30
|
+
it 'renders the template' do
|
|
31
|
+
mc.render.should include('Hello World')
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
it 'makes controller instance variable available in the template' do
|
|
35
|
+
mc.render.should include('hello from the controller')
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
it 'makes local variables available' do
|
|
39
|
+
mc.render.should include('hello from the locals')
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
it 'makes helper methods available' do
|
|
43
|
+
mc.render.should include('hello from the helpers')
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
it 'should find and delegate to custom helpers' do
|
|
47
|
+
mc.render.should include('hello from the custom presenter')
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe Fierce::PresenterFinder do
|
|
4
|
+
let(:fixture_presenter_path) { File.dirname(__FILE__) + "/custom_presenters" }
|
|
5
|
+
before do
|
|
6
|
+
Rails.stub(:root).and_return(File.dirname(__FILE__))
|
|
7
|
+
Fierce.clear_paths
|
|
8
|
+
Fierce.add_path(fixture_presenter_path)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
let(:finder) { Fierce::PresenterFinder.new('home/index') }
|
|
12
|
+
|
|
13
|
+
it "requires the file" do
|
|
14
|
+
finder.perform
|
|
15
|
+
defined?(CustomPresenters).should be_true
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
it "return the class" do
|
|
19
|
+
finder.perform.should == CustomPresenters::Home::Index
|
|
20
|
+
end
|
|
21
|
+
end
|
data/spec/spec_helper.rb
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Dir[File.dirname(__FILE__) + "/support/**/*.rb"].each {|f| require f}
|
|
2
|
+
|
|
3
|
+
$: << File.dirname(__FILE__) + "/../lib"
|
|
4
|
+
require 'fierce'
|
|
5
|
+
|
|
6
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
|
7
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
|
8
|
+
# Require this file using `require "spec_helper"` to ensure that it is only
|
|
9
|
+
# loaded once.
|
|
10
|
+
#
|
|
11
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
|
12
|
+
RSpec.configure do |config|
|
|
13
|
+
config.treat_symbols_as_metadata_keys_with_true_values = true
|
|
14
|
+
config.run_all_when_everything_filtered = true
|
|
15
|
+
config.filter_run :focus
|
|
16
|
+
|
|
17
|
+
# Run specs in random order to surface order dependencies. If you find an
|
|
18
|
+
# order dependency and want to debug it, you can fix the order by providing
|
|
19
|
+
# the seed, which is printed after each run.
|
|
20
|
+
# --seed 1234
|
|
21
|
+
config.order = 'random'
|
|
22
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
class FauxController
|
|
2
|
+
def initialize
|
|
3
|
+
@available = 'im for you!'
|
|
4
|
+
@from_controller = 'hello from the controller'
|
|
5
|
+
@template = 'not here'
|
|
6
|
+
@protected_ivar = 'also missing'
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
def protected_instance_variables
|
|
10
|
+
[:@protected_ivar]
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def controller
|
|
15
|
+
FauxController.new
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
class Rails
|
|
19
|
+
def root
|
|
20
|
+
File.expand_path(
|
|
21
|
+
File.dirname(__FILE__) + "/../"
|
|
22
|
+
)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
class Railtie
|
|
26
|
+
def self.initializer *args
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
module ActionView
|
|
32
|
+
class Template
|
|
33
|
+
def self.register_template_handler *args
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
File without changes
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe Fierce::ViewModel do
|
|
4
|
+
let(:presenter) { Struct.new(:foo).new('bar') }
|
|
5
|
+
let(:context) { double('template context', content_for: '<h1>layout here</h1>') }
|
|
6
|
+
let(:controller_presenter) { Fierce::DelegateGenerator::Controller.new(controller).generate }
|
|
7
|
+
|
|
8
|
+
let(:view_model) {
|
|
9
|
+
Fierce::ViewModel.new(presenter, controller_presenter, context)
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
it "responds to methods on any of the passed in presenters" do
|
|
13
|
+
view_model.available.should == 'im for you!'
|
|
14
|
+
view_model.foo.should == 'bar'
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
it "resonds to yield in a traditional erb layout type of a way" do
|
|
18
|
+
view_model.yield.should == '<h1>layout here</h1>'
|
|
19
|
+
end
|
|
20
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: fierce
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Kane Baccigalupi
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2013-12-02 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: mustache
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - '>='
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '0'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - '>='
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '0'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: activesupport
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - '>='
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '0'
|
|
34
|
+
type: :runtime
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - '>='
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '0'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: bundler
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - ~>
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '1.3'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - ~>
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '1.3'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: rake
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - '>='
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '0'
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - '>='
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '0'
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: rspec
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
72
|
+
requirements:
|
|
73
|
+
- - '>='
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: '0'
|
|
76
|
+
type: :development
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - '>='
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: '0'
|
|
83
|
+
- !ruby/object:Gem::Dependency
|
|
84
|
+
name: rails
|
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
|
86
|
+
requirements:
|
|
87
|
+
- - '>='
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: '0'
|
|
90
|
+
type: :development
|
|
91
|
+
prerelease: false
|
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
+
requirements:
|
|
94
|
+
- - '>='
|
|
95
|
+
- !ruby/object:Gem::Version
|
|
96
|
+
version: '0'
|
|
97
|
+
description: Fierce, opinionate view logic for Rails
|
|
98
|
+
email:
|
|
99
|
+
- developers@socialchorus.com
|
|
100
|
+
executables: []
|
|
101
|
+
extensions: []
|
|
102
|
+
extra_rdoc_files: []
|
|
103
|
+
files:
|
|
104
|
+
- .gitignore
|
|
105
|
+
- .rspec
|
|
106
|
+
- .rvmrc
|
|
107
|
+
- Gemfile
|
|
108
|
+
- LICENSE.txt
|
|
109
|
+
- README.md
|
|
110
|
+
- Rakefile
|
|
111
|
+
- fierce.gemspec
|
|
112
|
+
- integration_spec/dummy/.gitignore
|
|
113
|
+
- integration_spec/dummy/.rspec
|
|
114
|
+
- integration_spec/dummy/Gemfile
|
|
115
|
+
- integration_spec/dummy/README.rdoc
|
|
116
|
+
- integration_spec/dummy/Rakefile
|
|
117
|
+
- integration_spec/dummy/app/assets/images/.keep
|
|
118
|
+
- integration_spec/dummy/app/assets/javascripts/application.js
|
|
119
|
+
- integration_spec/dummy/app/assets/javascripts/home.js
|
|
120
|
+
- integration_spec/dummy/app/assets/stylesheets/application.css
|
|
121
|
+
- integration_spec/dummy/app/assets/stylesheets/home.css
|
|
122
|
+
- integration_spec/dummy/app/controllers/application_controller.rb
|
|
123
|
+
- integration_spec/dummy/app/controllers/home_controller.rb
|
|
124
|
+
- integration_spec/dummy/app/helpers/application_helper.rb
|
|
125
|
+
- integration_spec/dummy/app/helpers/home_helper.rb
|
|
126
|
+
- integration_spec/dummy/app/mailers/.keep
|
|
127
|
+
- integration_spec/dummy/app/models/.keep
|
|
128
|
+
- integration_spec/dummy/app/models/concerns/.keep
|
|
129
|
+
- integration_spec/dummy/app/presenters/home/index.rb
|
|
130
|
+
- integration_spec/dummy/app/presenters/home/show.rb
|
|
131
|
+
- integration_spec/dummy/app/presenters/layouts/application.rb
|
|
132
|
+
- integration_spec/dummy/app/views/home/_hamlton.html.haml
|
|
133
|
+
- integration_spec/dummy/app/views/home/_local.html.mustache
|
|
134
|
+
- integration_spec/dummy/app/views/home/_looplet.html.mustache
|
|
135
|
+
- integration_spec/dummy/app/views/home/index.html.mustache
|
|
136
|
+
- integration_spec/dummy/app/views/home/show.html.mustache
|
|
137
|
+
- integration_spec/dummy/app/views/layouts/_far_away.html.mustache
|
|
138
|
+
- integration_spec/dummy/app/views/layouts/application.html.mustache
|
|
139
|
+
- integration_spec/dummy/bin/bundle
|
|
140
|
+
- integration_spec/dummy/bin/rails
|
|
141
|
+
- integration_spec/dummy/bin/rake
|
|
142
|
+
- integration_spec/dummy/config.ru
|
|
143
|
+
- integration_spec/dummy/config/application.rb
|
|
144
|
+
- integration_spec/dummy/config/boot.rb
|
|
145
|
+
- integration_spec/dummy/config/environment.rb
|
|
146
|
+
- integration_spec/dummy/config/environments/development.rb
|
|
147
|
+
- integration_spec/dummy/config/environments/production.rb
|
|
148
|
+
- integration_spec/dummy/config/environments/test.rb
|
|
149
|
+
- integration_spec/dummy/config/initializers/backtrace_silencers.rb
|
|
150
|
+
- integration_spec/dummy/config/initializers/filter_parameter_logging.rb
|
|
151
|
+
- integration_spec/dummy/config/initializers/inflections.rb
|
|
152
|
+
- integration_spec/dummy/config/initializers/mime_types.rb
|
|
153
|
+
- integration_spec/dummy/config/initializers/secret_token.rb
|
|
154
|
+
- integration_spec/dummy/config/initializers/session_store.rb
|
|
155
|
+
- integration_spec/dummy/config/initializers/wrap_parameters.rb
|
|
156
|
+
- integration_spec/dummy/config/locales/en.yml
|
|
157
|
+
- integration_spec/dummy/config/routes.rb
|
|
158
|
+
- integration_spec/dummy/db/seeds.rb
|
|
159
|
+
- integration_spec/dummy/lib/assets/.keep
|
|
160
|
+
- integration_spec/dummy/lib/tasks/.keep
|
|
161
|
+
- integration_spec/dummy/log/.keep
|
|
162
|
+
- integration_spec/dummy/public/404.html
|
|
163
|
+
- integration_spec/dummy/public/422.html
|
|
164
|
+
- integration_spec/dummy/public/500.html
|
|
165
|
+
- integration_spec/dummy/public/favicon.ico
|
|
166
|
+
- integration_spec/dummy/public/robots.txt
|
|
167
|
+
- integration_spec/dummy/spec/controllers/home_controller_spec.rb
|
|
168
|
+
- integration_spec/dummy/spec/spec_helper.rb
|
|
169
|
+
- integration_spec/dummy/vendor/assets/javascripts/.keep
|
|
170
|
+
- integration_spec/dummy/vendor/assets/stylesheets/.keep
|
|
171
|
+
- lib/fierce.rb
|
|
172
|
+
- lib/fierce/config.rb
|
|
173
|
+
- lib/fierce/delegate_generator/controller.rb
|
|
174
|
+
- lib/fierce/handler.rb
|
|
175
|
+
- lib/fierce/master_of_ceremonies.rb
|
|
176
|
+
- lib/fierce/partial_finder.rb
|
|
177
|
+
- lib/fierce/presenter_finder.rb
|
|
178
|
+
- lib/fierce/railtie.rb
|
|
179
|
+
- lib/fierce/renderer.rb
|
|
180
|
+
- lib/fierce/stage_manager.rb
|
|
181
|
+
- lib/fierce/version.rb
|
|
182
|
+
- lib/fierce/view_model.rb
|
|
183
|
+
- spec/config_spec.rb
|
|
184
|
+
- spec/custom_presenters/home/index.rb
|
|
185
|
+
- spec/delegate_generator/controller_spec.rb
|
|
186
|
+
- spec/master_of_ceremonies_spec.rb
|
|
187
|
+
- spec/presenter_finder_spec.rb
|
|
188
|
+
- spec/spec_helper.rb
|
|
189
|
+
- spec/support/stubs.rb
|
|
190
|
+
- spec/support/view_model_spec.rb
|
|
191
|
+
- spec/view_model_spec.rb
|
|
192
|
+
homepage: ''
|
|
193
|
+
licenses:
|
|
194
|
+
- MIT
|
|
195
|
+
metadata: {}
|
|
196
|
+
post_install_message:
|
|
197
|
+
rdoc_options: []
|
|
198
|
+
require_paths:
|
|
199
|
+
- lib
|
|
200
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
201
|
+
requirements:
|
|
202
|
+
- - '>='
|
|
203
|
+
- !ruby/object:Gem::Version
|
|
204
|
+
version: '0'
|
|
205
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
206
|
+
requirements:
|
|
207
|
+
- - '>='
|
|
208
|
+
- !ruby/object:Gem::Version
|
|
209
|
+
version: '0'
|
|
210
|
+
requirements: []
|
|
211
|
+
rubyforge_project:
|
|
212
|
+
rubygems_version: 2.0.3
|
|
213
|
+
signing_key:
|
|
214
|
+
specification_version: 4
|
|
215
|
+
summary: Fierce, opinionate view logic for Rails
|
|
216
|
+
test_files:
|
|
217
|
+
- spec/config_spec.rb
|
|
218
|
+
- spec/custom_presenters/home/index.rb
|
|
219
|
+
- spec/delegate_generator/controller_spec.rb
|
|
220
|
+
- spec/master_of_ceremonies_spec.rb
|
|
221
|
+
- spec/presenter_finder_spec.rb
|
|
222
|
+
- spec/spec_helper.rb
|
|
223
|
+
- spec/support/stubs.rb
|
|
224
|
+
- spec/support/view_model_spec.rb
|
|
225
|
+
- spec/view_model_spec.rb
|