Skip to content

Commit 2d10f31

Browse files
committed
Rename from working title "wheelie" to "katapult"
1 parent 37f2ec2 commit 2d10f31

Some content is hidden

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

73 files changed

+258
-253
lines changed

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
source 'https://rubygems.org'
22

3-
# Specify your gem's dependencies in wheelie.gemspec
3+
# Specify your gem's dependencies in katapult.gemspec
44
gemspec

Guardfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ guard 'cucumber' do
66
watch(%r{^features/support/.+$}) { 'features' }
77
watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
88

9-
watch(%r{^lib/generators/wheelie/.+/.+_generator\.rb$}) { 'features/wheelie.feature:12' }
10-
watch(%r{^lib/wheelie/.+\.rb$}) { 'features/wheelie.feature:12' }
9+
watch(%r{^lib/generators/katapult/.+/.+_generator\.rb$}) { 'features/katapult.feature:12' }
10+
watch(%r{^lib/katapult/.+\.rb$}) { 'features/katapult.feature:12' }
1111
end

README.md

+46-26
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,45 @@
1-
# Wheelie
1+
# Katapult
22

3-
Wheelie is a kickstart framework for Rails applications. It makes starting
3+
<img src="katapult.png" width="200px" align="right" />
4+
5+
6+
`Katapult` is a kickstart framework for Rails applications. It makes starting
47
Rails applications a bliss.
58

6-
Wheelie will always support current Versions of Ruby and Rails, at the moment
7-
it's Rails 4.1 and Ruby 2.1.
9+
`Katapult` will always support current versions of Ruby and Rails, at the
10+
moment it's Rails 4.1 and Ruby 2.1.
811

912
## Installation
1013

11-
As Wheelie is designed to *start* Rails applications, it works best with a
14+
As `katapult` is designed to *start* Rails applications, it works best with a
1215
clean new Rails app. To create one, run
1316

14-
rails new choose_your_name
17+
katapult target MY_APPLICATION_NAME
18+
19+
This will add the `katapult` gem to the Gemfile and then integrate `katapult`
20+
by running
1521

16-
Add `gem 'wheelie'` to the Gemfile, `bundle` and then run
22+
rails generate katapult:install
23+
rails generate katapult:basics
1724

18-
rails generate wheelie:install
1925

20-
This will create `lib/wheelie/application_model.rb` where you will draft your
21-
application.
26+
It will install application basics, such as a `database.yml`, basics styles as
27+
well as RSpec and Cucumber and prepare `lib/katapult/application_model.rb`
28+
where you will draft your application.
2229

2330

2431
## Usage
2532

26-
After installation, you'll find a file `lib/wheelie/application_model.rb` where
27-
you will define the fundamentals of your application. Inside this file, you'll
28-
use Wheelie's simple DSL (domain specific language) to express yourself.
33+
After installation, you'll find a file `lib/katapult/application_model.rb` where
34+
you will define the properties of your application. Inside this file, you'll
35+
use `katapult`'s simple DSL (domain specific language) to express yourself.
2936

30-
Wheelie brings several basic elements: Model, Attribute, WUI (which stands for
31-
*Web User Interface*) and Action. Each Wheelie element has the same syntax,
32-
taking a name, options and a block:
37+
The DSL consists of elements: Model, Attribute, WUI (which stands for *Web User
38+
Interface*), Action, and more. Each `katapult` element has the same syntax,
39+
taking a name, options, and a block:
3340

34-
element 'name', options: 'go here' do |element|
35-
element.method
41+
element_type 'name', options: 'example' do |element|
42+
element.some_method
3643
end
3744

3845

@@ -48,7 +55,7 @@ Takes a name and a block:
4855
Defined on Model. Takes a name and options:
4956

5057
model.attr :email
51-
model.attr :age, type: :integer
58+
model.attr :age, type: :integer, assignable_values: 18..99
5259
model.attr :income, type: :money
5360
model.attr :homepage, type: :url, default: 'http://www.makandra.de'
5461
model.attr :locked, type: :flag, default: false
@@ -67,28 +74,41 @@ Defined on WUI. Takes a name and options:
6774

6875
wui.action :index
6976
wui.action :show
70-
wui.action :create
71-
wui.action :update
77+
wui.action :create # also creates :new
78+
wui.action :update # also creates :edit
7279
wui.action :destroy
80+
wui.crud # creates all the standard rails actions above
7381
wui.action :custom_action, method: :post, scope: :member
7482
wui.action :other_action, method: :get, scope: :collection
7583

7684

85+
### Navigation
86+
Takes a name, will generate a navigation with links to the index pages of all
87+
WUIs.
88+
89+
navigation :main
90+
91+
7792
## Contributing
7893

79-
<!-- 1. Fork it ( http://github.com/<my-github-username>/wheelie/fork )
94+
<!-- 1. Fork it ( http://github.com/<my-github-username>/katapult/fork )
8095
2. Create your feature branch (`git checkout -b my-new-feature`)
8196
3. Commit your changes (`git commit -am 'Add some feature'`)
8297
4. Push to the branch (`git push origin my-new-feature`)
8398
5. Create new Pull Request -->
8499

85-
Wheelie caches a pristine Rails application inside its `tmp/` directory to speed up testing. Keep this in mind, as it may lead to issues when switching Ruby versions or installing a new version of the Rails gem.
100+
`Katapult` caches a pristine Rails application inside its `tmp/` directory to
101+
speed up test runs. Keep this in mind, as it may lead to caching issues when
102+
switching Ruby versions or installing a new version of the Rails gem.
86103

87-
Since Wheelie has full-stack integration tests, it requires a MySQL account. Create a dedicated account by running this command in a MySQL console (as-is):
104+
Since `katapult` has full-stack integration tests, it requires a MySQL account.
105+
Create a dedicated account on your MySQL server by running this command in a
106+
MySQL console (as-is):
88107

89-
GRANT ALL ON *.* TO 'wheelie'@'localhost' IDENTIFIED BY 'secret';
108+
GRANT ALL ON *.* TO 'katapult'@'localhost' IDENTIFIED BY 'secret';
90109

91-
The user `wheelie` is hereby granted any action (SELECT, UPDATE, etc. except for granting privileges) on any database and table (`*.*`).
110+
The user `katapult` is hereby granted any action (SELECT, UPDATE, etc. except
111+
for granting privileges) on any database and table (`*.*`).
92112

93113

94114
## Credits

bin/katapult

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/usr/bin/env ruby
2+
3+
case (command = ARGV.shift)
4+
when 'target'
5+
app_name = ARGV.shift
6+
7+
puts 'Creating new Rails application ...'
8+
system "rails new #{app_name} --skip-test-unit --skip-bundle --database mysql"
9+
Dir.chdir app_name
10+
11+
puts
12+
puts 'Installing katapult ...'
13+
File.open('Gemfile', 'a') do |file|
14+
file.puts "gem 'katapult'#{ ENV['KATAPULT_GEMFILE_OPTIONS'] }"
15+
end
16+
system 'bundle install'
17+
system 'bundle exec rails generate katapult:install'
18+
19+
puts
20+
puts 'Generating katapult basics ...'
21+
system 'bundle exec rails generate katapult:basics'
22+
23+
puts
24+
puts 'Done.'
25+
26+
when 'fire'
27+
app_model_path = 'lib/katapult/application_model.rb'
28+
29+
puts 'Loading katapult ...'
30+
system 'bin/rails generate katapult:render ' + app_model_path
31+
32+
else
33+
puts 'Usage: katapult [target APP_NAME | fire]'
34+
end

bin/wheelie

-34
This file was deleted.

features/binary.feature

+17-13
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,39 @@
1-
Feature: Wheelie binary `wheelie`
1+
Feature: Katapult binary `katapult`
22

33
Scenario: Start new Rails application
44
Given The default aruba timeout is 120 seconds
55

6-
When I successfully run `wheelie target binary_test`
7-
And I cd to "binary_test"
6+
When I successfully run `katapult target binary_test`
7+
Then the output should contain "Creating new Rails application"
8+
And the output should contain "Installing katapult"
9+
And the output should contain "Generating katapult basics"
10+
And the output should contain "Done."
811

9-
Then a file named "lib/wheelie/application_model.rb" should exist
12+
When I cd to "binary_test"
13+
Then a file named "lib/katapult/application_model.rb" should exist
1014
And a file named "config/database.yml" should exist
11-
And the file "Gemfile" should contain "gem 'wheelie'"
15+
And the file "Gemfile" should contain "gem 'katapult'"
1216

1317
When I run `bundle check`
1418
Then the output should contain "The Gemfile's dependencies are satisfied"
1519

1620

1721
Scenario: Forget to pass application name
18-
When I run `wheelie target # without app name`
22+
When I run `katapult target # without app name`
1923
Then the output should contain "No value provided for required arguments 'app_path'"
2024

2125

2226
Scenario: Run without arguments
23-
When I run `wheelie # without arguments`
24-
Then the output should contain "Usage: wheelie [target APP_NAME | fire]"
27+
When I run `katapult # without arguments`
28+
Then the output should contain "Usage: katapult [target APP_NAME | fire]"
2529

2630

2731
Scenario: Render the application model
2832
Given a pristine Rails application
29-
And I install wheelie
30-
And I generate wheelie basics
33+
And I install katapult
34+
And I generate katapult basics
3135

32-
When I run `wheelie fire`
36+
When I run `katapult fire`
3337
Then the output should contain "Loading katapult"
34-
And the output should contain "parse lib/wheelie/application_model"
35-
And the output should contain "render into wheelie_test_app"
38+
And the output should contain "parse lib/katapult/application_model"
39+
And the output should contain "render into katapult_test_app"

features/configuration.feature

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
Feature: Configure Wheelie
1+
Feature: Configure katapult
22

33
Background:
44
Given a pristine Rails application
5-
And I install wheelie
6-
And I generate wheelie basics
5+
And I install katapult
6+
And I generate katapult basics
77

88

99
Scenario: Custom model template
10-
When I overwrite "lib/wheelie/application_model.rb" with:
10+
When I overwrite "lib/katapult/application_model.rb" with:
1111
"""
1212
model 'Car'
1313
"""
14-
And a file named "lib/templates/wheelie/model/model.rb" with:
14+
And a file named "lib/templates/katapult/model/model.rb" with:
1515
"""
1616
# custom model template for <%= class_name %>
1717

features/wheelie.feature features/katapult.feature

+15-12
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
Feature: Wheelie in general
1+
Feature: Katapult in general
22

33
Background:
44
Given a pristine Rails application
55

66

7-
Scenario: Install Wheelie
8-
When I install wheelie
9-
Then the file "lib/wheelie/application_model.rb" should contain exactly:
7+
Scenario: Install katapult
8+
When I install katapult
9+
Then the file "lib/katapult/application_model.rb" should contain exactly:
1010
"""
1111
# Here you define the fundamentals of your application.
1212
#
@@ -23,13 +23,16 @@ Feature: Wheelie in general
2323
# wui.action :show
2424
# wui.action :lock, scope: :member, method: :post
2525
# end
26+
#
27+
# Add navigation
28+
# navigation :main
2629
2730
"""
2831

2932

3033
Scenario: Generate basic files and settings
31-
Given I install wheelie
32-
When I generate wheelie basics
34+
Given I install katapult
35+
When I generate katapult basics
3336
Then the file "Gemfile" should contain exactly:
3437
"""
3538
source 'https://rubygems.org'
@@ -40,7 +43,7 @@ Feature: Wheelie in general
4043
gem 'jquery-rails'
4144
gem 'jbuilder', '~> 2.0'
4245
gem 'spring', group: :development
43-
gem 'wheelie', path: '../../..'
46+
gem 'katapult', path: '../../..'
4447
4548
# engines
4649
gem 'haml-rails'
@@ -121,16 +124,16 @@ Feature: Wheelie in general
121124
common: &common
122125
adapter: mysql2
123126
encoding: utf8
124-
username: wheelie
127+
username: katapult
125128
password: secret
126129
127130
development:
128131
<<: *common
129-
database: wheelie_test_app_development
132+
database: katapult_test_app_development
130133
131134
test: &test
132135
<<: *common
133-
database: wheelie_test_app_test<%= ENV['TEST_ENV_NUMBER'] %>
136+
database: katapult_test_app_test<%= ENV['TEST_ENV_NUMBER'] %>
134137
135138
cucumber:
136139
<<: *test
@@ -145,11 +148,11 @@ Feature: Wheelie in general
145148
146149
development:
147150
<<: *common
148-
database: wheelie_test_app_development
151+
database: katapult_test_app_development
149152
150153
test: &test
151154
<<: *common
152-
database: wheelie_test_app_test<%= ENV['TEST_ENV_NUMBER'] %>
155+
database: katapult_test_app_test<%= ENV['TEST_ENV_NUMBER'] %>
153156
154157
cucumber:
155158
<<: *test

0 commit comments

Comments
 (0)