decent_exposure 3.0.0.beta1 → 3.0.0.beta2
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 +4 -4
- data/.travis.yml +12 -0
- data/Gemfile +2 -0
- data/README.md +20 -4
- data/decent_exposure.gemspec +2 -4
- data/gemfiles/Gemfile.rails-4.2.0 +5 -0
- data/gemfiles/Gemfile.rails-4.2.6 +5 -0
- data/gemfiles/Gemfile.rails-5.0.0.rc1 +5 -0
- data/lib/decent_exposure.rb +1 -0
- data/lib/decent_exposure/version.rb +1 -1
- data/lib/generators/decent_exposure/USAGE +13 -0
- data/lib/generators/decent_exposure/scaffold_templates_generator.rb +46 -0
- data/lib/generators/decent_exposure/templates/_form.html.erb +34 -0
- data/lib/generators/decent_exposure/templates/_form.html.haml +15 -0
- data/lib/generators/decent_exposure/templates/controller.rb +41 -0
- data/lib/generators/decent_exposure/templates/edit.html.erb +6 -0
- data/lib/generators/decent_exposure/templates/edit.html.haml +7 -0
- data/lib/generators/decent_exposure/templates/index.html.erb +31 -0
- data/lib/generators/decent_exposure/templates/index.html.haml +25 -0
- data/lib/generators/decent_exposure/templates/new.html.erb +5 -0
- data/lib/generators/decent_exposure/templates/new.html.haml +5 -0
- data/lib/generators/decent_exposure/templates/show.html.erb +11 -0
- data/lib/generators/decent_exposure/templates/show.html.haml +11 -0
- data/spec/generators/decent_exposure/scaffold_templates_generator_spec.rb +46 -0
- data/spec/integration_spec.rb +3 -3
- metadata +32 -42
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7cfd8c745c922accdd68b09011ac06094d2c71bc
|
4
|
+
data.tar.gz: 3eab645e6e2b13e763cbe6835125ec8104730c9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7413bd28015045c87343f8bcc3210a46964420782f96c016fb2687c8f07a4ce26cdeb5868f35b9c376934593f36973fcfca2d1955bba40cd3b6e5ee4864bd67a
|
7
|
+
data.tar.gz: 92bb65c55c3c2f5902b93cb24ab54dadaf52b844360f377d49736df2b261e949f7130b551d9ad4b719625013ffe7398435efddbf00bd31aaaf35659d34f70120
|
data/.travis.yml
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
language: ruby
|
1
2
|
rvm:
|
2
3
|
- 2.2.2
|
3
4
|
- 2.3.0
|
5
|
+
gemfile:
|
6
|
+
- Gemfile
|
7
|
+
- gemfiles/Gemfile.rails-5.0.0.rc1
|
8
|
+
- gemfiles/Gemfile.rails-4.2.6
|
9
|
+
- gemfiles/Gemfile.rails-4.2.0
|
10
|
+
notifications:
|
11
|
+
slack:
|
12
|
+
on_success: change
|
13
|
+
on_failure: always
|
14
|
+
rooms:
|
15
|
+
secure: Ch/Euv0+g1BQawHLVXzT9R/eoFxQWBf95SQzufpA19tlwz+7OsGlaOH4YfxVbnanH33XL06AEB1arsDUwlv0lx/I2Cs1LRh4WHAJ7T5hahusF2W3/+RgCDf2eifk1MRswkDpvhxH/sAS6INc4gOKc52q4gAdzU2uytVsdaaCjCY=
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -7,16 +7,18 @@
|
|
7
7
|
|
8
8
|
### Notice
|
9
9
|
|
10
|
-
DecentExposure `3.0` is a major change from `< 3.0`.
|
10
|
+
DecentExposure `3.0` is a major change from `< 3.0`.
|
11
11
|
|
12
|
-
|
12
|
+
Version `3.0` will support Rails 4 and 5.
|
13
|
+
|
14
|
+
**Be aware... mild API changes ahead.** Check this [API changes in version 3](https://github.com/hashrocket/decent_exposure/wiki/Api-changes-in-version-3)
|
13
15
|
|
14
16
|
### Installation
|
15
17
|
|
16
18
|
Add this line to your application's Gemfile:
|
17
19
|
|
18
20
|
```ruby
|
19
|
-
gem 'decent_exposure'
|
21
|
+
gem 'decent_exposure', '3.0.0.beta1'
|
20
22
|
```
|
21
23
|
|
22
24
|
And then execute:
|
@@ -48,7 +50,7 @@ instance variable.
|
|
48
50
|
|
49
51
|
#### Example Controller
|
50
52
|
|
51
|
-
Here's what a standard Rails
|
53
|
+
Here's what a standard Rails 5 CRUD controller using Decent Exposure might look like:
|
52
54
|
|
53
55
|
```ruby
|
54
56
|
class ThingsController < ApplicationController
|
@@ -323,6 +325,20 @@ expose :thing, with: [:cool_find, :cool_build]
|
|
323
325
|
expose :another_thing, with: :cool_build
|
324
326
|
```
|
325
327
|
|
328
|
+
## Rails Scaffold Templates
|
329
|
+
|
330
|
+
If you want to generate rails scaffold templates prepared for `decent_exposure` run:
|
331
|
+
|
332
|
+
```bash
|
333
|
+
rails generate decent_exposure:scaffold_templates [--template_engine erb|haml]
|
334
|
+
```
|
335
|
+
|
336
|
+
This will create the templates in your `lib/templates` folder. Now you can run scaffold like:
|
337
|
+
|
338
|
+
```bash
|
339
|
+
rails generate scaffold post title description:text
|
340
|
+
```
|
341
|
+
|
326
342
|
## Contributing
|
327
343
|
|
328
344
|
1. Fork it (https://github.com/hashrocket/decent_exposure/fork)
|
data/decent_exposure.gemspec
CHANGED
@@ -22,9 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
|
23
23
|
spec.required_ruby_version = "~> 2.0"
|
24
24
|
|
25
|
-
spec.add_dependency "
|
26
|
-
spec.
|
25
|
+
spec.add_dependency "activesupport", ">= 4.0"
|
26
|
+
spec.add_development_dependency "railties", ">= 4.0"
|
27
27
|
spec.add_development_dependency "rspec-rails", "~> 3.0"
|
28
|
-
spec.add_development_dependency "rake", "~> 10.3"
|
29
|
-
spec.add_development_dependency "pry"
|
30
28
|
end
|
data/lib/decent_exposure.rb
CHANGED
@@ -0,0 +1,13 @@
|
|
1
|
+
Description:
|
2
|
+
Generate DecentExposure scaffold template files
|
3
|
+
|
4
|
+
Example:
|
5
|
+
rails generate decent_exposure:scaffold_templates [--template_engine erb|haml]
|
6
|
+
|
7
|
+
This will create:
|
8
|
+
lib/templates/rails/scaffold_controller/controller.rb
|
9
|
+
lib/templates/erb/scaffold/_form.html.erb
|
10
|
+
lib/templates/erb/scaffold/edit.html.erb
|
11
|
+
lib/templates/erb/scaffold/index.html.erb
|
12
|
+
lib/templates/erb/scaffold/new.html.erb
|
13
|
+
lib/templates/erb/scaffold/show.html.erb
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
|
3
|
+
module DecentExposure
|
4
|
+
module Generators
|
5
|
+
class ScaffoldTemplatesGenerator < Rails::Generators::Base
|
6
|
+
desc 'Generate DecentExposure scaffold template files'
|
7
|
+
source_root File.expand_path('../templates', __FILE__)
|
8
|
+
class_option :template_engine, desc: 'Template engine to be invoked (erb).'
|
9
|
+
|
10
|
+
VIEWS = %i(_form edit index new show)
|
11
|
+
AVAILABLE_ENGINES = %w(erb haml)
|
12
|
+
|
13
|
+
def generate
|
14
|
+
validate_template_engine
|
15
|
+
|
16
|
+
generate_controller
|
17
|
+
VIEWS.each { |view| generate_view(view) }
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def generate_controller
|
23
|
+
copy_template('rails/scaffold_controller', 'controller.rb')
|
24
|
+
end
|
25
|
+
|
26
|
+
def generate_view(view)
|
27
|
+
copy_template("#{engine}/scaffold", "#{view}.html.#{engine}")
|
28
|
+
end
|
29
|
+
|
30
|
+
def copy_template(generator, file)
|
31
|
+
copy_file(file, "lib/templates/#{generator}/#{file}")
|
32
|
+
end
|
33
|
+
|
34
|
+
def engine
|
35
|
+
options[:template_engine]
|
36
|
+
end
|
37
|
+
|
38
|
+
def validate_template_engine
|
39
|
+
unless AVAILABLE_ENGINES.include?(engine.to_s)
|
40
|
+
message = "ERROR: template_engine must be: #{AVAILABLE_ENGINES}."
|
41
|
+
raise ArgumentError, message
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<%%= form_for(<%= singular_table_name %>) do |f| %>
|
2
|
+
<%% if <%= singular_table_name %>.errors.any? %>
|
3
|
+
<div id="error_explanation">
|
4
|
+
<h2><%%= pluralize(<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:</h2>
|
5
|
+
|
6
|
+
<ul>
|
7
|
+
<%% <%= singular_table_name %>.errors.full_messages.each do |message| %>
|
8
|
+
<li><%%= message %></li>
|
9
|
+
<%% end %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
<%% end %>
|
13
|
+
|
14
|
+
<% attributes.each do |attribute| -%>
|
15
|
+
<div class="field">
|
16
|
+
<% if attribute.password_digest? -%>
|
17
|
+
<%%= f.label :password %>
|
18
|
+
<%%= f.password_field :password %>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
<div class="field">
|
22
|
+
<%%= f.label :password_confirmation %>
|
23
|
+
<%%= f.password_field :password_confirmation %>
|
24
|
+
<% else -%>
|
25
|
+
<%%= f.label :<%= attribute.column_name %> %>
|
26
|
+
<%%= f.<%= attribute.field_type %> :<%= attribute.column_name %> %>
|
27
|
+
<% end -%>
|
28
|
+
</div>
|
29
|
+
|
30
|
+
<% end -%>
|
31
|
+
<div class="actions">
|
32
|
+
<%%= f.submit %>
|
33
|
+
</div>
|
34
|
+
<%% end %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
= form_for <%= singular_table_name %> do |f|
|
2
|
+
- if <%= singular_table_name %>.errors.any?
|
3
|
+
#error_explanation
|
4
|
+
%h2= "#{pluralize(<%= singular_table_name %>.errors.count, "error")} prohibited this <%= singular_table_name %> from being saved:"
|
5
|
+
%ul
|
6
|
+
- <%= singular_table_name %>.errors.full_messages.each do |msg|
|
7
|
+
%li= msg
|
8
|
+
|
9
|
+
<% for attribute in attributes -%>
|
10
|
+
.field
|
11
|
+
= f.label :<%= attribute.name %>
|
12
|
+
= f.<%= attribute.field_type %> :<%= attribute.name %>
|
13
|
+
<% end -%>
|
14
|
+
.actions
|
15
|
+
= f.submit 'Save'
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<% if namespaced? -%>
|
2
|
+
require_dependency "<%= namespaced_path %>/application_controller"
|
3
|
+
|
4
|
+
<% end -%>
|
5
|
+
<% module_namespacing do -%>
|
6
|
+
class <%= controller_class_name %>Controller < ApplicationController
|
7
|
+
expose :<%= plural_table_name %>, ->{ <%= orm_class.all(class_name) %> }
|
8
|
+
expose :<%= singular_table_name %>
|
9
|
+
|
10
|
+
def create
|
11
|
+
if <%= orm_instance.save %>
|
12
|
+
redirect_to <%= singular_table_name %>, notice: <%= "'#{human_name} was successfully created.'" %>
|
13
|
+
else
|
14
|
+
render :new
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def update
|
19
|
+
if <%= orm_instance.update("#{singular_table_name}_params") %>
|
20
|
+
redirect_to <%= singular_table_name %>, notice: <%= "'#{human_name} was successfully updated.'" %>
|
21
|
+
else
|
22
|
+
render :edit
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def destroy
|
27
|
+
<%= orm_instance.destroy %>
|
28
|
+
redirect_to <%= index_helper %>_url, notice: <%= "'#{human_name} was successfully destroyed.'" %>
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def <%= "#{singular_table_name}_params" %>
|
34
|
+
<%- if attributes_names.empty? -%>
|
35
|
+
params.fetch(:<%= singular_table_name %>, {})
|
36
|
+
<%- else -%>
|
37
|
+
params.require(:<%= singular_table_name %>).permit(<%= attributes_names.map { |name| ":#{name}" }.join(', ') %>)
|
38
|
+
<%- end -%>
|
39
|
+
end
|
40
|
+
end
|
41
|
+
<% end -%>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<p id="notice"><%%= notice %></p>
|
2
|
+
|
3
|
+
<h1><%= plural_table_name.titleize %></h1>
|
4
|
+
|
5
|
+
<table>
|
6
|
+
<thead>
|
7
|
+
<tr>
|
8
|
+
<% attributes.reject(&:password_digest?).each do |attribute| -%>
|
9
|
+
<th><%= attribute.human_name %></th>
|
10
|
+
<% end -%>
|
11
|
+
<th colspan="3"></th>
|
12
|
+
</tr>
|
13
|
+
</thead>
|
14
|
+
|
15
|
+
<tbody>
|
16
|
+
<%% <%= plural_table_name %>.each do |<%= singular_table_name %>| %>
|
17
|
+
<tr>
|
18
|
+
<% attributes.reject(&:password_digest?).each do |attribute| -%>
|
19
|
+
<td><%%= <%= singular_table_name %>.<%= attribute.name %> %></td>
|
20
|
+
<% end -%>
|
21
|
+
<td><%%= link_to 'Show', <%= singular_table_name %> %></td>
|
22
|
+
<td><%%= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>) %></td>
|
23
|
+
<td><%%= link_to 'Destroy', <%= singular_table_name %>, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
24
|
+
</tr>
|
25
|
+
<%% end %>
|
26
|
+
</tbody>
|
27
|
+
</table>
|
28
|
+
|
29
|
+
<br>
|
30
|
+
|
31
|
+
<%%= link_to 'New <%= singular_table_name.titleize %>', new_<%= singular_table_name %>_path %>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
%h1 Listing <%= plural_table_name %>
|
2
|
+
|
3
|
+
%table
|
4
|
+
%thead
|
5
|
+
%tr
|
6
|
+
<% for attribute in attributes -%>
|
7
|
+
%th <%= attribute.human_name %>
|
8
|
+
<% end -%>
|
9
|
+
%th
|
10
|
+
%th
|
11
|
+
%th
|
12
|
+
|
13
|
+
%tbody
|
14
|
+
- <%= plural_table_name %>.each do |<%= singular_table_name %>|
|
15
|
+
%tr
|
16
|
+
<% for attribute in attributes -%>
|
17
|
+
%td= <%= singular_table_name %>.<%= attribute.name %>
|
18
|
+
<% end -%>
|
19
|
+
%td= link_to 'Show', <%= singular_table_name %>
|
20
|
+
%td= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>)
|
21
|
+
%td= link_to 'Destroy', <%= singular_table_name %>, method: :delete, data: { confirm: 'Are you sure?' }
|
22
|
+
|
23
|
+
%br
|
24
|
+
|
25
|
+
= link_to 'New <%= human_name %>', new_<%= singular_table_name %>_path
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<p id="notice"><%%= notice %></p>
|
2
|
+
|
3
|
+
<% attributes.reject(&:password_digest?).each do |attribute| -%>
|
4
|
+
<p>
|
5
|
+
<strong><%= attribute.human_name %>:</strong>
|
6
|
+
<%%= <%= singular_table_name %>.<%= attribute.name %> %>
|
7
|
+
</p>
|
8
|
+
|
9
|
+
<% end -%>
|
10
|
+
<%%= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>) %> |
|
11
|
+
<%%= link_to 'Back', <%= index_helper %>_path %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
%p#notice= notice
|
2
|
+
|
3
|
+
<% for attribute in attributes -%>
|
4
|
+
%p
|
5
|
+
%b <%= attribute.human_name %>:
|
6
|
+
= <%= singular_table_name %>.<%= attribute.name %>
|
7
|
+
<% end -%>
|
8
|
+
|
9
|
+
= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>)
|
10
|
+
\|
|
11
|
+
= link_to 'Back', <%= index_helper %>_path
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe DecentExposure::Generators::ScaffoldTemplatesGenerator, type: :generator do
|
4
|
+
|
5
|
+
subject(:generator) { described_class.new }
|
6
|
+
|
7
|
+
context 'with erb' do
|
8
|
+
it 'generates controller and erb views' do
|
9
|
+
allow(generator).to receive(:copy_file).with('controller.rb', 'lib/templates/rails/scaffold_controller/controller.rb')
|
10
|
+
allow(generator).to receive(:copy_file).with('_form.html.erb', 'lib/templates/erb/scaffold/_form.html.erb')
|
11
|
+
allow(generator).to receive(:copy_file).with('edit.html.erb', 'lib/templates/erb/scaffold/edit.html.erb')
|
12
|
+
allow(generator).to receive(:copy_file).with('index.html.erb', 'lib/templates/erb/scaffold/index.html.erb')
|
13
|
+
allow(generator).to receive(:copy_file).with('new.html.erb', 'lib/templates/erb/scaffold/new.html.erb')
|
14
|
+
allow(generator).to receive(:copy_file).with('show.html.erb', 'lib/templates/erb/scaffold/show.html.erb')
|
15
|
+
|
16
|
+
generator.generate
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
context 'with haml' do
|
21
|
+
before do
|
22
|
+
allow(generator).to receive(:options).and_return(template_engine: :haml)
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'generates controller and haml views' do
|
26
|
+
allow(generator).to receive(:copy_file).with('controller.rb', 'lib/templates/rails/scaffold_controller/controller.rb')
|
27
|
+
allow(generator).to receive(:copy_file).with('_form.html.haml', 'lib/templates/haml/scaffold/_form.html.haml')
|
28
|
+
allow(generator).to receive(:copy_file).with('edit.html.haml', 'lib/templates/haml/scaffold/edit.html.haml')
|
29
|
+
allow(generator).to receive(:copy_file).with('index.html.haml', 'lib/templates/haml/scaffold/index.html.haml')
|
30
|
+
allow(generator).to receive(:copy_file).with('new.html.haml', 'lib/templates/haml/scaffold/new.html.haml')
|
31
|
+
allow(generator).to receive(:copy_file).with('show.html.haml', 'lib/templates/haml/scaffold/show.html.haml')
|
32
|
+
|
33
|
+
generator.generate
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
context 'with invalid template_engine' do
|
38
|
+
before do
|
39
|
+
allow(generator).to receive(:options).and_return(template_engine: :foo_bar)
|
40
|
+
end
|
41
|
+
|
42
|
+
it 'raises an ArgumentError' do
|
43
|
+
expect { generator.generate }. to raise_error(ArgumentError)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
data/spec/integration_spec.rb
CHANGED
@@ -9,17 +9,17 @@ describe BirdsController, type: :controller do
|
|
9
9
|
after{ expect(controller.bird).to eq(mockingbird) }
|
10
10
|
|
11
11
|
it "finds model by id" do
|
12
|
-
get :show,
|
12
|
+
get :show, { id: "mockingbird" }
|
13
13
|
end
|
14
14
|
|
15
15
|
it "finds model by bird_id" do
|
16
|
-
get :show,
|
16
|
+
get :show, { bird_id: "mockingbird" }
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
20
|
it "builds bird if id is not provided" do
|
21
21
|
bird = double("Bird")
|
22
|
-
expect(Bird).to receive(:new).and_return(bird)
|
22
|
+
expect(Bird).to receive(:new).with({}).and_return(bird)
|
23
23
|
get :show
|
24
24
|
expect(controller.bird).to eq(bird)
|
25
25
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decent_exposure
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0.
|
4
|
+
version: 3.0.0.beta2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Pravosud
|
@@ -9,36 +9,36 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-05-
|
12
|
+
date: 2016-05-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
15
|
+
name: activesupport
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - "
|
18
|
+
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version:
|
20
|
+
version: '4.0'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - "
|
25
|
+
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version:
|
27
|
+
version: '4.0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
|
-
name:
|
29
|
+
name: railties
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- - "
|
32
|
+
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version:
|
35
|
-
type: :
|
34
|
+
version: '4.0'
|
35
|
+
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- - "
|
39
|
+
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version:
|
41
|
+
version: '4.0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: rspec-rails
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -53,34 +53,6 @@ dependencies:
|
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '3.0'
|
56
|
-
- !ruby/object:Gem::Dependency
|
57
|
-
name: rake
|
58
|
-
requirement: !ruby/object:Gem::Requirement
|
59
|
-
requirements:
|
60
|
-
- - "~>"
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: '10.3'
|
63
|
-
type: :development
|
64
|
-
prerelease: false
|
65
|
-
version_requirements: !ruby/object:Gem::Requirement
|
66
|
-
requirements:
|
67
|
-
- - "~>"
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '10.3'
|
70
|
-
- !ruby/object:Gem::Dependency
|
71
|
-
name: pry
|
72
|
-
requirement: !ruby/object:Gem::Requirement
|
73
|
-
requirements:
|
74
|
-
- - ">="
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
version: '0'
|
77
|
-
type: :development
|
78
|
-
prerelease: false
|
79
|
-
version_requirements: !ruby/object:Gem::Requirement
|
80
|
-
requirements:
|
81
|
-
- - ">="
|
82
|
-
- !ruby/object:Gem::Version
|
83
|
-
version: '0'
|
84
56
|
description: "\n DecentExposure helps you program to an interface, rather than
|
85
57
|
an\n implementation in your Rails controllers. The fact of the matter is that\n
|
86
58
|
\ sharing state via instance variables in controllers promotes close coupling\n
|
@@ -101,6 +73,9 @@ files:
|
|
101
73
|
- Rakefile
|
102
74
|
- decent_exposure.gemspec
|
103
75
|
- decent_exposure.png
|
76
|
+
- gemfiles/Gemfile.rails-4.2.0
|
77
|
+
- gemfiles/Gemfile.rails-4.2.6
|
78
|
+
- gemfiles/Gemfile.rails-5.0.0.rc1
|
104
79
|
- hashrocket_logo.png
|
105
80
|
- lib/decent_exposure.rb
|
106
81
|
- lib/decent_exposure/attribute.rb
|
@@ -110,7 +85,21 @@ files:
|
|
110
85
|
- lib/decent_exposure/exposure.rb
|
111
86
|
- lib/decent_exposure/flow.rb
|
112
87
|
- lib/decent_exposure/version.rb
|
88
|
+
- lib/generators/decent_exposure/USAGE
|
89
|
+
- lib/generators/decent_exposure/scaffold_templates_generator.rb
|
90
|
+
- lib/generators/decent_exposure/templates/_form.html.erb
|
91
|
+
- lib/generators/decent_exposure/templates/_form.html.haml
|
92
|
+
- lib/generators/decent_exposure/templates/controller.rb
|
93
|
+
- lib/generators/decent_exposure/templates/edit.html.erb
|
94
|
+
- lib/generators/decent_exposure/templates/edit.html.haml
|
95
|
+
- lib/generators/decent_exposure/templates/index.html.erb
|
96
|
+
- lib/generators/decent_exposure/templates/index.html.haml
|
97
|
+
- lib/generators/decent_exposure/templates/new.html.erb
|
98
|
+
- lib/generators/decent_exposure/templates/new.html.haml
|
99
|
+
- lib/generators/decent_exposure/templates/show.html.erb
|
100
|
+
- lib/generators/decent_exposure/templates/show.html.haml
|
113
101
|
- spec/controller_spec.rb
|
102
|
+
- spec/generators/decent_exposure/scaffold_templates_generator_spec.rb
|
114
103
|
- spec/integration_spec.rb
|
115
104
|
- spec/spec_helper.rb
|
116
105
|
- spec/support/rails_app.rb
|
@@ -134,12 +123,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
134
123
|
version: 1.3.1
|
135
124
|
requirements: []
|
136
125
|
rubyforge_project:
|
137
|
-
rubygems_version: 2.
|
126
|
+
rubygems_version: 2.6.4
|
138
127
|
signing_key:
|
139
128
|
specification_version: 4
|
140
129
|
summary: A helper for creating declarative interfaces in controllers
|
141
130
|
test_files:
|
142
131
|
- spec/controller_spec.rb
|
132
|
+
- spec/generators/decent_exposure/scaffold_templates_generator_spec.rb
|
143
133
|
- spec/integration_spec.rb
|
144
134
|
- spec/spec_helper.rb
|
145
135
|
- spec/support/rails_app.rb
|