katapult 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.ruby-version +1 -1
  4. data/README.md +61 -35
  5. data/bin/katapult +24 -34
  6. data/features/authenticate.feature +344 -0
  7. data/features/basics.feature +590 -0
  8. data/features/binary.feature +33 -1
  9. data/features/model.feature +9 -13
  10. data/features/step_definitions/rails_steps.rb +3 -2
  11. data/features/wui.feature +49 -4
  12. data/lib/generators/katapult/basics/basics_generator.rb +63 -17
  13. data/lib/generators/katapult/basics/templates/.gitignore +1 -0
  14. data/lib/generators/katapult/basics/templates/.ruby-version +1 -1
  15. data/lib/generators/katapult/basics/templates/Capfile +25 -0
  16. data/lib/generators/katapult/basics/templates/Gemfile +14 -6
  17. data/lib/generators/katapult/basics/templates/Guardfile +44 -0
  18. data/lib/generators/katapult/basics/templates/config/database.sample.yml +3 -2
  19. data/lib/generators/katapult/basics/templates/config/database.yml +3 -2
  20. data/lib/generators/katapult/basics/templates/config/deploy/production.rb +8 -0
  21. data/lib/generators/katapult/basics/templates/config/deploy/staging.rb +7 -0
  22. data/lib/generators/katapult/basics/templates/config/deploy.rb +37 -0
  23. data/lib/generators/katapult/basics/templates/config/initializers/ext.rb +3 -0
  24. data/lib/generators/katapult/basics/templates/features/support/factory_girl.rb +1 -0
  25. data/lib/generators/katapult/basics/templates/features/support/paths.rb +6 -0
  26. data/lib/generators/katapult/basics/templates/lib/capistrano/tasks/db.rake +28 -0
  27. data/lib/generators/katapult/basics/templates/lib/capistrano/tasks/deploy.rake +15 -0
  28. data/lib/generators/katapult/basics/templates/lib/capistrano/tasks/passenger.rake +8 -0
  29. data/lib/generators/katapult/basics/templates/{config/initializers → lib/ext/action_view}/form_for_with_development_errors.rb +0 -2
  30. data/lib/generators/katapult/basics/templates/lib/ext/action_view/spec_label.rb +46 -0
  31. data/lib/generators/katapult/basics/templates/{config/initializers → lib/ext/active_record}/find_by_anything.rb +0 -0
  32. data/lib/generators/katapult/basics/templates/lib/ext/active_record/these.rb +7 -0
  33. data/lib/generators/katapult/basics/templates/lib/ext/array/xss_aware_join.rb +10 -0
  34. data/lib/generators/katapult/basics/templates/lib/ext/enumerable/natural_sort.rb +15 -0
  35. data/lib/generators/katapult/basics/templates/lib/ext/hash/infinite.rb +7 -0
  36. data/lib/generators/katapult/basics/templates/lib/ext/string/html_entities.rb +11 -0
  37. data/lib/generators/katapult/basics/templates/lib/ext/string/to_sort_atoms.rb +52 -0
  38. data/lib/generators/katapult/basics/templates/lib/tasks/pending_migrations.rake +24 -0
  39. data/lib/generators/katapult/basics/templates/spec/factories/factories.rb +9 -0
  40. data/lib/generators/katapult/basics/templates/spec/support/factory_girl.rb +3 -0
  41. data/lib/generators/katapult/clearance/clearance_generator.rb +125 -0
  42. data/lib/generators/katapult/clearance/templates/app/controllers/passwords_controller.rb +16 -0
  43. data/lib/generators/katapult/clearance/templates/app/views/clearance_mailer/change_password.html.haml +6 -0
  44. data/lib/generators/katapult/clearance/templates/app/views/clearance_mailer/change_password.text.erb +3 -0
  45. data/lib/generators/katapult/clearance/templates/app/views/passwords/create.html.haml +5 -0
  46. data/lib/generators/katapult/clearance/templates/app/views/passwords/edit.html.haml +16 -0
  47. data/lib/generators/katapult/clearance/templates/app/views/passwords/new.html.haml +14 -0
  48. data/lib/generators/katapult/clearance/templates/app/views/sessions/new.html.haml +19 -0
  49. data/lib/generators/katapult/clearance/templates/config/initializers/clearance.rb +15 -0
  50. data/lib/generators/katapult/clearance/templates/config/locales/clearance.en.yml +59 -0
  51. data/lib/generators/katapult/clearance/templates/features/authentication.feature +94 -0
  52. data/lib/generators/katapult/clearance/templates/features/step_definitions/authentication_steps.rb +4 -0
  53. data/lib/generators/katapult/cucumber_features/templates/feature.feature +11 -7
  54. data/lib/generators/katapult/haml/haml_generator.rb +5 -0
  55. data/lib/generators/katapult/haml/templates/_form.html.haml +4 -4
  56. data/lib/generators/katapult/haml/templates/app/views/layouts/_flashes.html.haml +3 -0
  57. data/lib/generators/katapult/haml/templates/app/views/layouts/application.html.haml +9 -3
  58. data/lib/generators/katapult/haml/templates/index.html.haml +1 -1
  59. data/lib/generators/katapult/haml/templates/show.html.haml +2 -4
  60. data/lib/generators/katapult/install/templates/lib/katapult/application_model.rb +9 -7
  61. data/lib/generators/katapult/model/model_generator.rb +1 -1
  62. data/lib/generators/katapult/w_u_i/templates/controller.rb +1 -1
  63. data/lib/generators/katapult/w_u_i/w_u_i_generator.rb +4 -2
  64. data/lib/katapult/application_model.rb +8 -1
  65. data/lib/katapult/attribute.rb +10 -11
  66. data/lib/katapult/authentication.rb +25 -0
  67. data/lib/katapult/binary_util.rb +37 -0
  68. data/lib/katapult/element.rb +1 -1
  69. data/lib/katapult/generator.rb +6 -0
  70. data/lib/katapult/model.rb +13 -1
  71. data/lib/katapult/parser.rb +7 -0
  72. data/lib/katapult/version.rb +1 -1
  73. data/lib/katapult/wui.rb +4 -0
  74. data/lib/katapult.rb +2 -0
  75. data/spec/attribute_spec.rb +13 -0
  76. data/spec/element_spec.rb +5 -0
  77. data/spec/model_spec.rb +5 -4
  78. data/spec/util_spec.rb +8 -8
  79. data/spec/wui_spec.rb +19 -0
  80. metadata +44 -8
  81. data/features/katapult.feature +0 -271
  82. data/lib/katapult/util.rb +0 -16
@@ -17,7 +17,7 @@
17
17
  %td
18
18
  .items__actions
19
19
  = link_to 'Edit', <%= wui.path(:edit, object_name) %>, class: 'items__action'
20
- = link_to 'Destroy', <%= wui.path(:destroy, object_name) %>, method: :delete, class: 'items__action', confirm: 'Really destroy?'
20
+ = link_to 'Destroy', <%= wui.path(:destroy, object_name) %>, method: :delete, class: 'items__action', data: { confirm: 'Really destroy?' }, title: "Destroy #{<%= object_name %>.to_s}"
21
21
  <%- wui.custom_actions.select(&:member?).each do |action| -%>
22
22
  = link_to '<%= action.name.humanize.titleize %>', <%= wui.path(action, object_name) %>, class: 'items__action'<%=
23
23
  ", method: :#{action.method}" unless action.get?
@@ -12,7 +12,7 @@
12
12
  <% end -%>
13
13
 
14
14
  %dl.values
15
- <% wui.model.attrs.each do |attribute| -%>
15
+ <% wui.model.renderable_attrs.each do |attribute| -%>
16
16
  <%- model_attribute = "#{model_name(:ivar)}.#{attribute.name}" -%>
17
17
  %dt
18
18
  = <%= model_name(:class) %>.human_attribute_name(:<%= attribute.name %>)
@@ -31,11 +31,9 @@
31
31
 
32
32
  <%- when :text -%>
33
33
  = simple_format(<%= model_attribute %>)
34
- <%- when :markdown -%>
35
- = markdown(<%= model_attribute %>)
36
34
  <%- when :flag -%>
37
35
  = <%= model_attribute %> ? 'Yes' : 'No'
38
36
  <%- when :datetime -%>
39
- = l(<%= model_attribute %>) if <%= model_attribute %>
37
+ = l(<%= model_attribute %>.to_date) if <%= model_attribute %>
40
38
  <%- end -%>
41
39
  <%- end -%>
@@ -1,18 +1,20 @@
1
1
  # Here you define the fundamentals of your application.
2
2
  #
3
3
  # Add a model:
4
- # model 'customer' do |customer|
5
- # customer.attr :name
6
- # customer.attr :birth, type: :date
7
- # customer.attr :email
4
+ # model 'user' do |user|
5
+ # user.attr :name
6
+ # user.attr :birth, type: :datetime
7
+ # user.attr :email
8
8
  # end
9
9
  #
10
10
  # Add a web user interface:
11
- # wui 'customer' do |wui|
12
- # wui.action :index
13
- # wui.action :show
11
+ # wui 'user' do |wui|
12
+ # wui.crud # Creates all CRUD actions: index, new, show, etc.
14
13
  # wui.action :lock, scope: :member, method: :post
15
14
  # end
16
15
  #
17
16
  # Add navigation
18
17
  # navigation :main
18
+ #
19
+ # Add authentication
20
+ # authenticate 'user', system_email: 'system@example.com'
@@ -15,7 +15,7 @@ module Katapult
15
15
 
16
16
  def create_migration_file
17
17
  migration_name = "create_#{table_name}"
18
- migration_attributes = model.attrs.map(&:for_migration)
18
+ migration_attributes = model.db_fields.map(&:for_migration)
19
19
 
20
20
  args = [migration_name] + migration_attributes
21
21
  options = { timestamps: true, force: true }
@@ -91,7 +91,7 @@ class <%= model_name(:classes) %>Controller < ApplicationController
91
91
 
92
92
  def <%= method_name(:params) %>
93
93
  <%= method_name(:params) %> = params[:<%= model_name(:variable) %>]
94
- <%= method_name(:params) %> ? <%= method_name(:params) %>.permit(<%= wui.model.attrs.map(&:name).map(&:to_sym) %>) : {}
94
+ <%= method_name(:params) %> ? <%= method_name(:params) %>.permit(%i[<%= wui.model.attrs.map(&:name).join(' ') %>]) : {}
95
95
  end
96
96
 
97
97
  def <%= method_name(:scope) %>
@@ -21,14 +21,16 @@ module Katapult
21
21
  route = model_name(:symbols)
22
22
  routes = File.read('config/routes.rb')
23
23
 
24
- if routes.include? "resources #{ route }"
24
+ if routes =~ /^\s+resources #{ route }/
25
25
  say_status :warn, <<MESSAGE, :red
26
26
  Routes for #{ route } already exist! Not updated.
27
27
 
28
28
  In order to keep existing routes created by the user, the config/routes.rb file
29
- is not wiped on model transformation. To have Katapult update the #{ route}
29
+ is not wiped on model transformation. To have Katapult update the #{ route }
30
30
  route for you, delete it before transforming the application model.
31
31
  MESSAGE
32
+ elsif wui.crud_only?
33
+ route "resources #{ route }"
32
34
  else
33
35
  route render_partial('_route.rb')
34
36
  end
@@ -3,7 +3,7 @@
3
3
  module Katapult
4
4
  class ApplicationModel
5
5
 
6
- attr_reader :models, :wuis, :navigation
6
+ attr_reader :models, :wuis, :navigation, :authentication
7
7
 
8
8
  def initialize
9
9
  @models = []
@@ -33,12 +33,19 @@ module Katapult
33
33
  @navigation = navigation
34
34
  end
35
35
 
36
+ def set_authentication(auth)
37
+ auth.set_application_model(self)
38
+ auth.ensure_user_model_attributes_present
39
+ @authentication = auth
40
+ end
41
+
36
42
  # ---
37
43
 
38
44
  def render
39
45
  models.each &:render
40
46
  wuis.each &:render
41
47
  navigation.render if navigation
48
+ authentication.render if authentication
42
49
  end
43
50
 
44
51
  end
@@ -8,16 +8,17 @@ require 'zlib'
8
8
  module Katapult
9
9
  class Attribute < Element
10
10
 
11
- options :type, :default, :assignable_values, :allow_blank
11
+ options :type, :default, :assignable_values, :allow_blank, :skip_db
12
12
 
13
13
  UnknownTypeError = Class.new(StandardError)
14
14
  MissingOptionError = Class.new(StandardError)
15
- TYPES = %i(string email url integer money text markdown flag datetime)
15
+ TYPES = %i(string email password url integer money text flag datetime json plain_json)
16
16
 
17
17
  def initialize(*args)
18
18
  super
19
19
 
20
20
  self.type ||= :email if name.to_s =~ /email/
21
+ self.type ||= :password if name.to_s =~ /password/
21
22
  self.type ||= :string
22
23
 
23
24
  validate
@@ -31,15 +32,12 @@ module Katapult
31
32
 
32
33
  def for_migration
33
34
  db_type = case type
34
- when :email, :url
35
- 'string'
36
- when :flag
37
- 'boolean'
38
- when :money
39
- 'decimal{10,2}' # {precision,scale} = total digits, decimal places
40
- else
41
- type
42
- end
35
+ when :email, :url, :password then 'string'
36
+ when :flag then 'boolean'
37
+ when :money then 'decimal{10,2}' # {precision,scale} = total digits, decimal places
38
+ when :json then 'jsonb' # Indexable JSON
39
+ when :plain_json then 'json' # Only use this if you need to
40
+ else type end
43
41
 
44
42
  "#{name}:#{db_type}"
45
43
  end
@@ -51,6 +49,7 @@ module Katapult
51
49
  else
52
50
  case type
53
51
  when :string then "#{name}-string"
52
+ when :password then "#{name}-password"
54
53
  when :email then "#{name}@example.com"
55
54
  when :url then "#{name}.example.com"
56
55
  when :text then "#{name}-text"
@@ -0,0 +1,25 @@
1
+ require 'generators/katapult/clearance/clearance_generator'
2
+
3
+ module Katapult
4
+ class Authentication < Element
5
+
6
+ MissingUserModel = Class.new(StandardError)
7
+
8
+ # attr name: The user model name
9
+ attr_accessor :system_email
10
+
11
+ def ensure_user_model_attributes_present
12
+ user_model = application_model.get_model(name) or raise MissingUserModel,
13
+ "Could not find a model named #{ name }"
14
+ user_attrs = user_model.attrs.map(&:name)
15
+
16
+ user_model.attr(:email) unless user_attrs.include?('email')
17
+ user_model.attr(:password, type: :password, skip_db: true) unless user_attrs.include?('password')
18
+ end
19
+
20
+ def render
21
+ Generators::ClearanceGenerator.new(self).invoke_all
22
+ end
23
+
24
+ end
25
+ end
@@ -0,0 +1,37 @@
1
+ # Utility methods.
2
+
3
+ # The Katapult::Util module is used inside the `katapult` script. It should not
4
+ # require any gems in order to prevent version conflicts.
5
+ require_relative '../katapult'
6
+ require 'bundler'
7
+
8
+ module Katapult
9
+ module BinaryUtil
10
+ extend self
11
+
12
+ def git_commit(message, options = nil)
13
+ message.gsub! /'/, "" # remove single quotes
14
+ system "git add --all; git commit -m '#{ message }' --author='katapult <katapult@makandra.com>' #{ options }"
15
+ end
16
+
17
+ def create_rails_app(name)
18
+ run "rails _#{ Katapult::RAILS_VERSION }_ new #{ name } --skip-test-unit --skip-bundle --database postgresql"
19
+ end
20
+
21
+ def puts(*args)
22
+ message = "\n> #{ args.join ' ' }"
23
+ Kernel.puts "\e[35m#{ message }\e[0m" # pink
24
+ end
25
+
26
+ # With clean Bundler env
27
+ def run(command)
28
+ success = Bundler.with_clean_env { system command }
29
+
30
+ if !success
31
+ puts 'x Something went wrong'
32
+ exit(1)
33
+ end
34
+ end
35
+
36
+ end
37
+ end
@@ -33,8 +33,8 @@ module Katapult
33
33
  end
34
34
 
35
35
  def name(kind = nil)
36
- human_name = @name.downcase
37
36
  machine_name = @name.underscore
37
+ human_name = machine_name.humanize.downcase
38
38
 
39
39
  case kind.to_s
40
40
  when '' then @name
@@ -24,5 +24,11 @@ module Katapult
24
24
  ERB.new(::File.binread(path), nil, '%').result(given_binding || binding)
25
25
  end
26
26
 
27
+ def run(*)
28
+ Bundler.with_clean_env do
29
+ super
30
+ end
31
+ end
32
+
27
33
  end
28
34
  end
@@ -22,7 +22,19 @@ module Katapult
22
22
  end
23
23
 
24
24
  def label_attr
25
- attrs.first
25
+ renderable_attrs.first
26
+ end
27
+
28
+ def db_fields
29
+ attrs.reject(&:skip_db)
30
+ end
31
+
32
+ def renderable_attrs
33
+ attrs.reject { |a| %w[plain_json json password].include? a.type.to_s }
34
+ end
35
+
36
+ def editable_attrs
37
+ attrs.reject { |a| %w[plain_json json].include? a.type.to_s }
26
38
  end
27
39
 
28
40
  def render
@@ -5,6 +5,7 @@ require_relative 'application_model'
5
5
  require 'katapult/model'
6
6
  require 'katapult/wui'
7
7
  require 'katapult/navigation'
8
+ require 'katapult/authentication'
8
9
 
9
10
  module Katapult
10
11
  class Parser
@@ -31,6 +32,12 @@ module Katapult
31
32
  application_model.set_navigation Navigation.new(name)
32
33
  end
33
34
 
35
+ def authenticate(name, system_email:)
36
+ application_model.set_authentication Authentication.new(name,
37
+ system_email: system_email
38
+ )
39
+ end
40
+
34
41
  private
35
42
 
36
43
  attr_accessor :application_model
@@ -1,3 +1,3 @@
1
1
  module Katapult
2
- VERSION = '0.1.2'
2
+ VERSION = '0.2.0'
3
3
  end
data/lib/katapult/wui.rb CHANGED
@@ -34,6 +34,10 @@ module Katapult
34
34
  %i(index show create update destroy).each &method(:action)
35
35
  end
36
36
 
37
+ def crud_only?
38
+ actions.map(&:name).sort == RAILS_ACTIONS.sort
39
+ end
40
+
37
41
  def model
38
42
  model_name = @model || self.name
39
43
  application_model.get_model(model_name) or raise UnknownModelError,
data/lib/katapult.rb CHANGED
@@ -2,4 +2,6 @@ require 'active_support'
2
2
  require 'active_support/core_ext/hash/slice'
3
3
 
4
4
  module Katapult
5
+ RAILS_VERSION = '4.2.6'
6
+ RUBY_VERSION = '2.3.0'
5
7
  end
@@ -32,6 +32,19 @@ describe Katapult::Attribute do
32
32
  end
33
33
  end
34
34
 
35
+ describe 'password attributes' do
36
+ it 'recognizes password attributes' do
37
+ expect(described_class.new('password').type).to eql(:password)
38
+ expect(described_class.new('encrypted_password').type).to eql(:password)
39
+ expect(described_class.new('name').type).to_not eql(:password)
40
+ end
41
+
42
+ it 'does not overwrite a given type' do
43
+ expect(described_class.new('password', type: :string).type).to eql(:string)
44
+ expect(described_class.new('password_updated_at', type: :datetime).type).to eql(:datetime)
45
+ end
46
+ end
47
+
35
48
  describe 'email attributes' do
36
49
  it 'recognizes email attributes' do
37
50
  expect(described_class.new('email').type).to eql(:email)
data/spec/element_spec.rb CHANGED
@@ -11,6 +11,11 @@ describe Katapult::Element do
11
11
  end.to raise_error(Katapult::Element::UnknownFormattingError,
12
12
  'Unknown name formatting: :foobar')
13
13
  end
14
+
15
+ it 'properly spells human names' do
16
+ subject = described_class.new('complex_name')
17
+ expect(subject.name(:human)).to eq 'complex name'
18
+ end
14
19
  end
15
20
 
16
21
  end
data/spec/model_spec.rb CHANGED
@@ -7,11 +7,12 @@ describe Katapult::Model do
7
7
  subject { described_class.new('model') }
8
8
 
9
9
  describe '#label_attr' do
10
- it 'returns the model’s first attribute' do
11
- subject.attr('first_attr')
12
- subject.attr('second_attr')
10
+ it 'returns the model’s first renderable attribute' do
11
+ subject.attr 'first_attr', type: :json
12
+ subject.attr 'second_attr'
13
+ subject.attr 'third_attr'
13
14
 
14
- expect(subject.label_attr.name).to eql('first_attr')
15
+ expect(subject.label_attr.name).to eql('second_attr')
15
16
  end
16
17
  end
17
18
 
data/spec/util_spec.rb CHANGED
@@ -1,22 +1,22 @@
1
1
  require 'spec_helper'
2
- require 'katapult/util'
2
+ require 'katapult/binary_util'
3
3
 
4
- describe Katapult::Util do
4
+ describe Katapult::BinaryUtil do
5
5
 
6
6
  describe '#git_commit' do
7
7
  it 'adds all files before committing' do
8
- allow(Katapult::Util).to receive(:system).with(/git add --all; git commit/)
9
- Katapult::Util.git_commit 'test'
8
+ allow(Katapult::BinaryUtil).to receive(:system).with(/git add --all; git commit/)
9
+ Katapult::BinaryUtil.git_commit 'test'
10
10
  end
11
11
 
12
12
  it 'sets "katapult" as commit author' do
13
- allow(Katapult::Util).to receive(:system).with(/git commit.*--author='katapult \<katapult@makandra\.com\>'/)
14
- Katapult::Util.git_commit 'test'
13
+ allow(Katapult::BinaryUtil).to receive(:system).with(/git commit.*--author='katapult \<katapult@makandra\.com\>'/)
14
+ Katapult::BinaryUtil.git_commit 'test'
15
15
  end
16
16
 
17
17
  it 'sanitizes the commit message' do
18
- allow(Katapult::Util).to receive(:system).with(/git commit -m '"hack0r"'/)
19
- Katapult::Util.git_commit "\"hack''''0r\""
18
+ allow(Katapult::BinaryUtil).to receive(:system).with(/git commit -m '"hack0r"'/)
19
+ Katapult::BinaryUtil.git_commit "\"hack''''0r\""
20
20
  end
21
21
  end
22
22
 
data/spec/wui_spec.rb CHANGED
@@ -17,6 +17,25 @@ describe Katapult::WUI do
17
17
  end
18
18
  end
19
19
 
20
+ describe '#crud_only?' do
21
+ it 'is true for a crud WUI' do
22
+ subject.crud
23
+ expect(subject.crud_only?).to be true
24
+ end
25
+
26
+ it 'is false if the WUI has custom actions' do
27
+ subject.crud
28
+ subject.action :custom, method: :get, scope: :collection
29
+ expect(subject.crud_only?).to be false
30
+ end
31
+
32
+ it 'is false if the WUI does not have all CRUD actions' do
33
+ subject.action :index
34
+ subject.action :show
35
+ expect(subject.crud_only?).to be false
36
+ end
37
+ end
38
+
20
39
  describe '#model' do
21
40
  it 'returns the model object' do
22
41
  subject = described_class.new('Customer', model: 'User')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: katapult
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominik Schöler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-13 00:00:00.000000000 Z
11
+ date: 2016-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -139,9 +139,10 @@ files:
139
139
  - README.md
140
140
  - Rakefile
141
141
  - bin/katapult
142
+ - features/authenticate.feature
143
+ - features/basics.feature
142
144
  - features/binary.feature
143
145
  - features/configuration.feature
144
- - features/katapult.feature
145
146
  - features/model.feature
146
147
  - features/navigation.feature
147
148
  - features/step_definitions/db_steps.rb
@@ -156,7 +157,9 @@ files:
156
157
  - lib/generators/katapult/basics/basics_generator.rb
157
158
  - lib/generators/katapult/basics/templates/.gitignore
158
159
  - lib/generators/katapult/basics/templates/.ruby-version
160
+ - lib/generators/katapult/basics/templates/Capfile
159
161
  - lib/generators/katapult/basics/templates/Gemfile
162
+ - lib/generators/katapult/basics/templates/Guardfile
160
163
  - lib/generators/katapult/basics/templates/app/assets/stylesheets/application.sass
161
164
  - lib/generators/katapult/basics/templates/app/assets/stylesheets/application/blocks/_all.sass
162
165
  - lib/generators/katapult/basics/templates/app/assets/stylesheets/application/blocks/_items.sass
@@ -166,21 +169,52 @@ files:
166
169
  - lib/generators/katapult/basics/templates/config/cucumber.yml
167
170
  - lib/generators/katapult/basics/templates/config/database.sample.yml
168
171
  - lib/generators/katapult/basics/templates/config/database.yml
172
+ - lib/generators/katapult/basics/templates/config/deploy.rb
173
+ - lib/generators/katapult/basics/templates/config/deploy/production.rb
174
+ - lib/generators/katapult/basics/templates/config/deploy/staging.rb
169
175
  - lib/generators/katapult/basics/templates/config/initializers/exception_notification.rb.tt
170
- - lib/generators/katapult/basics/templates/config/initializers/find_by_anything.rb
171
- - lib/generators/katapult/basics/templates/config/initializers/form_for_with_development_errors.rb
176
+ - lib/generators/katapult/basics/templates/config/initializers/ext.rb
172
177
  - lib/generators/katapult/basics/templates/config/spring.rb
173
178
  - lib/generators/katapult/basics/templates/features/support/capybara_screenshot.rb
174
179
  - lib/generators/katapult/basics/templates/features/support/cucumber_factory.rb
175
180
  - lib/generators/katapult/basics/templates/features/support/database_cleaner.rb
176
181
  - lib/generators/katapult/basics/templates/features/support/env-custom.rb
182
+ - lib/generators/katapult/basics/templates/features/support/factory_girl.rb
177
183
  - lib/generators/katapult/basics/templates/features/support/paths.rb
178
184
  - lib/generators/katapult/basics/templates/features/support/selectors.rb
185
+ - lib/generators/katapult/basics/templates/lib/capistrano/tasks/db.rake
186
+ - lib/generators/katapult/basics/templates/lib/capistrano/tasks/deploy.rake
187
+ - lib/generators/katapult/basics/templates/lib/capistrano/tasks/passenger.rake
188
+ - lib/generators/katapult/basics/templates/lib/ext/action_view/form_for_with_development_errors.rb
189
+ - lib/generators/katapult/basics/templates/lib/ext/action_view/spec_label.rb
190
+ - lib/generators/katapult/basics/templates/lib/ext/active_record/find_by_anything.rb
191
+ - lib/generators/katapult/basics/templates/lib/ext/active_record/these.rb
192
+ - lib/generators/katapult/basics/templates/lib/ext/array/xss_aware_join.rb
193
+ - lib/generators/katapult/basics/templates/lib/ext/enumerable/natural_sort.rb
194
+ - lib/generators/katapult/basics/templates/lib/ext/hash/infinite.rb
195
+ - lib/generators/katapult/basics/templates/lib/ext/string/html_entities.rb
196
+ - lib/generators/katapult/basics/templates/lib/ext/string/to_sort_atoms.rb
197
+ - lib/generators/katapult/basics/templates/lib/tasks/pending_migrations.rake
198
+ - lib/generators/katapult/basics/templates/spec/factories/factories.rb
199
+ - lib/generators/katapult/basics/templates/spec/support/factory_girl.rb
179
200
  - lib/generators/katapult/basics/templates/spec/support/shoulda_matchers.rb
201
+ - lib/generators/katapult/clearance/clearance_generator.rb
202
+ - lib/generators/katapult/clearance/templates/app/controllers/passwords_controller.rb
203
+ - lib/generators/katapult/clearance/templates/app/views/clearance_mailer/change_password.html.haml
204
+ - lib/generators/katapult/clearance/templates/app/views/clearance_mailer/change_password.text.erb
205
+ - lib/generators/katapult/clearance/templates/app/views/passwords/create.html.haml
206
+ - lib/generators/katapult/clearance/templates/app/views/passwords/edit.html.haml
207
+ - lib/generators/katapult/clearance/templates/app/views/passwords/new.html.haml
208
+ - lib/generators/katapult/clearance/templates/app/views/sessions/new.html.haml
209
+ - lib/generators/katapult/clearance/templates/config/initializers/clearance.rb
210
+ - lib/generators/katapult/clearance/templates/config/locales/clearance.en.yml
211
+ - lib/generators/katapult/clearance/templates/features/authentication.feature
212
+ - lib/generators/katapult/clearance/templates/features/step_definitions/authentication_steps.rb
180
213
  - lib/generators/katapult/cucumber_features/cucumber_features_generator.rb
181
214
  - lib/generators/katapult/cucumber_features/templates/feature.feature
182
215
  - lib/generators/katapult/haml/haml_generator.rb
183
216
  - lib/generators/katapult/haml/templates/_form.html.haml
217
+ - lib/generators/katapult/haml/templates/app/views/layouts/_flashes.html.haml
184
218
  - lib/generators/katapult/haml/templates/app/views/layouts/application.html.haml
185
219
  - lib/generators/katapult/haml/templates/custom_action.html.haml
186
220
  - lib/generators/katapult/haml/templates/edit.html.haml
@@ -204,12 +238,13 @@ files:
204
238
  - lib/katapult/action.rb
205
239
  - lib/katapult/application_model.rb
206
240
  - lib/katapult/attribute.rb
241
+ - lib/katapult/authentication.rb
242
+ - lib/katapult/binary_util.rb
207
243
  - lib/katapult/element.rb
208
244
  - lib/katapult/generator.rb
209
245
  - lib/katapult/model.rb
210
246
  - lib/katapult/navigation.rb
211
247
  - lib/katapult/parser.rb
212
- - lib/katapult/util.rb
213
248
  - lib/katapult/version.rb
214
249
  - lib/katapult/wui.rb
215
250
  - script/console
@@ -240,14 +275,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
240
275
  version: '0'
241
276
  requirements: []
242
277
  rubyforge_project:
243
- rubygems_version: 2.4.8
278
+ rubygems_version: 2.5.1
244
279
  signing_key:
245
280
  specification_version: 4
246
281
  summary: Kickstart Rails development
247
282
  test_files:
283
+ - features/authenticate.feature
284
+ - features/basics.feature
248
285
  - features/binary.feature
249
286
  - features/configuration.feature
250
- - features/katapult.feature
251
287
  - features/model.feature
252
288
  - features/navigation.feature
253
289
  - features/step_definitions/db_steps.rb